/* ==========================================================
   EarnZone design system — member area, auth pages and admin panel
   Palette: deep violet night, neon purple / pink glow, gold coins.
   Mobile first; no framework; every page shares these classes.
   ========================================================== */
:root {
  --bg: #08030F;
  --bg-2: #12051D;
  --card-bg: #1A0828;
  --primary: #8000FF;
  --neon: #C000FF;
  --pink: #FF36E8;
  --gold: #FFD000;
  --yellow: #FFCC00;
  --secondary: #C000FF;
  --accent: #FF36E8;
  --glass: rgba(26, 8, 40, 0.72);
  --glass-2: rgba(128, 0, 255, 0.14);
  --border: rgba(192, 0, 255, 0.26);
  --border-soft: rgba(255, 255, 255, 0.07);
  --text: #FFFFFF;
  --muted: #C9B7D8;
  --green: #2EE59D;
  --red: #FF4D6D;
  --amber: #FFB020;
  --blue: #5AA9FF;
  --radius: 18px;
  --shadow: 0 14px 40px rgba(0, 0, 0, 0.45);
  --glow: 0 0 0 1px rgba(192, 0, 255, .35), 0 10px 34px -8px rgba(192, 0, 255, .55);
  --sidebar: 264px;
  --grad: linear-gradient(135deg, #8000FF 0%, #C000FF 55%, #FF36E8 100%);
  --grad-gold: linear-gradient(135deg, #FFE45C 0%, #FFD000 45%, #FFB000 100%);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: 'Poppins', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  color: var(--text);
  background-color: var(--bg);
  background-image:
    radial-gradient(900px 520px at 8% -8%, rgba(128, 0, 255, .34), transparent 62%),
    radial-gradient(760px 480px at 108% 6%, rgba(255, 54, 232, .18), transparent 60%),
    radial-gradient(700px 520px at 50% 118%, rgba(192, 0, 255, .20), transparent 62%);
  background-attachment: fixed;
  min-height: 100vh;
  line-height: 1.55;
  font-size: 15px;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { line-height: 1.25; font-weight: 600; }
::selection { background: rgba(192, 0, 255, .45); }
:focus-visible { outline: 2px solid var(--pink); outline-offset: 2px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.text-green { color: var(--green); } .text-red { color: var(--red); } .text-amber { color: var(--amber); } .text-gold { color: var(--gold); }
.mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; } .mb-2 { margin-bottom: 16px; } .mb-3 { margin-bottom: 24px; }
.flex { display: flex; gap: 12px; align-items: center; } .between { justify-content: space-between; } .wrap { flex-wrap: wrap; }
.hidden { display: none !important; }
.gradient-text { background: linear-gradient(90deg, #E7B8FF, var(--pink)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.gold-text { background: var(--grad-gold); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- glass card ---------- */
.card {
  background: linear-gradient(160deg, rgba(42, 10, 70, .78), rgba(26, 8, 40, .86));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: var(--shadow);
  padding: 20px;
  min-width: 0;
}
.card-title { font-size: 16px; font-weight: 600; margin-bottom: 14px; display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.card-title i { color: #D78BFF; }
.card-glow { box-shadow: var(--glow); }

/* ---------- layout: sidebar ---------- */
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--sidebar);
  background: linear-gradient(180deg, rgba(18, 5, 29, .96), rgba(8, 3, 15, .97));
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-right: 1px solid var(--border);
  padding: 20px 14px; display: flex; flex-direction: column; z-index: 60;
  transform: translateX(-100%); transition: transform .3s ease;
  overflow-y: auto; overscroll-behavior: contain;
}
.sidebar.open { transform: translateX(0); box-shadow: 20px 0 60px rgba(0,0,0,.6); }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 20px; padding: 4px 10px 20px; letter-spacing: .01em; }
.brand-logo { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--grad); box-shadow: 0 6px 22px rgba(192, 0, 255, .55); }
.brand-logo i { color: var(--gold); }
.brand img { height: 38px; width: auto; border-radius: 10px; }
.brand .brand-accent { color: var(--gold); }
.nav-label { font-size: 10.5px; text-transform: uppercase; letter-spacing: .14em; color: #9C84B3; padding: 14px 12px 6px; }
.nav a {
  display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 12px; color: #E3D5F0; margin-bottom: 3px;
  border: 1px solid transparent; transition: background .2s, color .2s, transform .2s, box-shadow .2s;
}
.nav a i { width: 20px; text-align: center; color: #C58CFF; transition: color .2s, filter .2s; }
.nav a:hover { background: rgba(128, 0, 255, .16); color: #fff; transform: translateX(3px); box-shadow: 0 0 18px -6px rgba(192, 0, 255, .8); }
.nav a:hover i { color: var(--pink); filter: drop-shadow(0 0 6px rgba(255, 54, 232, .7)); }
.nav a.active { background: linear-gradient(90deg, rgba(128, 0, 255, .75), rgba(192, 0, 255, .25)); color: #fff; border-color: rgba(192, 0, 255, .55); box-shadow: 0 0 22px -6px rgba(192, 0, 255, .9); }
.nav a.active i { color: var(--gold); }
.nav .count { margin-left: auto; background: var(--pink); color: #fff; font-size: 11px; padding: 1px 7px; border-radius: 20px; }
.sidebar-foot { margin-top: auto; padding-top: 16px; }
.sidebar-vip { padding: 14px; border-radius: 16px; background: linear-gradient(135deg, rgba(255, 208, 0, .14), rgba(128, 0, 255, .22)); border: 1px solid rgba(255, 208, 0, .35); margin-bottom: 12px; }
.sidebar-vip strong { color: var(--gold); }
.overlay { position: fixed; inset: 0; background: rgba(4, 0, 10, .62); z-index: 55; display: none; }
.overlay.show { display: block; }

/* ---------- layout: main + topbar ---------- */
.main { min-height: 100vh; padding-bottom: 96px; }
.topbar {
  position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; background: rgba(8, 3, 15, 0.82); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}
.topbar h1 { font-size: 17px; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topnav { display: none; gap: 4px; flex: 1; }
.topnav a { padding: 8px 12px; border-radius: 10px; font-size: 13.5px; font-weight: 500; color: #E3D5F0; transition: background .2s, color .2s; }
.topnav a:hover { background: rgba(128, 0, 255, .18); color: #fff; }
.topnav a.active { color: #fff; background: rgba(128, 0, 255, .3); box-shadow: inset 0 -2px 0 var(--pink); }
.icon-btn { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; background: rgba(128, 0, 255, .14); border: 1px solid var(--border); cursor: pointer; position: relative; flex-shrink: 0; transition: box-shadow .2s; }
.icon-btn:hover { box-shadow: 0 0 16px -4px rgba(192, 0, 255, .9); }
.icon-btn .dot { position: absolute; top: 4px; right: 4px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 10px; background: var(--pink); font-size: 10px; font-weight: 700; display: grid; place-items: center; box-shadow: 0 0 10px rgba(255, 54, 232, .8); }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 30px; background: rgba(128, 0, 255, .14); border: 1px solid var(--border); font-size: 13px; font-weight: 600; white-space: nowrap; }
.chip-coins { border-color: rgba(255, 208, 0, .45); background: linear-gradient(135deg, rgba(255, 208, 0, .14), rgba(128, 0, 255, .14)); }
.chip-coins span { color: var(--gold); }
.chip i.fa-coins { color: var(--gold); } .chip i.fa-gem { color: #5EF0FF; }
.chip-points { display: none; }
.chip-vip { border-color: rgba(255, 208, 0, .4); }
.chip-vip span { display: none; }
@media (min-width: 600px) { .chip-vip span { display: inline; } }
.acct { position: relative; flex-shrink: 0; }
.acct summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px; border-radius: 14px; padding: 3px; border: 1px solid var(--border); background: rgba(128, 0, 255, .14); }
.acct summary::-webkit-details-marker { display: none; }
.acct summary .avatar { width: 32px; height: 32px; border-radius: 10px; font-size: 14px; }
.acct summary .acct-name { display: none; font-size: 13px; font-weight: 600; padding-right: 8px; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-menu { position: absolute; right: 0; top: calc(100% + 8px); width: 230px; padding: 8px; border-radius: 16px; background: #1A0828; border: 1px solid var(--border); box-shadow: 0 20px 50px rgba(0,0,0,.6), 0 0 30px -10px rgba(192,0,255,.7); z-index: 70; }
.acct-menu .acct-head { padding: 8px 10px 10px; border-bottom: 1px solid var(--border-soft); margin-bottom: 6px; }
.acct-menu a, .acct-menu button { display: flex; width: 100%; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 10px; font-size: 14px; background: none; border: 0; cursor: pointer; text-align: left; color: #EADCF7; }
.acct-menu a:hover, .acct-menu button:hover { background: rgba(128, 0, 255, .22); color: #fff; }
.acct-menu i { width: 18px; color: #C58CFF; }
.acct-menu form { margin: 0; border-top: 1px solid var(--border-soft); margin-top: 6px; padding-top: 6px; }
.coin-emoji { font-size: 30px; line-height: 1; }
.coin-ico { width: 1.15em; height: 1.15em; vertical-align: -.2em; display: inline-block; }
img.coin-emoji { width: 34px; height: 34px; vertical-align: middle; }
.spin-result-ico img.coin-emoji { width: 72px; height: 72px; margin: 0 auto; }
.spin-result-ico { font-size: 64px; line-height: 1.1; margin: 6px 0 10px; filter: drop-shadow(0 6px 18px rgba(255, 208, 0, .5)); }
.content { padding: 16px 14px; max-width: 1320px; margin: 0 auto; }

/* ---------- bottom nav (mobile) ---------- */
.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 45; display: grid; grid-template-columns: repeat(5, 1fr);
  background: rgba(18, 5, 29, 0.95); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  border-top: 1px solid var(--border); padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
}
.bottom-nav a, .bottom-nav button { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 10.5px; color: var(--muted); padding: 5px 0; border-radius: 12px; background: none; border: 0; cursor: pointer; }
.bottom-nav i { font-size: 18px; }
.bottom-nav a.active { color: #fff; background: rgba(128, 0, 255, .22); }
.bottom-nav a.active i { color: var(--gold); filter: drop-shadow(0 0 8px rgba(192, 0, 255, .9)); }

@media (min-width: 992px) {
  .sidebar { transform: none; }
  .main { margin-left: var(--sidebar); padding-bottom: 30px; }
  .bottom-nav, .menu-toggle { display: none; }
  .content { padding: 24px 28px; }
  .topbar { padding: 12px 28px; }
  .chip-points { display: inline-flex; }
  .acct summary .acct-name { display: block; }
}
@media (min-width: 1280px) {
  .topnav { display: flex; }
  .topbar h1 { display: none; }
}

/* ---------- page hero banner with illustration ---------- */
.page-hero {
  position: relative; overflow: hidden; display: grid; grid-template-columns: 1fr; gap: 14px; align-items: center;
  padding: 22px; border-radius: 24px; margin-bottom: 20px;
  background:
    radial-gradient(420px 220px at 85% 30%, rgba(255, 54, 232, .28), transparent 70%),
    linear-gradient(135deg, rgba(128, 0, 255, .55), rgba(26, 8, 40, .9) 70%);
  border: 1px solid rgba(192, 0, 255, .45);
  box-shadow: 0 18px 50px -18px rgba(192, 0, 255, .7);
}
.page-hero h2 { font-size: clamp(22px, 4.6vw, 30px); font-weight: 800; letter-spacing: -.01em; }
.page-hero p { color: #E6D6F5; margin-top: 6px; max-width: 560px; font-size: 14.5px; }
.page-hero .hero-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.page-hero .hero-art { justify-self: center; width: min(40vw, 150px); aspect-ratio: 1; object-fit: contain; filter: drop-shadow(0 16px 30px rgba(192, 0, 255, .55)); animation: floaty 6s ease-in-out infinite; }
.page-hero .kicker { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--gold); margin-bottom: 6px; }
@media (min-width: 720px) {
  .page-hero { grid-template-columns: 1fr auto; padding: 26px 30px; }
  .page-hero .hero-art { width: 200px; }
}

/* ---------- grids & stats ---------- */
.grid { display: grid; gap: 16px; }
.grid > * { min-width: 0; }
.grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
@media (min-width: 560px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .grid-2 { grid-template-columns: repeat(2, 1fr); } .grid-3 { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1200px) { .grid-4 { grid-template-columns: repeat(4, 1fr); } }
.stats { display: grid; gap: 12px; grid-template-columns: repeat(2, 1fr); }
.stats > * { min-width: 0; }
@media (min-width: 900px) { .stats { grid-template-columns: repeat(4, 1fr); gap: 14px; } }
.stat { position: relative; overflow: hidden; padding: 16px; transition: transform .2s, box-shadow .2s; }
.stat:hover { transform: translateY(-3px); box-shadow: var(--glow); }
.stat .label { font-size: 12.5px; color: var(--muted); padding-right: 44px; min-height: 2.6em; }
.stat .value { font-size: 21px; font-weight: 700; margin-top: 4px; word-break: break-word; }
.stat .sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.stat .ico { position: absolute; top: 12px; right: 12px; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-size: 17px; }
.stat::after { content: ''; position: absolute; width: 130px; height: 130px; border-radius: 50%; right: -46px; bottom: -66px; background: radial-gradient(circle, rgba(192, 0, 255, .42), transparent 70%); pointer-events: none; }
.ico-purple { background: rgba(128, 0, 255, .3); color: #DDA8FF; }
.ico-blue { background: rgba(90, 169, 255, .2); color: #A8D1FF; }
.ico-green { background: rgba(46, 229, 157, .18); color: #8DF5C9; }
.ico-amber { background: rgba(255, 208, 0, .18); color: var(--gold); }
.ico-pink { background: rgba(255, 54, 232, .2); color: #FF9CF3; }
.ico-cyan { background: rgba(94, 240, 255, .16); color: #9AF6FF; }
.ico-red { background: rgba(255, 77, 109, .2); color: #FFA3B4; }

.hero-balance {
  background:
    radial-gradient(300px 200px at 90% 10%, rgba(255, 208, 0, .28), transparent 70%),
    linear-gradient(135deg, #6A00D9 0%, #A800FF 55%, #E52BD2 100%);
  border-radius: 24px; padding: 22px; position: relative; overflow: hidden;
  box-shadow: 0 22px 50px -16px rgba(192, 0, 255, .75); border: 1px solid rgba(255, 255, 255, .14);
}
.hero-balance::before { content: ''; position: absolute; width: 280px; height: 280px; border-radius: 50%; background: rgba(255,255,255,.08); right: -80px; top: -120px; pointer-events: none; }
.hero-balance .big { font-size: clamp(28px, 7vw, 36px); font-weight: 800; }
.hero-balance .actions { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; position: relative; }
.hero-balance .hb-art { position: absolute; right: 10px; bottom: 6px; width: 120px; opacity: .95; pointer-events: none; filter: drop-shadow(0 10px 20px rgba(0,0,0,.35)); }
@media (max-width: 520px) { .hero-balance .hb-art { width: 84px; opacity: .55; } }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 20px; border-radius: 12px;
  border: 1px solid transparent; cursor: pointer; font-weight: 600; font-size: 14px; transition: transform .15s, box-shadow .2s, opacity .2s, filter .2s; white-space: nowrap;
}
.btn:active { transform: scale(.97); }
.btn:disabled, .btn.disabled { opacity: .5; cursor: not-allowed; pointer-events: none; }
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 8px 24px -6px rgba(192, 0, 255, .75); }
.btn-primary:hover { box-shadow: 0 10px 32px -4px rgba(255, 54, 232, .8); filter: brightness(1.08); }
.btn-gold { background: var(--grad-gold); color: #2A0845; box-shadow: 0 8px 24px -8px rgba(255, 208, 0, .8); }
.btn-gold:hover { filter: brightness(1.06); box-shadow: 0 10px 30px -6px rgba(255, 208, 0, .9); }
.btn-glass { background: rgba(128, 0, 255, .16); border-color: var(--border); color: #fff; }
.btn-glass:hover { background: rgba(128, 0, 255, .28); box-shadow: 0 0 18px -6px rgba(192, 0, 255, .9); }
.btn-light { background: #fff; color: #2A0845; }
.btn-success { background: linear-gradient(135deg, #12B981, #2EE59D); color: #04261A; }
.btn-danger { background: linear-gradient(135deg, #E11D48, #FF4D6D); color: #fff; }
.btn-warning { background: linear-gradient(135deg, #F59E0B, #FFCC00); color: #2A0845; }
.btn-sm { padding: 7px 12px; font-size: 12.5px; border-radius: 10px; }
.btn-block { width: 100%; }
.btn-lg { padding: 14px 26px; font-size: 16px; }

/* ---------- forms ---------- */
.form-group { margin-bottom: 16px; }
label { display: block; font-size: 13px; color: #E3D5F0; margin-bottom: 6px; font-weight: 500; }
.input, select.input, textarea.input {
  width: 100%; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--border); background: rgba(8, 3, 15, .55);
  outline: none; transition: border .2s, box-shadow .2s; font-size: 14px; color: #fff;
}
.input::placeholder { color: #8F78A6; }
.input:focus { border-color: var(--neon); box-shadow: 0 0 0 4px rgba(192, 0, 255, .22), 0 0 18px -6px rgba(255, 54, 232, .8); }
.input:disabled { opacity: .7; }
select.input option { background: var(--bg-2); }
textarea.input { min-height: 100px; resize: vertical; }
.input-icon { position: relative; }
.input-icon > i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: #B48AD6; pointer-events: none; }
.input-icon .input { padding-left: 40px; }
.input-icon .pw-eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 34px; height: 34px; border: 0; background: none; color: #B48AD6; cursor: pointer; border-radius: 8px; }
.input-icon .pw-eye:hover { color: #fff; }
.help { font-size: 12px; color: var(--muted); margin-top: 5px; }
.check { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--neon); }
.form-row { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 700px) { .form-row { grid-template-columns: repeat(2, 1fr); } .form-row.cols-3 { grid-template-columns: repeat(3, 1fr); } }
input[type=color].input { height: 46px; padding: 4px; }
input[type=file].input { padding: 9px; }

/* ---------- alerts / badges ---------- */
.alert { padding: 12px 16px; border-radius: 12px; margin-bottom: 14px; border: 1px solid; font-size: 14px; display: flex; gap: 10px; align-items: flex-start; }
.alert-success { background: rgba(46, 229, 157, .1); border-color: rgba(46, 229, 157, .38); color: #BFFBE2; }
.alert-error { background: rgba(255, 77, 109, .12); border-color: rgba(255, 77, 109, .4); color: #FFD0D9; }
.alert-info { background: rgba(128, 0, 255, .14); border-color: rgba(192, 0, 255, .45); color: #EBD3FF; }
.alert-warning { background: rgba(255, 208, 0, .1); border-color: rgba(255, 208, 0, .4); color: #FFEFA6; }
.badge { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 11.5px; font-weight: 600; white-space: nowrap; }
.badge-green { background: rgba(46, 229, 157, .16); color: #8DF5C9; } .badge-red { background: rgba(255, 77, 109, .18); color: #FFA3B4; }
.badge-amber { background: rgba(255, 208, 0, .16); color: var(--gold); } .badge-blue { background: rgba(90, 169, 255, .18); color: #A8D1FF; }
.badge-indigo { background: rgba(128, 0, 255, .25); color: #DDA8FF; } .badge-cyan { background: rgba(94, 240, 255, .14); color: #9AF6FF; }
.badge-gray { background: rgba(201, 183, 216, .14); color: #DCCDE8; } .badge-purple { background: rgba(192, 0, 255, .24); color: #EBB8FF; }
.badge-gold { background: var(--grad-gold); color: #2A0845; }

/* ---------- tables (desktop) + cards (mobile) ---------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 -4px; }
table.table { width: 100%; border-collapse: collapse; font-size: 13.5px; min-width: 560px; }
.table th { text-align: left; color: #B9A2CF; font-weight: 500; font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; padding: 10px 12px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.table td { padding: 12px; border-bottom: 1px solid var(--border-soft); vertical-align: middle; }
.table tr:hover td { background: rgba(128, 0, 255, .07); }
@media (max-width: 699px) {
  .table-cards table.table { min-width: 0; }
  .table-cards thead { display: none; }
  .table-cards tr { display: block; padding: 12px 14px; margin-bottom: 10px; border-radius: 14px; background: rgba(8, 3, 15, .45); border: 1px solid var(--border); }
  .table-cards td { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; border: 0; text-align: right; word-break: break-word; }
  .table-cards td::before { content: attr(data-label); color: var(--muted); font-size: 12px; text-align: left; flex-shrink: 0; }
  .table-cards tr:hover td { background: none; }
}
.amount-pos { color: var(--green); font-weight: 600; } .amount-neg { color: var(--red); font-weight: 600; }
.empty { text-align: center; padding: 30px 10px; color: var(--muted); }
.empty i { font-size: 34px; margin-bottom: 10px; opacity: .7; display: block; color: #C58CFF; }
.empty img { width: 150px; height: auto; margin: 0 auto 12px; filter: drop-shadow(0 10px 24px rgba(192, 0, 255, .45)); }
.empty strong { display: block; color: #fff; font-size: 16px; margin-bottom: 4px; }

.list-item { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border-soft); }
.list-item:last-child { border-bottom: 0; }
.list-item .li-ico { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; flex-shrink: 0; }
.list-item .li-body { flex: 1; min-width: 0; }
.list-item .li-title { font-weight: 500; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.pagination { display: flex; gap: 6px; justify-content: center; margin-top: 18px; flex-wrap: wrap; }
.pagination a { min-width: 36px; height: 36px; padding: 0 10px; display: grid; place-items: center; border-radius: 10px; background: rgba(128, 0, 255, .14); border: 1px solid var(--border); font-size: 13px; }
.pagination a:hover { box-shadow: 0 0 14px -4px rgba(192, 0, 255, .9); }
.pagination a.active { background: var(--grad); border-color: transparent; }

.tabs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 16px; scrollbar-width: thin; }
.tabs a { padding: 8px 16px; border-radius: 30px; background: rgba(128, 0, 255, .14); border: 1px solid var(--border); font-size: 13px; white-space: nowrap; }
.tabs a:hover { background: rgba(128, 0, 255, .25); }
.tabs a.active { background: var(--grad); border-color: transparent; box-shadow: 0 6px 18px -6px rgba(192, 0, 255, .9); }

/* ---------- toast, modal, loader ---------- */
#toasts { position: fixed; top: 16px; right: 16px; left: 16px; z-index: 1000; display: flex; flex-direction: column; gap: 10px; align-items: flex-end; pointer-events: none; }
.toast { pointer-events: auto; max-width: 380px; width: 100%; padding: 14px 16px; border-radius: 14px; background: rgba(26, 8, 40, .97); border: 1px solid var(--border); box-shadow: var(--shadow), 0 0 24px -10px rgba(192,0,255,.9); display: flex; gap: 10px; align-items: center; animation: slideIn .3s ease; font-size: 14px; }
.toast.success i { color: var(--green); } .toast.error i { color: var(--red); } .toast.info i { color: #D78BFF; }
@keyframes slideIn { from { transform: translateY(-15px); opacity: 0; } to { transform: none; opacity: 1; } }
.modal { position: fixed; inset: 0; background: rgba(4, 0, 10, .74); z-index: 900; display: none; align-items: center; justify-content: center; padding: 16px; backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.modal.show { display: flex; }
.modal-box { width: 100%; max-width: 720px; max-height: 92vh; overflow-y: auto; background: linear-gradient(160deg, #24093A, #14051F); border: 1px solid var(--border); border-radius: 22px; padding: 20px; animation: pop .25s ease; box-shadow: 0 30px 80px rgba(0,0,0,.6), 0 0 40px -14px rgba(192,0,255,.8); }
@keyframes pop { from { transform: scale(.94); opacity: 0; } to { transform: none; opacity: 1; } }
.modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; gap: 10px; }
.loader { display: grid; place-items: center; gap: 10px; padding: 26px; color: var(--muted); }
.loader::before { content: ''; width: 38px; height: 38px; border-radius: 50%; border: 3px solid rgba(192, 0, 255, .25); border-top-color: var(--pink); animation: spin .8s linear infinite; }

/* ---------- VIP ---------- */
.vip-ico { width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; font-size: 18px; color: #fff; flex-shrink: 0;
  background: linear-gradient(135deg, var(--vip, #C000FF), rgba(255,255,255,.08)); box-shadow: 0 6px 20px -6px var(--vip, #C000FF); }
.vip-banner { border-color: rgba(255, 208, 0, .3); }
.vip-meter { margin-top: 10px; }
.vip-meter .flex { margin-bottom: 6px; gap: 10px; flex-wrap: wrap; }
.vip-meter .progress { flex: none; width: 100%; }
.progress > div.bar-amber { background: linear-gradient(90deg, #FFB020, #FFD000); }
.progress > div.bar-red { background: linear-gradient(90deg, #E11D48, #FF4D6D); }
.vip-plans { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.vip-card { position: relative; display: flex; flex-direction: column; gap: 10px; border-top: 3px solid var(--vip, #C000FF); transition: transform .25s, box-shadow .25s; }
.vip-card:hover { transform: translateY(-4px); box-shadow: 0 0 0 1px var(--vip, #C000FF), 0 22px 46px -18px var(--vip, #C000FF); }
.vip-card.current { box-shadow: 0 0 0 2px var(--gold), 0 18px 40px -20px var(--gold); }
.vip-card .vip-img { width: 100%; aspect-ratio: 16/9; object-fit: cover; border-radius: 12px; }
.vip-card .price { font-size: 30px; font-weight: 800; background: var(--grad-gold); -webkit-background-clip: text; background-clip: text; color: transparent; }
.vip-card .price small { font-size: 13px; font-weight: 500; color: var(--muted); -webkit-text-fill-color: var(--muted); }
.vip-card ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; font-size: 13.5px; }
.vip-card ul li i { width: 18px; color: var(--vip, #C000FF); }
.vip-card .btn { margin-top: auto; }
.vip-tag { position: absolute; top: 12px; right: 12px; }
.pay-methods { display: grid; gap: 10px; }
.pay-methods label { display: flex; gap: 10px; align-items: center; padding: 12px; border-radius: 12px; border: 1px solid var(--border); background: rgba(8, 3, 15, .45); cursor: pointer; margin: 0; }
.pay-methods label:has(input:checked) { border-color: var(--neon); box-shadow: 0 0 18px -6px rgba(192, 0, 255, .9); }
.pay-methods input { accent-color: var(--neon); }
.upi-qr { max-width: 220px; border-radius: 12px; background: #fff; padding: 8px; }
.pay-state { text-align: center; }
.pay-state img { width: 140px; margin: 0 auto 10px; }

/* ---------- watch ---------- */
.video-card { padding: 0; overflow: hidden; display: flex; flex-direction: column; transition: transform .25s, box-shadow .25s; }
.video-card:hover { transform: translateY(-4px); box-shadow: var(--glow); }
.video-thumb { position: relative; aspect-ratio: 16/9; background: #12051D center/cover no-repeat; }
.video-thumb .play { position: absolute; inset: 0; display: grid; place-items: center; font-size: 46px; color: #fff; background: linear-gradient(transparent 30%, rgba(8, 3, 15, .7)); text-shadow: 0 0 24px rgba(192, 0, 255, .9); }
.video-thumb .reward-tag { position: absolute; top: 10px; left: 10px; }
.video-thumb .dur { position: absolute; bottom: 10px; right: 10px; background: rgba(8, 3, 15, .8); padding: 2px 8px; border-radius: 6px; font-size: 12px; }
.video-body { padding: 14px 16px 16px; flex: 1; display: flex; flex-direction: column; gap: 8px; }
.video-body h3 { font-size: 15px; }
.player-wrap { position: relative; aspect-ratio: 16/9; background: #000; border-radius: 14px; overflow: hidden; border: 1px solid var(--border); }
.player-wrap video, .player-wrap iframe, .player-wrap #ytPlayer { width: 100%; height: 100%; border: 0; display: block; }
.timer-ring { display: flex; align-items: center; gap: 14px; margin-top: 14px; }
.progress { height: 10px; border-radius: 10px; background: rgba(255,255,255,.08); overflow: hidden; flex: 1; }
.progress > div { height: 100%; width: 0; background: linear-gradient(90deg, var(--primary), var(--pink)); transition: width .5s linear; box-shadow: 0 0 12px rgba(255, 54, 232, .6); }

/* ---------- spin wheel ---------- */
.wheel-area { display: flex; flex-direction: column; align-items: center; gap: 22px; padding: 10px 0; }
.wheel-box { position: relative; width: min(84vw, 380px); aspect-ratio: 1; }
.wheel-box canvas { width: 100%; height: 100%; border-radius: 50%; box-shadow: 0 0 0 8px rgba(255, 208, 0, .5), 0 0 0 14px rgba(128, 0, 255, .35), 0 0 70px rgba(192, 0, 255, .7); transition: transform 6s cubic-bezier(.12,.8,.12,1); }
.wheel-pointer { position: absolute; top: -14px; left: 50%; transform: translateX(-50%); width: 0; height: 0; border-left: 18px solid transparent; border-right: 18px solid transparent; border-top: 34px solid var(--gold); filter: drop-shadow(0 4px 10px rgba(255, 208, 0, .6)); z-index: 2; }
.wheel-center { position: absolute; inset: 0; margin: auto; width: 72px; height: 72px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #3B0A66, #12051D); display: grid; place-items: center; font-weight: 700; border: 4px solid var(--gold); box-shadow: 0 0 22px rgba(255, 208, 0, .6); }

/* ---------- crash card ---------- */
.mult-track { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; }
.mult-step { flex: 1; min-width: 64px; text-align: center; padding: 10px 6px; border-radius: 12px; background: rgba(8, 3, 15, .5); border: 1px solid var(--border); font-weight: 600; font-size: 14px; }
.mult-step.done { background: rgba(46, 229, 157, .18); border-color: rgba(46, 229, 157, .5); }
.mult-step.current { background: rgba(128, 0, 255, .45); border-color: var(--pink); animation: pulse 1.4s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 6px rgba(255, 54, 232, .2); } }
.card-row { display: grid; gap: 14px; grid-template-columns: repeat(var(--cols, 3), 1fr); max-width: 560px; margin: 22px auto; perspective: 900px; }
.game-card { aspect-ratio: 3/4; border-radius: 16px; cursor: pointer; position: relative; transform-style: preserve-3d; transition: transform .6s; }
.game-card .face { position: absolute; inset: 0; border-radius: 16px; display: grid; place-items: center; backface-visibility: hidden; -webkit-backface-visibility: hidden; font-size: 34px; border: 1px solid var(--border); }
.game-card .front { background: linear-gradient(145deg, #8000FF, #C000FF 60%, #FF36E8); box-shadow: 0 10px 30px rgba(0,0,0,.4), inset 0 0 0 2px rgba(255, 208, 0, .35); }
.game-card .front::after { content: '?'; font-size: 40px; font-weight: 800; color: var(--gold); text-shadow: 0 0 14px rgba(255, 208, 0, .6); }
.game-card .back { transform: rotateY(180deg); background: #1A0828; }
.game-card.flipped { transform: rotateY(180deg); }
.game-card.safe .back { background: linear-gradient(145deg, #0B6B4B, #2EE59D); }
.game-card.crash .back { background: linear-gradient(145deg, #7A0E2A, #FF4D6D); }
.game-card:not(.flipped):hover { transform: translateY(-6px); }
.game-card.disabled { pointer-events: none; }

/* ---------- mini games ---------- */
.game-tile { text-align: center; cursor: pointer; transition: transform .25s, box-shadow .25s; }
.game-tile:hover { transform: translateY(-5px); box-shadow: var(--glow); }
.game-tile .gi { width: 66px; height: 66px; margin: 0 auto 12px; border-radius: 20px; display: grid; place-items: center; font-size: 28px; background: var(--grad); }
.game-tile .g-art { width: 120px; height: 120px; margin: 0 auto 10px; object-fit: contain; filter: drop-shadow(0 12px 22px rgba(192, 0, 255, .5)); transition: transform .3s; }
.game-tile:hover .g-art { transform: scale(1.06) rotate(-2deg); }
.num-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.num-btn { aspect-ratio: 1; border-radius: 14px; background: rgba(128, 0, 255, .18); border: 1px solid var(--border); font-size: 20px; font-weight: 700; cursor: pointer; }
.num-btn.sel { background: var(--grad); }
.num-btn.draw { background: var(--green); color: #04261A; }
.scratch-wrap { position: relative; width: 100%; max-width: 340px; aspect-ratio: 16/10; margin: 0 auto; border-radius: 18px; overflow: hidden; background: linear-gradient(135deg, #FFB000, #FF36E8); display: grid; place-items: center; text-align: center; touch-action: none; }
.scratch-wrap .prize { font-size: 30px; font-weight: 800; color: #fff; text-shadow: 0 2px 10px rgba(0,0,0,.4); }
.scratch-wrap canvas { position: absolute; inset: 0; width: 100%; height: 100%; cursor: crosshair; }
.mem-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; max-width: 420px; margin: 0 auto; perspective: 700px; }
.mem-grid .game-card { aspect-ratio: 1; }
.mem-grid .game-card .face { font-size: 26px; }
.mem-grid .game-card .front::after { font-size: 24px; }
.mem-grid .game-card.matched .back { background: linear-gradient(145deg, #0B6B4B, #2EE59D); }
.box-row { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin: 20px 0; }
.lucky-box { width: 96px; height: 96px; border-radius: 20px; display: grid; place-items: center; font-size: 40px; cursor: pointer; background: linear-gradient(145deg, #C000FF, #8000FF); border: 1px solid rgba(255, 208, 0, .4); transition: transform .2s; }
.lucky-box:hover { transform: translateY(-6px) rotate(-3deg); }
.lucky-box.opened { background: #1A0828; font-size: 18px; font-weight: 700; flex-direction: column; }
.lucky-box.picked { outline: 3px solid var(--gold); }
.quiz-opt { display: block; width: 100%; text-align: left; padding: 14px 16px; margin-bottom: 10px; border-radius: 14px; background: rgba(8, 3, 15, .45); border: 1px solid var(--border); cursor: pointer; }
.quiz-opt:hover { background: rgba(128, 0, 255, .2); }
.quiz-opt.correct { background: rgba(46, 229, 157, .22); border-color: var(--green); }
.quiz-opt.wrong { background: rgba(255, 77, 109, .22); border-color: var(--red); }

.result-pop { text-align: center; padding: 10px; }
.result-pop .big-ico { font-size: 54px; margin-bottom: 10px; }

/* ---------- daily reward ---------- */
.streak { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin: 12px 0; }
.streak div { text-align: center; padding: 8px 2px; border-radius: 10px; background: rgba(8, 3, 15, .5); border: 1px solid var(--border); font-size: 11px; }
.streak div.on { background: var(--grad); border-color: transparent; box-shadow: 0 0 14px -4px rgba(255, 54, 232, .9); }

/* ---------- auth pages ---------- */
.auth-page { min-height: 100vh; display: grid; place-items: center; padding: 28px 16px; }
.auth-card { width: 100%; max-width: 440px; }
.auth-card .brand { justify-content: center; }
.auth-card h2 { text-align: center; margin-bottom: 4px; }
.auth-card .sub { text-align: center; color: var(--muted); margin-bottom: 22px; font-size: 14px; }
.auth-links { text-align: center; margin-top: 16px; font-size: 14px; color: var(--muted); }
.auth-links a, .link { color: #E7A6FF; font-weight: 500; }
.auth-links a:hover, .link:hover { color: var(--pink); }
.auth-split { width: 100%; max-width: 980px; display: grid; grid-template-columns: 1fr; border-radius: 26px; overflow: hidden; border: 1px solid var(--border); background: rgba(26, 8, 40, .82); box-shadow: 0 30px 80px rgba(0,0,0,.55), 0 0 60px -24px rgba(192,0,255,.9); }
.auth-split .auth-card { max-width: none; border: 0; border-radius: 0; box-shadow: none; padding: 28px 22px; background: none; }
.auth-art { display: none; position: relative; padding: 36px 30px; background: radial-gradient(360px 260px at 50% 40%, rgba(255, 54, 232, .3), transparent 70%), linear-gradient(160deg, #5A00B8, #24093A); text-align: center; }
.auth-art img { width: 100%; max-width: 300px; margin: 10px auto 18px; filter: drop-shadow(0 18px 34px rgba(0,0,0,.45)); animation: floaty 6s ease-in-out infinite; }
.auth-art h3 { font-size: 22px; font-weight: 800; }
.auth-art p { color: #E6D6F5; font-size: 14px; margin-top: 6px; }
.auth-art ul { list-style: none; display: grid; gap: 8px; margin-top: 18px; text-align: left; font-size: 13.5px; color: #F2E7FB; }
.auth-art ul i { color: var(--gold); width: 20px; }
.auth-mobile-art { width: 120px; margin: 0 auto 10px; }
@media (min-width: 860px) {
  .auth-split { grid-template-columns: 1fr 1fr; }
  .auth-art { display: flex; flex-direction: column; justify-content: center; }
  .auth-split .auth-card { padding: 40px 38px; }
  .auth-mobile-art { display: none; }
}
.auth-back { position: fixed; top: 14px; left: 14px; z-index: 5; }

/* legacy landing helpers (kept for compatibility) */
.landing-nav { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; max-width: 1200px; margin: 0 auto; }
.feature i { font-size: 24px; width: 54px; height: 54px; display: grid; place-items: center; border-radius: 16px; margin-bottom: 14px; }
.footer { text-align: center; color: var(--muted); font-size: 13px; padding: 30px 16px; border-top: 1px solid var(--border); }
.floaty { animation: floaty 5s ease-in-out infinite; }
@keyframes floaty { 50% { transform: translateY(-10px); } }

/* ---------- profile / notifications / support ---------- */
.profile-head { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.avatar-lg { width: 84px; height: 84px; border-radius: 24px; object-fit: cover; flex-shrink: 0; border: 2px solid var(--gold); box-shadow: 0 0 24px -6px rgba(255, 208, 0, .8); }
div.avatar-lg { display: grid; place-items: center; font-size: 34px; font-weight: 800; background: var(--grad); }
.notif-card { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: 16px; background: rgba(8, 3, 15, .42); border: 1px solid var(--border-soft); margin-bottom: 10px; transition: border-color .2s; }
.notif-card.unread { border-color: rgba(192, 0, 255, .55); background: linear-gradient(90deg, rgba(128, 0, 255, .2), rgba(8, 3, 15, .42)); box-shadow: inset 3px 0 0 var(--pink); }
.notif-card .li-ico { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; flex-shrink: 0; }
.notif-card .nc-body { flex: 1; min-width: 0; word-break: break-word; }
.new-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--pink); box-shadow: 0 0 8px var(--pink); margin-left: 6px; vertical-align: middle; }
.ticket-thread { display: grid; gap: 12px; }
.msg { max-width: 88%; padding: 12px 14px; border-radius: 16px; background: rgba(8, 3, 15, .5); border: 1px solid var(--border-soft); word-break: break-word; }
.msg.mine { justify-self: end; background: linear-gradient(135deg, rgba(128, 0, 255, .45), rgba(192, 0, 255, .25)); border-color: rgba(192, 0, 255, .5); }
.msg.staff { border-color: rgba(255, 208, 0, .35); }
.msg .meta { font-size: 11.5px; color: var(--muted); margin-bottom: 4px; }
.faq details { border: 1px solid var(--border); border-radius: 14px; padding: 12px 14px; margin-bottom: 10px; background: rgba(8, 3, 15, .4); }
.faq summary { cursor: pointer; font-weight: 600; }
.faq details p { margin-top: 8px; color: var(--muted); font-size: 14px; }

/* ---------- admin image manager ---------- */
.img-slots { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.img-slot .preview { aspect-ratio: 4/3; border-radius: 14px; background: repeating-conic-gradient(rgba(255,255,255,.05) 0 25%, transparent 0 50%) 0 0/20px 20px, rgba(8,3,15,.6); display: grid; place-items: center; overflow: hidden; border: 1px solid var(--border); margin-bottom: 10px; }
.img-slot .preview img { max-height: 100%; max-width: 100%; object-fit: contain; }

/* ---------- misc ---------- */
.kv { display: flex; justify-content: space-between; padding: 9px 0; border-bottom: 1px dashed rgba(201, 183, 216, .16); font-size: 14px; gap: 10px; }
.kv > span:last-child { text-align: right; word-break: break-word; }
.kv:last-child { border-bottom: 0; }
.avatar { width: 40px; height: 40px; border-radius: 12px; background: var(--grad); display: grid; place-items: center; font-weight: 700; flex-shrink: 0; overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.notif.unread { border-left: 3px solid var(--pink); padding-left: 10px; }
.spinner { width: 18px; height: 18px; border: 2px solid rgba(255,255,255,.3); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
.chart-box { position: relative; height: 280px; }
code, .mono { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12.5px; }
.word-break { word-break: break-all; }
.confetti { position: fixed; top: -10px; width: 10px; height: 14px; z-index: 999; animation: fall 2.4s linear forwards; pointer-events: none; }
@keyframes fall { to { transform: translateY(105vh) rotate(720deg); opacity: .6; } }
.site-foot { text-align: center; color: #9C84B3; font-size: 12.5px; padding: 22px 16px 8px; }
.site-foot a { color: #D9B8F2; margin: 0 6px; }
.site-foot a:hover { color: var(--pink); }
body.admin .topbar { border-bottom-color: rgba(255, 208, 0, .22); }
body.admin .brand .badge { margin-left: 2px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }

/* ---------- refer ---------- */
.refer-code { display: inline-flex; flex-direction: column; gap: 2px; padding: 10px 16px; border-radius: 14px; background: rgba(8, 3, 15, .35); border: 1px dashed rgba(255, 208, 0, .7); position: relative; }
.refer-code strong { font-size: 22px; letter-spacing: .14em; color: var(--gold); }

/* VIP: the plan that is currently active (cannot be bought again until it expires) */
.vip-card.is-active { box-shadow: 0 0 0 2px var(--green), 0 18px 40px -20px var(--green); }
.vip-card.is-active:hover { transform: none; }
.vip-card.is-active > ul, .vip-card.is-active > .price, .vip-card.is-active > .vip-img, .vip-card.is-active > p { opacity: .55; filter: blur(.6px) saturate(.6); }
.vip-card.is-active .btn[disabled] { opacity: .8; cursor: not-allowed; border-color: var(--green); color: var(--green); }
.vip-active-box { display: grid; gap: 4px; padding: 10px 12px; border: 1px solid rgba(46, 229, 157, .35); border-radius: 12px; background: rgba(46, 229, 157, .07); }
.vip-active-box .kv { margin: 0; }
.vip-active-box .progress { margin-top: 4px; }

/* Withdraw: balance + limit tiles */
.wd-tiles { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
.wd-tile { padding: 14px; border-radius: 14px; border: 1px solid var(--border); background: rgba(255, 255, 255, .03); }
.wd-tile .l { font-size: 12px; color: var(--muted); }
.wd-tile .v { font-size: 20px; font-weight: 800; margin-top: 2px; }
/* ---- Spin & Win result popups (Try Again logic) ---- */
.spin-result .spin-big { font-size: 22px; font-weight: 700; color: var(--gold, #FFD000); }
.spin-result .coin-burst { animation: coinBurst 1.1s cubic-bezier(.2,.9,.3,1.4) both, floaty 2.4s ease-in-out 1.1s infinite; }
@keyframes coinBurst { 0% { transform: scale(.2) rotate(-200deg); opacity: 0; } 60% { transform: scale(1.25) rotate(10deg); opacity: 1; } 100% { transform: none; } }
.spin-result.try .spin-result-ico i { display: inline-block; animation: spin 2.4s linear infinite; }
.btn-retry { animation: retryPulse 1.2s ease-in-out infinite; }
@keyframes retryPulse { 50% { transform: scale(1.04); box-shadow: 0 0 0 8px rgba(255, 208, 0, .18); } }
@media (prefers-reduced-motion: reduce) { .spin-result .coin-burst, .spin-result.try .spin-result-ico i, .btn-retry { animation: none; } }

/* ---- Watch Ads: dedicated Watch Page ---- */
.wa-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 14px 18px; }
.wa-top .brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 18px; color: #fff; text-decoration: none; }
.wa-top-stats { display: flex; gap: 8px; flex-wrap: wrap; }
.wa-top-stats .badge { font-size: 13px; padding: 7px 12px; display: inline-flex; align-items: center; gap: 6px; color: #fff; }
.wa-top-stats .badge-gold { color: #2A0845; }
.wa-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 18px; align-items: start; }
@media (max-width: 980px) { .wa-grid { grid-template-columns: 1fr; } }
.wa-title { font-size: clamp(20px, 2.6vw, 28px); margin: 0 0 4px; }
.wa-desc { color: var(--muted); margin: 14px 0 0; line-height: 1.6; }
.wa-blocked { text-align: center; padding: 40px 16px; }
.wa-blocked > i { font-size: 54px; }
.wa-side { position: sticky; top: 84px; }
.wa-timer-box { text-align: center; padding: 18px 12px; border-radius: 16px; background: radial-gradient(120% 120% at 50% 0%, rgba(192, 0, 255, .28), rgba(8, 3, 15, .6)); border: 1px solid var(--border); }
.wa-timer { font-size: clamp(42px, 6vw, 58px); font-weight: 800; letter-spacing: 2px; background: var(--grad-gold); -webkit-background-clip: text; background-clip: text; color: transparent; line-height: 1.1; }
.wa-done { text-align: center; margin-top: 16px; padding: 18px; border-radius: 16px; background: rgba(46, 229, 157, .08); border: 1px solid rgba(46, 229, 157, .4); animation: pop .35s ease both; }
.wa-done > i { font-size: 46px; color: var(--green); }
.wa-done h3 { margin: 6px 0; }
.wa-steps { margin: 0; padding-left: 20px; color: var(--muted); line-height: 1.8; }

/* player */
.ez-player { position: relative; border-radius: 16px; overflow: hidden; background: #000; aspect-ratio: 16 / 9; box-shadow: var(--glow); }
.ez-player video { width: 100%; height: 100%; display: block; object-fit: contain; background: #000; }
.ez-player:fullscreen { border-radius: 0; aspect-ratio: auto; }
.ez-bigplay { position: absolute; inset: 0; margin: auto; width: max-content; height: max-content; display: inline-flex; align-items: center; gap: 10px; padding: 16px 26px; border-radius: 999px; border: 0; background: var(--grad); color: #fff; font: 700 16px Poppins, sans-serif; cursor: pointer; box-shadow: 0 10px 30px -6px rgba(255, 54, 232, .7); animation: retryPulse 1.6s ease-in-out infinite; }
.ez-bigplay[hidden] { display: none; }
.ez-spinner { position: absolute; inset: 0; display: grid; place-items: center; font-size: 40px; color: var(--pink); pointer-events: none; }
.ez-spinner[hidden] { display: none; }
.ez-controls { position: absolute; left: 0; right: 0; bottom: 0; display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: linear-gradient(transparent, rgba(8, 3, 15, .92)); }
.ez-ctl { background: rgba(255, 255, 255, .12); border: 0; color: #fff; width: 36px; height: 36px; border-radius: 10px; cursor: pointer; flex: none; }
.ez-ctl:hover { background: rgba(192, 0, 255, .45); }
.ez-time { font-size: 12.5px; color: #fff; white-space: nowrap; }
.ez-seek { position: relative; flex: 1; height: 6px; border-radius: 99px; background: rgba(255, 255, 255, .18); overflow: hidden; }
.ez-buf { position: absolute; inset: 0 auto 0 0; background: rgba(255, 255, 255, .25); width: 0; }
.ez-pos { position: absolute; inset: 0 auto 0 0; background: var(--grad); width: 0; }
.ez-vol { width: 80px; accent-color: var(--pink); }
@media (max-width: 560px) { .ez-vol { display: none; } .ez-controls { gap: 6px; padding: 8px; } }
.ez-error { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center; padding: 20px; background: rgba(8, 3, 15, .92); color: #fff; }
.ez-error[hidden] { display: none; }
.ez-error > i { font-size: 34px; color: var(--amber); }
.ez-frame-wrap { position: relative; border-radius: 16px; overflow: hidden; background: #0B0414; border: 1px solid var(--border); min-height: 360px; }
.ez-content { display: block; width: 100%; height: min(70vh, 620px); border: 0; background: #0B0414; }
.ez-embed + .ez-embed { border-top: 1px solid var(--border); }
/* Watch Ads list: lazy thumbnails */
.video-thumb img.vt-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.video-thumb .progress-chip { position: absolute; left: 10px; bottom: 10px; }

/* Admin Watch Ads */
.chip.active { background: var(--grad); border-color: transparent; }
.admin-preview { width: 100%; max-height: 70vh; aspect-ratio: 16 / 9; background: #000; border-radius: 14px; display: block; }
.admin-preview-frame { width: 100%; height: 520px; max-height: 75vh; border: 1px solid var(--border); border-radius: 14px; background: #0b0614; display: block; margin-bottom: 10px; }
.wa-field[hidden] { display: none !important; }

/* Watch Ads: HTML / JavaScript content */
.ez-frame-wrap.is-html .ez-content { height: min(70vh, 620px); transition: height .2s ease; }
.ez-frame-wrap.is-html.sized { min-height: 0; }
.ez-loading { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 10px; color: var(--muted); background: #0B0414; pointer-events: none; }
.ez-loading[hidden] { display: none; }
.ez-loading i { color: var(--pink); font-size: 22px; }
.ez-notes { margin-top: 10px; padding: 10px 12px; border-radius: 12px; border: 1px solid rgba(255, 208, 0, .35); background: rgba(255, 208, 0, .08); font-size: 13px; }
.ez-notes[hidden] { display: none; }
.ez-notes p { margin: 2px 0; } .ez-notes i { color: var(--gold); }
@media (max-width: 600px) { .ez-frame-wrap.is-html .ez-content { height: 75vh; } }

/* Admin code editor */
.code-editor-wrap { border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.code-editor-wrap .CodeMirror { height: 460px; font-size: 13.5px; font-family: ui-monospace, Menlo, Consolas, monospace; }
.code-editor-wrap textarea.input { border: 0; border-radius: 0; min-height: 460px; }
.code-toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; margin: 8px 0; }
.code-msgs { margin-top: 8px; font-size: 13px; }
.code-msgs p { margin: 3px 0; }
/* Admin preview: live advertisement status + diagnostics (text only) */
.pv-status { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--border); background: rgba(255, 255, 255, .03); margin: 0 0 8px; font-size: 14px; }
.pv-status strong { font-weight: 700; }
.pv-status .pv-detail { flex-basis: 100%; font-size: 13px; color: var(--muted); }
.pv-status.is-ok { border-color: rgba(34, 197, 94, .45); } .pv-status.is-ok i { color: var(--green); }
.pv-status.is-bad { border-color: rgba(239, 68, 68, .45); } .pv-status.is-bad i { color: var(--red); }
.pv-status.is-warn { border-color: rgba(245, 158, 11, .45); } .pv-status.is-warn i { color: var(--amber); }
.pv-status.is-busy i { color: var(--pink); }
details.pv-diag { font-size: 12.5px; margin: 0 0 8px; }
details.pv-diag > summary { cursor: pointer; color: var(--muted); }
details.pv-diag ul { margin: 6px 0 0; padding-left: 18px; }
details.pv-diag li { margin: 2px 0; overflow-wrap: anywhere; }
.admin-form-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 14px; }
details.more-opts { border: 1px dashed var(--border); border-radius: 12px; padding: 10px 14px; margin: 12px 0; }
details.more-opts > summary { cursor: pointer; font-weight: 600; }