/* ==========================================================================
   Wazbii Casino — dark-neon theme (school project, frontend only)
   ========================================================================== */

:root {
  --bg:        #0a0a12;
  --bg-2:      #11111f;
  --surface:   #161628;
  --surface-2: #1d1d34;
  --line:      #2a2a45;
  --text:      #eef0ff;
  --muted:     #9aa0c4;
  --accent:    #a855f7;   /* neon purple */
  --accent-2:  #22d3ee;   /* neon cyan   */
  --gold:      #ffc83d;
  --danger:    #ff5b7a;
  --success:   #2ee6a6;
  --radius:    14px;
  --radius-sm: 9px;
  --maxw:      1240px;
  --glow:      0 0 24px rgba(168, 85, 247, .45);
  --glow-cyan: 0 0 22px rgba(34, 211, 238, .40);
  --shadow:    0 18px 40px rgba(0, 0, 0, .5);
  --font:      'Poppins', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }

/* off-canvas drawers (right rail / left nav) are pushed past the viewport edge;
   clip horizontal overflow so they don't create a horizontal scrollbar (which
   otherwise leaves a gap below the fixed sidebar). `clip` (not `hidden`) avoids
   creating a scroll container, so the sticky header keeps working. */
html { scroll-behavior: smooth; overflow-x: clip; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(1100px 600px at 12% -8%, rgba(168, 85, 247, .18), transparent 60%),
    radial-gradient(900px 520px at 92% 4%, rgba(34, 211, 238, .14), transparent 55%),
    var(--bg);
  min-height: 100vh;
  line-height: 1.55;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 20px; }

/* ---- buttons ------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-weight: 600; cursor: pointer;
  padding: 11px 20px; border-radius: 999px; border: 1px solid transparent;
  transition: transform .12s ease, box-shadow .2s ease, background .2s ease, border-color .2s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: linear-gradient(135deg, var(--accent), #7c3aed);
  color: #fff; box-shadow: var(--glow);
}
.btn-primary:hover { box-shadow: 0 0 30px rgba(168, 85, 247, .7); }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--text); }
.btn-ghost:hover { border-color: var(--accent); color: #fff; }
.btn-cyan { background: linear-gradient(135deg, var(--accent-2), #0ea5b7); color: #04141a; box-shadow: var(--glow-cyan); }
.btn-gold { background: linear-gradient(135deg, var(--gold), #f59e0b); color: #2a1b00; }
.btn-block { width: 100%; }
.btn-sm { padding: 8px 14px; font-size: .85rem; }

/* ---- header -------------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 60;
  background: rgba(10, 10, 18, .82);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 18px; height: 70px; }

.logo { display: inline-flex; align-items: baseline; gap: 2px; font-weight: 800; font-size: 1.5rem; letter-spacing: 1px; }
.logo .w-mark { color: #fff; text-shadow: var(--glow); }
.logo .w-accent { color: var(--accent-2); text-shadow: var(--glow-cyan); }
.logo .w-dot { color: var(--accent); }

.main-nav { display: flex; gap: 4px; margin-left: 8px; }
.main-nav a {
  padding: 8px 14px; border-radius: 999px; color: var(--muted); font-weight: 500;
  transition: color .15s, background .15s;
}
.main-nav a:hover { color: #fff; background: var(--surface); }
.main-nav a.active { color: #fff; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }

.header-search { position: relative; flex: 1 1 auto; max-width: 560px; min-width: 200px; margin-left: 18px; }
.header-search input {
  width: 100%; padding: 10px 14px 10px 38px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line); color: var(--text); font: inherit;
}
.header-search input:focus { outline: none; border-color: var(--accent); }
.header-search .s-icon { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--muted); }

.header-actions { display: flex; align-items: center; gap: 10px; }

.user-chip { display: flex; align-items: center; gap: 10px; }
.user-chip .balance {
  background: var(--surface); border: 1px solid var(--line); padding: 7px 14px; border-radius: 999px;
  font-weight: 700; color: var(--gold);
}
.user-chip .avatar {
  width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-weight: 700;
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #06121a;
}

.hamburger { display: none; background: none; border: 0; color: var(--text); font-size: 1.6rem; cursor: pointer; }

/* ---- hero ---------------------------------------------------------------- */
.hero {
  position: relative; overflow: hidden; margin-top: 26px;
  border-radius: 22px; border: 1px solid var(--line);
  background:
    radial-gradient(600px 300px at 85% 20%, rgba(34, 211, 238, .22), transparent 60%),
    linear-gradient(120deg, rgba(168, 85, 247, .28), rgba(13, 13, 28, .6)),
    var(--surface);
  padding: 56px 46px;
}
.hero h1 { font-size: clamp(1.9rem, 4vw, 3rem); line-height: 1.1; margin: 0 0 14px; max-width: 16ch; }
.hero p { color: var(--text); opacity: .9; max-width: 52ch; margin: 0 0 26px; font-size: 1.05rem; }
.hero .hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.hero .bonus-badge {
  display: inline-block; margin-bottom: 18px; padding: 6px 14px; border-radius: 999px;
  background: rgba(255, 200, 61, .12); color: var(--gold); border: 1px solid rgba(255, 200, 61, .35);
  font-weight: 600; font-size: .85rem; letter-spacing: .5px;
}
.hero .hero-coins {
  position: absolute; right: -30px; bottom: -50px; font-size: 16rem; opacity: .12; transform: rotate(-12deg);
  pointer-events: none; user-select: none;
}

