/* =========================================================================
   NEON PURPLE — LAPISAN TEMA GLOBAL
   Menggantikan theme-black-green.css. Dimuat paling akhir di <head> semua
   halaman (setelah CSS halaman & blok <style> lama) supaya menjadi satu
   sumber kebenaran untuk permukaan, tombol, dan aksen.

   Catatan penting:
   - Semua selector diberi prefiks `html:root` sehingga spesifisitasnya lebih
     tinggi daripada blok <style> inline halaman yang memakai !important.
   - Warna STATUS (sukses/gagal/proses) sengaja TIDAK disentuh di sini:
     hijau/kuning/merah tetap dipakai untuk makna status.
   - backdrop-filter hanya dipakai di panel besar (jumlahnya sedikit) supaya
     tidak membebani HP kelas bawah.
   ========================================================================= */

/* ---------------------------------------------------- Shell / latar halaman */
html:root .app{
  background:linear-gradient(180deg,rgba(var(--bg-1-rgb),.72),rgba(var(--bg-0-rgb),.86) 55%,rgba(var(--bg-0-rgb),.92)) !important;
  border-color:var(--line) !important;
}
html:root .slots-page,
html:root .register-page,
html:root .login-page,
html:root .promo-page,
html:root .dash,
html:root .category-page,
html:root .page-wrap,
html:root .content-wrap,
html:root .content-wrapper,
html:root .page-wrapper,
html:root .site-content,
html:root .home-wrapper,
html:root .main-wrapper,
html:root .main-content,
html:root .page-content,
html:root .backdrop,
html:root .home-content,
html:root .container-fluid,
html:root .section-wrap{
  background:transparent !important;
  background-color:transparent !important;
}

/* ---------------------------------------------------------------- Header */
html:root .header,
html:root .slots-header,
html:root .register-head,
html:root .side-head,
html:root .top-bar,
html:root nav.navbar{
  background:rgba(var(--bg-1-rgb),.86) !important;
  border-color:var(--line) !important;
  backdrop-filter:blur(10px) saturate(140%);
  -webkit-backdrop-filter:blur(10px) saturate(140%);
}
html:root .bottom{
  background:rgba(var(--bg-0-rgb),.94) !important;
  border-color:var(--line) !important;
  backdrop-filter:blur(10px) saturate(140%);
  -webkit-backdrop-filter:blur(10px) saturate(140%);
}
html:root .bottom .active,
html:root .logo{
  color:var(--brand-2) !important;
}

/* --------------------------------------------------- Panel / kartu (kaca) */
html:root .simple-card,
html:root .promo-card,
html:root .register-card,
html:root .login-card,
html:root .balance,
html:root .provider,
html:root .provider-brand,
html:root .game-card,
html:root .home-benefit,
html:root .provider-item,
html:root .bank-online-card,
html:root .dash-action,
html:root .toto,
html:root .error-state,
html:root .empty-state,
html:root .loading-card,
html:root .hero-card,
html:root .side-promo-card,
html:root .side-service{
  background:var(--surface-2) !important;
  border:1px solid var(--line) !important;
  border-radius:var(--r-lg);
  box-shadow:var(--sh-md),var(--inset-hi);
}
/* Banner hero memakai gambar penuh: border 0 agar rasio gambar tidak berubah */
html:root .hero-card{border:0!important}
/* Blur hanya pada kartu besar yang berdiri sendiri */
html:root .balance,
html:root .login-card,
html:root .register-card,
html:root #loginModal .login-modal-box,
html:root .account-sheet,
html:root .side-menu{
  backdrop-filter:blur(12px) saturate(150%);
  -webkit-backdrop-filter:blur(12px) saturate(150%);
}

