/* ═══════════════════════════════════════════════════════
   SkinCaseReviewer Theme Override for RevSim / Gambatest
   ───────────────────────────────────────────────────────
   Add AFTER style.css:
   <link rel="stylesheet" href="/casesim/theme-skincasereviewer.css">
   
   Aligns the simulator's look with the main
   skincasereviewer.com design language.
   ═══════════════════════════════════════════════════════ */

/* ── Core palette override ── */
:root {
  /* Backgrounds — match main site's deeper navy tones */
  --bg:      #0b0f19;
  --bg2:     #0f1523;
  --bg3:     #141c2e;
  --card:    #141c2e;
  --card2:   #1a2540;

  /* Borders — slightly blue-tinted like main site */
  --border:  rgba(59, 130, 246, 0.08);
  --border2: rgba(59, 130, 246, 0.15);

  /* Accent — match main site's bright blue */
  --accent:  #3b82f6;
  --accent2: #60a5fa;

  /* Teal → green to match main site's green highlights */
  --teal:    #22c55e;

  /* Keep gold and red */
  --gold:    #f5c842;
  --green:   #22c55e;
  --red:     #ef4444;
  --orange:  #f97316;

  /* Text tones — slightly warmer */
  --muted:   #3d4f6f;
  --sub:     #7b8fad;
  --text:    #e2e8f0;
}


/* ═══════════════════════════
   SIDEBAR — match main site nav
   ═══════════════════════════ */
#sidebar {
  background: #0c1120;
  border-right: 1px solid rgba(59, 130, 246, 0.08);
}

.logo-wrap {
  border-bottom: 1px solid rgba(59, 130, 246, 0.08);
}

.nav-btn.active {
  background: rgba(59, 130, 246, 0.10);
}
.nav-btn.active::before {
  background: #3b82f6;
}
.nav-btn:hover {
  background: rgba(59, 130, 246, 0.06);
}

/* XP bar — blue-green gradient like main site buttons */
.xp-fill,
.hw-lvfill {
  background: linear-gradient(90deg, #3b82f6, #22c55e);
}

/* User card balance */
.uc-balance {
  background: rgba(59, 130, 246, 0.06);
  border-color: rgba(59, 130, 246, 0.12);
}


/* ═══════════════════════════
   HEADER
   ═══════════════════════════ */
#header {
  background: #0c1120;
  border-bottom: 1px solid rgba(59, 130, 246, 0.08);
}

.hstat {
  background: rgba(59, 130, 246, 0.06);
  border-color: rgba(59, 130, 246, 0.12);
}

.logout-btn {
  border-color: rgba(59, 130, 246, 0.15);
}
.logout-btn:hover {
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.4);
}


/* ═══════════════════════════
   CONTENT AREA
   ═══════════════════════════ */
#content {
  background: #0b0f19;
}

.s-label::after {
  background: rgba(59, 130, 246, 0.10);
}


/* ═══════════════════════════
   CARDS — glass-card style from main site
   ═══════════════════════════ */
