/* Performance-lite layer: keeps restrained Liquid Glass while avoiding broad, heavy blur. */

/* 1. Remove background effects */
#particles-canvas, #snow-canvas, .hero-particles,
.home-3d-backdrop { display: none !important; }
body::after { content: none !important; display: none !important; }

/* 2. Backdrop blur is the biggest source of lag: disable everywhere */
*, *::before, *::after {
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}
/* ...except the top bar, which gets Liquid Glass below */

/* 3. Stop endless decorative animations outside banner + watermark */
.header-bar, .nav-tier-promax .nav-center-pill,
.user-profile-card-v2::before, .sidebar::before,
.profile-avatar-ring, .verified-badge { animation: none !important; }

/* 4. Light 3D: CuTools watermark gets depth using transforms only */
.bg-brand { perspective: 700px; contain: layout paint; }
.bg-brand span {
  text-shadow: none !important;
  will-change: transform;
  animation: bgBrandTilt 7s ease-in-out infinite !important;
  animation-delay: calc(var(--i) * -.6s) !important;
}
@keyframes bgBrandTilt {
  0%, 100% { transform: translate3d(0, -8px, 0) rotateY(-14deg); }
  50%      { transform: translate3d(0, 8px, 0) rotateY(14deg); }
}

/* 5. Light 3D: soft tilt + lift on hover for cards and buttons (desktop only) */
@media (hover: hover) and (pointer: fine) {
  .game-card, .banner-slide-btn, .btn, button.btn-primary {
    transition: transform .25s ease, box-shadow .25s ease;
    will-change: transform;
  }
  .game-card:hover {
    transform: perspective(900px) rotateX(2deg) rotateY(-2deg) translateY(-4px) !important;
  }
  .banner-slide-btn:hover, .btn:hover { transform: translateY(-2px) scale(1.03); }
}

/* 6. Respect low-power / reduced-motion users */
@media (prefers-reduced-motion: reduce) {
  .bg-brand span { animation: none !important; }
}

/* 7. Remove scrolling ticker under the top bar */
.header-ticker { display: none !important; }
:root { --ticker-h: 0px !important; }

/* 8. Light starfield: static dots on one fixed layer, only opacity twinkles */
body::before {
  content: '' !important;
  position: fixed !important; inset: 0 !important;
  z-index: 0 !important; pointer-events: none !important;
  background-image:
    radial-gradient(2.2px 2.2px at 40px 60px,  rgba(255,255,255,1) 50%, transparent 52%),
    radial-gradient(1.6px 1.6px at 130px 150px,    rgba(160,210,255,.8)  50%, transparent 52%),
    radial-gradient(2.2px 2.2px at 210px 40px, rgba(200,170,255,.75) 50%, transparent 52%),
    radial-gradient(1.6px 1.6px at 270px 210px,    rgba(255,255,255,.7)  50%, transparent 52%),
    radial-gradient(1.6px 1.6px at 80px 240px,     rgba(140,220,255,.7)  50%, transparent 52%) !important;
  background-size: 310px 290px, 370px 330px, 430px 360px, 250px 310px, 340px 270px !important;
  background-repeat: repeat !important;
  opacity: .9;
  animation: starTwinkle 6s ease-in-out infinite !important;
}
@keyframes starTwinkle { 0%,100% { opacity: .55; } 50% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { body::before { animation: none !important; } }

/* 9. Liquid Glass top bar */
.header-bar {
  background:
    linear-gradient(180deg, rgba(255,255,255,.16) 0%, rgba(255,255,255,.04) 45%, rgba(255,255,255,.08) 100%),
    rgba(14, 22, 44, .38) !important;
  -webkit-backdrop-filter: blur(18px) saturate(180%) !important;
  backdrop-filter: blur(18px) saturate(180%) !important;
  border-bottom: 1px solid rgba(255,255,255,.22) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.45),
    inset 0 -1px 0 rgba(255,255,255,.08),
    0 8px 28px rgba(0,0,0,.35) !important;
  overflow: hidden;
}
.header-bar::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(105deg, transparent 20%, rgba(255,255,255,.14) 45%, transparent 60%);
}
.header-bar .icon-btn, .header-bar .topbar-menu-button {
  background: rgba(255,255,255,.1) !important;
  border: 1px solid rgba(255,255,255,.28) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.4), 0 2px 8px rgba(0,0,0,.25) !important;
}