/* --------------------------------------------------- Tombol aksi utama */
html:root .register,
html:root .register-submit,
html:root .hero-btn,
html:root .head-login,
html:root .guest-login-primary,
html:root .login-modal-submit,
html:root .submit,
html:root .am-save,
html:root .play-btn,
html:root .side-auth .side-register{
  /* Stop terang sengaja var(--cta-from) (bukan var(--brand)) supaya teks putih lulus WCAG. */
  background:linear-gradient(135deg,var(--cta-from),var(--brand-deep)) !important;
  border-color:var(--brand-2) !important;
  color:var(--on-brand) !important;
  box-shadow:0 8px 22px rgba(var(--brand-3-rgb),.34),var(--glow) !important;
  border-radius:var(--r-md) !important;
}
html:root .register:hover,
html:root .register-submit:hover,
html:root .hero-btn:hover,
html:root .guest-login-primary:hover,
html:root .login-modal-submit:hover,
html:root .submit:hover,
html:root .am-save:hover,
html:root .play-btn:hover{
  filter:brightness(1.06);
  box-shadow:0 10px 26px rgba(var(--brand-3-rgb),.42),var(--glow-strong) !important;
  transform:translateY(-1px);
}
html:root .register:active,
html:root .register-submit:active,
html:root .hero-btn:active,
html:root .submit:active,
html:root .play-btn:active,
html:root .side-wallet-btn:active,
html:root .am-wallet a:active{
  transform:translateY(1px) scale(.995);
}

/* Aksi sekunder — dua tone supaya tidak monoton dan tetap lulus kontras:
   Penarikan = magenta terang + teks gelap (≈11:1), Deposit = ungu dalam + teks putih (≈5.4:1). */
html:root .side-wallet-btn.withdraw,
html:root .am-wallet .w1{
  background:linear-gradient(145deg,var(--accent-soft),var(--accent)) !important;
  border-color:rgba(var(--accent-soft-rgb),.60) !important;
  color:var(--ink) !important;
  box-shadow:0 6px 18px rgba(var(--accent-rgb),.28),0 0 16px rgba(var(--accent-rgb),.22) !important;
}
html:root .side-wallet-btn.deposit,
html:root .am-wallet .w2{
  background:linear-gradient(145deg,var(--cta-from),var(--brand-deep)) !important;
  border-color:rgba(var(--brand-2-rgb),.55) !important;
  color:var(--on-brand) !important;
  box-shadow:0 6px 18px rgba(var(--brand-deep-rgb),.34),0 0 16px rgba(var(--brand-rgb),.26) !important;
}
html:root .side-wallet-btn .wallet-icon,
html:root .am-wallet .wallet-action-icon{
  background:rgba(255,255,255,.14) !important;
  color:var(--on-brand) !important;
}
html:root .side-wallet-btn.withdraw .wallet-icon,
html:root .am-wallet .w1 .wallet-action-icon{
  background:rgba(var(--ink-rgb),.14) !important;
  color:var(--ink) !important;
}

/* Tombol ikon / sekunder */
html:root .login,
html:root .back-btn,
html:root .icon-btn,
html:root .search-btn,
html:root .more,
html:root .guest-login-secondary,
html:root .login-modal-close,
html:root .am-menu-btn,
html:root .am-subclose{
  background:rgba(var(--bg-2-rgb),.92) !important;
  border:1px solid var(--line-mid) !important;
  color:var(--text-soft) !important;
  border-radius:var(--r-md);
}
html:root .icon-btn:hover,
html:root .search-btn:hover,
html:root .more:hover,
html:root .login:hover{
  border-color:var(--line-strong) !important;
  box-shadow:var(--glow);
}

/* ------------------------------------------------------------ Form input */
html:root .field input,
html:root .field textarea,
html:root .form-control,
html:root .search-box input,
html:root .login-modal-field input{
  background:rgba(var(--bg-0-rgb),.86) !important;
  border:1px solid var(--line-mid) !important;
  color:var(--text) !important;
  border-radius:var(--r-md);
}
html:root .field input:focus,
html:root .field textarea:focus,
html:root .form-control:focus,
html:root .search-box:focus-within,
html:root .login-modal-field input:focus{
  border-color:var(--brand-2) !important;
  box-shadow:0 0 0 3px rgba(var(--brand-rgb),.16) !important;
  outline:none;
}
html:root .field input::placeholder{color:var(--muted-dim)}