.hw,
.stat-tile,
.case-card2,
.battle-card,
.rank-row,
.inv-item,
.clk-stat,
.clk-upgrades-panel,
.clk-pot-wrap,
.ug2-bet-panel,
.ug2-target-panel {
  background: rgba(15, 23, 42, 0.60);
  border: 1px solid rgba(59, 130, 246, 0.10);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* Hover glow — subtle blue like main site review cards */
.case-card2:hover,
.battle-card:hover,
.rank-row:hover,
.inv-item:hover {
  border-color: rgba(59, 130, 246, 0.35);
  box-shadow: 0 8px 32px rgba(59, 130, 246, 0.12);
}

/* Case card inner gradient — match main site's dark depth */
.cc2-inner {
  background: radial-gradient(ellipse at 50% 70%, rgba(59, 130, 246, 0.12) 0%, rgba(11, 15, 25, 0.95) 80%) !important;
}

.cc2-footer {
  background: rgba(11, 15, 25, 0.70);
  border-top: 1px solid rgba(59, 130, 246, 0.06);
}


/* ═══════════════════════════
   BUTTONS — match main site blue
   ═══════════════════════════ */
.free-btn,
.open-btn,
.save-btn,
.create-battle-btn,
.join-btn,
.auth-btn,
.cb2-create-btn,
.cb2-pcard-add,
.cb2-picker-add-btn {
  background: #3b82f6;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
}

.free-btn:hover,
.open-btn:hover:not(:disabled),
.save-btn:hover,
.create-battle-btn:hover,
.join-btn:hover,
.auth-btn:hover,
.cb2-create-btn:hover,
.cb2-pcard-add:hover,
.cb2-picker-add-btn:hover {
  background: #60a5fa;
  box-shadow: 0 4px 20px rgba(59, 130, 246, 0.3);
}

/* Green action buttons keep green but match main site's green */
.ug2-upgrade-btn,
.bat-start-btn {
  background: linear-gradient(135deg, #22c55e, #16a34a);
}

/* Secondary / outline buttons */
.multi-btn {
  background: rgba(59, 130, 246, 0.06);
  border-color: rgba(59, 130, 246, 0.15);
}
.multi-btn:hover {
  border-color: #3b82f6;
  color: var(--text);
}
.multi-btn.sel {
  background: #3b82f6;
  border-color: #3b82f6;
}

.ug2-bet-btn {
  background: rgba(59, 130, 246, 0.06);
  border-color: rgba(59, 130, 246, 0.12);
}
.ug2-bet-btn:hover {
  background: rgba(59, 130, 246, 0.15);
  border-color: rgba(59, 130, 246, 0.3);
  color: var(--text);
}
.ug2-bet-max {
  background: rgba(59, 130, 246, 0.15);
  border-color: rgba(59, 130, 246, 0.4);
  color: #60a5fa;
}


/* ═══════════════════════════
   HOME HERO BANNER
   ═══════════════════════════ */
.hbanner {
  background: linear-gradient(135deg, #0f1a30, #132040);
  border-color: rgba(59, 130, 246, 0.12);
}
.hbanner:hover {
  border-color: rgba(59, 130, 246, 0.4);
}

.hb-tag {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
}

.hb-cta {
  background: #3b82f6;
}
.hb-cta:hover {
  background: #60a5fa;
}


/* ═══════════════════════════
   GAME TILES
   ═══════════════════════════ */
.game-card {
  border-color: rgba(59, 130, 246, 0.08);
  background: #141c2e;
}
.game-card:hover {
  border-color: rgba(59, 130, 246, 0.25);
  box-shadow: 0 12px 30px rgba(59, 130, 246, 0.10);
}


/* ═══════════════════════════
   CHAT PANEL
   ═══════════════════════════ */
#chat {
  background: #0c1120;
  border-left: 1px solid rgba(59, 130, 246, 0.08);
}

.chat-head {
  border-bottom: 1px solid rgba(59, 130, 246, 0.08);
}

.chat-ipt {
  background: rgba(59, 130, 246, 0.04);
  border-color: rgba(59, 130, 246, 0.12);
}
.chat-ipt:focus {
  border-color: #3b82f6;
}

.chat-send {
  background: #3b82f6;
}
.chat-send:hover {
  background: #60a5fa;
}


/* ═══════════════════════════
   MODALS & OVERLAYS
   ═══════════════════════════ */
.overlay {
  background: rgba(5, 8, 16, 0.90);
}

.modal {
  background: #0f1523;
  border-color: rgba(59, 130, 246, 0.15);
}

.modal-x {
  background: rgba(59, 130, 246, 0.08);
}

/* Reel */
.reel-wrap {
  background: #0b0f19;
  border-color: rgba(59, 130, 246, 0.10);

  contain: layout style;
  transform: translateZ(0);

  overflow: hidden;
}

.reel-item {
  background: #141c2e;
  border-color: rgba(59, 130, 246, 0.08);
}

.reel-arrow {
  background: #22c55e;
  box-shadow: 0 0 8px #22c55e;
}
.reel-arrow::before { color: #22c55e; }
.reel-arrow::after  { color: #22c55e; }

/* Win box */
.win-box {
  background: rgba(15, 23, 42, 0.80);
  border-color: rgba(59, 130, 246, 0.15);
}


/* ═══════════════════════════
   BATTLES — arena & cards
   ═══════════════════════════ */
#page-arena {
  background: #080c16;
}

.bat-arena-topbar {
  background: #0c1120;
  border-bottom-color: rgba(59, 130, 246, 0.08);
}

.bat-back-btn {
  background: rgba(59, 130, 246, 0.06);
  border-color: rgba(59, 130, 246, 0.15);
}
.bat-back-btn:hover {
  background: rgba(59, 130, 246, 0.12);
}

.bat-player-col {
  border-right-color: rgba(59, 130, 246, 0.05);
}
.bat-player-me {
  background: rgba(59, 130, 246, 0.04);
}

.bat-pcol-header {
  background: #0c1120;
  border-bottom-color: rgba(59, 130, 246, 0.06);
}

.bat-pcol-avatar {
  background: #141c2e;
}

.bat-round-card {
  background: #0f1523;
  border-color: rgba(59, 130, 246, 0.07);
}
.bat-round-card.bat-round-active {
  border-color: rgba(59, 130, 246, 0.5);
  background: rgba(59, 130, 246, 0.06);
}

.bat-lobby-bar {
  background: #0c1120;
  border-top-color: rgba(59, 130, 246, 0.08);
}

.bat-addbot-btn,
.bat-inline-bot-btn {
  background: #141c2e;
  border-color: rgba(59, 130, 246, 0.12);
}
.bat-addbot-btn:hover,
.bat-inline-bot-btn:hover {
  background: #1a2540;
}

/* Battle list cards */
.battle-card {
  background: rgba(15, 23, 42, 0.50);
  border-color: rgba(59, 130, 246, 0.08);
}
.brow-case {
  background: #141c2e;
}


/* ═══════════════════════════
   UPGRADER
   ═══════════════════════════ */
.ug2-top {
  background: #0c1120;
  border-bottom-color: rgba(59, 130, 246, 0.08);
}

.ug2-bet-panel {
  border-right-color: rgba(59, 130, 246, 0.08);
}

.ug2-target-panel {
  border-left-color: rgba(59, 130, 246, 0.08);
}

.ug2-bet-input-row {
  background: rgba(59, 130, 246, 0.04);
  border-color: rgba(59, 130, 246, 0.15);
}

.ug2-roll-group {
  background: rgba(59, 130, 246, 0.04);
  border-color: rgba(59, 130, 246, 0.10);
}

.ug2-target-display {
  background: rgba(59, 130, 246, 0.04);
  border-color: rgba(59, 130, 246, 0.12);
}
.ug2-target-display:not(.has-target):hover {
  border-color: rgba(59, 130, 246, 0.4);
}

.ug2-skin-card {
  background: #141c2e;
  border-color: rgba(59, 130, 246, 0.08);
}
.ug2-skin-card:hover {
  border-color: rgba(59, 130, 246, 0.35);
  box-shadow: 0 4px 20px rgba(59, 130, 246, 0.10);
}

.ug2-search {
  background: rgba(59, 130, 246, 0.04);
  border-color: rgba(59, 130, 246, 0.12);
}
.ug2-search:focus {
  border-color: #3b82f6;
}
.ug2-select {
  appearance: none;
  -webkit-appearance: none;
  background: #141c2e url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%237b8fad'/%3E%3C/svg%3E") no-repeat right 12px center;
  background-size: 10px 6px;
  border: 1px solid rgba(59,130,246,0.2);
  border-radius: 8px;
  color: #e2e8f0;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  padding: 8px 36px 8px 14px;
  cursor: pointer;
  transition: border-color .15s;
  min-width: 140px;
}
.ug2-select:hover { border-color: #3b82f6; }
.ug2-select:focus { outline: none; border-color: #3b82f6; }


/* ═══════════════════════════
   CLICKER
   ═══════════════════════════ */
.clk-upg-card {
  background: #0f1523;
  border-color: rgba(59, 130, 246, 0.08);
}
.clk-upg-card:hover {
  border-color: #3b82f6;
  background: #141c2e;
}
.clk-upg-card.clk-affordable {
  border-color: rgba(34, 197, 94, 0.5);
}


/* ═══════════════════════════
   RANKS & LEADERBOARD
   ═══════════════════════════ */
.rank-row.active-rank {
  border-color: #3b82f6;
  background: rgba(59, 130, 246, 0.07);
}

.rr-badge {
  background: #3b82f6;
}

.lb-tab {
  background: #141c2e;
  border-color: rgba(59, 130, 246, 0.08);
}
.lb-tab:hover {
  background: #1a2540;
}
.lb-tab.active {
  background: rgba(59, 130, 246, 0.15);
  border-color: rgba(59, 130, 246, 0.4);
  color: #60a5fa;
}

.lb-row {
  background: #0f1523;
  border-color: rgba(59, 130, 246, 0.06);
}
.lb-row.lb-me {
  background: rgba(59, 130, 246, 0.08);
  border-color: rgba(59, 130, 246, 0.3);
}


/* ═══════════════════════════
   PROFILE
   ═══════════════════════════ */
.profile-hero {
  background: rgba(15, 23, 42, 0.60);
  border-color: rgba(59, 130, 246, 0.10);
  backdrop-filter: blur(8px);
}

.ph-av,
.uc-avatar {
  background: linear-gradient(135deg, #3b82f6, #22c55e);
}

.uname-ipt {
  background: rgba(59, 130, 246, 0.04);
  border-color: rgba(59, 130, 246, 0.15);
}
.uname-ipt:focus {
  border-color: #3b82f6;
}

/* ═══════════════════════════
   PROFILE — Quick links (mobile)
   ═══════════════════════════ */
.profile-quick-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 24px;
}
.pql-btn {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: rgba(15, 23, 42, 0.60);
  border: 1px solid rgba(59, 130, 246, 0.10);
  border-radius: 12px;
  cursor: pointer;
  transition: border-color .15s, background .15s;
  text-align: left;
  width: 100%;
  font-family: inherit;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.pql-btn:hover {
  border-color: rgba(59, 130, 246, 0.35);
  background: rgba(59, 130, 246, 0.06);
}
.pql-icon {
  font-size: 24px;
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(59, 130, 246, 0.08);
  border-radius: 10px;
}
.pql-text {
  flex: 1;
  min-width: 0;
}
.pql-title {
  font-size: 14px;
  font-weight: 700;
  color: #e2e8f0;
}
.pql-sub {
  font-size: 11px;
  color: #7b8fad;
  margin-top: 2px;
}
.pql-arrow {
  font-size: 20px;
  color: #3d4f6f;
  flex-shrink: 0;
  transition: color .15s;
}
.pql-btn:hover .pql-arrow {
  color: #7b8fad;
}

/* Legal links at bottom of profile */
.profile-legal-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 4px 16px;
  margin-top: 32px;
  padding: 16px 0 24px;
  border-top: 1px solid rgba(255,255,255,0.05);
}
.profile-legal-links a {
  font-size: 11px;
  color: rgba(255,255,255,0.3);
  text-decoration: none;
  transition: color .15s;
}
.profile-legal-links a:hover {
  color: rgba(255,255,255,0.6);
}

/* Desktop: hide quick links (sidebar already has ranks + legal) */
@media (min-width: 769px) {
  .profile-quick-links {
    display: none;
  }
  .profile-legal-links {
    display: none;
  }
}


/* ═══════════════════════════
   FREE COINS MODAL
   ═══════════════════════════ */
.coin-opt {
  background: #141c2e;
  border-color: rgba(59, 130, 246, 0.10);
}
.coin-opt:hover,
.coin-opt.sel {
  border-color: #3b82f6;
  background: rgba(59, 130, 246, 0.10);
}

.claim-btn {
  background: linear-gradient(90deg, #22c55e, #16a34a);
}


/* ═══════════════════════════
   CREATE BATTLE v2
   ═══════════════════════════ */
.cb2-panel {
  background: #0b0f19;
  border-color: rgba(59, 130, 246, 0.10);
}

.cb2-topbar {
  background: #0c1120;
  border-bottom-color: rgba(59, 130, 246, 0.08);
}

.cb2-footer {
  background: #0c1120;
  border-top-color: rgba(59, 130, 246, 0.08);
}

.cb2-mode-card {
  background: #0f1523;
  border-color: rgba(59, 130, 246, 0.10);
}
.cb2-mode-card:hover {
  border-color: #3b82f6;
  background: #141c2e;
}
.cb2-mode-card.sel {
  border-color: #3b82f6;
  background: rgba(59, 130, 246, 0.08);
}

.cb2-tabs-row {
  background: #0f1523;
  border-color: rgba(59, 130, 246, 0.08);
}

.cb2-tab {
  background: #141c2e;
  border-color: rgba(59, 130, 246, 0.10);
}
.cb2-tab:hover {
  border-color: #3b82f6;
}
.cb2-tab.sel {
  background: #3b82f6;
  border-color: #3b82f6;
}

.cb2-case-card {
  background: #0f1523;
  border: none !important;
}

.cb2-add-card {
  background: #0f1523;
  border: none !important;
}
.cb2-add-card:hover {
  border-color: #3b82f6;
  background: rgba(59, 130, 246, 0.04);
}

.cb2-picker-panel {
  background: #0f1523;
  border-top-color: rgba(59, 130, 246, 0.10);
}

.cb2-picker-card {
  background: #141c2e;
  border-color: rgba(59, 130, 246, 0.08);
}
.cb2-picker-card:hover {
  border-color: #3b82f6;
}
.cb2-picker-card.cb2-in-cart {
  border-color: #22c55e;
  background: rgba(34, 197, 94, 0.05);
}


/* ═══════════════════════════
   AUTH / LOGIN PAGE
   ═══════════════════════════ */
.auth-page {
  background: #0b0f19;
}

.auth-box {
  background: #0f1523;
  border-color: rgba(59, 130, 246, 0.15);
}

.form-input {
  background: rgba(59, 130, 246, 0.04);
  border-color: rgba(59, 130, 246, 0.15);
}
.form-input:focus {
  border-color: #3b82f6;
}


/* ═══════════════════════════
   TOASTS
   ═══════════════════════════ */
.toast {
  background: #141c2e;
  border-color: rgba(59, 130, 246, 0.15);
}
.toast.t-success {
  border-color: rgba(34, 197, 94, 0.3);
}
.toast.t-error {
  border-color: rgba(239, 68, 68, 0.3);
}
.toast.t-win {
  border-color: rgba(245, 200, 66, 0.3);
}


/* ═══════════════════════════
   MOBILE NAV
   ═══════════════════════════ */
#mobileNav {
  background: #0c1120;
  border-top-color: rgba(59, 130, 246, 0.08);
}

.mob-nav-btn.active {
  color: #60a5fa;
}

.mob-bal-chip {
  background: rgba(245, 200, 66, 0.10);
  border-color: rgba(245, 200, 66, 0.20);
}


/* ═══════════════════════════
   SCROLLBAR — match blue tint
   ═══════════════════════════ */
::-webkit-scrollbar-thumb {
  background: rgba(59, 130, 246, 0.15);
}


/* ═══════════════════════════
   CASES SORT TOOLBAR
   ═══════════════════════════ */
.cases-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.cases-sort-btns {
  display: flex;
  gap: 6px;
}

.cs-sort-btn {
  background: #0f1523;
  border: 1px solid rgba(59, 130, 246, 0.10);
  color: #7b8fad;
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all .15s;
}
.cs-sort-btn:hover {
  border-color: #3b82f6;
  color: #e2e8f0;
}
.cs-sort-btn.sel {
  background: #3b82f6;
  border-color: #3b82f6;
  color: #fff;
}

.cases-search {
  flex: 1;
  min-width: 160px;
  max-width: 260px;
  background: rgba(59, 130, 246, 0.04);
  border: 1px solid rgba(59, 130, 246, 0.12);
  border-radius: 8px;
  padding: 7px 14px;
  color: #e2e8f0;
  font-size: 13px;
}
.cases-search:focus {
  outline: none;
  border-color: #3b82f6;
}

/* ═══════════════════════════
   CB2 OVERLAY & PANEL LAYOUT
   ═══════════════════════════ */
.cb2-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 8, 16, 0.92);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}
.cb2-overlay.open {
  opacity: 1;
  pointer-events: all;
}
.cb2-panel {
  width: min(1100px, 96vw);
  height: calc(100vh - 60px);
  height: calc(100dvh - 60px);
  display: flex;
  flex-direction: column;
  border-radius: 14px;
  overflow: hidden;
}
.cb2-topbar {
  display: flex;
  align-items: center;
  padding: 0 20px;
  height: 56px;
  flex-shrink: 0;
  gap: 12px;
}
.cb2-topbar-title {
  font-size: 15px;
  font-weight: 800;
  color: #e2e8f0;
  letter-spacing: -.2px;
  white-space: nowrap;
}
.cb2-topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}
.cb2-back {
  background: rgba(59,130,246,0.08);
  border: 1px solid rgba(59,130,246,0.15);
  color: #7b8fad;
  padding: 7px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s;
  white-space: nowrap;
  font-family: inherit;
}
.cb2-back:hover { background: rgba(59,130,246,0.15); color: #e2e8f0; }

/* ── Toggle pill (Speed + Gold) ── */
.cb2-toggle-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 5px 12px 5px 10px;
  background: rgba(59,130,246,0.04);
  border: 1px solid rgba(59,130,246,0.10);
  border-radius: 20px;
  transition: border-color .15s, background .15s;
  white-space: nowrap;
}
.cb2-toggle-pill:hover {
  border-color: rgba(59,130,246,0.25);
  background: rgba(59,130,246,0.08);
}
.cb2-pill-label {
  font-size: 12px;
  font-weight: 600;
  color: #7b8fad;
  transition: color .15s;
}
.cb2-toggle-pill:has(input:checked) .cb2-pill-label {
  color: #e2e8f0;
}
.cb2-toggle-gold:has(input:checked) {
  border-color: rgba(245,200,66,0.3);
  background: rgba(245,200,66,0.06);
}
.cb2-toggle-gold:has(input:checked) .cb2-pill-label {
  color: #f5c842;
}

.cb2-body {
  flex: 1;
  overflow: visible;
  display: flex;
  flex-direction: column;
}
.cb2-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 16px 24px 16px;
}

/* ── Config sections ── */
.cb2-config-section {
  margin-bottom: 18px;
}
.cb2-config-section .cb2-section-label {
  margin-bottom: 10px;
  display: block;
}

/* ── Section headers ── */
.cb2-section-header {
  margin: 0 0 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.cb2-section-label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #7b8fad;
}

/* ── Mode cards ── */
.cb2-modes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.cb2-mode-card {
  border: 1px solid;
  border-radius: 12px;
  padding: 14px 16px;
  cursor: pointer;
  transition: all .15s;
  display: flex;
  align-items: center;
  gap: 12px;
}
.cb2-mode-icon { font-size: 22px; flex-shrink: 0; }
.cb2-mode-name { font-size: 14px; font-weight: 700; color: #e2e8f0; }
.cb2-mode-desc { font-size: 11px; color: #7b8fad; margin-top: 2px; }

/* ── Toggle shared ── */
.cb2-toggle-wrap { position: relative; width: 36px; height: 20px; flex-shrink: 0; }
.cb2-toggle-wrap input { opacity: 0; width: 0; height: 0; }
.cb2-toggle-track {
  position: absolute;
  inset: 0;
  background: rgba(59,130,246,0.15);
  border-radius: 20px;
  border: 1px solid rgba(59,130,246,0.2);
  transition: all .2s;
}
.cb2-toggle-track::after {
  content: '';
  position: absolute;
  left: 3px; top: 2px;
  width: 14px; height: 14px;
  background: #7b8fad;
  border-radius: 50%;
  transition: all .2s;
}
/* Speed toggle: blue when active */
.cb2-toggle-wrap input:checked + .cb2-toggle-track { background: rgba(59,130,246,0.3); border-color: #3b82f6; }
.cb2-toggle-wrap input:checked + .cb2-toggle-track::after { transform: translateX(16px); background: #3b82f6; }
/* Gold toggle: gold when active */
.cb2-toggle-wrap input:checked + .cb2-toggle-track-gold { background: rgba(245,200,66,0.3); border-color: #f5c842; }
.cb2-toggle-wrap input:checked + .cb2-toggle-track-gold::after { transform: translateX(16px); background: #f5c842; }

/* ── Player tabs ── */
.cb2-tabs-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  padding: 8px;
  border-radius: 10px;
  border: 1px solid;
}
.cb2-tab-group-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: #3d4f6f;
  padding: 0 6px;
}
.cb2-tab-divider {
  width: 1px;
  height: 20px;
  background: rgba(59,130,246,0.12);
}
.cb2-tab {
  padding: 6px 14px;
  border-radius: 7px;
  border: 1px solid;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  color: #7b8fad;
  transition: all .15s;
}
.cb2-tab:hover { color: #e2e8f0; }
.cb2-tab.sel { color: #fff; }

/* ── Cases grid ── */
.cb2-cases-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)) !important;
  gap: 14px !important;
  min-height: 120px;
  align-items: stretch !important;
}
.cb2-case-count-badge {
  font-size: 11px;
  color: #7b8fad;
  margin-bottom: 8px;
}

/* ── Footer ── */
.cb2-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  height: 58px;
  flex-shrink: 0;
}
.cb2-footer-stats { display: flex; gap: 24px; align-items: center; }
.cb2-footer-stat { display: flex; flex-direction: column; }
.cb2-footer-lbl { font-size: 10px; text-transform: uppercase; letter-spacing: .07em; color: #3d4f6f; }
.cb2-footer-val { font-size: 16px; font-weight: 800; color: #e2e8f0; }
.cb2-footer-divider { width: 1px; height: 28px; background: rgba(59,130,246,0.10); }
.cb2-create-btn {
  padding: 10px 28px;
  border-radius: 9px;
  border: none;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  color: #fff;
  transition: all .15s;
}
.cb2-create-btn:hover { transform: translateY(-1px); box-shadow: 0 4px 20px rgba(59,130,246,0.35); }

/* ── Picker overlay ── */
.cb2-picker-overlay {
  position: absolute;
  inset: 0;
  background: rgba(5,8,16,0.85);
  z-index: 10;
  display: flex;
  align-items: flex-end;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s;
}
.cb2-picker-overlay.open { opacity: 1; pointer-events: all; }
.cb2-picker-panel {
  width: 100%;
  max-height: 78%;
  border-radius: 14px 14px 0 0;
  border: 1px solid rgba(59,130,246,0.10);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.cb2-picker-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(59,130,246,0.08);
  flex-shrink: 0;
}
.cb2-picker-title { font-size: 14px; font-weight: 800; color: #e2e8f0; }
.cb2-picker-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  background: rgba(59,130,246,0.08);
  border: 1px solid rgba(59,130,246,0.15);
  border-radius: 7px;
  color: #7b8fad;
  font-size: 14px;
  cursor: pointer;
  line-height: 1;
  flex-shrink: 0;
}
.cb2-picker-close:hover { color: #e2e8f0; }
.cb2-picker-filters {
  display: flex;
  gap: 8px;
  padding: 10px 18px;
  border-bottom: 1px solid rgba(59,130,246,0.06);
  flex-shrink: 0;
  flex-wrap: wrap;
}
.cb2-search-wrap { position: relative; flex: 1; min-width: 160px; }
.cb2-search {
  width: 100%;
  background: rgba(59,130,246,0.04);
  border: 1px solid rgba(59,130,246,0.12);
  border-radius: 8px;
  padding: 7px 12px;
  color: #e2e8f0;
  font-size: 13px;
  box-sizing: border-box;
}
.cb2-search:focus { outline: none; border-color: #3b82f6; }
.cb2-filter-sel {
  background: rgba(59,130,246,0.04);
  border: 1px solid rgba(59,130,246,0.12);
  border-radius: 8px;
  padding: 7px 10px;
  color: #e2e8f0;
  font-size: 13px;
}
.cb2-picker-grid {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 14px 18px;
  align-content: flex-start;
}
.cb2-picker-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 18px;
  border-top: 1px solid rgba(59,130,246,0.08);
  flex-shrink: 0;
}
.cb2-picker-info { font-size: 13px; color: #7b8fad; }
.cb2-picker-add-btn {
  padding: 8px 20px;
  border-radius: 8px;
  border: none;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  color: #fff;
}

/* ── Volume slider ── */
.hstat.hvol {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 10px;
}
#volIcon { font-size: 14px; cursor: pointer; }
#volSlider {
  -webkit-appearance: none;
  appearance: none;
  width: 80px;
  height: 4px;
  border-radius: 4px;
  background: rgba(59,130,246,0.2);
  outline: none;
  cursor: pointer;
}
#volSlider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: #3b82f6;
  cursor: pointer;
}

/* ═══════════════════════════
   OWNER CHAT STYLES
   ═══════════════════════════ */
@keyframes ownerGlow {
  0%, 100% { box-shadow: 0 0 6px rgba(245,200,66,0.3); }
  50%       { box-shadow: 0 0 14px rgba(245,200,66,0.6); }
}
.r-owner {
  background: #1a1200 !important;
  color: #f5c842 !important;
  font-weight: 800 !important;
  border: 1px solid rgba(245,200,66,0.4) !important;
  border-radius: 4px !important;
  padding: 2px 6px !important;
  -webkit-text-fill-color: #f5c842 !important;
  letter-spacing: .3px;
}
.c-msg.owner-msg { /* no special border or background */ }
.c-msg.owner-msg .c-user { color: #f5c842; font-weight: 700; }

/* ═══════════════════════════
   TEAM BATTLE LABELS
   ═══════════════════════════ */
.bat-team-label {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .07em;
  padding: 6px 12px 5px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.bat-team-total {
  font-size: 13px;
  font-weight: 800;
}

/* ═══════════════════════════════════════════
   BATTLE ARENA — layout overrides
   ═══════════════════════════════════════════ */

/* Players area — no internal scroll, page scrolls instead */
#page-arena.active {
  overflow-y: auto !important;
  overflow-x: hidden !important;
}
.bat-arena-main {
  overflow: visible !important;
  height: auto !important;
  flex: none !important;
}
/* Player header */
.bat-pcol-header {
  background: #0c1120;
  border-bottom-color: rgba(59,130,246,0.06);
  padding: 8px 16px;
}
.bat-pcol-avatar { background: #141c2e; }
.bat-pcol-name { font-size: 14px; }

/* Score row — prominent below reel */
.bat-pcol-score-row {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  background: #0c1120;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  flex-shrink: 0;
}
.bat-pcol-score-row .bat-pcol-score {
  font-size: 15px;
  font-weight: 900;
  color: #f5c842;
}

/* Reel area — taller, full width for better spin visibility */
.bat-pcol-reel,
.bat-pcol-reel .reel-wrap {
  height: 120px !important;
}
.bat-pcol-reel .reel-item {
  width: 108px !important;
  min-width: 108px !important;
  height: 108px !important;
}
.bat-pcol-reel .reel-item img {
  width: 68px !important;
  height: 68px !important;
}

/* Round cards — stack vertically, full width */
.bat-pcol-rounds {
  display: flex !important;
  flex-direction: column !important;
  flex-wrap: nowrap !important;
  overflow: visible !important;
  gap: 4px !important;
  padding: 6px !important;
  flex: none !important;
  align-content: unset !important;
}
.bat-round-card {
  width: 100% !important;
  min-width: 0 !important;
  min-height: 0 !important;
  height: auto !important;
  flex-shrink: 0 !important;
  flex-grow: 0 !important;
  background: #0f1523;
  border-color: rgba(59,130,246,0.07);
  box-sizing: border-box !important;
  padding: 8px 6px !important;
}
.bat-round-card.bat-round-active {
  border-color: rgba(59,130,246,0.5);
  background: rgba(59,130,246,0.06);
}

/* VS divider */
.bat-vs-divider {
  flex-shrink: 0;
}

/* ── Team layout: teams side by side, players stacked, rounds at bottom ── */
.bat-team-wrapper {
  flex: 1 !important;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

/* Players area: stack players vertically */
.bat-team-players {
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}
.bat-team-players .bat-player-col {
  width: 100% !important;
  flex: none !important;
  border-right: none !important;
  border-bottom: 1px solid rgba(59,130,246,0.06);
}

/* Rounds area: player round grids side by side at the bottom */
.bat-team-rounds {
  display: flex !important;
  flex: none !important;
  height: auto !important;
  min-height: 0 !important;
  overflow: visible !important;
  border-top: 2px solid rgba(59,130,246,0.1);
}
.bat-team-rounds .bat-pcol-rounds {
  flex: 1 !important;
  min-width: 0 !important;
  overflow: visible !important;
  border-right: 1px solid rgba(255,255,255,0.04);
}
.bat-team-rounds .bat-pcol-rounds:last-child {
  border-right: none;
}
.bat-team-rounds .bat-round-card {
  flex: none !important;
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  flex-grow: 0 !important;
  flex-shrink: 0 !important;
}

.bat-team-label {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .07em;
  padding: 5px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}
.bat-team-total {
  font-size: 13px;
  font-weight: 900;
}

.bat-player-me { background: rgba(59,130,246,0.04); }

/* Lobby bar */
.bat-lobby-bar { background: #0c1120; }

.c-owner-name { color: #f5c842 !important; font-weight: 700; }

/* ═══════════════════════════════════════════
   HOME BANNER — case image background
   ═══════════════════════════════════════════ */
.hbanner {
  background:
    linear-gradient(to right, #0d1226 30%, rgba(13,18,38,0.55) 60%, rgba(13,18,38,0.1) 100%),
    url('img/case_banner.png') right center / contain no-repeat !important;
  border-color: rgba(91,106,245,0.25) !important;
}
/* Remove the emoji placeholder now that we have a real image */
.hbanner::after { display: none !important; }

/* ═══════════════════════════════
   HOME BANNER — case image background
   ═══════════════════════════════ */
.hbanner {
  background-image: url('../casesim/img/case_banner_bg.png') !important;
  background-size: cover !important;
  background-position: center right !important;
  background-repeat: no-repeat !important;
}
/* Keep text readable over the image */
.hbanner .hb-tag,
.hbanner .hb-title,
.hbanner .hb-cta {
  position: relative;
  z-index: 2;
}
/* Subtle dark overlay on LEFT side so text stays legible */
.hbanner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(10,12,24,0.85) 0%, rgba(10,12,24,0.55) 55%, rgba(10,12,24,0.0) 100%);
  z-index: 1;
  border-radius: inherit;
}

/* ═══════════════════════════════
   GAME CARDS — fix label cutoff
   ═══════════════════════════════ */
/* Show full image including bottom label text */
.gc-img img {
  object-fit: cover !important;
  object-position: center 30% !important;
}

/* ═══════════════════════════════
   PROFILE — Stats Grid
   ═══════════════════════════════ */
.profile-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}
.psg-card {
  background: #0f1623;
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 14px;
  padding: 18px 14px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
  transition: border-color .2s, transform .2s;
}
.psg-card:hover {
  border-color: rgba(99,102,241,0.35);
  transform: translateY(-2px);
}
.psg-icon {
  font-size: 22px;
  line-height: 1;
}
.psg-val {
  font-size: 20px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.5px;
  line-height: 1.1;
}
.psg-lbl {
  font-size: 10px;
  font-weight: 600;
  color: rgba(255,255,255,0.38);
  text-transform: uppercase;
  letter-spacing: .6px;
}



/* ═══════════════════════════════
   LEGAL FOOTER in simulator
   ═══════════════════════════════ */
.sim-legal-footer {
  background: var(--surface, #0d1220);
  border-top: 1px solid rgba(255,255,255,0.06);
  padding: 16px 24px;
  text-align: center;
  margin-top: auto;
}
.slf-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 4px 18px;
  margin-bottom: 8px;
}
.slf-links a {
  font-size: 11px;
  color: rgba(255,255,255,0.35);
  text-decoration: none;
  transition: color .2s;
  letter-spacing: .3px;
}
.slf-links a:hover { color: rgba(255,255,255,0.7); }
.slf-copy {
  font-size: 10px;
  color: rgba(255,255,255,0.2);
  letter-spacing: .2px;
}

/* ═══════════════════════════════
   SIDEBAR — Legal collapsible
   ═══════════════════════════════ */
.nav-legal-group {
  border-top: 1px solid rgba(255,255,255,0.06);
  padding-top: 8px;
  margin-top: 4px;
}
.nav-legal-toggle {
  width: 100%;
  display: flex !important;
  align-items: center;
  justify-content: space-between !important;
  opacity: 0.55;
  transition: opacity .2s;
}
.nav-legal-toggle:hover { opacity: 1; }
.nav-legal-arrow {
  font-size: 16px;
  line-height: 1;
  transition: transform .25s;
  margin-left: auto;
  padding-left: 6px;
  color: rgba(255,255,255,0.4);
}
.nav-legal-toggle.open .nav-legal-arrow {
  transform: rotate(90deg);
}
/* Dropdown */
.nav-legal-dropdown {
  max-height: 0;
  overflow: hidden;
  transition: max-height .28s ease;
  display: flex;
  flex-direction: column;
  padding-left: 14px;
}
.nav-legal-dropdown.open {
  max-height: 200px;
}
.nav-legal-item {
  text-decoration: none;
  font-size: 12px;
  color: rgba(255,255,255,0.45);
  padding: 5px 8px;
  border-radius: 6px;
  transition: color .15s, background .15s;
  display: block;
}
.nav-legal-item:hover {
  color: #fff;
  background: rgba(255,255,255,0.06);
}



/* ═══════════════════════════════════════════════
   CASE MODAL — Redesigned overlay
   ═══════════════════════════════════════════════ */

/* Modal container */
.cp-modal {
  background: #0b1020;
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 18px;
  width: min(780px, 96vw);
  max-height: 90vh;
  overflow-y: auto;
  overflow-x: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
  box-shadow: 0 30px 80px rgba(0,0,0,0.7);
}

/* ── Header ── */
.cp-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  background: rgba(255,255,255,0.02);
  flex-shrink: 0;
}
.cp-case-img {
  width: 72px;
  height: 72px;
  object-fit: contain;
  filter: drop-shadow(0 0 12px rgba(99,102,241,0.4));
  flex-shrink: 0;
}
.cp-header-mid {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}
.cp-title {
  font-family: 'Syne', sans-serif;
  font-size: 20px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -.4px;
}
.cp-header .multi-btns {
  display: flex;
  gap: 6px;
}
.cp-header .multi-btn {
  width: 40px;
  height: 32px;
  border-radius: 7px;
  border: 1px solid rgba(255,255,255,0.13);
  background: transparent;
  color: rgba(255,255,255,0.5);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all .15s;
}
.cp-header .multi-btn.sel,
.cp-header .multi-btn:hover {
  background: rgba(99,102,241,0.2);
  border-color: #6366f1;
  color: #fff;
}
.cp-header-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  flex-shrink: 0;
}
.cp-gold-btn {
  background: rgba(245,200,66,0.08);
  border: 1px solid rgba(245,200,66,0.3);
  color: #f5c842;
  border-radius: 7px;
  padding: 5px 12px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: background .2s;
}
.cp-gold-btn:hover, .cp-gold-btn.active {
  background: rgba(245,200,66,0.18);
}
.cp-close-btn {
  width: 28px;
  height: 28px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 6px;
  color: rgba(255,255,255,0.5);
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color .15s, background .15s;
}
.cp-close-btn:hover { color: #fff; background: rgba(255,255,255,0.12); }

/* ── Reel zone ── */
.cp-reel-zone {
  padding: 16px 18px 0;
  flex-shrink: 0;
}
.cp-modal .reel-wrap {
  height: 120px;
  margin-bottom: 0;
  border-radius: 10px;
}
.cp-modal #reelsContainer {
  display: grid;
  gap: 8px;
  grid-template-columns: 1fr;
}
.cp-modal #reelsContainer:has(.reel-wrap:nth-child(2)) { grid-template-columns: repeat(2,1fr); }
.cp-modal #reelsContainer:has(.reel-wrap:nth-child(3)) { grid-template-columns: repeat(3,1fr); }
.cp-modal #reelsContainer:has(.reel-wrap:nth-child(4)) { grid-template-columns: repeat(2,1fr); }
.cp-modal #reelsContainer:has(.reel-wrap:nth-child(5)) { grid-template-columns: repeat(3,1fr); }

/* win box in modal — stays inside reel zone */
.cp-modal .win-box {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px;
  margin: 10px 0 0;
  background: rgba(11,16,32,0.0);
  border-radius: 10px;
  position: static;
}
.cp-modal .win-box.show { display: flex; }

/* ── Open button ── */
.cp-open-btn {
  margin: 14px 18px;
  width: calc(100% - 36px);
  height: 46px;
  background: linear-gradient(135deg,#4f52e0,#6366f1);
  border: none;
  border-radius: 11px;
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  letter-spacing: -.2px;
  box-shadow: 0 4px 20px rgba(99,102,241,0.35);
  transition: filter .15s, transform .1s;
  flex-shrink: 0;
}
.cp-open-btn:hover { filter: brightness(1.1); transform: translateY(-1px); }
.cp-open-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; filter: none; }

/* ── Scrollable content area ── */
.cp-content {
  padding: 4px 18px 24px;
  flex: 1;
}
.cp-section-head {
  font-size: 12px;
  font-weight: 700;
  color: rgba(255,255,255,0.45);
  text-transform: uppercase;
  letter-spacing: .8px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ── Top drops ── */
.cp-top-drops {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 6px;
  scrollbar-width: none;
}
.cp-top-drops::-webkit-scrollbar { display: none; }
.ctd-card {
  flex: 0 0 120px;
  background: #0f1624;
  border: 1px solid;
  border-radius: 11px;
  padding: 8px 8px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  transition: transform .2s;
  cursor: default;
}
.ctd-card:hover { transform: translateY(-3px); }
.ctd-rarity {
  font-size: 8px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  padding: 2px 7px;
  border-radius: 20px;
  align-self: flex-start;
}
.ctd-img, .ctd-e {
  width: 68px;
  height: 50px;
  object-fit: contain;
  display: block;
  font-size: 32px;
  text-align: center;
  line-height: 50px;
}
.ctd-name {
  font-size: 10px;
  font-weight: 600;
  color: #fff;
  text-align: center;
  line-height: 1.3;
  width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ctd-val { font-size: 11px; font-weight: 700; color: #f5c842; }
.ctd-pct { font-size: 9px; color: rgba(255,255,255,0.3); }

/* ── Case contents grid ── */
.cp-modal .pi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(90px,1fr));
  gap: 7px;
}
.cp-modal .pi-item {
  background: #0f1624;
  border: 1px solid color-mix(in srgb, var(--rc,#444) 28%, transparent);
  border-radius: 9px;
  padding: 8px 6px 7px;
  text-align: center;
  position: relative;
  cursor: default;
  transition: transform .15s, border-color .15s;
}
.cp-modal .pi-item:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--rc,#888) 55%, transparent);
}
.pi-pct-badge {
  position: absolute;
  top: 4px;
  right: 5px;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .1px;
}
.cp-modal .pi-img {
  width: 58px;
  height: 44px;
  object-fit: contain;
  display: block;
  margin: 0 auto 4px;
}
.cp-modal .pi-e { font-size: 26px; margin-bottom: 4px; }
.cp-modal .pi-n {
  font-size: 8.5px;
  color: rgba(255,255,255,0.58);
  line-height: 1.25;
  margin-bottom: 3px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.cp-modal .pi-v { font-size: 10px; font-weight: 700; color: #f5c842; }



/* ═══════════════════════════════
   EMOTE PICKER — Custom animated
   ═══════════════════════════════ */

/* Update the emote picker button icon */
.chat-emote-btn img { display: none !important; }
.chat-emote-btn::before { content: '😄'; font-size: 16px; }

/* Picker popup */
.chat-emote-picker {
  position: absolute;
  bottom: 52px;
  right: 8px;
  width: 300px;
  max-height: 320px;
  background: #0f1623;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.6);
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 300;
  display: none;
  padding: 8px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.1) transparent;
}
.chat-emote-picker.cep-open { display: block; }

/* Section headers */
.cep-section {
  font-size: 10px;
  font-weight: 700;
  color: rgba(255,255,255,0.3);
  text-transform: uppercase;
  letter-spacing: .7px;
  padding: 4px 4px 6px;
  width: 100%;
}

/* Grid */
.cep-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

/* Standard emoji tiles */
.cep-emote {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  cursor: pointer;
  font-size: 20px;
  transition: background .12s, transform .1s;
  flex-shrink: 0;
}
.cep-emote:hover {
  background: rgba(255,255,255,0.1);
  transform: scale(1.2);
}

/* Custom animated emote tiles */
.cep-custom {
  width: 52px;
  height: 52px;
  flex-direction: column;
  gap: 2px;
  padding: 3px;
}
.cep-img {
  width: 36px;
  height: 36px;
  object-fit: contain;
  display: block;
}
.cep-label {
  font-size: 7px;
  color: rgba(255,255,255,0.4);
  text-align: center;
  line-height: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  width: 100%;
}

/* Inline emotes in chat messages */
.chat-emote-img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  vertical-align: middle;
  display: inline-block;
  margin: -2px 1px;
}

/* ═══════════════════════════════════════════════════
   MOBILE — Comprehensive responsive overrides
   ≤ 768px: tablet/phone
   ≤ 480px: small phone
   ═══════════════════════════════════════════════════ */

@media (max-width: 768px) {

  /* ── Home banner ── */
  .hbanner {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 18px 16px;
    min-height: 0;
  }
  .hbanner-cases {
    display: none; /* hide floating case images on small screens */
  }
  .hb-title { font-size: 22px !important; }
  .hb-tag   { font-size: 10px; }

  /* ── Case modal — bottom-sheet style ── */
  .overlay:has(.cp-modal) { align-items: flex-end !important; padding-bottom: 60px !important; }
  .cp-modal {
    width: 100% !important;
    border-radius: 18px 18px 0 0 !important;
    max-height: calc(92vh - 60px) !important;
  }
  .cp-header {
    padding: 12px;
    gap: 10px;
    flex-wrap: wrap;
  }
  .cp-case-img { width: 54px; height: 54px; }
  .cp-title { font-size: 15px; }
  .cp-header-right { flex-direction: row; align-items: center; }
  .cp-header .multi-btn { width: 34px; height: 28px; font-size: 11px; }
  .cp-reel-zone { padding: 10px 12px 0; }
  .cp-open-btn  { margin: 10px 12px; width: calc(100% - 24px); height: 42px; font-size: 14px; }
  .cp-content   { padding: 4px 12px 20px; }

  /* Top drops: smaller cards */
  .ctd-card { flex: 0 0 96px; }
  .ctd-img, .ctd-e { width: 56px; height: 42px; }

  /* Items grid in case modal */
  .cp-modal .pi-grid {
    grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)) !important;
    gap: 6px;
  }

  /* ── Profile stats grid: 2 cols ── */
  .profile-stats-grid { grid-template-columns: repeat(2, 1fr) !important; }
  .psg-val { font-size: 16px; }

  /* ── CB2 create battle ── */
  .cb2-panel {
    width: 100vw !important;
    height: 100vh !important;    /* fallback for older browsers */
    height: 100dvh !important;   /* dvh accounts for mobile browser URL bar */
    max-height: -webkit-fill-available; /* Safari fallback */
    border-radius: 0 !important;
  }
  .cb2-topbar { padding: 0 10px; height: 50px; gap: 8px; }
  .cb2-topbar-title { display: none; }  /* save space on mobile */
  .cb2-back   { font-size: 12px; padding: 5px 10px; }
  .cb2-toggle-pill { padding: 4px 8px 4px 8px; gap: 6px; }
  .cb2-pill-label { font-size: 11px; }
  .cb2-scroll { padding: 12px; }
  .cb2-mode-cards { gap: 8px; }
  .cb2-mode-card  { padding: 12px; }
  .cb2-cases-grid { grid-template-columns: repeat(3, 1fr) !important; gap: 8px; }
  .cb2-footer     { padding: 10px 12px; gap: 8px; }
  .cb2-confirm-btn { font-size: 13px; height: 42px; }

  /* ── Legal footer ── */
  .sim-legal-footer { padding: 12px 16px 76px; }  /* 76px = bottom nav height + spacing */
  .slf-links { gap: 4px 14px; }

  /* ── Emote picker ── */
  .chat-emote-picker {
    width: calc(100vw - 20px);
    right: 0;
    left: 0;
    margin: 0 10px;
    max-height: 260px;
  }

  /* ── Legal collapsible nav: no border on mobile (sidebar hidden) ── */
  .nav-legal-group { display: none; }
}

@media (max-width: 480px) {

  /* ── Header balance ── */
  .mob-bal-chip { font-size: 11px; padding: 3px 8px; }

  /* ── Home banner ── */
  .hb-title { font-size: 18px !important; }
  .hb-cta   { padding: 8px 16px; font-size: 13px; }

  /* ── Games grid: 2x2 ── */
  .games-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 8px; }
  .game-card  { padding-top: 56% !important; }

  /* ── Cases grid ── */
  #homeCases, #allCases {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
  }

  /* ── Case modal: even tighter ── */
  .cp-case-img { width: 44px; height: 44px; }
  .cp-title    { font-size: 13px; }
  .cp-header   { padding: 10px; gap: 8px; }
  .cp-gold-btn { font-size: 10px; padding: 4px 8px; }
  .cp-modal .pi-grid {
    grid-template-columns: repeat(auto-fill, minmax(68px, 1fr)) !important;
  }
  .ctd-card { flex: 0 0 82px; }

  /* ── Top drops: tighter ── */
  .cp-top-drops { gap: 6px; }

  /* ── Profile stats ── */
  .psg-card  { padding: 14px 10px; }
  .psg-val   { font-size: 15px; }
  .psg-icon  { font-size: 18px; }

  /* ── Reel items ── */
  .reel-item {
    width: 70px !important;
    min-width: 70px !important;
    height: 70px !important;
  }
  .reel-item img { width: 38px !important; height: 38px !important; }

  /* ── Win box ── */
  .wb-e  { font-size: 42px; }
  .wb-n  { font-size: 13px; }
  .wb-v  { font-size: 16px; }
  .wb-img { width: 72px !important; height: 72px !important; }

  /* ── Inventory grid ── */
  .inv-grid { grid-template-columns: repeat(3, 1fr) !important; gap: 6px; }

  /* ── CB2 cases grid ── */
  .cb2-cases-grid { grid-template-columns: repeat(2, 1fr) !important; }
  .cb2-mode-cards { flex-direction: column; }

  /* ── Battle arena ── */
  .bat-arena-topbar { font-size: 12px; }
  .bat-player-col   { min-width: 0; }

  /* ── Legal pages ── */
  .legal-box h1 { font-size: 22px; }
  .cp-section-head { font-size: 11px; }
  .cookie-table th, .cookie-table td { font-size: 11px; padding: 7px 8px; }

  /* ── Emote picker ── */
  .cep-custom { width: 44px; height: 44px; }
  .cep-img    { width: 30px; height: 30px; }
}

/* ── Mobile nav: 7 items ── */
@media (max-width: 768px) {
  #mobileNav {
    justify-content: space-around;
  }
  .mob-nav-btn {
    flex: 1;
    min-width: 0;
    padding: 6px 2px;
  }
  .mob-label {
    font-size: 9px !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
  }
  .mob-icon {
    font-size: 18px !important;
  }
}

.risk-bar-track {
  flex: 1;
  height: 5px;
  background: rgba(255,255,255,0.08);
  border-radius: 3px;
  overflow: hidden;
  min-width: 48px;
}
.risk-bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.4s ease;
}
/* ── Risk bar (replaces old dots) ── */
.cc2-risk {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
}
.risk-dot { display: none !important; }  /* hide old dots */
.risk-bar-track {
  flex: 1;
  height: 4px;
  background: rgba(255,255,255,0.08);
  border-radius: 3px;
  overflow: hidden;
  min-width: 44px;
}
.risk-bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.5s cubic-bezier(0.25,0.46,0.45,0.94);
}
.risk-label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  white-space: nowrap;
  flex-shrink: 0;
}