/* 10. Floating pill top bar (matches the bottom bar) */
.header-bar {
  top: max(10px, env(safe-area-inset-top)) !important;
  left: 12px !important; right: 12px !important;
  max-width: 1240px; margin: 0 auto !important;
  border-radius: 999px !important;
  border: 1px solid rgba(255,255,255,.28) !important;
  border-top-color: rgba(255,255,255,.5) !important;
  padding: 0 10px !important;
}
.header-bar::after { display: none !important; }
.main-container { padding-top: calc(var(--topbar-h) + 26px) !important; }
@media (min-width: 1025px) {
  .sidebar { top: calc(var(--topbar-h) + 22px) !important; height: calc(100vh - var(--topbar-h) - 22px) !important; }
}

/* 11. Bottom bar center: no small framed pill, text only */
.bottom-nav .nav-center-pill {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  animation: none !important;
  padding: 0 !important;
  border-radius: 0 !important;
}

/* 12. Top bar layout: true-centered logo, balanced sides, tidy sizing */
.header-bar {
  display: grid !important;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  column-gap: 8px;
  height: 58px !important;
  padding: 0 8px !important;
}
.header-bar .header-left  { justify-self: start; display: flex; align-items: center; gap: 8px; }
.header-bar .header-right { justify-self: end;   display: flex; align-items: center; gap: 8px; }
.header-bar .header-logo  { justify-self: center; display: flex; align-items: center; justify-content: center; }
.header-bar .header-logo-img {
  height: 42px !important; width: auto; max-width: 150px; object-fit: contain;
  filter: drop-shadow(0 2px 8px rgba(60,140,255,.45));
}
.header-bar .icon-btn, .header-bar .topbar-menu-button {
  width: 42px; height: 42px; border-radius: 50% !important;
  display: inline-flex; align-items: center; justify-content: center; padding: 0;
}
.topbar-login-btn {
  display: inline-flex; align-items: center; height: 40px; padding: 0 20px;
  border-radius: 999px; text-decoration: none; color: #fff;
  font-family: var(--font-heading, inherit); font-size: .78rem; font-weight: 800; letter-spacing: 1px; text-transform: uppercase;
  background: linear-gradient(180deg, rgba(255,255,255,.3), rgba(255,255,255,.08));
  border: 1px solid rgba(255,255,255,.4);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.5), 0 3px 10px rgba(0,0,0,.25);
  transition: transform .2s ease;
}
.topbar-login-btn:hover { transform: translateY(-1px); }
.main-container { padding-top: calc(58px + 28px) !important; }
@media (max-width: 1024px) {
  .topbar-login-btn { display: none; }
  .header-bar { left: 10px !important; right: 10px !important; height: 54px !important; }
  .header-bar .header-logo-img { height: 36px !important; }
  .header-bar .icon-btn, .header-bar .topbar-menu-button { width: 38px; height: 38px; }
  .main-container { padding-top: calc(54px + 26px) !important; }
}
.header-bar .header-left  { grid-column: 1; }
.header-bar .header-logo  { grid-column: 2; position: static !important; transform: none !important; }
.header-bar .header-right { grid-column: 3; }
.header-bar .header-logo:hover .header-logo-img { transform: scale(1.04); }

/* 13. Bigger logo */
.header-bar { height: 66px !important; }
.header-bar .header-logo-img { height: 56px !important; max-width: 220px !important; }
.main-container { padding-top: calc(66px + 28px) !important; }
@media (max-width: 1024px) {
  .header-bar { height: 60px !important; }
  .header-bar .header-logo-img { height: 48px !important; max-width: 180px !important; }
  .main-container { padding-top: calc(60px + 26px) !important; }
}

/* 14. Slightly bigger logo, bar size unchanged */
.header-bar .header-logo-img { height: 64px !important; max-width: 260px !important; }
@media (max-width: 1024px) {
  .header-bar .header-logo-img { height: 56px !important; max-width: 210px !important; }
}
.header-bar .header-logo-img { max-height: none !important; }