/* ------------------------------------------ Tab, provider, kartu game aktif */
html:root .cat.active,
html:root .cat:active,
html:root .provider.active,
html:root .provider-brand.active,
html:root .category-provider.active,
html:root .game-card:active,
html:root .game:hover,
html:root .games-grid .game-card:hover{
  border-color:var(--brand-2) !important;
  box-shadow:0 0 0 1px rgba(var(--brand-2-rgb),.22),0 10px 26px rgba(0,0,0,.34),var(--glow) !important;
}
html:root .cat.active,
html:root .category-provider.active,
html:root .provider.active,
html:root .provider-brand.active{
  background:linear-gradient(180deg,rgba(var(--surface-3-rgb),.92),rgba(var(--bg-1-rgb),.94)) !important;
}
html:root .cat.active .cat-art,
html:root .provider-brand.active .provider-logo{
  border-color:var(--brand-2) !important;
}
html:root .game-img{
  background:linear-gradient(145deg,var(--bg-3),var(--bg-1) 60%,var(--bg-2)) !important;
}
html:root .game-img img{transition:transform .35s ease}
html:root .game-card:hover .game-img img{transform:scale(1.04)}

/* --------------------------------------------------- Aksen teks & indikator */
html:root .section-head h2,
html:root .section-title,
html:root .eyebrow,
html:root .home-stat strong,
html:root .home-contact>a,
html:root .register-login a,
html:root .links a,
html:root .provider-item:hover,
html:root .side-link:hover,
html:root .side-link.active,
html:root .side-tab.active,
html:root .game-meta,
html:root .hero-kicker,
html:root .hero-subtitle,
html:root .provider.active,
html:root .provider-brand.active,
html:root .brand .fallback,
html:root .promo-mark,
html:root .latest-game-badge,
html:root .game-badge,
html:root .guest-login-icon,
html:root #loginModal .login-modal-foot a,
html:root .am-arrow,
html:root .am-vip-detail{
  color:var(--brand-2) !important;
}
html:root .dot,
html:root .section-head h2:after,
html:root .hero-dots i.active,
html:root .bank-online-dot{
  background:var(--brand) !important;
  box-shadow:0 0 10px rgba(var(--brand-rgb),.65) !important;
}
html:root .promo-card:before,
html:root .promo-mark{
  background:linear-gradient(135deg,var(--cta-from),var(--brand-deep)) !important;
  color:var(--on-brand) !important;
}
html:root .hero-orb{
  background:radial-gradient(circle at 38% 35%,var(--accent-soft) 0,var(--brand) 30%,var(--brand-dark) 58%,transparent 72%) !important;
}

/* -------------------------------------------------------------- Popup/modal */
html:root #loginModal.login-modal-backdrop,
html:root .guest-login-backdrop,
html:root .sidebar-overlay,
html:root .account-overlay,
html:root .am-suboverlay{
  background:rgba(4,1,10,.80) !important;
  backdrop-filter:blur(8px);
  -webkit-backdrop-filter:blur(8px);
}
html:root #loginModal .login-modal-box,
html:root .guest-login-box,
html:root .account-sheet,
html:root .am-subsheet,
html:root .login-modal-box{
  background:var(--surface) !important;
  border:1px solid var(--line-mid) !important;
  border-radius:var(--r-xl) !important;
  box-shadow:var(--sh-lg),var(--glow);
}
html:root #loginModal .login-modal-icon,
html:root .guest-login-icon{
  background:rgba(var(--brand-rgb),.12) !important;
  border-color:rgba(var(--brand-rgb),.26) !important;
  color:var(--brand-2) !important;
  border-radius:var(--r-pill);
}
html:root #loginModal .login-modal-title,
html:root #loginModal .login-modal-field label,
html:root .guest-login-title,
html:root .am-subhead h3{
  color:var(--text) !important;
  font-family:var(--font-display);
}
html:root #loginModal .login-modal-field input{
  background:rgba(var(--bg-0-rgb),.90) !important;
  border-color:var(--line-mid) !important;
  color:var(--text) !important;
}