/* ── Guest / Login styles ── */

/* Login button in header (mirrors logout-btn style) */
.login-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: linear-gradient(135deg, #3b82f6, #6366f1);
  color: #fff;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  transition: opacity .15s, transform .1s;
  white-space: nowrap;
  flex-shrink: 0;
}
.login-btn:hover { opacity: .85; transform: translateY(-1px); }

/* Login prompt modal */
.login-prompt-modal {
  max-width: 360px;
  width: calc(100vw - 40px);
  padding: 36px 28px 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
  border-radius: 18px;
}
.lpm-icon { font-size: 44px; line-height: 1; }
.lpm-title {
  font-size: 22px;
  font-weight: 800;
  color: #fff;
  margin: 0;
}
.lpm-sub {
  font-size: 13px;
  color: rgba(255,255,255,0.55);
  margin: 0;
  line-height: 1.5;
}
.lpm-login-btn {
  width: 100%;
  padding: 13px;
  background: linear-gradient(135deg, #3b82f6, #6366f1);
  color: #fff;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  transition: opacity .15s;
}
.lpm-login-btn:hover { opacity: .85; }
.lpm-register-btn {
  width: 100%;
  padding: 13px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.8);
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: background .15s;
}
.lpm-register-btn:hover { background: rgba(255,255,255,0.1); }