/* Auto bet: liquid-glass must not wash out each game's own colours (login box, dashboard, modal) */
.bl-inner {
  background: radial-gradient(120% 80% at 50% 0, var(--bg1), var(--bg2) 75%) !important;
  border: 0 !important; box-shadow: none !important;
  -webkit-backdrop-filter: none !important; backdrop-filter: none !important;
}
.bd-card {
  background: radial-gradient(120% 70% at 50% 0, var(--bg1), var(--bg2) 78%) !important;
  border: 2px solid var(--edge2) !important;
  box-shadow: 0 18px 40px rgba(0,0,0,.55), 0 0 0 1px var(--edge1) inset !important;
  -webkit-backdrop-filter: none !important; backdrop-filter: none !important;
}
.bl-field input, .bd-field input {
  background: linear-gradient(180deg, rgba(0,0,0,.55), rgba(0,0,0,.25)) !important;
  border: 1.5px solid var(--edge2) !important; color: #fff !important;
  box-shadow: inset 0 2px 6px rgba(0,0,0,.6) !important;
  -webkit-backdrop-filter: none !important; backdrop-filter: none !important;
}
.bl-field input:focus, .bd-field input:focus { border-color: var(--edge1) !important; }
.bl-btn span, .bd-btn span {
  background: linear-gradient(180deg, var(--btn1), var(--btn2)) !important;
  border: 0 !important; box-shadow: none !important;
  -webkit-backdrop-filter: none !important; backdrop-filter: none !important;
}
.bd-btn-stop span { background: linear-gradient(180deg, #4b5563, #1f2937) !important; }
.bm-ok {
  background: linear-gradient(180deg, var(--bm-btn1, #e6521f), var(--bm-btn2, #6b1c08)) !important;
  border: 0 !important; box-shadow: 0 0 0 2px var(--bm-edge, #d9791a) !important;
}
.bl-field .bl-eye, .bl-cap-refresh {
  background: transparent !important; border: 0 !important; box-shadow: none !important;
  color: var(--accent) !important; text-shadow: none !important;
}
.bl-cap-refresh { background: rgba(0,0,0,.45) !important; border: 1px solid var(--edge2) !important; color: #fff !important; }
.bl-field i, .bl-field i svg { color: var(--accent) !important; }

/* Bottom bar: same glass as the top bar, buttons tinted lightly */
.bottom-nav {
  background: linear-gradient(180deg, rgba(255,255,255,.12), rgba(255,255,255,.04)) !important;
  border: 1px solid rgba(255,255,255,.28) !important;
  border-top-color: rgba(255,255,255,.5) !important;
  box-shadow: inset 0 -1px 0 rgba(255,255,255,.1), 0 6px 24px rgba(0,0,0,.25) !important;
}
.bottom-nav .nav-item, .bottom-nav .nav-center {
  border: 1px solid rgba(255,255,255,.26) !important;
  border-top-color: rgba(255,255,255,.45) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.3), 0 3px 10px rgba(0,0,0,.18) !important;
}
.bottom-nav .nav-register { background: linear-gradient(180deg, rgba(150,92,240,.42), rgba(76,40,150,.22)) !important; }
.bottom-nav .nav-support  { background: linear-gradient(180deg, rgba(36,190,136,.42), rgba(10,90,70,.22)) !important; }
.bottom-nav .nav-login    { background: linear-gradient(180deg, rgba(56,140,255,.42), rgba(24,70,170,.22)) !important; }
.bottom-nav .nav-deposit  { background: linear-gradient(180deg, rgba(245,180,40,.42), rgba(170,100,10,.22)) !important; }
.bottom-nav .nav-package  { background: linear-gradient(180deg, rgba(100,120,245,.42), rgba(52,56,170,.22)) !important; }

/* Recharge page: each frame gets its own tint, same structure so they read as one set */
.dep-header, .dep-launcher-card, .dep-tips {
  border-radius: 20px !important;
  border: 1.5px solid var(--dp-edge) !important;
  background: radial-gradient(120% 90% at 50% 0, var(--dp-bg1), var(--dp-bg2) 80%) !important;
  box-shadow: 0 10px 28px rgba(0,0,0,.4), 0 0 22px var(--dp-glow), inset 0 1px 0 rgba(255,255,255,.14) !important;
  -webkit-backdrop-filter: none !important; backdrop-filter: none !important;
}
.dep-header { --dp-edge: rgba(251,191,36,.55); --dp-bg1: rgba(120,72,6,.55); --dp-bg2: rgba(26,15,3,.9); --dp-glow: rgba(251,191,36,.14); }
.dep-launcher-card { --dp-edge: rgba(96,165,250,.6); --dp-bg1: rgba(20,60,140,.6); --dp-bg2: rgba(5,12,34,.92); --dp-glow: rgba(96,165,250,.16); }
.dep-tips { --dp-edge: rgba(52,211,153,.5); --dp-bg1: rgba(8,84,62,.5); --dp-bg2: rgba(3,22,17,.9); --dp-glow: rgba(52,211,153,.12); overflow: hidden; }
.dep-tips .dep-section-header { background: rgba(52,211,153,.1) !important; border-bottom: 1px solid rgba(52,211,153,.25) !important; }
.dep-tips .dep-section-title { color: #6ee7b7; }
.dep-tips .dep-tip-item { border-bottom-color: rgba(52,211,153,.12) !important; }
.dep-header .dep-rates-label { color: #fcd34d; }
.dep-launcher-title { color: #bfdbfe; }
.dep-balance-showcase { background: linear-gradient(135deg, rgba(251,191,36,.18), rgba(120,72,6,.25)) !important; border-color: rgba(251,191,36,.4) !important; }

/* Bottom bar: no small frame behind "HỖ TRỢ" */
.bottom-nav .nav-center .nav-center-pill,
.bottom-nav .nav-support .nav-center-pill {
  background: transparent !important; border: 0 !important; box-shadow: none !important;
  padding: 0 !important; border-radius: 0 !important;
}

/* Support page: single Telegram card + coloured frames like the recharge page */
.support-channels-single { grid-template-columns: 1fr !important; }
.support-channel-card {
  border-radius: 20px !important; flex-direction: row; gap: 14px; padding: 16px 18px !important;
  border: 1.5px solid rgba(96,165,250,.6) !important;
  background: radial-gradient(120% 90% at 50% 0, rgba(20,80,150,.55), rgba(5,14,34,.92) 80%) !important;
  box-shadow: 0 10px 28px rgba(0,0,0,.4), 0 0 22px rgba(41,168,219,.16), inset 0 1px 0 rgba(255,255,255,.14) !important;
}
.support-ticket-box {
  border-radius: 20px !important; overflow: hidden;
  border: 1.5px solid rgba(251,191,36,.5) !important;
  background: radial-gradient(120% 60% at 50% 0, rgba(120,72,6,.45), rgba(26,15,3,.9) 70%) !important;
  box-shadow: 0 10px 28px rgba(0,0,0,.4), 0 0 22px rgba(251,191,36,.12), inset 0 1px 0 rgba(255,255,255,.12) !important;
}
.support-ticket-header { background: rgba(251,191,36,.1) !important; border-bottom: 1px solid rgba(251,191,36,.25) !important; }
.support-ticket-title { color: #fcd34d; }
.support-ticket-select, .support-ticket-textarea, .support-ticket-box .input-field {
  background: rgba(0,0,0,.4) !important; border: 1.5px solid rgba(251,191,36,.35) !important; color: #fff !important; border-radius: 12px !important;
}
.support-contact-row { display: flex; gap: 8px; }
.support-ticket-box .btn-primary { background: linear-gradient(180deg, #fbbf24, #b45309) !important; color: #1a0f03 !important; border: 0 !important; border-radius: 999px !important; }

/* History + profile pages: same coloured-frame style as recharge/support */
.page-header-enhanced, .empty-state-enhanced, .profile-hero-v5.profile-tier-none, .profile-info-section {
  border-radius: 20px !important;
  border: 1.5px solid var(--pf-edge) !important;
  background: radial-gradient(120% 90% at 50% 0, var(--pf-bg1), var(--pf-bg2) 80%) !important;
  box-shadow: 0 10px 28px rgba(0,0,0,.4), 0 0 22px var(--pf-glow), inset 0 1px 0 rgba(255,255,255,.14) !important;
}
.page-header-enhanced { --pf-edge: rgba(167,139,250,.6); --pf-bg1: rgba(70,40,150,.6); --pf-bg2: rgba(14,8,34,.92); --pf-glow: rgba(167,139,250,.16); }
.empty-state-enhanced { --pf-edge: rgba(96,165,250,.55); --pf-bg1: rgba(20,60,140,.5); --pf-bg2: rgba(5,12,34,.92); --pf-glow: rgba(96,165,250,.14); }
.profile-hero-v5.profile-tier-none { --pf-edge: rgba(96,165,250,.6); --pf-bg1: rgba(20,60,140,.6); --pf-bg2: rgba(5,12,34,.92); --pf-glow: rgba(96,165,250,.16); }
.profile-info-section { --pf-edge: rgba(52,211,153,.5); --pf-bg1: rgba(8,84,62,.5); --pf-bg2: rgba(3,22,17,.9); --pf-glow: rgba(52,211,153,.12); }
.profile-info-section.profile-no-key-section { --pf-edge: rgba(251,191,36,.5); --pf-bg1: rgba(120,72,6,.45); --pf-bg2: rgba(26,15,3,.9); --pf-glow: rgba(251,191,36,.12); }
.profile-info-section:not(.profile-no-key-section) .profile-info-title { color: #6ee7b7; }
.profile-no-key-section .phv5-nokey-icon { color: #fbbf24; }

/* Login / register modal: one colour scheme (blue frame, gold action) matching the other pages */
.auth-modal-card {
  border: 1.5px solid rgba(96,165,250,.65) !important;
  background: radial-gradient(120% 70% at 50% 0, rgba(20,70,160,.65), rgba(5,12,34,.96) 80%) !important;
  box-shadow: 0 24px 60px rgba(0,0,0,.65), 0 0 26px rgba(96,165,250,.2), inset 0 1px 0 rgba(255,255,255,.16) !important;
}
.auth-modal-card .am-tabs { background: rgba(4,12,40,.7) !important; border-bottom: 1px solid rgba(96,165,250,.3) !important; }
.auth-modal-card .am-tab { color: #8fb0e6 !important; }
.auth-modal-card #am-tab-login.active, .auth-modal-card #am-tab-register.active {
  background: linear-gradient(180deg, rgba(96,165,250,.55), rgba(37,99,235,.35)) !important;
  box-shadow: inset 0 1px rgba(255,255,255,.35), inset 0 -3px #fbbf24 !important;
  color: #fff !important; text-shadow: none !important;
}
.auth-modal-card .input-field {
  background: linear-gradient(180deg, rgba(0,0,0,.5), rgba(0,0,0,.25)) !important;
  border: 1.5px solid rgba(96,165,250,.45) !important; color: #fff !important;
}
.auth-modal-card .input-field:focus { border-color: #fbbf24 !important; box-shadow: 0 0 0 3px rgba(251,191,36,.15) !important; }
.auth-modal-card .input-icon { color: #fbbf24 !important; filter: none !important; }
.auth-modal-card .password-toggle { color: #fbbf24 !important; }
.auth-modal-card #am-btn-login, .auth-modal-card #am-btn-register {
  background: linear-gradient(180deg, #fde047, #f59e0b 55%, #c2410c) !important;
  border: 1px solid rgba(255,238,140,.9) !important; color: #2a1403 !important; text-shadow: none !important;
  box-shadow: 0 5px 0 #8a3d07, 0 10px 24px rgba(245,158,11,.3), inset 0 1px rgba(255,255,255,.6) !important;
}
.auth-modal-card .am-footer a { color: #fcd34d !important; }

/* Restrained Liquid Glass: reserve backdrop blur for a few large surfaces.
   Smaller cards keep their translucent fill, edge shine and light inset depth. */
:root { --lg-blur: blur(10px) saturate(1.25); }
.header-bar, .sidebar, .bottom-nav,
.modal-box, .universal-modal-box, .notification-dropdown {
  -webkit-backdrop-filter: blur(8px) saturate(1.2) !important;
  backdrop-filter: blur(8px) saturate(1.2) !important;
}
.sidebar { -webkit-backdrop-filter: blur(6px) saturate(1.15) !important; backdrop-filter: blur(6px) saturate(1.15) !important; }
.header-bar, .sidebar, .bottom-nav {
  border-color: rgba(255,255,255,.22) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.28), 0 5px 18px rgba(0,0,0,.22) !important;
}

/* Keep small, quick feedback; avoid continuous 3D movement and promotion of many layers. */
.bg-brand span { animation: none !important; will-change: auto !important; }
@media (hover: hover) and (pointer: fine) {
  .game-card, .pkg-card, .prediction-card, .card, .btn, .icon-btn, .banner-slide-btn {
    transition: transform .18s ease, border-color .18s ease, filter .18s ease !important;
    will-change: auto !important;
  }
  .game-card:hover, .pkg-card:hover, .prediction-card:hover, .card:hover {
    transform: translateY(-2px) !important;
  }
  .btn:hover, .icon-btn:hover, .banner-slide-btn:hover { transform: translateY(-1px) !important; }
}
.btn:active, button:active, .bottom-nav .nav-item:active { transform: scale(.98) !important; }

@media (prefers-reduced-motion: reduce) {
  .btn, button, .game-card, .pkg-card, .prediction-card, .card, .icon-btn, .banner-slide-btn {
    transition: none !important;
  }
}