/* ----------------------------------------------------------------- Sidebar */
html:root .side-menu{
  background:linear-gradient(180deg,rgba(var(--bg-2-rgb),.96),rgba(var(--bg-0-rgb),.98)) !important;
  border-left:1px solid var(--line-mid) !important;
  box-shadow:-18px 0 50px rgba(0,0,0,.55);
}
html:root .side-profile-card{
  background:linear-gradient(155deg,rgba(var(--surface-3-rgb),.86),rgba(var(--bg-1-rgb),.92)) !important;
  border:1px solid var(--line-mid) !important;
  border-radius:var(--r-lg);
}
html:root .side-feature-icon,
html:root .feature-icon{
  background:linear-gradient(145deg,rgba(var(--brand-dark-rgb),.92),rgba(var(--surface-2-rgb),.95)) !important;
  border:1px solid var(--line-mid) !important;
  border-radius:var(--r-md);
  box-shadow:var(--sh-sm);
}
html:root .side-feature:hover .feature-icon{border-color:var(--brand-2) !important}
html:root .side-socials a,
html:root .side-share{
  background:rgba(var(--surface-2-rgb),.85) !important;
  border-color:var(--line-mid) !important;
}
html:root .side-socials a:hover{
  border-color:var(--brand-2) !important;
  color:var(--brand-2) !important;
  box-shadow:var(--glow);
}
html:root .language-grid button{
  border:1px solid var(--line-mid) !important;
  background:rgba(var(--bg-2-rgb),.85) !important;
  color:var(--text-soft) !important;
  border-radius:var(--r-md);
}
html:root .side-avatar{
  background:linear-gradient(145deg,var(--brand),var(--brand-dark)) !important;
  border-color:var(--line-strong) !important;
}

/* ------------------------------------------------------------------- Slots */
html:root .game-badge{
  background:rgba(var(--bg-0-rgb),.92) !important;
  border-color:rgba(var(--brand-2-rgb),.44) !important;
  color:var(--brand-2) !important;
  border-radius:var(--r-pill);
}
html:root .provider-slot88,
html:root .games-marquee .game-provider{
  background:rgba(var(--bg-2-rgb),.80) !important;
  border-color:var(--line-mid) !important;
}

/* --------------------------------------------------- Skeleton loading (ungu) */
html:root .loading-card{
  background:var(--surface-2) !important;
  border:1px solid var(--line) !important;
}
html:root .loading-card span{
  background:linear-gradient(90deg,rgba(var(--brand-rgb),.10),rgba(var(--accent-rgb),.28),rgba(var(--brand-rgb),.10)) !important;
  background-size:200% 100% !important;
  animation:cxf-neon-shimmer 1.4s linear infinite;
  border-radius:var(--r-sm);
}
@keyframes cxf-neon-shimmer{
  0%{background-position:200% 0}
  100%{background-position:-200% 0}
}

/* ------------------------------------------------- Fallback tanpa blur */
@supports not ((backdrop-filter:blur(2px)) or (-webkit-backdrop-filter:blur(2px))){
  html:root .header,
  html:root .bottom,
  html:root .side-menu,
  html:root .account-sheet,
  html:root #loginModal .login-modal-box{
    background:rgba(var(--bg-1-rgb),.98) !important;
  }
}

/* -------------------------------------------------------------- Mobile */
@media (max-width:600px){
  html:root .app,
  html:root .slots-page,
  html:root .register-page,
  html:root .login-page,
  html:root .promo-page{
    background-color:rgba(var(--bg-0-rgb),.62) !important;
  }
  /* Blur dimatikan di layar kecil: lebih hemat GPU, tampilan tetap konsisten. */
  html:root .header,
  html:root .bottom,
  html:root .side-menu,
  html:root .account-sheet,
  html:root .balance,
  html:root .login-card,
  html:root .register-card,
  html:root #loginModal .login-modal-box{
    backdrop-filter:none !important;
    -webkit-backdrop-filter:none !important;
  }
}
/* --------------------------------------------------------------------------
   Bottom nav premium — floating glass dock + tombol tengah bulat
   -------------------------------------------------------------------------- */