/* ── Welcome hero background ── */
.hw {
  background:
    linear-gradient(135deg, rgba(59,130,246,0.08) 0%, rgba(99,102,241,0.06) 50%, rgba(168,85,247,0.06) 100%),
    var(--card);
  border-color: rgba(99,102,241,0.25) !important;
  position: relative;
  overflow: hidden;
}

/* Animated glowing orbs */
.hw::before {
  content: '';
  position: absolute;
  top: -40px; right: -40px;
  width: 220px; height: 220px;
  background: radial-gradient(circle, rgba(99,102,241,0.18), transparent 65%);
  pointer-events: none;
  animation: hw-pulse 4s ease-in-out infinite alternate;
}
.hw::after {
  content: '';
  position: absolute;
  bottom: -30px; left: 10%;
  width: 160px; height: 160px;
  background: radial-gradient(circle, rgba(59,130,246,0.12), transparent 65%);
  pointer-events: none;
  animation: hw-pulse 5s ease-in-out infinite alternate-reverse;
}

@keyframes hw-pulse {
  from { opacity: 0.6; transform: scale(1); }
  to   { opacity: 1;   transform: scale(1.15); }
}

/* CS2 crosshair watermark */
.hw-bg-mark {
  position: absolute;
  right: 24px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 96px;
  opacity: 0.04;
  pointer-events: none;
  user-select: none;
  line-height: 1;
  filter: grayscale(1);
}