/* ---- section / lobby ----------------------------------------------------- */
.section { margin-top: 42px; }
.section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; gap: 16px; }
.section-head h2 { font-size: 1.4rem; margin: 0; display: flex; align-items: center; gap: 10px; }
.section-head .accent-bar { width: 4px; height: 22px; border-radius: 4px; background: linear-gradient(var(--accent), var(--accent-2)); }

.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 22px; }
.tab {
  padding: 9px 16px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line);
  color: var(--muted); font-weight: 600; cursor: pointer; font-size: .9rem; transition: all .15s;
}
.tab:hover { color: #fff; }
.tab.active { color: #fff; background: linear-gradient(135deg, var(--accent), #7c3aed); border-color: transparent; box-shadow: var(--glow); }

.game-grid {
  display: grid; gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(165px, 1fr));
}
.game-card {
  position: relative; border-radius: var(--radius); overflow: hidden; cursor: pointer;
  background: var(--surface); border: 1px solid var(--line); aspect-ratio: 1 / 1;
  transition: transform .18s ease, box-shadow .2s ease, border-color .2s;
}
.game-card img { width: 100%; height: 100%; object-fit: cover; }
.game-card:hover { transform: translateY(-5px); border-color: var(--accent); box-shadow: var(--glow); }
.game-card .overlay {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  background: linear-gradient(180deg, rgba(10, 10, 18, .1), rgba(10, 10, 18, .82));
  opacity: 0; transition: opacity .18s ease; text-align: center; padding: 12px;
}
.game-card:hover .overlay { opacity: 1; }
.game-card .g-title { position: absolute; left: 10px; right: 10px; bottom: 10px; font-size: .8rem; font-weight: 600;
  opacity: 0; transform: translateY(6px); transition: all .18s; text-shadow: 0 1px 4px #000; }
.game-card:hover .g-title { opacity: 1; transform: none; }
.game-card .g-provider { font-size: .7rem; color: var(--muted); }

.badges { position: absolute; top: 8px; left: 8px; display: flex; gap: 5px; z-index: 2; }
.badge {
  font-size: .62rem; font-weight: 800; letter-spacing: .5px; text-transform: uppercase;
  padding: 3px 7px; border-radius: 6px; color: #06121a;
}
.badge.hot { background: var(--danger); color: #fff; }
.badge.new { background: var(--accent-2); }
.badge.jackpot { background: var(--gold); }

.load-more-wrap { display: flex; justify-content: center; margin-top: 28px; }
.empty-state { text-align: center; color: var(--muted); padding: 50px 0; }

/* ---- generic content pages ---------------------------------------------- */
.page-head { margin-top: 30px; margin-bottom: 8px; }
.page-head h1 { font-size: clamp(1.7rem, 4vw, 2.6rem); margin: 0 0 8px; }
.page-head .crumb { color: var(--muted); font-size: .9rem; }

.prose { max-width: 820px; color: #d6d9f5; }
.prose h2 { margin-top: 34px; font-size: 1.25rem; }
.prose h3 { margin-top: 24px; font-size: 1.05rem; }
.prose p, .prose li { color: #c7cbef; }
.prose a { color: var(--accent-2); text-decoration: underline; }
.prose ul { padding-left: 20px; }

.notice {
  border: 1px solid rgba(255, 200, 61, .35); background: rgba(255, 200, 61, .08);
  color: var(--gold); padding: 14px 18px; border-radius: var(--radius-sm); margin: 18px 0; font-size: .92rem;
}

.card-grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); margin-top: 26px; }
.panel {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px;
}
.promo-card { position: relative; overflow: hidden; }
.promo-card .tag { position: absolute; top: 16px; right: 16px; background: var(--accent); color: #fff; padding: 4px 10px; border-radius: 999px; font-size: .72rem; font-weight: 700; }
.promo-card h3 { margin: 0 0 6px; font-size: 1.2rem; }
.promo-card .amount { font-size: 1.8rem; font-weight: 800; color: var(--gold); margin: 8px 0; }
.promo-card p { color: var(--muted); font-size: .92rem; }
.promo-card .btn { margin-top: 14px; }

/* VIP tiers */
.tier-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); margin-top: 26px; }
.tier { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; text-align: center; }
.tier .medal { font-size: 2.4rem; }
.tier h3 { margin: 8px 0 4px; }
.tier ul { list-style: none; padding: 0; margin: 14px 0 0; text-align: left; font-size: .88rem; color: var(--muted); }
.tier li { padding: 6px 0; border-top: 1px solid var(--line); }
.tier.bronze   { border-color: #b07b4f; }
.tier.silver   { border-color: #c8cde0; }
.tier.gold     { border-color: var(--gold); }
.tier.platinum { border-color: var(--accent-2); }
.tier.diamond  { border-color: var(--accent); box-shadow: var(--glow); }

/* FAQ accordion */
.accordion { margin-top: 24px; max-width: 820px; }
.acc-item { border: 1px solid var(--line); border-radius: var(--radius-sm); margin-bottom: 12px; background: var(--surface); overflow: hidden; }
.acc-q { width: 100%; text-align: left; background: none; border: 0; color: var(--text); font: inherit; font-weight: 600;
  padding: 16px 18px; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.acc-q .chev { transition: transform .2s; color: var(--accent); }
.acc-item.open .acc-q .chev { transform: rotate(180deg); }
.acc-a { max-height: 0; overflow: hidden; transition: max-height .25s ease; }
.acc-a-inner { padding: 0 18px 18px; color: var(--muted); }

/* ---- forms --------------------------------------------------------------- */
.field { margin-bottom: 16px; }
.field label { display: block; font-size: .85rem; font-weight: 600; margin-bottom: 6px; color: var(--muted); }
.field input, .field select, .field textarea {
  width: 100%; padding: 12px 14px; border-radius: var(--radius-sm);
  background: var(--bg-2); border: 1px solid var(--line); color: var(--text); font: inherit;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: var(--glow); }
.field.invalid input, .field.invalid select, .field.invalid textarea { border-color: var(--danger); }
.field .err { color: var(--danger); font-size: .78rem; margin-top: 5px; min-height: 1em; display: block; }
.check { display: flex; align-items: flex-start; gap: 10px; font-size: .85rem; color: var(--muted); }
.check input { width: auto; margin-top: 3px; }

/* ---- modals & overlays --------------------------------------------------- */
.overlay {
  position: fixed; inset: 0; z-index: 100; display: none;
  background: rgba(4, 4, 10, .72); backdrop-filter: blur(6px);
  align-items: center; justify-content: center; padding: 20px;
}
.overlay.open { display: flex; animation: fade .2s ease; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

.modal {
  width: 100%; max-width: 430px; background: var(--surface); border: 1px solid var(--line);
  border-radius: 18px; box-shadow: var(--shadow); overflow: hidden;
  animation: pop .22s cubic-bezier(.2, .9, .3, 1.2);
  display: flex; flex-direction: column; max-height: calc(100dvh - 40px);
}
@keyframes pop { from { transform: translateY(16px) scale(.96); opacity: 0; } to { transform: none; opacity: 1; } }
.modal-head { padding: 22px 24px 0; display: flex; justify-content: space-between; align-items: flex-start; }
.modal-head h2 { margin: 0; font-size: 1.4rem; }
.modal-head p { margin: 4px 0 0; color: var(--muted); font-size: .88rem; }
.modal-close { background: none; border: 0; color: var(--muted); font-size: 1.5rem; cursor: pointer; line-height: 1; }
.modal-close:hover { color: #fff; }
.modal-body { padding: 20px 24px 24px; overflow-y: auto; flex: 1 1 auto; min-height: 0; }
.modal-foot { text-align: center; color: var(--muted); font-size: .86rem; margin-top: 14px; }
.modal-foot a { color: var(--accent-2); cursor: pointer; }
.modal-tabs { display: flex; gap: 6px; margin: 16px 24px 0; background: var(--bg-2); padding: 5px; border-radius: 999px; }
.modal-tabs button { flex: 1; padding: 9px; border: 0; background: none; color: var(--muted); font: inherit; font-weight: 600; border-radius: 999px; cursor: pointer; }
.modal-tabs button.active { background: var(--accent); color: #fff; }

/* age gate */
.age-gate .modal { max-width: 460px; text-align: center; }
.age-gate .age-logo { font-size: 2rem; font-weight: 800; margin-bottom: 8px; }
.age-gate .age-18 { font-size: 3rem; font-weight: 900; color: var(--danger); border: 4px solid var(--danger); border-radius: 50%; width: 96px; height: 96px; display: grid; place-items: center; margin: 6px auto 18px; }
.age-gate .btn-row { display: flex; gap: 12px; margin-top: 20px; }

/* cookie banner */
.cookie-banner {
  position: fixed; left: 20px; right: 20px; bottom: 20px; z-index: 90; display: none;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 18px 20px; gap: 16px; align-items: center; flex-wrap: wrap;
  max-width: var(--maxw); margin-inline: auto;
}
.cookie-banner.show { display: flex; }
.cookie-banner p { margin: 0; flex: 1; min-width: 240px; font-size: .88rem; color: var(--muted); }
.cookie-banner .btn-row { display: flex; gap: 10px; }

/* toast */
.toast-wrap { position: fixed; top: 84px; right: 20px; z-index: 200; display: flex; flex-direction: column; gap: 10px; }
.toast {
  background: var(--surface-2); border: 1px solid var(--line); border-left: 4px solid var(--accent);
  padding: 14px 18px; border-radius: var(--radius-sm); box-shadow: var(--shadow); min-width: 240px; max-width: 340px;
  animation: slidein .25s ease; font-size: .9rem;
}
.toast.success { border-left-color: var(--success); }
.toast.error { border-left-color: var(--danger); }
.toast strong { display: block; margin-bottom: 2px; }
@keyframes slidein { from { transform: translateX(30px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---- footer -------------------------------------------------------------- */
.site-footer { margin-top: 70px; border-top: 1px solid var(--line); background: var(--bg-2); }
.footer-top { display: grid; gap: 34px; grid-template-columns: 1.4fr repeat(3, 1fr); padding: 50px 0 36px; }
.footer-col h4 { font-size: .82rem; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); margin: 0 0 14px; }
.footer-col a { display: block; color: #c7cbef; padding: 5px 0; font-size: .9rem; }
.footer-col a:hover { color: var(--accent-2); }
.footer-brand p { color: var(--muted); font-size: .9rem; max-width: 36ch; }
.pay-logos { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.pay-logos span { background: var(--surface); border: 1px solid var(--line); border-radius: 7px; padding: 6px 11px; font-size: .75rem; font-weight: 700; color: var(--muted); }
.footer-bottom { border-top: 1px solid var(--line); padding: 22px 0; display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.footer-bottom .rg { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; color: var(--muted); font-size: .82rem; }
.rg-18 { background: var(--danger); color: #fff; font-weight: 800; border-radius: 50%; width: 34px; height: 34px; display: grid; place-items: center; font-size: .8rem; flex: none; }
.footer-bottom .copyright { margin-left: auto; color: var(--muted); font-size: .82rem; }

/* ---- responsive ---------------------------------------------------------- */
@media (max-width: 900px) {
  .footer-top { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .main-nav, .header-search { display: none; }
  .main-nav.mobile-open {
    display: flex; flex-direction: column; position: absolute; top: 70px; left: 0; right: 0;
    background: var(--bg-2); border-bottom: 1px solid var(--line); padding: 12px 20px; gap: 4px;
  }
  .hamburger { display: block; }
  .header-inner { gap: 10px; }
  .hero { padding: 38px 24px; }
  .footer-top { grid-template-columns: 1fr; gap: 24px; }
  .game-grid { grid-template-columns: repeat(auto-fill, minmax(135px, 1fr)); gap: 12px; }
}
@media (max-width: 480px) {
  .header-actions .btn-register { display: none; }
}

/* ---- flags, language switcher, phone picker ----------------------------- */
.flag { width: 20px; height: 14px; border-radius: 2px; object-fit: cover; flex: none; box-shadow: 0 0 0 1px rgba(255,255,255,.08); vertical-align: middle; }

.lang-switch { flex: none; }
.lang-switch .lang-btn { gap: 7px; padding: 9px 12px; }
.lang-switch .lang-code { font-size: .82rem; letter-spacing: .5px; }
.lang-switch .dropdown-panel { width: 190px; right: 0; left: auto; }
.lang-switch .dd-option span { display: flex; align-items: center; gap: 9px; }

/* phone row in the register form */
.phone-row { display: flex; gap: 8px; }
.phone-cc { flex: none; }
.phone-cc .cc-btn { padding: 12px 12px; gap: 7px; height: 100%; border-radius: var(--radius-sm); }
.phone-cc .cc-dial { font-weight: 600; font-size: .9rem; }
.phone-cc .dropdown-panel { width: 300px; left: 0; right: auto; }
.phone-input { flex: 1; min-width: 0; }
.cc-option span { display: flex; align-items: center; gap: 9px; }
.cc-option .dd-count { color: var(--accent-2); background: var(--bg-2); }

@media (max-width: 480px) {
  .lang-switch .lang-code { display: none; }
}

/* utility */
.text-muted { color: var(--muted); }
.center { text-align: center; }
.mt-2 { margin-top: 20px; }
.hidden { display: none !important; }

/* ==========================================================================
   Iteration 2 — 3-column layout (left nav · content · right live feed)
   ========================================================================== */
.app-body {
  max-width: 1600px; margin: 0 auto; display: flex; gap: 22px;
  padding: 22px 18px 0; align-items: flex-start;
}
.content { flex: 1 1 auto; min-width: 0; }
/* full-bleed header/footer so the logo sits flush-left above the sidebar */
.site-header .container, .site-footer .container { max-width: none; }

/* ---- left navigation menu ----------------------------------------------- */
.left-nav {
  flex: 0 0 232px; position: sticky; top: 86px; align-self: flex-start;
  max-height: calc(100vh - 104px); display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px; overflow: hidden;
}
.nav-brand {
  display: flex; align-items: center; height: 64px; padding: 0 18px; flex: none;
  border-bottom: 1px solid var(--line); font-size: 1.4rem;
}
.nav-scroll { overflow-y: auto; flex: 1 1 auto; min-height: 0; scrollbar-width: thin; padding: 10px; }
.nav-group { margin-bottom: 6px; }
.nav-group-title { font-size: .68rem; text-transform: uppercase; letter-spacing: 1.2px; color: var(--muted); padding: 12px 12px 6px; }
.nav-item {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px;
  color: #c7cbef; font-weight: 500; white-space: nowrap; transition: background .15s, color .15s;
}
.nav-item:hover { background: var(--surface-2); color: #fff; }
.nav-item.active { background: linear-gradient(135deg, rgba(168,85,247,.28), rgba(34,211,238,.12)); color: #fff; box-shadow: inset 0 0 0 1px var(--line); }
.nav-ico { font-size: 1.1rem; width: 22px; text-align: center; flex: none; }
.nav-foot { border-top: 1px solid var(--line); padding: 8px 10px; margin-top: 4px; }
.nav-collapse {
  display: flex; align-items: center; gap: 12px; width: 100%; background: none; border: 0;
  color: var(--muted); font: inherit; padding: 10px 12px; cursor: pointer; border-radius: 10px;
}
.nav-collapse:hover { background: var(--surface-2); color: #fff; }
.nav-collapse .chev { width: 22px; text-align: center; transition: transform .2s; }
.left-nav.collapsed { flex-basis: 66px; }
.left-nav.collapsed .nav-label, .left-nav.collapsed .nav-group-title { display: none; }
.left-nav.collapsed .nav-item, .left-nav.collapsed .nav-collapse { justify-content: center; }
.left-nav.collapsed .nav-collapse .chev { transform: rotate(180deg); }

/* ---- right live-feed rail ------------------------------------------------ */
.right-rail {
  flex: 0 0 304px; position: sticky; top: 86px; align-self: flex-start;
  display: flex; flex-direction: column; gap: 14px; max-height: calc(100vh - 104px);
}
.rail-stats { display: flex; flex-direction: column; gap: 10px; }
.rail-stat { display: flex; align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 11px 14px; font-size: .88rem; color: var(--muted); }
.rail-stat strong { color: #fff; }
.rail-stat-l { font-size: .82rem; }
.dot-online { width: 9px; height: 9px; border-radius: 50%; background: var(--success); box-shadow: 0 0 8px var(--success); animation: pulse 1.6s infinite; flex: none; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
.rail-jackpot { background: linear-gradient(135deg, rgba(255,200,61,.16), rgba(168,85,247,.12)); border: 1px solid rgba(255,200,61,.4); border-radius: 12px; padding: 12px 14px; text-align: center; }
.rail-jackpot-l { display: block; font-size: .68rem; letter-spacing: 2px; color: var(--gold); font-weight: 700; }
.rail-jackpot strong { font-size: 1.5rem; color: var(--gold); text-shadow: 0 0 14px rgba(255,200,61,.5); }
.rail-card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.rail-card-head { padding: 12px 14px; font-weight: 700; font-size: .9rem; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; }
.chat-online { font-size: .7rem; color: var(--success); font-weight: 500; }
.wins-list { list-style: none; margin: 0; padding: 6px; }
.win-row { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 10px; }
.win-row.fresh { animation: slidein .3s ease; background: rgba(46,230,166,.07); }
.win-row img, .win-thumb-fallback { width: 34px; height: 34px; border-radius: 8px; object-fit: cover; flex: none; display: grid; place-items: center; background: var(--surface-2); }
.win-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.win-name { font-size: .8rem; font-weight: 600; }
.win-game { font-size: .7rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.win-amt { font-size: .82rem; font-weight: 700; color: var(--success); white-space: nowrap; }
.rail-chat { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 240px; }
.chat-log { flex: 1; overflow-y: auto; padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; font-size: .82rem; max-height: 300px; scrollbar-width: thin; }
.chat-row .chat-user { color: var(--accent-2); font-weight: 600; }
.chat-row .chat-text { color: #d6d9f5; word-break: break-word; }
.chat-row.system .chat-sys { color: var(--muted); font-style: italic; font-size: .78rem; }
.chat-form { display: flex; gap: 6px; padding: 10px; border-top: 1px solid var(--line); }
.chat-form input { flex: 1; min-width: 0; padding: 9px 12px; border-radius: 999px; background: var(--bg-2); border: 1px solid var(--line); color: var(--text); font: inherit; font-size: .85rem; }
.chat-form input:focus { outline: none; border-color: var(--accent); }
.chat-form button { padding: 8px 13px; }

/* ---- lobby: provider filter + category shelves -------------------------- */
.provider-bar { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 10px; margin-bottom: 18px; scrollbar-width: thin; }
.provider-chip { flex: none; padding: 8px 14px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); color: var(--muted); font-weight: 700; font-size: .8rem; cursor: pointer; white-space: nowrap; letter-spacing: .3px; transition: all .15s; }
.provider-chip:hover { color: #fff; border-color: var(--accent); }
.provider-chip.active { background: linear-gradient(135deg, var(--accent), #7c3aed); color: #fff; border-color: transparent; box-shadow: var(--glow); }

.shelf { margin-bottom: 30px; }
.shelf-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.shelf-head h3 { margin: 0; font-size: 1.12rem; display: flex; gap: 8px; align-items: center; }
.shelf-arrows { display: flex; gap: 6px; }
.shelf-arrow { width: 34px; height: 34px; border-radius: 9px; background: var(--surface); border: 1px solid var(--line); color: #fff; cursor: pointer; font-size: 1rem; line-height: 1; }
.shelf-arrow:hover { border-color: var(--accent); }
.shelf-track { display: flex; gap: 14px; overflow-x: auto; scroll-behavior: smooth; scroll-snap-type: x mandatory; padding-bottom: 6px; scrollbar-width: none; }
.shelf-track::-webkit-scrollbar { display: none; }
.shelf-track .game-card { flex: 0 0 168px; scroll-snap-align: start; aspect-ratio: 1 / 1; }

/* ---- mobile drawers (fab + backdrop) ------------------------------------ */
.rail-fab {
  display: none; position: fixed; right: 18px; bottom: 18px; z-index: 85;
  width: 54px; height: 54px; border-radius: 50%; border: 0; cursor: pointer; font-size: 1.5rem;
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #06121a; box-shadow: var(--glow);
}
.drawer-backdrop { display: none; position: fixed; inset: 0; z-index: 70; background: rgba(4,4,10,.6); backdrop-filter: blur(3px); }
body.rail-drawer-open .drawer-backdrop, body.nav-drawer-open .drawer-backdrop { display: block; }

/* ---- iteration-2 responsive --------------------------------------------- */
@media (max-width: 1200px) {
  .right-rail {
    position: fixed; top: 0; right: 0; height: 100vh; width: 322px; max-height: none; z-index: 80;
    background: var(--bg-2); border-left: 1px solid var(--line); border-radius: 0; padding: 18px;
    transform: translateX(105%); transition: transform .25s ease; overflow-y: auto;
  }
  .right-rail.open { transform: none; box-shadow: -10px 0 40px rgba(0,0,0,.5); }
  .rail-fab { display: block; }
}
@media (max-width: 980px) {
  .left-nav {
    position: fixed; top: 0; left: 0; height: 100vh; width: 264px; max-height: none; z-index: 80;
    border-radius: 0; transform: translateX(-105%); transition: transform .25s ease;
  }
  .left-nav.open { transform: none; box-shadow: 10px 0 40px rgba(0,0,0,.5); }
  .left-nav.collapsed { flex-basis: 264px; }
  .left-nav.collapsed .nav-label, .left-nav.collapsed .nav-group-title { display: block; }
  .left-nav.collapsed .nav-item, .left-nav.collapsed .nav-collapse { justify-content: flex-start; }
  .nav-foot .nav-collapse { display: none; }   /* collapse toggle is desktop-only */
  .hamburger { display: block; }
  .app-body { padding-top: 16px; }
}

/* Desktop: left sidebar pinned flush to the screen edge (no left gap). The
   content and footer are shifted right by the sidebar width to clear it. */
@media (min-width: 981px) {
  .left-nav {
    position: fixed; left: 0; top: 0; bottom: 0; height: 100vh; width: 268px; z-index: 65;  /* above the header */
    transform: none; max-height: none; border-radius: 0; align-self: stretch;
    border-top: 0; border-left: 0; border-bottom: 0;
  }
  .left-nav .nav-brand { height: 70px; }   /* match the header bar height */
  .left-nav.collapsed { width: 72px; }
  .left-nav.collapsed .nav-brand { justify-content: center; padding: 0; font-size: 1.15rem; }
  .left-nav.collapsed .nav-brand .w-accent, .left-nav.collapsed .nav-brand .w-dot { display: none; }

  /* top bar starts to the right of the sidebar; its own logo is redundant now */
  .site-header .logo { display: none; }
  .site-header .header-inner { padding-left: 290px; }       /* 268 + 22 */
  body.nav-collapsed .site-header .header-inner { padding-left: 94px; }

  .app-body { max-width: none; margin: 0; padding: 22px 22px 0 290px; }   /* 268 + 22 */
  body.nav-collapsed .app-body { padding-left: 94px; }                    /* 72 + 22  */
  .site-footer { padding-left: 290px; transition: padding-left .15s; }
  body.nav-collapsed .site-footer { padding-left: 94px; }
}

/* ---- tournaments page --------------------------------------------------- */
.tourney-card { position: relative; }
.tourney-card .tag { position: absolute; top: 16px; right: 16px; background: var(--danger); color: #fff; padding: 4px 10px; border-radius: 999px; font-size: .72rem; font-weight: 700; }
.tourney-card h3 { margin: 0 0 6px; font-size: 1.2rem; }
.tourney-card .amount { font-size: 1.8rem; font-weight: 800; color: var(--gold); margin: 10px 0; }
.tourney-meta { display: flex; gap: 16px; color: var(--muted); font-size: .85rem; margin-bottom: 12px; }
.tourney-meta .countdown, .countdown-start { color: var(--accent-2); font-weight: 700; font-variant-numeric: tabular-nums; }
.progress { height: 7px; background: var(--bg-2); border-radius: 999px; overflow: hidden; margin-bottom: 16px; }
.progress span { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
.tourney-card > .btn { width: 100%; }
.tourney-card.upcoming > .btn { width: auto; }

.leaderboard { width: 100%; border-collapse: collapse; }
.leaderboard th, .leaderboard td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line); font-size: .9rem; }
.leaderboard th { color: var(--muted); font-size: .72rem; text-transform: uppercase; letter-spacing: 1px; }
.leaderboard tr:last-child td { border-bottom: 0; }
.leaderboard tr.top td { background: rgba(255, 200, 61, .05); }
.leaderboard td:nth-child(3) { color: #fff; font-weight: 600; }
.leaderboard .prize { color: var(--gold); font-weight: 700; }

/* provider restricted-territories table (legal pages) */
.legal-table-wrap { overflow-x: auto; margin: 18px 0; border: 1px solid var(--line); border-radius: 12px; }
.legal-table { width: 100%; border-collapse: collapse; font-size: .84rem; }
.legal-table th, .legal-table td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.legal-table th { color: var(--muted); font-size: .7rem; text-transform: uppercase; letter-spacing: .6px; background: var(--surface-2); position: sticky; top: 0; }
.legal-table td:first-child { font-weight: 600; color: #fff; white-space: nowrap; }
.legal-table tr:last-child td { border-bottom: 0; }
.legal-table tr:nth-child(even) td { background: rgba(255,255,255,.018); }
.legal-table .note { color: var(--muted); font-style: italic; }

/* ==========================================================================
   Lobby filters — friendlier toolbar (search + provider dropdown), category
   tabs with icons & counts, and an active-filters bar.
   ========================================================================== */
.lobby-toolbar { display: flex; gap: 12px; align-items: center; margin-bottom: 16px; flex-wrap: wrap; }
.lobby-search { position: relative; flex: 1 1 300px; min-width: 200px; max-width: 560px; }
.lobby-search input {
  width: 100%; padding: 11px 38px; border-radius: 999px; font: inherit;
  background: var(--surface); border: 1px solid var(--line); color: var(--text);
}
.lobby-search input:focus { outline: none; border-color: var(--accent); box-shadow: var(--glow); }
.lobby-search .s-icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.lobby-search .search-clear { display: none; position: absolute; right: 12px; top: 50%; transform: translateY(-50%); background: none; border: 0; color: var(--muted); font-size: 1.25rem; line-height: 1; cursor: pointer; }
.lobby-search .search-clear:hover { color: #fff; }

/* generic dropdown (provider filter) */
.dropdown { position: relative; }
.dropdown-btn {
  display: flex; align-items: center; gap: 9px; padding: 11px 16px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line); color: var(--text); font: inherit; font-weight: 600;
  cursor: pointer; white-space: nowrap; transition: border-color .15s, box-shadow .15s;
}
.dropdown-btn:hover { border-color: var(--accent); }
.dropdown.open .dropdown-btn { border-color: var(--accent); box-shadow: var(--glow); }
.dropdown-btn .dd-ico { font-size: 1rem; }
.dropdown-btn .dd-label { max-width: 180px; overflow: hidden; text-overflow: ellipsis; }
.dropdown-btn .dd-caret { color: var(--muted); font-size: .75rem; transition: transform .2s; }
.dropdown.open .dd-caret { transform: rotate(180deg); }
.dropdown-panel {
  position: absolute; z-index: 45; top: calc(100% + 8px); right: 0; width: 290px; max-width: 88vw;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); padding: 10px;
  animation: pop .16s ease;
}
.dropdown-search { width: 100%; padding: 9px 12px; border-radius: 9px; background: var(--bg-2); border: 1px solid var(--line); color: var(--text); font: inherit; font-size: .85rem; margin-bottom: 8px; }
.dropdown-search:focus { outline: none; border-color: var(--accent); }
.dropdown-list { max-height: 290px; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; scrollbar-width: thin; }
.dd-option {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; text-align: left;
  padding: 9px 12px; border-radius: 9px; background: none; border: 0; color: #c7cbef; font: inherit; font-size: .88rem; cursor: pointer;
}
.dd-option:hover { background: var(--surface); color: #fff; }
.dd-option.active { background: linear-gradient(135deg, rgba(168,85,247,.30), rgba(34,211,238,.12)); color: #fff; }
.dd-count { font-size: .72rem; color: var(--muted); background: var(--bg-2); border-radius: 999px; padding: 2px 9px; min-width: 32px; text-align: center; flex: none; }
.dd-option.active .dd-count { color: #fff; background: rgba(255,255,255,.18); }
.dd-empty { padding: 16px; text-align: center; color: var(--muted); font-size: .85rem; }

/* category tabs: icon + live count */
.tab { display: inline-flex; align-items: center; gap: 7px; }
.tab-ico { font-size: 1rem; line-height: 1; }
.tab-count { font-size: .72rem; background: var(--bg-2); border: 1px solid var(--line); color: var(--muted); border-radius: 999px; padding: 1px 8px; }
.tab.active .tab-count { background: rgba(255,255,255,.20); border-color: transparent; color: #fff; }

/* active filter pills */
.active-filters { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.active-filters:empty { display: none; }
.filters-label { font-size: .82rem; color: var(--muted); }
.filter-pill { display: inline-flex; align-items: center; gap: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 5px 8px 5px 13px; font-size: .82rem; color: #d6d9f5; }
.filter-pill button { background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 1.05rem; line-height: 1; padding: 0 2px; }
.filter-pill button:hover { color: var(--danger); }
.filter-clear-all { background: none; border: 0; color: var(--accent-2); cursor: pointer; font: inherit; font-size: .82rem; font-weight: 600; }
.filter-clear-all:hover { text-decoration: underline; }

@media (max-width: 560px) {
  .lobby-toolbar { flex-direction: column; align-items: stretch; }
  .dropdown-btn { justify-content: space-between; width: 100%; }
  .dropdown-panel { right: auto; left: 0; width: 100%; }
}

/* ---- header search suggestions (typeahead) ------------------------------ */
.search-suggest {
  position: absolute; top: calc(100% + 10px); left: 0; width: 100%; min-width: 320px; max-width: 86vw;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: var(--shadow); padding: 8px; z-index: 70; animation: pop .16s ease;
  max-height: 70vh; overflow-y: auto; scrollbar-width: thin;
}
.search-suggest[hidden] { display: none; }
.ss-label { font-size: .68rem; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); padding: 9px 10px 5px; }
.ss-item {
  display: flex; align-items: center; gap: 11px; width: 100%; text-align: left;
  background: none; border: 0; padding: 8px 10px; border-radius: 10px; cursor: pointer; color: var(--text);
}
.ss-item:hover, .ss-item.active { background: var(--surface); }
.ss-item img, .ss-thumb { width: 40px; height: 40px; border-radius: 9px; object-fit: cover; flex: none; display: grid; place-items: center; background: var(--surface); }
.ss-t { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.ss-title { font-size: .9rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ss-prov { font-size: .74rem; color: var(--muted); }
.ss-go { color: var(--muted); font-size: .9rem; opacity: 0; }
.ss-item:hover .ss-go, .ss-item.active .ss-go { opacity: 1; }
.ss-empty { padding: 16px; text-align: center; color: var(--muted); font-size: .85rem; }
.ss-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 4px 8px 10px; }
.ss-chip { background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; font-size: .8rem; color: #c7cbef; cursor: pointer; }
.ss-chip:hover, .ss-chip.active { color: #fff; border-color: var(--accent); }
.ss-all {
  display: block; width: 100%; text-align: left; background: none; border: 0; border-top: 1px solid var(--line);
  margin-top: 6px; padding: 11px 12px; color: var(--accent-2); font: inherit; font-weight: 600; cursor: pointer;
}
.ss-all:hover, .ss-all.active { background: var(--surface); }