html:root .bottom{
  left:50% !important;
  right:auto !important;
  bottom:calc(10px + env(safe-area-inset-bottom, 0px)) !important;
  width:min(calc(100% - 24px), 720px) !important;
  height:68px !important;
  padding:4px 6px !important;
  border:1px solid rgba(var(--brand-rgb),.22) !important;
  border-radius:22px !important;
  background:linear-gradient(180deg,rgba(var(--bg-2-rgb),.95),rgba(var(--bg-0-rgb),.98)) !important;
  box-shadow:
    0 18px 45px rgba(0,0,0,.62),
    0 0 28px rgba(var(--brand-rgb),.12),
    inset 0 1px 0 rgba(255,255,255,.08) !important;
  backdrop-filter:blur(18px) saturate(150%);
  -webkit-backdrop-filter:blur(18px) saturate(150%);
  overflow:visible !important;
}

html:root .bottom a{
  position:relative;
  height:52px !important;
  margin:4px 1px !important;
  padding:3px 1px !important;
  gap:3px !important;
  border-radius:14px !important;
  color:var(--muted) !important;
  font-size:8px !important;
  font-weight:800 !important;
  letter-spacing:.06em !important;
  line-height:1 !important;
  transition:color .18s ease, background-color .18s ease, transform .18s ease;
}

html:root .bottom a:hover,
html:root .bottom a:focus-visible{
  color:var(--text) !important;
  background:rgba(var(--brand-rgb),.07) !important;
}

html:root .bottom a.active{
  color:var(--brand-2) !important;
  background:linear-gradient(180deg,rgba(var(--brand-rgb),.16),rgba(var(--brand-rgb),.05)) !important;
  box-shadow:inset 0 0 0 1px rgba(var(--brand-rgb),.18) !important;
}

html:root .bottom a:active{
  transform:scale(.97);
}

html:root .bottom svg{
  width:20px !important;
  height:20px !important;
  stroke-width:1.7 !important;
}

html:root .bottom a.active svg{
  filter:drop-shadow(0 0 7px rgba(var(--brand-rgb),.65));
}

/* Tombol tengah: lingkaran penuh yang terangkat dari dock. */
html:root .bottom .center{
  position:relative !important;
  justify-content:flex-end !important;
  height:52px !important;
  margin:4px 1px !important;
  padding:0 !important;
}

html:root .bottom .center span{
  position:absolute !important;
  top:-26px !important;
  left:50% !important;
  transform:translateX(-50%) !important;
  display:grid !important;
  place-items:center !important;
  width:58px !important;
  height:58px !important;
  margin:0 !important;
  border-radius:50% !important;
  border:4px solid rgba(var(--bg-0-rgb),.98) !important;
  background:linear-gradient(145deg,var(--accent-soft),var(--brand) 52%,var(--brand-deep)) !important;
  color:var(--on-accent) !important;
  box-shadow:
    0 12px 28px rgba(0,0,0,.55),
    0 0 26px rgba(var(--brand-rgb),.42),
    inset 0 1px 0 rgba(255,255,255,.35) !important;
  z-index:3 !important;
}

html:root .bottom .center span svg{
  width:24px !important;
  height:24px !important;
  stroke-width:1.9 !important;
}

html:root .bottom .center label{
  position:absolute !important;
  left:0;
  right:0;
  bottom:6px !important;
  margin:0 !important;
  text-align:center !important;
  color:var(--brand-2) !important;
  font-size:8px !important;
  font-weight:900 !important;
  letter-spacing:.08em !important;
  line-height:1 !important;
}

/* Beri ruang aman agar konten terakhir tidak tertutup dock. */
html:root .app{
  padding-bottom:calc(104px + env(safe-area-inset-bottom, 0px)) !important;
}