/* Keep text above decorations */
.hw-hi, .hw-name, .hw-lvbar { position: relative; z-index: 1; }

/* ═══════════════════════════════
   UPGRADER WHEEL — Clean donut
   ═══════════════════════════════ */

.ug2-wheel-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  position: relative;
}

.ug2-wheel-wrap {
  position: relative;
  width: 300px;
  height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Static top marker */
.ugw-marker {
  position: absolute;
  top: -2px;
  left: 50%;
  transform: translateX(-50%);
  color: #fff;
  font-size: 16px;
  z-index: 10;
  pointer-events: none;
  filter: drop-shadow(0 0 6px rgba(255,255,255,0.6));
}

/* Zone drag hint */
.ugw-zone-hint {
  font-size: 11px;
  color: rgba(255,255,255,0.25);
  text-align: center;
  letter-spacing: 0.3px;
}
.ugw-zone-hint span {
  color: #f5c842;
  opacity: 0.6;
}

/* Win result overlay */
.ug2-wheel-result {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 6px;
  font-family: var(--ff);
  font-size: 20px;
  font-weight: 800;
  pointer-events: none;
  z-index: 5;
}
.ug2-wheel-result.win  { color: #22c55e; text-shadow: 0 0 20px rgba(34,197,94,0.6); }
.ug2-wheel-result.lose { color: #ef4444; text-shadow: 0 0 20px rgba(239,68,68,0.5); }

/* Old needle hidden (replaced by SVG needle) */
.ug2-wheel-needle { display: none !important; }

@media (max-width: 480px) {
  .ug2-wheel-wrap { width: 260px; height: 260px; }
  .ug2-wheel-wrap svg { width: 260px; height: 260px; }
}

/* ── Upgrader drag pin ── */
.ug2-wheel-wrap { position: relative; }

.ugw-drag-pin {
  position: absolute;
  width: 22px;
  height: 22px;
  transform: translate(-50%, -50%);
  cursor: grab;
  z-index: 10;
  display: none;
}
.ugw-drag-pin:active { cursor: grabbing; }

.ugw-pin-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #f5c842;
  border: 2.5px solid rgba(255,255,255,0.9);
  box-shadow: 0 0 8px rgba(245,200,66,0.6);
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%,-50%);
  transition: box-shadow .15s;
}
.ugw-drag-pin:hover .ugw-pin-dot {
  box-shadow: 0 0 14px rgba(245,200,66,0.9);
}

/* ── Upgrader price range filter ── */
.ug2-price-range {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  padding: 0 10px;
  height: 36px;
  flex-shrink: 0;
}
.upr-label { font-size: 13px; opacity: .5; }
.upr-sep   { font-size: 12px; color: rgba(255,255,255,0.3); }
.ug2-price-input {
  background: transparent;
  border: none;
  outline: none;
  color: #e8eaf2;
  font-size: 13px;
  font-family: var(--ff);
  width: 64px;
  -moz-appearance: textfield;
}
.ug2-price-input::placeholder { color: rgba(255,255,255,0.2); }
.ug2-price-input::-webkit-outer-spin-button,
.ug2-price-input::-webkit-inner-spin-button { -webkit-appearance: none; }

@media (max-width: 768px) {
  .ug2-price-range { width: 100%; }
  .ug2-price-input { flex: 1; }
}

/* ── Upgrader filter bar: wrap so price range is visible ── */
.ug2-browser-controls {
  flex-wrap: wrap !important;
}

/* ── Multi-open unlock system ── */
.multi-btn.multi-locked {
  opacity: 0.55;
  cursor: pointer;
  position: relative;
}
.multi-btn.multi-locked:hover {
  opacity: 0.85;
  border-color: #f5c842 !important;
  color: #f5c842;
}

/* Unlock modal */
.multi-unlock-modal {
  max-width: 340px;
  width: calc(100vw - 40px);
  padding: 36px 28px 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  border-radius: 18px;
}
.mum-icon  { font-size: 48px; line-height: 1; }
.mum-title { font-size: 22px; font-weight: 800; color: #fff; margin: 0; }
.mum-desc  { font-size: 13px; color: rgba(255,255,255,0.45); margin: 0; }
.mum-cost  {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 28px;
  font-weight: 800;
  color: #f5c842;
  margin: 4px 0;
}
.mum-cost .coin { font-size: 24px; }
.mum-buy-btn {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity .15s;
  margin-top: 4px;
}
.mum-buy-btn:hover:not(:disabled) { opacity: .85; }
.mum-buy-btn:disabled {
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.3);
  cursor: not-allowed;
}
.mum-bal { font-size: 12px; color: rgba(255,255,255,0.3); margin: 0; }

/* ── Larger case cards ── */
.cases-grid {
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)) !important;
  gap: 16px !important;
}
.cc2-inner {
  min-height: 170px !important;
}
.case-card2 .cc-img-real {
  width: 130px !important;
  height: 100px !important;
}
@media (max-width: 768px) {
  .cases-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)) !important;
    gap: 10px !important;
  }
  .cc2-inner { min-height: 130px !important; }
  .case-card2 .cc-img-real { width: 100px !important; height: 78px !important; }
}
@media (max-width: 480px) {
  .cases-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
  }
}

