@import url('https://fonts.googleapis.com/css2?family=Baloo+2:wght@500;600;700;800&family=Inter:wght@400;500;600;700&family=Mukta:wght@400;500;600;700;800&display=swap');

/* ============ Tokens ============ */
:root {
  --bg: #070b19;
  --bg-2: #0c1229;
  --surface: #111936;
  --surface-2: #172147;
  --surface-3: #1f2c5c;
  --border: rgba(255, 255, 255, .07);
  --border-2: rgba(255, 255, 255, .14);
  --text: #f4f6ff;
  --text-2: #aab3d6;
  --text-3: #6c77a3;

  --crimson: #ff2d55;
  --crimson-deep: #c8002f;
  --gold: #ffb800;
  --gold-2: #ffd76a;
  --emerald: #1fd67a;
  --emerald-deep: #0c8f4f;
  --sky: #3d8bff;
  --violet: #8b5cf6;
  --danger: #ff4d5e;

  --r-sm: 10px;
  --r: 16px;
  --r-lg: 24px;
  --shadow: 0 18px 40px -18px rgba(0, 0, 0, .7);
  --glow-crimson: 0 10px 30px -8px rgba(255, 45, 85, .55);
  --glow-gold: 0 10px 30px -8px rgba(255, 184, 0, .45);

  --font-display: 'Baloo 2', 'Mukta', system-ui, sans-serif;
  --font: 'Inter', 'Mukta', system-ui, sans-serif;
  --font-np: 'Mukta', 'Baloo 2', sans-serif;
  --nav-h: 64px;
  --bottom-h: 0px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  font-size: 15px;
  line-height: 1.5;
  overflow-x: hidden;
  padding-bottom: var(--bottom-h);
}
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(900px 500px at 85% -10%, rgba(61, 139, 255, .16), transparent 60%),
    radial-gradient(700px 500px at -10% 20%, rgba(255, 45, 85, .12), transparent 60%),
    radial-gradient(600px 400px at 50% 110%, rgba(255, 184, 0, .08), transparent 60%),
    var(--bg);
}
a { color: inherit; text-decoration: none; }
img, svg { display: block; }
button { font: inherit; color: inherit; }
::selection { background: var(--crimson); color: #fff; }

.np { font-family: var(--font-np); }
.display { font-family: var(--font-display); }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--text-2); }
.faint { color: var(--text-3); }
.small { font-size: 13px; }
.tiny { font-size: 11.5px; }
.hidden { display: none !important; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.col { display: flex; flex-direction: column; gap: 12px; }
.grow { flex: 1; min-width: 0; }
.center { text-align: center; }
h1, h2, h3, h4 { font-family: var(--font-display); margin: 0 0 10px; line-height: 1.1; letter-spacing: -.01em; }
h1 { font-size: clamp(30px, 5vw, 52px); font-weight: 800; }
h2 { font-size: clamp(22px, 3vw, 30px); font-weight: 700; }
h3 { font-size: 20px; font-weight: 700; }
.gold-text { background: linear-gradient(90deg, var(--gold-2), var(--gold) 40%, #ff7a00); -webkit-background-clip: text; background-clip: text; color: transparent; }
.crimson-text { background: linear-gradient(90deg, #ff6b8a, var(--crimson)); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ============ Top bar ============ */
.topbar {
  position: sticky; top: 0; z-index: 40;
  height: var(--nav-h);
  background: rgba(7, 11, 25, .72);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--border);
}
.topbar .wrap { display: flex; align-items: center; gap: 18px; height: 100%; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 800; font-size: 22px; letter-spacing: -.02em; }
.brand-mark { width: 34px; height: 38px; filter: drop-shadow(0 4px 10px rgba(255, 45, 85, .45)); }
.brand small { display: block; font-family: var(--font-np); font-size: 11px; color: var(--gold); font-weight: 600; letter-spacing: .05em; margin-top: -6px; }
.nav { display: flex; gap: 2px; margin-left: 12px; }
.nav a { color: var(--text-2); padding: 8px 14px; border-radius: 999px; font-size: 14px; font-weight: 500; transition: color .15s, background .15s; }
.nav a:hover { color: var(--text); background: rgba(255, 255, 255, .05); }
.nav a.active { color: var(--text); background: var(--surface-2); }

.wallet-pill {
  display: flex; align-items: center; gap: 0;
  background: linear-gradient(180deg, #1c2650, #141c3d);
  border: 1px solid var(--border-2);
  border-radius: 999px;
  padding: 3px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06);
}
.wallet-pill .amt { display: flex; align-items: center; gap: 8px; padding: 0 12px 0 8px; font-weight: 700; font-variant-numeric: tabular-nums; font-size: 15px; }
.wallet-pill .plus {
  width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--gold-2), var(--gold));
  color: #3a2500; font-weight: 800; font-size: 20px; line-height: 1;
  box-shadow: var(--glow-gold);
  transition: transform .15s;
}
.wallet-pill .plus:hover { transform: scale(1.08) rotate(90deg); }
.coin { width: 22px; height: 22px; flex: none; }
.bump { animation: bump .5s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes bump { 30% { transform: scale(1.18); } }

.avatar { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; background: linear-gradient(135deg, var(--violet), var(--sky)); font-size: 14px; cursor: pointer; border: 2px solid rgba(255, 255, 255, .12); position: relative; }
.menu { position: absolute; right: 0; top: 46px; background: var(--surface-2); border: 1px solid var(--border-2); border-radius: var(--r); padding: 6px; min-width: 190px; box-shadow: var(--shadow); z-index: 60; }
.menu a, .menu button { display: flex; width: 100%; padding: 10px 12px; border-radius: var(--r-sm); background: none; border: 0; cursor: pointer; font-size: 14px; color: var(--text); text-align: left; gap: 10px; align-items: center; }
.menu a:hover, .menu button:hover { background: rgba(255, 255, 255, .06); }
.menu .who { padding: 10px 12px 8px; border-bottom: 1px solid var(--border); margin-bottom: 4px; }

/* Bottom nav (mobile) */
.bottomnav { display: none; }
@media (max-width: 720px) {
  :root { --nav-h: 58px; --bottom-h: 68px; }
  .nav { display: none; }
  .brand { font-size: 19px; }
  .brand-mark { width: 28px; height: 32px; }
  .bottomnav {
    display: grid; grid-template-columns: repeat(var(--cols, 3), 1fr);
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    height: var(--bottom-h);
    padding-bottom: env(safe-area-inset-bottom);
    background: rgba(9, 13, 30, .92);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-top: 1px solid var(--border);
  }
  .bottomnav a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 11px; color: var(--text-3); font-weight: 500; }
  .bottomnav a svg { width: 22px; height: 22px; }
  .bottomnav a.active { color: var(--gold); }
}

/* ============ Buttons ============ */
.btn {
  --b: var(--surface-3);
  border: 0; cursor: pointer;
  font-weight: 600; font-size: 15px;
  padding: 11px 20px; border-radius: 12px;
  background: var(--b); color: var(--text);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  transition: transform .12s, filter .15s, box-shadow .15s;
  user-select: none; white-space: nowrap;
}
.btn:hover { filter: brightness(1.12); }
.btn:active { transform: translateY(1px) scale(.98); }
.btn:disabled { opacity: .45; cursor: not-allowed; filter: grayscale(.4); transform: none; }
.btn.primary { background: linear-gradient(180deg, #ff4b6e, var(--crimson) 45%, var(--crimson-deep)); box-shadow: var(--glow-crimson), inset 0 1px 0 rgba(255, 255, 255, .25); }
.btn.gold { background: linear-gradient(180deg, var(--gold-2), var(--gold) 50%, #e08a00); color: #3a2400; box-shadow: var(--glow-gold), inset 0 1px 0 rgba(255, 255, 255, .5); }
.btn.green { background: linear-gradient(180deg, #3ee891, var(--emerald) 50%, var(--emerald-deep)); color: #032814; }
.btn.blue { background: linear-gradient(180deg, #67a5ff, var(--sky) 50%, #1f5fd1); }
.btn.ghost { background: transparent; border: 1px solid var(--border-2); }
.btn.ghost:hover { background: rgba(255, 255, 255, .05); }
.btn.sm { padding: 7px 13px; font-size: 13px; border-radius: 10px; }
.btn.lg { padding: 15px 26px; font-size: 17px; border-radius: 14px; }
.btn.xl { padding: 18px 28px; font-size: 19px; border-radius: 16px; font-family: var(--font-display); font-weight: 800; letter-spacing: .01em; }
.btn.block { width: 100%; }
.btn.icon { padding: 0; width: 40px; height: 40px; border-radius: 12px; }

/* ============ Forms ============ */
input, select, textarea {
  font: inherit; color: var(--text);
  background: var(--bg-2);
  border: 1px solid var(--border-2);
  border-radius: 12px;
  padding: 12px 14px; width: 100%;
  transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--sky); box-shadow: 0 0 0 4px rgba(61, 139, 255, .18); }
input::placeholder { color: var(--text-3); }
label, .label { display: block; font-size: 12.5px; font-weight: 600; color: var(--text-2); margin: 14px 0 7px; letter-spacing: .02em; }
.field-hint { font-size: 12px; color: var(--text-3); margin-top: 6px; }

/* ============ Surfaces ============ */
.card {
  background: linear-gradient(180deg, rgba(255, 255, 255, .025), transparent 40%), var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 22px;
  box-shadow: var(--shadow);
}
.card.flat { box-shadow: none; }
.grid { display: grid; gap: 16px; }
.grid.cols-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid.cols-4 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
section { margin: 36px 0; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.section-head h2 { margin: 0; }
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); }

.tag { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; padding: 4px 9px; border-radius: 999px; background: rgba(255, 255, 255, .08); color: var(--text-2); backdrop-filter: blur(6px); }
.tag.skill { background: rgba(61, 139, 255, .18); color: #9cc4ff; }
.tag.chance { background: rgba(255, 45, 85, .18); color: #ff9db1; }
.tag.hot { background: rgba(255, 184, 0, .2); color: var(--gold-2); }

/* Chips & segmented */
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { padding: 8px 15px; border-radius: 999px; border: 1px solid var(--border-2); background: transparent; cursor: pointer; font-size: 13.5px; font-weight: 600; color: var(--text-2); transition: all .15s; }
.chip:hover { color: var(--text); border-color: rgba(255, 255, 255, .3); }
.chip.on { background: var(--text); color: var(--bg); border-color: var(--text); }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; background: var(--bg-2); padding: 4px; border-radius: 14px; border: 1px solid var(--border); }
.seg button { border: 0; background: transparent; padding: 10px 12px; border-radius: 10px; cursor: pointer; font-weight: 600; font-size: 14px; color: var(--text-2); transition: all .15s; display: flex; align-items: center; justify-content: center; gap: 8px; }
.seg button.on { background: var(--surface-3); color: var(--text); box-shadow: 0 4px 12px -4px rgba(0, 0, 0, .5); }

/* ============ Tables & lists ============ */
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--border); vertical-align: middle; }
th { color: var(--text-3); font-weight: 600; font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; }
tr:last-child td { border-bottom: 0; }
.table-wrap { overflow-x: auto; margin: 0 -6px; }
.pos { color: var(--emerald); }
.neg { color: var(--danger); }
.status { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px; background: rgba(255, 255, 255, .07); text-transform: capitalize; }
.status::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status.pending, .status.active { background: rgba(255, 184, 0, .14); color: var(--gold-2); }
.status.approved, .status.paid, .status.won { background: rgba(31, 214, 122, .14); color: #5ef0a3; }
.status.rejected, .status.lost, .status.banned { background: rgba(255, 77, 94, .14); color: #ff8f9a; }
.status.draw { background: rgba(61, 139, 255, .15); color: #9cc4ff; }

.list { display: flex; flex-direction: column; }
.list-item { display: flex; align-items: center; gap: 14px; padding: 14px 4px; border-bottom: 1px solid var(--border); }
.list-item:last-child { border-bottom: 0; }
.list-icon { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; flex: none; font-size: 18px; background: var(--surface-2); }
.empty { text-align: center; padding: 36px 16px; color: var(--text-3); }
.empty .big { font-size: 40px; margin-bottom: 6px; }

/* ============ Toast ============ */
#toasts { position: fixed; left: 50%; top: calc(var(--nav-h) + 12px); transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; width: min(420px, calc(100% - 32px)); pointer-events: none; }
.toast { display: flex; gap: 10px; align-items: center; background: rgba(23, 33, 71, .96); border: 1px solid var(--border-2); padding: 12px 16px; border-radius: 14px; box-shadow: var(--shadow); font-size: 14px; font-weight: 500; animation: toast-in .35s cubic-bezier(.2, 1.4, .4, 1); backdrop-filter: blur(10px); }
.toast.err { border-color: rgba(255, 77, 94, .5); }
.toast.out { animation: toast-out .25s forwards; }
@keyframes toast-in { from { opacity: 0; transform: translateY(-14px) scale(.96); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(-10px); } }

/* ============ Modal ============ */
.modal-bg { position: fixed; inset: 0; background: rgba(3, 5, 14, .72); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); display: flex; align-items: center; justify-content: center; z-index: 100; padding: 16px; animation: fade-in .2s; }
.modal { width: 100%; max-width: 420px; position: relative; animation: pop-in .35s cubic-bezier(.2, 1.3, .4, 1); }
.modal .x { position: absolute; right: 14px; top: 14px; background: rgba(255, 255, 255, .06); border: 0; width: 34px; height: 34px; border-radius: 50%; cursor: pointer; font-size: 18px; color: var(--text-2); }
@keyframes fade-in { from { opacity: 0; } }
@keyframes pop-in { from { opacity: 0; transform: scale(.9) translateY(10px); } }
.auth-hero { margin: -22px -22px 18px; padding: 26px 22px 18px; border-radius: var(--r-lg) var(--r-lg) 0 0; background: radial-gradient(400px 180px at 80% 0, rgba(255, 45, 85, .35), transparent), radial-gradient(300px 160px at 0 100%, rgba(255, 184, 0, .2), transparent); border-bottom: 1px solid var(--border); }

/* ============ Result overlay ============ */
.result-bg { position: fixed; inset: 0; z-index: 120; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(3, 5, 14, .55); backdrop-filter: blur(3px); animation: fade-in .25s; }
.result-card { width: min(380px, 100%); text-align: center; padding: 30px 24px 22px; border-radius: 28px; position: relative; overflow: hidden; animation: result-in .55s cubic-bezier(.2, 1.4, .35, 1); border: 1px solid var(--border-2); box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .8); }
.result-card.won { background: radial-gradient(420px 260px at 50% -10%, rgba(255, 184, 0, .45), transparent 70%), linear-gradient(180deg, #2a2108, #141022); }
.result-card.lost { background: radial-gradient(420px 260px at 50% -10%, rgba(255, 45, 85, .3), transparent 70%), linear-gradient(180deg, #24101a, #110d1f); }
.result-card.draw { background: radial-gradient(420px 260px at 50% -10%, rgba(61, 139, 255, .35), transparent 70%), linear-gradient(180deg, #101a33, #0e1022); }
.result-card .emoji { font-size: 64px; line-height: 1; margin-bottom: 4px; animation: float 2.4s ease-in-out infinite; }
.result-card .title { font-family: var(--font-display); font-size: 36px; font-weight: 800; line-height: 1; margin: 6px 0 2px; }
.result-card .title-np { font-family: var(--font-np); font-size: 18px; color: var(--text-2); font-weight: 600; }
.result-card .amount { font-family: var(--font-display); font-size: 52px; font-weight: 800; margin: 14px 0 0; display: flex; justify-content: center; align-items: center; gap: 10px; font-variant-numeric: tabular-nums; }
.result-card .amount .coin { width: 40px; height: 40px; }
.result-card .detail { color: var(--text-2); font-size: 14px; margin: 6px 0 20px; min-height: 20px; }
.result-card .actions { display: grid; grid-template-columns: 1fr 1.4fr; gap: 10px; }
.result-card .rays { position: absolute; left: 50%; top: 70px; width: 600px; height: 600px; margin-left: -300px; margin-top: -300px; background: repeating-conic-gradient(rgba(255, 215, 106, .12) 0 10deg, transparent 10deg 20deg); animation: spin 18s linear infinite; mask-image: radial-gradient(circle, #000 0, transparent 60%); -webkit-mask-image: radial-gradient(circle, #000 0, transparent 60%); pointer-events: none; }
.result-card > *:not(.rays) { position: relative; }
@keyframes result-in { from { opacity: 0; transform: scale(.7) translateY(30px); } }
@keyframes float { 50% { transform: translateY(-6px) rotate(-3deg); } }
@keyframes spin { to { transform: rotate(360deg); } }

#confetti { position: fixed; inset: 0; pointer-events: none; z-index: 150; }

/* ============ Lobby ============ */
.hero {
  position: relative; overflow: hidden;
  border-radius: 30px; margin-top: 22px;
  min-height: 360px;
  display: grid; grid-template-columns: 1.05fr 1fr; align-items: center;
  background: linear-gradient(120deg, #1a0b2e 0%, #3a0b2a 45%, #7a1530 75%, #ff7a2f 130%);
  border: 1px solid rgba(255, 255, 255, .08);
  box-shadow: 0 40px 80px -40px rgba(255, 45, 85, .5);
}
.hero-copy { padding: 44px 0 44px 44px; position: relative; z-index: 2; }
.hero-copy p { color: rgba(255, 255, 255, .8); font-size: 17px; max-width: 460px; margin: 0 0 24px; }
.hero-copy h1 { margin-bottom: 14px; }
.hero-art { position: absolute; inset: 0 0 0 38%; }
.hero-art svg { width: 100%; height: 100%; }
.hero-badges { display: flex; gap: 18px; margin-top: 26px; flex-wrap: wrap; }
.hero-badges div { font-size: 13px; color: rgba(255, 255, 255, .75); display: flex; align-items: center; gap: 8px; }
.hero-badges b { color: #fff; }
@media (max-width: 820px) {
  .hero { grid-template-columns: 1fr; min-height: 0; border-radius: 24px; }
  .hero-copy { padding: 210px 22px 26px; }
  .hero-art { inset: 0 0 auto 0; height: 250px; }
  .hero-copy::before { content: ''; position: absolute; inset: 150px 0 0; background: linear-gradient(180deg, transparent, #3a0b2a 70px); z-index: -1; }
  .hero-copy p { font-size: 15px; }
}

.ticker { margin-top: 18px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); display: flex; align-items: center; overflow: hidden; height: 50px; }
.ticker .live { flex: none; display: flex; align-items: center; gap: 8px; padding: 0 16px; height: 100%; font-weight: 700; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--emerald); background: linear-gradient(90deg, var(--surface) 70%, transparent); position: relative; z-index: 2; }
.ticker .live::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--emerald); box-shadow: 0 0 0 0 rgba(31, 214, 122, .6); animation: ping 1.6s infinite; }
@keyframes ping { 70% { box-shadow: 0 0 0 10px rgba(31, 214, 122, 0); } 100% { box-shadow: 0 0 0 0 rgba(31, 214, 122, 0); } }
.ticker-track { display: flex; gap: 34px; white-space: nowrap; animation: marquee 40s linear infinite; padding-left: 10px; }
.ticker:hover .ticker-track { animation-play-state: paused; }
.ticker-item { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--text-2); }
.ticker-item b { color: var(--text); }
.ticker-item .win { color: var(--gold-2); font-weight: 700; }
@keyframes marquee { to { transform: translateX(-50%); } }

.game-grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
@media (max-width: 560px) { .game-grid { grid-template-columns: 1fr 1fr; gap: 12px; } }
.gcard {
  position: relative; display: flex; flex-direction: column;
  border-radius: 22px; overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  transition: transform .25s cubic-bezier(.2, 1, .3, 1), box-shadow .25s, border-color .25s;
  isolation: isolate;
}
.gcard:hover { transform: translateY(-6px); border-color: rgba(255, 255, 255, .18); box-shadow: 0 30px 50px -25px var(--accent, rgba(255, 45, 85, .6)); }
.gcard .cover { position: relative; aspect-ratio: 4 / 3; overflow: hidden; }
.gcard .cover svg { width: 100%; height: 100%; transition: transform .5s cubic-bezier(.2, 1, .3, 1); }
.gcard:hover .cover svg { transform: scale(1.06); }
.gcard .cover .tag { position: absolute; top: 12px; left: 12px; }
.gcard .cover::after { content: ''; position: absolute; inset: auto 0 0; height: 50%; background: linear-gradient(transparent, var(--surface)); }
.gcard .body { padding: 2px 18px 18px; display: flex; flex-direction: column; gap: 3px; flex: 1; }
.gcard .name { font-family: var(--font-display); font-size: 22px; font-weight: 800; line-height: 1.05; }
.gcard .name-np { font-family: var(--font-np); color: var(--gold-2); font-weight: 600; font-size: 15px; }
.gcard .desc { color: var(--text-2); font-size: 13px; margin: 6px 0 12px; }
.gcard .foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.gcard .foot .from { font-size: 12px; color: var(--text-3); }
.gcard .foot .from b { color: var(--text); font-size: 14px; }
.gcard .play { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--accent, var(--crimson)); color: #fff; transition: transform .2s; box-shadow: 0 8px 18px -6px var(--accent); }
.gcard:hover .play { transform: scale(1.12); }
@media (max-width: 560px) {
  .gcard .body { padding: 0 12px 14px; }
  .gcard .name { font-size: 18px; }
  .gcard .desc { display: none; }
  .gcard .name-np { font-size: 13px; margin-bottom: 8px; }
  .gcard .play { width: 34px; height: 34px; }
}

.steps { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); counter-reset: s; }
.step { padding: 24px; border-radius: 22px; background: var(--surface); border: 1px solid var(--border); position: relative; overflow: hidden; }
.step .n { position: absolute; right: 16px; top: 4px; font-family: var(--font-display); font-size: 80px; font-weight: 800; color: rgba(255, 255, 255, .04); line-height: 1; }
.step .ic { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; font-size: 24px; margin-bottom: 14px; }
.step p { color: var(--text-2); margin: 0; font-size: 14px; }

.footer { border-top: 1px solid var(--border); margin-top: 50px; padding: 30px 0 40px; color: var(--text-3); font-size: 13px; }
.footer .wrap { display: flex; gap: 16px; justify-content: space-between; flex-wrap: wrap; align-items: center; }
.age { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--danger); color: var(--danger); font-weight: 800; font-size: 12px; }

/* ============ Game shell ============ */
.game-top { display: flex; align-items: center; gap: 14px; padding: 18px 0 14px; }
.game-top .back { width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--border); flex: none; transition: background .15s; }
.game-top .back:hover { background: var(--surface-2); }
.game-top .title { font-family: var(--font-display); font-size: 26px; font-weight: 800; line-height: 1; }
.game-top .title span { font-family: var(--font-np); color: var(--gold-2); font-size: 18px; font-weight: 600; margin-left: 8px; }
.game-top .sub { font-size: 12.5px; color: var(--text-3); margin-top: 4px; display: flex; gap: 8px; align-items: center; }
.game-body { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 18px; align-items: start; }
.stage {
  position: relative; border-radius: 26px; overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  min-height: 460px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  box-shadow: var(--shadow);
}
.dock { position: sticky; top: calc(var(--nav-h) + 16px); display: flex; flex-direction: column; gap: 14px; }
.dock .card { padding: 18px; }
@media (max-width: 900px) {
  .game-body { grid-template-columns: 1fr; }
  .dock { position: static; }
  .stage { min-height: 0; border-radius: 22px; }
  .game-top .title { font-size: 22px; }
  .game-top { padding: 12px 0 10px; }
}

.stake {
  display: flex; align-items: center; gap: 8px;
  background: var(--bg-2); border: 1px solid var(--border-2);
  border-radius: 16px; padding: 6px;
}
.stake button { width: 44px; height: 44px; border-radius: 12px; border: 0; background: var(--surface-3); cursor: pointer; font-size: 22px; font-weight: 600; transition: background .15s, transform .1s; flex: none; }
.stake button:hover { background: #2a3a76; }
.stake button:active { transform: scale(.94); }
.stake .val { flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px; }
.stake input { background: transparent; border: 0; text-align: center; font-family: var(--font-display); font-size: 26px; font-weight: 800; padding: 0; width: 100%; min-width: 0; -moz-appearance: textfield; }
.stake input:focus { box-shadow: none; }
.stake input::-webkit-outer-spin-button, .stake input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.stake-quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 8px; }
.stake-quick button { padding: 8px 0; border-radius: 10px; border: 1px solid var(--border); background: transparent; cursor: pointer; font-size: 13px; font-weight: 600; color: var(--text-2); transition: all .15s; }
.stake-quick button:hover { color: var(--text); background: rgba(255, 255, 255, .05); }
.win-preview { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; border-radius: 14px; background: linear-gradient(90deg, rgba(255, 184, 0, .1), transparent); border: 1px solid rgba(255, 184, 0, .18); font-size: 13.5px; color: var(--text-2); }
.win-preview b { font-family: var(--font-display); font-size: 20px; color: var(--gold-2); display: flex; align-items: center; gap: 6px; }
.win-preview .coin { width: 18px; height: 18px; }

.rules summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; align-items: center; justify-content: space-between; }
.rules summary::-webkit-details-marker { display: none; }
.rules summary::after { content: '+'; font-size: 20px; color: var(--text-3); transition: transform .2s; }
.rules[open] summary::after { transform: rotate(45deg); }
.rules ul { margin: 12px 0 0; padding-left: 18px; color: var(--text-2); font-size: 13.5px; }
.rules li { margin: 6px 0; }

.pay-table { display: grid; gap: 6px; }
.pay-table .r { display: flex; justify-content: space-between; padding: 8px 12px; border-radius: 10px; background: var(--bg-2); font-size: 13.5px; }
.pay-table .r b { color: var(--gold-2); font-family: var(--font-display); font-size: 16px; }

.sound-btn { margin-left: auto; }

.stage-overlay { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; z-index: 5; pointer-events: none; text-align: center; }
.big-call { font-family: var(--font-display); font-weight: 800; font-size: clamp(42px, 9vw, 86px); line-height: 1; text-shadow: 0 6px 30px rgba(0, 0, 0, .5); animation: call .9s cubic-bezier(.2, 1.5, .4, 1) forwards; }
@keyframes call { 0% { transform: scale(.3); opacity: 0; } 30% { transform: scale(1.15); opacity: 1; } 70% { transform: scale(1); opacity: 1; } 100% { transform: scale(1.05); opacity: 0; } }

.shake { animation: shake .4s; }
@keyframes shake { 20% { transform: translateX(-8px); } 40% { transform: translateX(7px); } 60% { transform: translateX(-5px); } 80% { transform: translateX(3px); } }

.pulse { animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .55; transform: scale(.97); } }

.dots::after { content: ''; animation: dots 1.2s steps(4) infinite; }
@keyframes dots { 0% { content: ''; } 25% { content: '.'; } 50% { content: '..'; } 75% { content: '...'; } }

/* ============ Wallet ============ */
.balance-card {
  position: relative; overflow: hidden; border-radius: 28px; padding: 28px;
  background: radial-gradient(500px 260px at 100% 0, rgba(255, 184, 0, .35), transparent 60%), radial-gradient(400px 260px at 0 100%, rgba(255, 45, 85, .35), transparent 60%), linear-gradient(135deg, #1d1440, #2a0f2c);
  border: 1px solid rgba(255, 255, 255, .1);
  box-shadow: 0 30px 60px -30px rgba(255, 45, 85, .5);
}
.balance-card .amt { font-family: var(--font-display); font-size: clamp(42px, 7vw, 62px); font-weight: 800; line-height: 1; display: flex; align-items: center; gap: 12px; margin: 8px 0 4px; font-variant-numeric: tabular-nums; }
.balance-card .amt .coin { width: 44px; height: 44px; }
.balance-card .pattern { position: absolute; right: -40px; bottom: -60px; width: 260px; opacity: .14; pointer-events: none; }

.method-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.method { padding: 14px 10px; border-radius: 16px; border: 2px solid var(--border-2); background: var(--bg-2); cursor: pointer; text-align: center; transition: all .15s; display: flex; flex-direction: column; align-items: center; gap: 8px; font-weight: 600; font-size: 14px; }
.method:hover { border-color: rgba(255, 255, 255, .3); }
.method.on { border-color: var(--gold); background: rgba(255, 184, 0, .07); box-shadow: 0 0 0 4px rgba(255, 184, 0, .12); }
.method .mlogo { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; font-weight: 800; font-size: 18px; color: #fff; font-family: var(--font-display); }

.pay-box { margin-top: 14px; padding: 16px; border-radius: 18px; background: var(--bg-2); border: 1px dashed var(--border-2); display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: center; }
.pay-box .kv { display: flex; flex-direction: column; gap: 10px; }
.pay-box .k { font-size: 11.5px; color: var(--text-3); text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
.pay-box .v { font-weight: 700; font-size: 16px; display: flex; align-items: center; gap: 8px; }
.copy { border: 0; background: rgba(255, 255, 255, .08); color: var(--text-2); font-size: 11.5px; padding: 4px 9px; border-radius: 8px; cursor: pointer; font-weight: 600; }
.copy:hover { color: var(--text); }
.pay-box img { width: 120px; height: 120px; border-radius: 12px; background: #fff; padding: 6px; }

.amount-chips { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 8px; }
.amount-chips button { padding: 10px 0; border-radius: 12px; border: 1px solid var(--border-2); background: transparent; cursor: pointer; font-weight: 700; font-size: 14px; transition: all .15s; }
.amount-chips button:hover, .amount-chips button.on { border-color: var(--gold); color: var(--gold-2); background: rgba(255, 184, 0, .06); }

.drop { border: 2px dashed var(--border-2); border-radius: 16px; padding: 18px; text-align: center; cursor: pointer; transition: all .15s; color: var(--text-2); font-size: 13.5px; position: relative; }
.drop:hover, .drop.over { border-color: var(--sky); background: rgba(61, 139, 255, .06); }
.drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.drop img { max-height: 140px; margin: 0 auto 8px; border-radius: 10px; }

.stepper { display: flex; gap: 10px; align-items: center; margin-bottom: 16px; }
.stepper .s { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 13px; background: var(--gold); color: #3a2400; flex: none; }

/* ============ Admin ============ */
.admin-layout { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 20px; margin-top: 20px; align-items: start; }
.side-nav { position: sticky; top: calc(var(--nav-h) + 16px); display: flex; flex-direction: column; gap: 3px; background: var(--surface); border: 1px solid var(--border); border-radius: 20px; padding: 10px; }
.side-nav button { display: flex; align-items: center; gap: 10px; border: 0; background: transparent; padding: 11px 12px; border-radius: 12px; cursor: pointer; color: var(--text-2); font-size: 14px; font-weight: 500; text-align: left; }
.side-nav button:hover { background: rgba(255, 255, 255, .04); color: var(--text); }
.side-nav button.on { background: var(--surface-3); color: var(--text); }
.side-nav .badge { margin-left: auto; background: var(--crimson); color: #fff; border-radius: 999px; font-size: 11px; font-weight: 700; padding: 1px 7px; }
@media (max-width: 860px) {
  .admin-layout { grid-template-columns: 1fr; }
  .side-nav { position: static; flex-direction: row; overflow-x: auto; }
  .side-nav button { white-space: nowrap; }
}
.kpi { padding: 18px; border-radius: 20px; background: var(--surface); border: 1px solid var(--border); }
.kpi .k { color: var(--text-3); font-size: 12.5px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.kpi .v { font-family: var(--font-display); font-size: 30px; font-weight: 800; margin-top: 6px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.kpi .s { color: var(--text-3); font-size: 12.5px; margin-top: 2px; }
.kpi.alert { border-color: rgba(255, 184, 0, .35); background: linear-gradient(180deg, rgba(255, 184, 0, .08), transparent), var(--surface); }
textarea.cfg { font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-size: 12.5px; min-height: 170px; line-height: 1.5; }
.shot { max-width: 92vw; max-height: 82vh; border-radius: 14px; }
code { background: var(--bg-2); padding: 2px 7px; border-radius: 7px; font-size: 12.5px; word-break: break-all; font-family: ui-monospace, Menlo, monospace; }

/* Switch */
.switch { position: relative; width: 44px; height: 26px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch span { position: absolute; inset: 0; background: var(--surface-3); border-radius: 999px; cursor: pointer; transition: background .2s; }
.switch span::after { content: ''; position: absolute; left: 3px; top: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .2s; }
.switch input:checked + span { background: var(--emerald); }
.switch input:checked + span::after { transform: translateX(18px); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ============ Notifications ============ */
.bell { position: relative; width: 38px; height: 38px; border-radius: 50%; }
.bell-dot { position: absolute; top: -3px; right: -3px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--crimson); color: #fff; font-size: 10.5px; font-weight: 800; display: grid; place-items: center; box-shadow: 0 0 0 2px var(--bg); animation: bump .5s; }
.menu.inbox { width: min(360px, calc(100vw - 24px)); max-height: 70vh; overflow-y: auto; right: -50px; }
.note { display: flex !important; gap: 10px; align-items: flex-start !important; padding: 10px 12px !important; border-radius: 12px; line-height: 1.35; }
.note .ni { font-size: 18px; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--surface-3); flex: none; }
.note b { font-size: 13.5px; font-weight: 600; }
.note.unread { background: rgba(255, 184, 0, .07); }
.note.unread b::before { content: ''; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--gold); margin-right: 6px; vertical-align: 1px; }
@media (max-width: 720px) { .menu.inbox { position: fixed; left: 12px; right: 12px; top: calc(var(--nav-h) + 6px); width: auto; } }

/* ============ Leaderboard ============ */
.podium { display: grid; grid-template-columns: 1fr 1.15fr 1fr; gap: 12px; align-items: end; margin: 10px 0 22px; }
.pod { text-align: center; border-radius: 22px 22px 14px 14px; padding: 18px 10px 16px; background: var(--surface); border: 1px solid var(--border); position: relative; }
.pod .medal { font-size: 34px; line-height: 1; }
.pod .av { width: 58px; height: 58px; margin: 8px auto 8px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 20px; background: linear-gradient(135deg, var(--violet), var(--sky)); border: 3px solid rgba(255, 255, 255, .2); }
.pod .nm { font-weight: 700; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pod .net { font-family: var(--font-display); font-weight: 800; font-size: 22px; margin-top: 2px; }
.pod.p1 { padding-top: 26px; background: linear-gradient(180deg, rgba(255, 184, 0, .22), var(--surface) 70%); border-color: rgba(255, 184, 0, .45); }
.pod.p1 .av { width: 72px; height: 72px; border-color: var(--gold); box-shadow: 0 0 30px -4px rgba(255, 184, 0, .6); }
.pod.p2 { background: linear-gradient(180deg, rgba(200, 210, 230, .16), var(--surface) 70%); }
.pod.p3 { background: linear-gradient(180deg, rgba(205, 127, 50, .2), var(--surface) 70%); }
.rank-row { display: grid; grid-template-columns: 44px 1fr auto auto; gap: 12px; align-items: center; padding: 12px 10px; border-bottom: 1px solid var(--border); }
.rank-row .rk { font-family: var(--font-display); font-weight: 800; font-size: 18px; color: var(--text-3); text-align: center; }
.rank-row.me { background: rgba(61, 139, 255, .1); border-radius: 12px; border-bottom-color: transparent; box-shadow: inset 3px 0 0 var(--sky); }
.rank-row .net { font-family: var(--font-display); font-weight: 800; font-size: 17px; min-width: 70px; text-align: right; }
.my-rank { position: sticky; bottom: calc(var(--bottom-h) + 12px); margin-top: 14px; border-radius: 16px; background: rgba(23, 33, 71, .95); border: 1px solid rgba(61, 139, 255, .4); backdrop-filter: blur(10px); box-shadow: var(--shadow); }
@media (max-width: 560px) { .rank-row { grid-template-columns: 34px 1fr auto; } .rank-row .wins { display: none; } .podium { gap: 8px; } .pod .nm { font-size: 13px; } .pod .net { font-size: 18px; } }

/* ============ Invite ============ */
.invite-hero { position: relative; overflow: hidden; border-radius: 28px; padding: 30px; margin-top: 22px; background: radial-gradient(500px 300px at 100% 0, rgba(31, 214, 122, .3), transparent 60%), radial-gradient(400px 300px at 0 100%, rgba(255, 184, 0, .28), transparent 60%), linear-gradient(135deg, #0f2b2a, #1d1440); border: 1px solid rgba(255, 255, 255, .1); }
.code-box { display: flex; align-items: center; gap: 10px; background: rgba(0, 0, 0, .35); border: 2px dashed rgba(255, 215, 106, .5); border-radius: 18px; padding: 10px 10px 10px 20px; max-width: 520px; }
.code-box .code { font-family: var(--font-display); font-size: 34px; font-weight: 800; letter-spacing: .18em; color: var(--gold-2); flex: 1; }
.share-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.share-row a, .share-row button { border-radius: 12px; }
.live-dot { display: inline-flex; align-items: center; gap: 6px; }
.live-dot::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; animation: ping 1.6s infinite; }
@media (max-width: 1100px) and (min-width: 721px) { .nav a { padding: 8px 9px; font-size: 13px; } .brand small { display: none; } }
.nav a { white-space: nowrap; }
@media (max-width: 1000px) and (min-width: 721px) { .topbar.authed .brand-text { display: none; } }
@media (max-width: 440px) { .topbar.authed .brand-text { display: none; } .topbar .wrap { gap: 10px; } .wallet-pill .amt { padding: 0 8px 0 6px; } }

/* ============ Visual polish pass ============ */
/* Ticker: items fade out at both edges instead of sliding under the label. */
.ticker .live { background: var(--surface); box-shadow: 14px 0 14px -4px var(--surface); }
.ticker-viewport { flex: 1; min-width: 0; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 40px, #000 calc(100% - 40px), transparent); mask-image: linear-gradient(90deg, transparent, #000 40px, #000 calc(100% - 40px), transparent); }
.ticker-item .coin { width: 18px; height: 18px; }

/* Six games sit as two even rows of three on desktop. */
@media (min-width: 900px) { .game-grid { grid-template-columns: repeat(3, 1fr); gap: 22px; } }

/* Line icons in place of emoji. */
.hero-badges div { gap: 7px; }
.hero-badges svg { width: 16px; height: 16px; color: var(--gold-2); flex: none; }
.chip { display: inline-flex; align-items: center; gap: 6px; }
.chip svg { width: 15px; height: 15px; }
.step .ic svg { width: 26px; height: 26px; }
.step .ic { color: var(--text); }

/* Phone hero: buttons share one width. */
@media (max-width: 560px) {
  #cta { flex-direction: column; align-items: stretch; }
  #cta .btn { width: 100%; }
  .hero-badges { gap: 10px 16px; }
}

/* Loading placeholders. */
.skeleton { position: relative; overflow: hidden; background: var(--surface); border: 1px solid var(--border); border-radius: 22px; min-height: 300px; }
.skeleton::after { content: ''; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 20%, rgba(255, 255, 255, .05) 50%, transparent 80%); animation: shimmer 1.4s infinite; transform: translateX(-100%); }
@keyframes shimmer { to { transform: translateX(100%); } }
@media (max-width: 560px) { .skeleton { min-height: 220px; } }

/* Leaderboard: quieter colour for players below zero. */
.net-down { color: var(--text-3); }
.ticker-track { padding-left: 34px; }
.step:nth-child(1) .ic { color: #5ef0a3; } .step:nth-child(2) .ic { color: var(--gold-2); } .step:nth-child(3) .ic { color: #ff8fa3; }