/* ── Speed Open ── */
#speedOpenBtn { margin-left: 6px; }
#speedOpenBtn.gs-active {
  background: linear-gradient(135deg, #f59e0b, #d97706) !important;
  border-color: #f59e0b !important;
  color: #000 !important;
  font-weight: 700;
}
/* bat-speed-toggle kept for battle arena page if still used there */
.bat-speed-toggle {
  padding: 8px 14px;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 8px;
  color: rgba(255,255,255,0.6);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s;
}
.bat-speed-toggle:hover { border-color: #f59e0b; color: #f59e0b; }
.bat-speed-toggle.bat-speed-active {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  border-color: #f59e0b;
  color: #000;
  font-weight: 700;
}


/* picker card sizing handled below in the "uniform fixed size" section */
/* pcard styles consolidated below in "Picker cards" section */

/* ── Picker cards: uniform responsive size ── */
.cb2-picker-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)) !important;
  gap: 8px !important;
  flex-wrap: unset !important;
}
.cb2-picker-card {
  width: auto !important;
  min-width: 0 !important;
  max-width: none !important;
  flex: none !important;
  box-sizing: border-box !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  padding: 10px 6px 8px !important;
  overflow: visible !important;
  height: auto !important;
  min-height: 140px !important;
}
.cb2-pcard-img,
.cb2-pcard-emoji {
  width: 100% !important;
  max-width: 72px !important;
  height: 52px !important;
  object-fit: contain !important;
  flex-shrink: 0 !important;
  display: block !important;
  margin: 0 auto 6px !important;
  font-size: 28px !important;
  line-height: 52px !important;
  text-align: center !important;
}
.cb2-pcard-name {
  font-size: 10px !important;
  line-height: 1.3 !important;
  text-align: center !important;
  width: 100% !important;
  overflow: hidden !important;
  display: -webkit-box !important;
  -webkit-line-clamp: 2 !important;
  -webkit-box-orient: vertical !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: 28px !important;
  word-break: break-word !important;
  color: #e2e8f0 !important;
  margin-bottom: 3px !important;
}
.cb2-pcard-price {
  font-size: 11px !important;
  font-weight: 700 !important;
  text-align: center !important;
  margin-top: auto !important;
  color: #f5c842 !important;
  white-space: nowrap !important;
}
.cb2-pcard-add {
  font-size: 10px !important;
  text-align: center !important;
  margin-top: 4px !important;
  padding: 4px 10px !important;
  background: rgba(59,130,246,0.15) !important;
  border: 1px solid rgba(59,130,246,0.3) !important;
  border-radius: 5px !important;
  color: #60a5fa !important;
  cursor: pointer !important;
  font-weight: 600 !important;
  transition: all .12s !important;
}
.cb2-pcard-add:hover {
  background: rgba(59,130,246,0.25) !important;
  border-color: #3b82f6 !important;
}
.cb2-pcard-added {
  font-size: 10px !important;
  text-align: center !important;
  margin-top: 4px !important;
  color: #22c55e !important;
  font-weight: 600 !important;
}

/* SEO H1 - visible to crawlers, unobtrusive on screen */
.seo-h1 {
  font-size: 13px;
  color: rgba(255,255,255,0.25);
  font-weight: 400;
  margin: 0 0 6px 2px;
  letter-spacing: 0;
}

/* ── Auth alert variants ── */
.auth-alert {
  background: rgba(239,68,68,0.12);
  border: 1px solid rgba(239,68,68,0.3);
  color: #fca5a5;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13px;
  margin-bottom: 16px;
}
.auth-alert.auth-alert-success {
  background: rgba(34,197,94,0.12);
  border-color: rgba(34,197,94,0.3);
  color: #86efac;
}

/* ── 5-button mobile nav ── */
#mobileNav {
  grid-template-columns: repeat(5, 1fr) !important;
}
@media (max-width: 480px) {
  .mob-label { font-size: 9px !important; }
  .mob-icon  { font-size: 18px !important; }
  #mobileNav { gap: 0 !important; }
}

/* ── Games popup ── */
#mobGamesPopup {
  position: fixed;
  bottom: calc(var(--mobile-nav-h, 60px) + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: #0f1523;
  border: 1px solid rgba(59,130,246,0.2);
  border-radius: 14px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  z-index: 1100;
  min-width: 180px;
  box-shadow: 0 -4px 32px rgba(0,0,0,0.5);
}
.mob-games-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: transparent;
  border: none;
  border-radius: 10px;
  color: #e2e8f0;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  transition: background .15s;
  font-family: inherit;
}
.mob-games-item:hover,
.mob-games-item:active {
  background: rgba(59,130,246,0.12);
}
.mob-games-item span { font-size: 18px; }
#mobGamesOverlay {
  position: fixed;
  inset: 0;
  z-index: 1090;
  background: transparent;
}

/* ── Inventory mobile fix ── */
@media (max-width: 600px) {
  .inv-grid {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 6px !important;
  }
  .inv-item {
    padding: 6px 4px !important;
    min-width: 0 !important;
    overflow: hidden !important;
  }
  .inv-item img {
    width: 100% !important;
    height: auto !important;
    max-width: 100% !important;
  }
  .inv-item .ii-name {
    font-size: 9px !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  #page-inventory {
    overflow-x: hidden !important;
    padding: 10px 8px !important;
  }
}
@media (max-width: 380px) {
  .inv-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

/* ── Custom CB sort dropdown ── */
.cb2-sort-drop {
  position: relative;
  flex-shrink: 0;
}
.cb2-sort-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: #141c2e;
  border: 1px solid rgba(59,130,246,0.2);
  border-radius: 8px;
  color: #e2e8f0;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  font-family: inherit;
  transition: border-color .15s;
}
.cb2-sort-btn:hover { border-color: #3b82f6; }
.cb2-sort-arrow { font-size: 10px; color: #7b8fad; }
.cb2-sort-opts {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: #141c2e;
  border: 1px solid rgba(59,130,246,0.2);
  border-radius: 10px;
  overflow: hidden;
  z-index: 200;
  min-width: 160px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}
.cb2-sort-opt {
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 500;
  color: #94a3b8;
  cursor: pointer;
  transition: background .12s, color .12s;
}
.cb2-sort-opt:hover {
  background: rgba(59,130,246,0.1);
  color: #e2e8f0;
}
.cb2-sort-opt.sel {
  color: #3b82f6;
  font-weight: 700;
  background: rgba(59,130,246,0.08);
}


.reel-track {
  will-change: transform;
  backface-visibility: hidden;
}


/* ═══════════════════════════════════════════════════════
   MOBILE FIX PATCH — March 2026
   Fixes: upgrader stacking, clicker stacking, header
   overflow, dash-hero stacking, battle arena overflow,
   cases toolbar, overlay alignment, dead nav rule
   ═══════════════════════════════════════════════════════ */

/* ── 1. Remove dead 8-column mobile nav rule (was overridden anyway) ── */
/* The repeat(8,1fr) at line ~2593 is now harmless since repeat(5,1fr) at
   line ~2603 wins, but we reinforce 5-col to prevent specificity races.  */

/* ── 2. Header: hide stats on mobile, keep balance + login/logout ── */
@media (max-width: 768px) {
  #header .hstat {
    display: none !important;
  }
  #header {
    gap: 8px;
    padding: 0 12px;
  }
  .page-heading {
    font-size: 14px !important;
  }
  .logout-btn, .login-btn {
    font-size: 12px;
    padding: 5px 10px;
  }
}

/* ── 3. Dash hero: stack welcome + banner on mobile ── */
@media (max-width: 768px) {
  .dash-hero {
    flex-direction: column !important;
    gap: 12px !important;
  }
  .dash-hero .hw,
  .dash-hero .hbanner {
    width: 100% !important;
    min-width: 0 !important;
    flex: none !important;
  }
  .hw-bg-mark {
    font-size: 56px;
    right: 12px;
  }
}

/* ── 4. Upgrader: stack bet/wheel/target vertically on mobile ── */
@media (max-width: 768px) {
  .ug2-top {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 16px !important;
    padding: 16px 12px !important;
  }
  .ug2-bet-panel,
  .ug2-wheel-panel,
  .ug2-target-panel {
    width: 100% !important;
    min-width: 0 !important;
    flex: none !important;
    border-right: none !important;
    border-left: none !important;
    border-bottom: 1px solid rgba(59,130,246,0.08);
    padding-bottom: 16px !important;
  }
  .ug2-target-panel {
    border-bottom: none;
    padding-bottom: 0 !important;
  }
  .ug2-wheel-panel {
    align-items: center;
  }
  .ug2-wheel-wrap {
    width: 240px;
    height: 240px;
  }
  .ug2-wheel-wrap svg {
    width: 240px;
    height: 240px;
  }
  /* Skin browser controls */
  .ug2-browser-controls {
    flex-direction: column !important;
    gap: 8px !important;
  }
  .ug2-search-wrap {
    width: 100% !important;
  }
  .ug2-select {
    width: 100% !important;
    min-width: 0 !important;
  }
  /* Skin grid: 2 columns on small screens */
  .ug2-skin-grid {
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)) !important;
    gap: 8px !important;
  }
}

@media (max-width: 480px) {
  .ug2-wheel-wrap {
    width: 200px;
    height: 200px;
  }
  .ug2-wheel-wrap svg {
    width: 200px;
    height: 200px;
  }
  .ug2-bet-btns {
    flex-wrap: wrap;
    gap: 6px;
  }
  .ug2-bet-btn {
    flex: 1 1 calc(50% - 4px);
    min-width: 0;
  }
  .ug2-roll-row {
    flex-direction: column !important;
    gap: 6px !important;
  }
}

/* ── 5. Clicker: stack upgrades panel above click area on mobile ── */
@media (max-width: 768px) {
  .clk-layout {
    flex-direction: column !important;
    gap: 16px !important;
  }
  .clk-upgrades-panel {
    width: 100% !important;
    max-width: 100% !important;
    flex: none !important;
    max-height: 260px;
    overflow-y: auto;
  }
  .clk-center {
    width: 100% !important;
    flex: none !important;
  }
  .clk-stats-row {
    flex-wrap: wrap !important;
    gap: 8px !important;
  }
  .clk-stat {
    flex: 1 1 calc(50% - 4px) !important;
    min-width: 0 !important;
  }
  .clk-big-btn img {
    width: 90px !important;
    height: 90px !important;
  }
}

/* ── 6. Battle arena: prevent horizontal overflow ── */
@media (max-width: 768px) {
  .bat-arena-main {
    flex-direction: column !important;
  }
  .bat-player-col {
    width: 100% !important;
    flex: none !important;
    border-right: none !important;
    border-bottom: 1px solid rgba(59,130,246,0.06);
  }
  .bat-vs-divider {
    writing-mode: horizontal-tb !important;
    width: auto !important;
    height: auto !important;
    padding: 4px 0 !important;
    text-align: center;
  }
  .bat-arena-topbar {
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px 12px;
  }
  .bat-case-strip {
    flex-wrap: wrap;
    gap: 4px;
  }
  .bat-lobby-bar {
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px 12px;
  }
  .bat-share-wrap {
    display: none;
  }
}

/* ── 7. Cases toolbar: better wrapping on small screens ── */
@media (max-width: 480px) {
  .cases-toolbar {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 8px !important;
  }
  .cases-sort-btns {
    flex-wrap: wrap;
    gap: 4px;
  }
  .cs-sort-btn {
    flex: 1 1 auto;
    text-align: center;
    padding: 6px 8px;
  }
  .cases-search {
    max-width: 100% !important;
    width: 100% !important;
  }
}

/* ── 8. Overlays: only bottom-align for case modal, center everything else ── */
@media (max-width: 768px) {
  .overlay {
    align-items: center !important;
    padding-bottom: 0 !important;
  }
  /* Case preview modal specifically gets bottom-sheet treatment */
  .overlay:has(.cp-modal) {
    align-items: flex-end !important;
    padding-bottom: 60px !important;
  }
  /* Make sure non-case modals are centered and fit on screen */
  .modal {
    max-width: calc(100vw - 24px) !important;
    max-height: calc(100vh - 140px) !important;
    overflow-y: auto;
  }
  .login-prompt-modal,
  .multi-unlock-modal {
    max-width: 340px !important;
  }
}

/* ── 9. Stats strip: scroll horizontally on tiny screens ── */
@media (max-width: 480px) {
  .stats-strip {
    overflow-x: auto !important;
    flex-wrap: nowrap !important;
    gap: 8px !important;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .stats-strip::-webkit-scrollbar { display: none; }
  .stat-tile {
    flex: 0 0 auto !important;
    min-width: 80px;
  }
}

/* ── 10. Rank tabs: scroll on small screens ── */
@media (max-width: 480px) {
  .lb-tabs {
    overflow-x: auto !important;
    flex-wrap: nowrap !important;
    gap: 6px !important;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
  }
  .lb-tabs::-webkit-scrollbar { display: none; }
  .lb-tab {
    flex: 0 0 auto !important;
    white-space: nowrap;
    font-size: 11px !important;
    padding: 6px 10px !important;
  }
}

/* ── 11. Profile hero: responsive on mobile ── */
@media (max-width: 480px) {
  .profile-hero {
    flex-direction: column !important;
    text-align: center;
    gap: 12px !important;
    padding: 16px !important;
  }
  .ph-av {
    width: 56px !important;
    height: 56px !important;
    font-size: 22px !important;
  }
  .profile-stats-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
  }
  .psg-card {
    padding: 12px 8px !important;
  }
}

/* ── 12. Battle creation: fix footer on mobile ── */
@media (max-width: 480px) {
  .cb2-footer {
    flex-direction: column !important;
    gap: 8px !important;
    padding: 10px 12px !important;
    height: auto !important;
  }
  .cb2-footer-stats {
    width: 100%;
    justify-content: space-around;
  }
  .cb2-create-btn {
    width: 100% !important;
  }
}

/* ── 13. Prevent body scroll when mobile chat is open ── */
body.mob-chat-active {
  overflow: hidden !important;
}

/* ── 14. Free coins modal grid: 2 columns on mobile ── */
@media (max-width: 480px) {
  .coin-options {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
  }
}

/* ── 15. Battles page: topbar wrapping ── */
@media (max-width: 480px) {
  .bat-topbar {
    flex-direction: column !important;
    gap: 10px !important;
    align-items: stretch !important;
  }
  .create-battle-btn {
    width: 100%;
    text-align: center;
  }
}

/* ═══════════════════════════════════════════════════════
   BATTLE CREATION — Case card & panel fixes
   ═══════════════════════════════════════════════════════ */

/* Case cards in the "selected cases" grid — ensure name + price always visible */
.cb2-case-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px 10px 8px;
  border-radius: 10px;
  border: none !important;
  box-shadow: inset 0 0 0 1px rgba(59,130,246,0.15);
  background: #0f1523;
  position: relative;
  min-width: 0;
  overflow: hidden;
  box-sizing: border-box;
}

/* Add-card button */
.cb2-add-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 100px;
  border-radius: 10px;
  border: none !important;
  background: rgba(59,130,246,0.02);
  cursor: pointer;
  transition: all .15s;
  align-self: stretch;
  box-sizing: border-box;
  background-image: url("data:image/svg+xml,%3csvg width='100%25' height='100%25' xmlns='http://www.w3.org/2000/svg'%3e%3crect width='100%25' height='100%25' fill='none' rx='10' ry='10' stroke='rgba(59,130,246,0.2)' stroke-width='2' stroke-dasharray='8,6' stroke-dashoffset='0' stroke-linecap='round'/%3e%3c/svg%3e");
}
.cb2-add-card:hover {
  background-color: rgba(59,130,246,0.06);
  background-image: url("data:image/svg+xml,%3csvg width='100%25' height='100%25' xmlns='http://www.w3.org/2000/svg'%3e%3crect width='100%25' height='100%25' fill='none' rx='10' ry='10' stroke='rgba(59,130,246,0.4)' stroke-width='2' stroke-dasharray='8,6' stroke-dashoffset='0' stroke-linecap='round'/%3e%3c/svg%3e");
}
.cb2-card-img {
  width: 100%;
  max-width: 72px;
  height: 52px;
  object-fit: contain;
  display: block;
  margin: 0 auto 6px;
  flex-shrink: 0;
}
.cb2-pcard-emoji {
  font-size: 32px;
  text-align: center;
  line-height: 52px;
  height: 52px;
  flex-shrink: 0;
}
.cb2-card-name {
  font-size: 10px;
  font-weight: 600;
  color: #e2e8f0;
  text-align: center;
  width: 100%;
  line-height: 1.3;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  margin-bottom: 3px;
  min-height: 0;
}
.cb2-card-price {
  font-size: 11px;
  font-weight: 700;
  color: #f5c842;
  text-align: center;
  margin-bottom: 4px;
  white-space: nowrap;
}
.cb2-card-qty {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: auto;
}
.cb2-qty-btn {
  width: 22px;
  height: 22px;
  border-radius: 5px;
  border: 1px solid rgba(59,130,246,0.2);
  background: rgba(59,130,246,0.06);
  color: #7b8fad;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  line-height: 1;
  transition: all .12s;
}
.cb2-qty-btn:hover {
  border-color: #3b82f6;
  color: #e2e8f0;
  background: rgba(59,130,246,0.15);
}
.cb2-qty-val {
  font-size: 13px;
  font-weight: 700;
  color: #e2e8f0;
  min-width: 14px;
  text-align: center;
}
.cb2-card-rm {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: none;
  background: rgba(239,68,68,0.2);
  color: #ef4444;
  font-size: 11px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  line-height: 1;
  opacity: 0.7;
  transition: opacity .12s, background .12s;
  z-index: 2;
}
.cb2-card-rm:hover {
  opacity: 1;
  background: rgba(239,68,68,0.4);
}

.cb2-add-icon {
  font-size: 28px;
  color: #3b82f6;
  opacity: 0.6;
}
.cb2-add-lbl {
  font-size: 11px;
  font-weight: 600;
  color: #7b8fad;
}

/* Cases grid — force grid layout with higher specificity */
.cb2-cases-grid,
div.cb2-cases-grid,
div#cbCasesGrid,
#cbCasesGrid.cb2-cases-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)) !important;
  gap: 14px !important;
  align-items: stretch !important;
  flex-wrap: unset !important;
}
/* Remove old margin hack since gap should work now */
.cb2-cases-grid > * {
  margin: 0 !important;
}

/* cb2-body should allow content to show, not clip it */
.cb2-body {
  overflow: visible !important;
}

/* ── Mobile: battle creation panel height & footer ── */
@media (max-width: 768px) {
  .cb2-cases-grid {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 8px !important;
  }
  .cb2-case-card {
    padding: 8px 6px 6px;
  }
  .cb2-card-img {
    max-width: 60px;
    height: 44px;
    margin-bottom: 4px;
  }
  .cb2-card-name {
    font-size: 9px;
  }
  .cb2-card-price {
    font-size: 10px;
  }

  /* Footer: stack stats above buttons when space is tight */
  .cb2-footer {
    flex-wrap: wrap !important;
    height: auto !important;
    padding: 8px 12px !important;
    gap: 6px !important;
  }
  .cb2-footer-stats {
    width: 100%;
    justify-content: flex-start;
    gap: 14px;
  }
  .cb2-create-btn {
    flex: 1;
  }
}

@media (max-width: 480px) {
  .cb2-cases-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  .cb2-case-card {
    padding: 6px 4px 5px;
  }
  .cb2-card-img {
    max-width: 52px;
    height: 38px;
  }
  .cb2-modes {
    grid-template-columns: 1fr !important;
    gap: 6px;
  }
  .cb2-mode-card {
    padding: 10px 12px;
  }
  .cb2-mode-icon {
    font-size: 18px;
  }
  .cb2-mode-name {
    font-size: 13px;
  }
  /* Tabs row: horizontally scrollable */
  .cb2-tabs-row {
    overflow-x: auto;
    flex-wrap: nowrap !important;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    gap: 4px;
  }
  .cb2-tabs-row::-webkit-scrollbar { display: none; }
  .cb2-tab {
    flex: 0 0 auto;
    white-space: nowrap;
    padding: 5px 10px;
    font-size: 11px;
  }
}

/* ═══════════════════════════════════════════════════════
   CASE PICKER — Mobile responsive cards
   ═══════════════════════════════════════════════════════ */

/* Picker panel: take more screen space on mobile */
@media (max-width: 768px) {
  .cb2-picker-panel {
    max-height: 92% !important;
  }
  .cb2-picker-grid {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 8px !important;
    padding: 10px 10px !important;
  }
  .cb2-picker-card {
    padding: 8px 5px 7px !important;
    min-height: 130px !important;
  }
  .cb2-pcard-img,
  .cb2-pcard-emoji {
    max-width: 60px !important;
    height: 44px !important;
  }
  .cb2-pcard-name {
    font-size: 9px !important;
  }
  .cb2-pcard-price {
    font-size: 10px !important;
  }
  .cb2-pcard-add {
    font-size: 9px !important;
    padding: 3px 8px !important;
  }
  .cb2-pcard-added {
    font-size: 9px !important;
  }
  /* Filters row: stack search above sort */
  .cb2-picker-filters {
    flex-direction: column !important;
    gap: 6px !important;
    padding: 8px 10px !important;
  }
  .cb2-search-wrap {
    min-width: 0 !important;
    width: 100% !important;
  }
  .cb2-sort-drop {
    width: 100% !important;
  }
  .cb2-sort-btn {
    width: 100% !important;
    justify-content: space-between;
  }
  /* Footer */
  .cb2-picker-footer {
    padding: 8px 10px !important;
  }
  .cb2-picker-head {
    padding: 10px 12px !important;
  }
}

@media (max-width: 380px) {
  .cb2-picker-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  .cb2-picker-card {
    min-height: 120px !important;
  }
}

/* ═══════════════════════════════════════════════════════
   REMAINING MOBILE FIXES — Pre-release patch
   ═══════════════════════════════════════════════════════ */

/* ── 1. Mobile chat drawer (styles missing from theme) ── */
@media (max-width: 768px) {
  #chat {
    position: fixed !important;
    right: -100% !important;
    top: 0 !important;
    width: 85vw !important;
    max-width: 340px !important;
    height: 100vh !important;
    height: 100dvh !important;
    z-index: 1200 !important;
    transition: right 0.25s ease !important;
    border-left: 1px solid rgba(59,130,246,0.12);
    box-shadow: -8px 0 40px rgba(0,0,0,0.5);
  }
  #chat.mob-chat-open {
    right: 0 !important;
  }
  #mobileChatOverlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1190;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s;
  }
  #mobileChatOverlay.active {
    opacity: 1;
    pointer-events: all;
  }
}

/* ── 2. Content area: padding-bottom for mobile nav ── */
@media (max-width: 768px) {
  #content {
    padding-bottom: 70px !important;
  }
}

/* ── 3. Multi-reel layout on small phones ── */
@media (max-width: 480px) {
  .cp-modal #reelsContainer:has(.reel-wrap:nth-child(3)) {
    grid-template-columns: 1fr !important;
  }
  .cp-modal #reelsContainer:has(.reel-wrap:nth-child(4)) {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  .cp-modal #reelsContainer:has(.reel-wrap:nth-child(5)) {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  .cp-modal .reel-wrap {
    height: 90px !important;
  }
}

/* ── 4. Case modal: prevent overscroll / body scroll-through ── */
@media (max-width: 768px) {
  body.modal-open {
    overflow: hidden !important;
    position: fixed !important;
    width: 100% !important;
  }
}

/* ── 5. Battle arena page: full scroll on mobile ── */
@media (max-width: 768px) {
  #page-arena {
    padding-bottom: 80px !important;
  }
  .bat-lobby-bar {
    position: sticky;
    bottom: 0;
    z-index: 10;
  }
  /* Battle reel smaller on mobile */
  .bat-pcol-reel,
  .bat-pcol-reel .reel-wrap {
    height: 90px !important;
  }
  .bat-pcol-reel .reel-item {
    width: 80px !important;
    min-width: 80px !important;
    height: 80px !important;
  }
  .bat-pcol-reel .reel-item img {
    width: 52px !important;
    height: 52px !important;
  }
}

/* ── 6. Home page: games grid touch feedback ── */
@media (max-width: 768px) {
  .game-card:active {
    transform: scale(0.97);
    transition: transform 0.1s;
  }
  .case-card2:active {
    transform: scale(0.97);
    transition: transform 0.1s;
  }
}

/* ── 7. Inventory: sell button fix on mobile ── */
@media (max-width: 768px) {
  .inv-toolbar {
    flex-wrap: wrap;
    gap: 8px;
  }
  .sell-all-btn {
    flex-shrink: 0;
  }
}

/* ── 8. Leaderboard rows: prevent overflow ── */
@media (max-width: 480px) {
  .lb-row {
    flex-wrap: wrap;
    gap: 4px;
    padding: 8px 10px !important;
  }
  .lb-row .lb-name {
    font-size: 12px;
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

/* ── 9. Toast notifications: above mobile nav ── */
@media (max-width: 768px) {
  #toasts {
    bottom: 74px !important;
  }
}

/* ── 10. Emote picker in mobile chat drawer ── */
@media (max-width: 768px) {
  .mob-chat-open .chat-emote-picker {
    width: calc(100% - 16px) !important;
    right: 8px !important;
    left: 8px !important;
    margin: 0 !important;
  }
}

/* ═══════════════════════════════════════════════════════
   BETA WELCOME POPUP
   ═══════════════════════════════════════════════════════ */
.beta-modal {
  max-width: 440px;
  width: calc(100vw - 32px);
  padding: 32px 28px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 14px;
  border-radius: 20px;
  max-height: 90vh;
  overflow-y: auto;
}
.beta-badge {
  display: inline-block;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 2px;
  padding: 5px 16px;
  border-radius: 20px;
}
.beta-title {
  font-size: 22px;
  font-weight: 800;
  color: #fff;
  margin: 0;
}
.beta-desc {
  font-size: 13px;
  color: rgba(255,255,255,0.55);
  line-height: 1.6;
  margin: 0;
}
.beta-desc strong {
  color: #e2e8f0;
}

/* Info cards */
.beta-info-cards {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}
.beta-info-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: rgba(59,130,246,0.05);
  border: 1px solid rgba(59,130,246,0.10);
  border-radius: 12px;
  text-align: left;
}
.bic-icon {
  font-size: 22px;
  flex-shrink: 0;
  width: 36px;
  text-align: center;
}
.bic-text strong {
  display: block;
  font-size: 13px;
  color: #e2e8f0;
  font-weight: 700;
}
.bic-text span {
  font-size: 11px;
  color: #7b8fad;
}

/* Rewards section */
.beta-rewards {
  width: 100%;
  background: rgba(245,200,66,0.04);
  border: 1px solid rgba(245,200,66,0.12);
  border-radius: 14px;
  padding: 16px 14px;
}
.beta-rewards-title {
  font-size: 12px;
  font-weight: 800;
  color: #f5c842;
  letter-spacing: .3px;
  margin-bottom: 14px;
}
.beta-rewards-note {
  font-size: 10px;
  color: rgba(255,255,255,0.35);
  margin: 10px 0 0;
}
.beta-podium {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 12px;
}
.beta-place {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 16px;
  border-radius: 12px;
  min-width: 70px;
}
.beta-place-1 {
  background: rgba(245,200,66,0.12);
  border: 1px solid rgba(245,200,66,0.3);
  transform: translateY(-4px);
}
.beta-place-2 {
  background: rgba(192,192,192,0.08);
  border: 1px solid rgba(192,192,192,0.2);
}
.beta-place-3 {
  background: rgba(205,127,50,0.08);
  border: 1px solid rgba(205,127,50,0.2);
}
.bp-rank {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.beta-place-1 .bp-rank { color: #f5c842; }
.beta-place-2 .bp-rank { color: #c0c0c0; }
.beta-place-3 .bp-rank { color: #cd7f32; }
.bp-prize {
  font-size: 22px;
  font-weight: 900;
  color: #fff;
}
.beta-place-1 .bp-prize { font-size: 26px; }

/* CTA */
.beta-cta {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, #3b82f6, #6366f1);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  transition: opacity .15s, transform .1s;
  font-family: inherit;
}
.beta-cta:hover {
  opacity: .9;
  transform: translateY(-1px);
}
.beta-note {
  font-size: 10px;
  color: rgba(255,255,255,0.25);
  margin: 0;
}

@media (max-width: 480px) {
  .beta-modal {
    padding: 20px 16px 16px;
    gap: 10px;
  }
  .beta-badge {
    font-size: 10px;
    padding: 4px 12px;
  }
  .beta-title { font-size: 17px; }
  .beta-desc { font-size: 12px; line-height: 1.5; }
  .beta-info-cards { gap: 6px; }
  .beta-info-card { padding: 9px 12px; gap: 10px; }
  .bic-icon { font-size: 18px; width: 28px; }
  .bic-text strong { font-size: 12px; }
  .bic-text span { font-size: 10px; }
  .beta-rewards { padding: 12px 10px; }
  .beta-rewards-title { font-size: 11px; margin-bottom: 10px; }
  .beta-podium { gap: 8px; }
  .beta-place { padding: 8px 10px; min-width: 55px; }
  .bp-rank { font-size: 10px; }
  .bp-prize { font-size: 18px; }
  .beta-place-1 .bp-prize { font-size: 20px; }
  .beta-cta { padding: 12px; font-size: 14px; }
  .beta-note { font-size: 9px; }
  .beta-rewards-note { font-size: 9px; }
}