/* ============================================================
   Lotto 20 — Sabay-Style Theme (matches iWin77/Sabay design)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Hanuman:wght@100..900&family=Kantumruy+Pro:ital,wght@0,100..700;1,100..700&display=swap');

/* ── Reset & Base ─────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  /* Layout backgrounds */
  --bg-page: #eef1f7;
  --bg-header: #1a2744;
  --bg-header2: #1e3a8a;
  --bg-sidebar: #e8edf5;
  --bg-white: #ffffff;
  --bg-tab-active: #2563eb;

  /* Accent */
  --gold: #ffd700;
  --gold-dark: #b8960a;
  --blue-accent: #1e40af;
  --blue-light: #3b82f6;
  --red-accent: #dc2626;
  --green-accent: #16a34a;
  --orange: #ea580c;

  /* Text */
  --text-header: #ffffff;
  --text-dark: #1e293b;
  --text-mid: #475569;
  --text-light: #94a3b8;
  --text-gold: #ffd700;
  --text-blue: #1e40af;
  --text-red: #dc2626;

  /* Borders */
  --border-light: #d1d5db;
  --border-blue: #93c5fd;

  /* Number ball colors */
  --ball-1: #dc2626;
  /* red */
  --ball-2: #2563eb;
  /* blue */
  --ball-3: #16a34a;
  /* green */
  --ball-4: #d97706;
  /* amber */
  --ball-5: #7c3aed;
  /* purple */
  --ball-6: #0891b2;
  /* cyan */
  --ball-7: #be185d;
  /* pink */
  --ball-8: #374151;
  /* dark */
  --ball-9: #065f46;
  /* teal */
  --ball-0: #9a3412;
  /* brown */

  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Kantumruy Pro', 'Hanuman', sans-serif;
  background: var(--bg-page);
  color: var(--text-dark);
  min-height: 100vh;
  font-size: 14px;
  max-width: 1920px;
  overflow-x: hidden;
  margin: 0 auto;
}

/* ── Scrollbar ─────────────────────────────────────────────── */
::-webkit-scrollbar {
  width: 4px;
  height: 4px;
}

::-webkit-scrollbar-track {
  background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
  background: #94a3b8;
  border-radius: 4px;
}

/* ══════════════════════════════════════════════════════════════
   HEADER
══════════════════════════════════════════════════════════════ */
.main-header {
  background: var(--bg-header);
  position: sticky;
  top: 0;
  z-index: 200;
}

/* Top bar */
.top-bar {
  display: flex;
  align-items: center;
  padding: 0 16px;
  height: 56px;
  background: linear-gradient(180deg, #1c2438, #141a2a);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.site-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.site-logo .logo-emoji {
  height: 50px;
  width: auto;
  display: block;
}

.top-bar-spacer {
  flex: 1;
}

.top-bar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-info {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0;
  position: relative;
  cursor: pointer;
}

.user-dropdown {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  min-width: 200px;
  background: #1c2438;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
  padding: 6px;
  display: none;
  flex-direction: column;
  gap: 2px;
  z-index: 250;
  text-align: left;
  cursor: default;
}

.user-info.open .user-dropdown {
  display: flex;
}

.user-dropdown a,
.user-dropdown button {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 10px;
  border-radius: 7px;
  color: rgba(255, 255, 255, 0.85);
  font-size: 12.5px;
  font-weight: 600;
  text-decoration: none;
  background: none;
  border: none;
  width: 100%;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
}

.user-dropdown a:hover,
.user-dropdown button:hover {
  background: rgba(255, 255, 255, 0.08);
}

.user-dropdown .ud-logout {
  color: #ff6b6b;
}

.user-dropdown .ud-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
  margin: 4px 2px;
}

.user-phone {
  font-size: 12px;
  color: var(--text-header);
  font-weight: 600;
}

.user-balance {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  font-weight: 700;
  color: var(--gold);
}

.icon-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  cursor: pointer;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  transition: background 0.2s;
}

.icon-btn:hover {
  background: rgba(255, 255, 255, 0.18);
}

.login-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 18px 6px 8px;
  background: var(--gold);
  color: #000;
  border-radius: 6px;
  font-weight: 800;
  font-size: 13px;
  text-decoration: none;
}

.login-btn-icon {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Required by the Flaticon free license for the login icon above */
.icon-credit {
  font-size: 9px;
  color: rgba(255, 255, 255, 0.35);
  text-decoration: none;
}
.icon-credit:hover {
  color: rgba(255, 255, 255, 0.6);
}

/* Animated header icons — self-contained CSS/SVG, no external assets */
.hicon {
  display: block;
}

.hicon-bell {
  animation: hiconBellRing 3.2s ease-in-out infinite;
  transform-origin: 50% 0%;
}

@keyframes hiconBellRing {
  0%, 65%, 100% { transform: rotate(0deg); }
  68%           { transform: rotate(14deg); }
  71%           { transform: rotate(-12deg); }
  74%           { transform: rotate(9deg); }
  77%           { transform: rotate(-6deg); }
  80%           { transform: rotate(3deg); }
  83%           { transform: rotate(0deg); }
}

.hicon-sound {
  animation: hiconSoundPulse 2.4s ease-in-out infinite;
  transform-origin: 30% 50%;
}

.icon-btn.muted .hicon-sound {
  animation: none;
}

.icon-btn .sound-mute-line {
  display: none;
}

.icon-btn.muted .sound-wave {
  display: none;
}

.icon-btn.muted .sound-mute-line {
  display: block;
}

@keyframes hiconSoundPulse {
  0%, 100% { transform: scale(1) rotate(0deg); }
  50%      { transform: scale(1.08) rotate(-4deg); }
}

.hicon-coin {
  animation: hiconCoinFlip 2.6s ease-in-out infinite;
}

@keyframes hiconCoinFlip {
  0%, 100% { transform: scaleX(1); }
  50%      { transform: scaleX(0.15); }
}

/* Game switcher tabs */
.game-tabs {
  display: flex;
  align-items: center;
  background: var(--bg-white);
  padding: 6px 16px;
  height: 44px;
  gap: 6px;
  border-bottom: 1px solid var(--border-light);
  overflow-x: auto;
  scrollbar-width: none;
}

.game-tabs::-webkit-scrollbar {
  display: none;
}

.game-tab {
  padding: 7px 18px;
  background: none;
  border: none;
  color: var(--text-mid);
  font-family: 'Kantumruy Pro', 'Hanuman', sans-serif;
  font-size: 13px;
  font-weight: 700;
  border-radius: 9999px;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.game-tab:hover {
  color: var(--blue-accent);
}

.game-tab.active {
  background: var(--bg-tab-active);
  color: #fff;
}

/* Sub-navigation */
.sub-nav {
  background: var(--bg-tab-active);
  border-bottom: none;
  display: flex;
  align-items: center;
  padding: 0 16px;
  height: 34px;
  gap: 24px;
  overflow-x: auto;
  scrollbar-width: none;
}

.sub-nav::-webkit-scrollbar {
  display: none;
}

.sub-nav a {
  font-size: 12px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.75);
  text-decoration: none;
  white-space: nowrap;
  padding: 4px 0;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}

.sub-nav a:hover,
.sub-nav a.active {
  color: #fff;
  border-color: #fff;
}

/* ══════════════════════════════════════════════════════════════
   MAIN LAYOUT
══════════════════════════════════════════════════════════════ */
.main-layout {
  display: grid;
  grid-template-columns: 210px 1fr;
  min-height: calc(100vh - 128px - 60px);
}

/* ── Left Sidebar ────────────────────────────────────────────── */
.sidebar {
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
  padding: 0;
}

.sidebar-meta {
  padding: 8px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-mid);
  font-weight: 600;
  border-bottom: 1px solid var(--border-light);
  margin-bottom: 8px;
}

.refresh-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--blue-light);
  font-size: 14px;
  padding: 2px;
  transition: transform 0.3s;
}

.refresh-btn:hover {
  transform: rotate(180deg);
}

.sidebar-stat {
  padding: 3px 12px;
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-mid);
}

.sidebar-stat span:last-child {
  font-weight: 700;
  color: var(--text-dark);
}

.sidebar-section-title {
  padding: 3px 12px 3px;
  font-size: 11px;
  color: var(--blue-accent);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #00ff6f38;
}

.result-list {
  overflow-y: auto;
  flex: 1;
  max-height: 160px;
}

.result-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 5px 12px;
  font-size: 12px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
  transition: background 0.15s;
  cursor: pointer;
}

.result-item:hover {
  background: rgba(37, 99, 235, 0.06);
}

.result-item .ri-info {
  color: var(--text-mid);
}

.result-item .ri-sum {
  font-weight: 800;
  font-size: 13px;
  color: var(--red-accent);
}

.result-item .ri-sum.over {
  color: var(--blue-accent);
}

.sidebar-divider {
  height: 1px;
  background: var(--border-light);
  margin: 3px 12px;
}

.slip-section {
  padding: 3px 12px;
}

.slip-title {
  font-size: 12px;
  padding: 3px ;
  font-weight: 700;
  color: var(--text-mid);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: #00ff6f38;
}

.slip-empty {
  text-align: center;
  padding: 0;
  font-size: 12px;
  color: var(--text-light);
}

.slip-item {
  padding: 6px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
  font-size: 11px;
}

.slip-item:last-child {
  border-bottom: none;
}

.slip-item-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.slip-item-type {
  font-weight: 700;
  color: var(--text-dark);
}

.slip-item-amount {
  font-weight: 700;
  color: var(--blue-accent);
}

.slip-item-sub {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 2px;
  font-size: 10px;
  color: var(--text-light);
}

.slip-result {
  font-weight: 700;
}

.slip-result.win {
  color: #15803d;
}

.slip-result.lose {
  color: #b91c1c;
}

/* ── Main Content ─────────────────────────────────────────────── */
.main-content {
  display: flex;
  flex-direction: column;
  background: var(--bg-white);
  overflow: hidden;
  width: 100%;
}

/* ── Draw Status Bar ──────────────────────────────────────────── */
.draw-status-bar {
  display: flex;
  align-items: stretch;
  background: #f8faff;
  border-bottom: 1px solid var(--border-light);
}

.draw-id-block {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 12px 20px;
  border-right: 1px solid var(--border-light);
  min-width: 140px;
}

.draw-id-block .label {
  font-size: 11px;
  color: var(--text-light);
  font-weight: 600;
}

.draw-id-block .value {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-dark);
}

.draw-timer-block {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-end;
  padding: 8px 16px;
  border-right: 1px solid var(--border-light);
}

/* ── Lotto Banner (idle state, alternates with the ball reveal card) ── */
.lotto-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 160px;
  min-width: 68px;
  padding: 4px;
  border-right: 1px solid var(--border-light);
}
.lotto-banner img {
  max-width: 100%;
  max-height: 56px;
  object-fit: contain;
}

/* ── Ball Reveal Card ──────────────────────────────────────── */
.ball-reveal-card {
  position: relative;
  width: 68px;
  min-width: 169px;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: linear-gradient(135deg, #ffb703, #dc2626);
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.35);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.brc-badge {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #b91c1c;
  color: #fff;
  border: 2px solid rgba(255, 255, 255, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 900;
}
.brc-number {
  font-size: 32px;
  font-weight: 900;
  color: #fff;
  padding: 14px 0 6px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.25);
}
.brc-number.rolling {
  animation: brcRoll 0.1s linear infinite;
  filter: blur(1.5px);
}
@keyframes brcRoll {
  0%   { transform: translateY(-8px) scaleY(1.2); opacity: 0.5; }
  50%  { transform: translateY(8px) scaleY(0.85); opacity: 1; }
  100% { transform: translateY(-8px) scaleY(1.2); opacity: 0.5; }
}
.brc-number.caught {
  animation: brcCatch 0.3s ease;
}
@keyframes brcCatch {
  0%   { transform: scale(1.6); }
  60%  { transform: scale(0.9); }
  100% { transform: scale(1); }
}

/* Brief pop used while a sum display counts up/down to a new value */
.sum-pop {
  display: inline-block;
  /* !important: this is a transient highlight state that must win over an
     element's own inline color style (curr-sum) and later same-specificity
     class rules (.brc-sum), neither of which it can out-cascade otherwise. */
  color: var(--gold) !important;
  text-shadow: 0 0 10px rgba(255, 215, 0, 0.8);
  animation: sumPop 0.35s ease;
}
@keyframes sumPop {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.3); }
  100% { transform: scale(1); }
}
.brc-sum {
  width: 100%;
  text-align: center;
  background: rgba(0, 0, 0, 0.28);
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  padding: 3px 0;
  font-variant-numeric: tabular-nums;
}

.draw-timer-block .tz-label {
  font-size: 11px;
  color: var(--text-light);
  font-weight: 600;
}

.draw-timer-block .timer-val {
  font-size: 20px;
  font-weight: 900;
  color: var(--text-dark);
  font-variant-numeric: tabular-nums;
}

.draw-timer-block .round-id {
  font-size: 12px;
  font-weight: 700;
  color: var(--blue-accent);
}

.timer-ring-small {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ring-wrap {
  position: relative;
  width: 56px;
  height: 56px;
}

.ring-svg {
  width: 56px;
  height: 56px;
  transform: rotate(-90deg);
}

.ring-track {
  fill: none;
  stroke: #e2e8f0;
  stroke-width: 5;
}

.ring-prog {
  fill: none;
  stroke: var(--blue-light);
  stroke-width: 5;
  stroke-linecap: round;
  stroke-dasharray: 150.8;
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 1s linear, stroke 0.3s;
}

.ring-text {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.ring-seconds {
  font-size: 14px;
  font-weight: 900;
  color: var(--text-dark);
  line-height: 1;
}

.ring-slabel {
  font-size: 8px;
  color: var(--text-light);
  font-weight: 600;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.3px;
}

.status-badge.open {
  background: #dcfce7;
  color: #15803d;
}

.status-badge.closed {
  background: #fef3c7;
  color: #92400e;
}

.status-badge.drawn {
  background: #dbeafe;
  color: #1d4ed8;
}

/* ── Number Grid Area ─────────────────────────────────────────── */
.number-grid-section {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  border-bottom: 1px solid var(--border-light);
}

.number-grid-wrap {
  padding: 0;
  border-right: 1px solid var(--border-light);
  min-width: 340px;
  max-width: 400px;
}

.brand-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 16px 20px;
  min-width: 856px;
  border-left: 1px solid var(--border-light);
  text-align: center;
}

.brand-panel-logo {
  width: 120px;
  height: 120px;
  border-radius: 16px;
  object-fit: cover;
  margin-bottom: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.brand-panel-name {
  font-size: 14px;
  font-weight: 900;
  color: var(--gold);
  letter-spacing: 0.5px;
}

.brand-panel-tag {
  font-size: 11px;
  color: var(--text-light);
  margin-top: 2px;
}

.number-grid {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
}

.num-cell {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-light);
  font-size: 12px;
  font-weight: 700;
  color: var(--text-dark);
  background: var(--bg-white);
  user-select: none;
}

.num-cell:hover {
  border-color: var(--blue-light);
  background: #eff6ff;
}

.num-cell.drawn {
  border: none;
  background: #dc2626;
  color: white;
  font-weight: 800;
  pointer-events: none;
  cursor: default;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  animation: ballPop 0.4s ease forwards;
}
@keyframes ballPop {
  0%  { transform: scale(0); opacity: 0; }
  70% { transform: scale(1.15); }
  100%{ transform: scale(1); opacity: 1; }
}

/* Highlight picked number */
.num-cell.selected {
  border-radius: 50%;
  border: 3px solid var(--gold);
  box-shadow: 0 0 0 2px var(--gold-dark);
  transform: scale(1.1);
}

/* ── Bet Options Right Panel ──────────────────────────────────── */
.bet-options-panel {
  padding: 0;
  display: flex;
  flex-direction: column;
  min-width: 455px;
}

/* Over/Under big buttons */
.ou-section {
  display: flex;
  gap: 0;
  background: var(--bg-header);
  padding: 10px;
  gap: 8px;
}

.ou-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 10px 8px;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  gap: 2px;
  min-height: 80px;
}

.ou-btn.under-btn {
  background: var(--red-accent);
  color: white;
}

.ou-btn.over-btn {
  background: var(--blue-accent);
  color: white;
}

.ou-btn:hover {
  filter: brightness(1.1);
  transform: scale(1.02);
}

.ou-btn.active {
  box-shadow: 0 0 0 3px var(--gold), 0 0 0 5px rgba(255, 215, 0, 0.3);
}

/* Winning under/over box — glowing highlight once the draw settles, for 15s
   (see highlightWinningResult in game.js) before reverting to plain, or
   immediately if the next round's reveal supersedes it. box-shadow (not
   border) so the highlight doesn't shift surrounding layout — matches the
   mobile port of this same feature (game20-m.js). */
.ou-btn.result-hit {
  position: relative;
  z-index: 1;
  box-shadow: 0 0 0 4px rgb(0,102,255), 0 0 16px rgba(0,102,255,.65);
  animation: resultHitPop 1.5s ease-in-out infinite;
}
@keyframes resultHitPop {
  0%, 100% { box-shadow: 0 0 0 4px rgb(255,94,0),  0 0 16px rgba(255,94,0,.65); }
  25%, 75% { box-shadow: 0 0 0 4px rgb(30,255,0),   0 0 16px rgba(30,255,0,.65); }
  50%      { box-shadow: 0 0 0 4px rgb(255,238,0),  0 0 16px rgba(255,238,0,.65); }
}

.ou-label {
  font-size: 22px;
  font-weight: 900;
  font-family: 'Battambang', sans-serif;
}

.ou-range {
  font-size: 11px;
  opacity: 0.85;
  font-weight: 600;
}

.ou-odds {
  font-size: 16px;
  font-weight: 800;
  color: var(--gold);
}

/* Range intervals table */
.range-section {
  flex: 1;
}

.range-title,
.ou-title {
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 800;
  color: var(--text-mid);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: #f8faff;
  border-bottom: 1px solid var(--border-light);
  text-align: center;
}

.range-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
}

.range-cell {
  padding: 8px 4px;
  text-align: center;
  border-right: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
  cursor: pointer;
  transition: background 0.15s;
  font-size: 11px;
}

.range-cell:last-child {
  border-right: none;
}

.range-cell:hover {
  background: #eff6ff;
}

.range-cell.active {
  background: #fef9c3;
}

/* Winning range cell — glowing highlight once the draw settles, for 15s
   (see highlightWinningRange in game.js) before reverting to plain, or
   immediately if the next round's reveal supersedes it. box-shadow (not
   border) so the highlight doesn't shift the grid's layout — matches the
   mobile port of this same feature (game20-m.js). */
.range-cell.range-hit {
  position: relative;
  z-index: 1;
  background: #fff8dc;
  box-shadow: 0 0 0 3px rgb(0,102,255), 0 0 14px rgba(0,102,255,.65);
  animation: rangeHitPop 1.5s ease-in-out infinite;
}
@keyframes rangeHitPop {
  0%, 100% { box-shadow: 0 0 0 3px rgb(47,0,255),  0 0 14px rgba(47,0,255,.65); }
  25%, 75% { box-shadow: 0 0 0 3px rgb(255,230,0), 0 0 14px rgba(255,230,0,.65); }
  50%      { box-shadow: 0 0 0 3px rgb(255,0,13),  0 0 14px rgba(255,0,13,.65); }
}

.range-num {
  font-size: 35px;
  font-weight: 900;
  color: var(--red-accent);
  line-height: 1.2;
}

.range-val {
  font-weight: 700;
  color: var(--text-dark);
  font-size: 12px;
}

.range-odds {
  color: var(--text-blue);
  font-size: 15px;
  font-weight: 600;
}

/* Combo range row */
.combo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}

.combo-cell {
  padding: 12px 4px;
  text-align: center;
  border-right: 1px solid var(--border-light);
  border-top: 1px solid var(--border-light);
  cursor: pointer;
  transition: background 0.15s;
}

.combo-cell:last-child {
  border-right: none;
}

.combo-cell:hover {
  background: #eff6ff;
}

.combo-cell.active {
  background: #fef9c3;
}

.combo-label {
  font-size: 20px;
  font-weight: 900;
  color: var(--red-accent);
}

.combo-sub {
  font-size: 15px;
  color: var(--text-blue);
  font-weight: 600;
}

/* ── Roadmap Section ─────────────────────────────────────────── */
.roadmap-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid var(--border-light);
}

.roadmap-panel {
  border-right: 1px solid var(--border-light);
  overflow: hidden;
}

.roadmap-panel:last-child {
  border-right: none;
}

.roadmap-header {
  padding: 6px 12px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-mid);
  background: #f8faff;
  border-bottom: 1px solid var(--border-light);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.roadmap-grid {
  display: grid;
  grid-template-rows: repeat(6, 24px);
  grid-auto-flow: column;
  grid-auto-columns: 24px;
  gap: 3px;
  padding: 4px;
  overflow-x: auto;
  scrollbar-width: none;
  border: 1px solid var(--border-light);
}
.roadmap-grid .even {
  border: 1px solid var(--blue-accent);
}

.road-ball {
  width: 20px;
  height: 20px;
  align-self: center;
  justify-self: center;
  border-radius: 50%;
  flex-shrink: 0;
  background: none;
  border: 2px solid transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 800;
}

.road-ball.empty {
  border: 1px dashed var(--border-light);
}

.road-ball.over {
  border-color: var(--blue-accent);
}

.road-ball.under {
  border-color: var(--red-accent);
}

.road-ball.range-1 { background: var(--ball-1); border-color: var(--ball-1); color: #fff; }
.road-ball.range-2 { background: var(--ball-2); border-color: var(--ball-2); color: #fff; }
.road-ball.range-3 { background: var(--ball-3); border-color: var(--ball-3); color: #fff; }
.road-ball.range-4 { background: var(--ball-4); border-color: var(--ball-4); color: #fff; }
.road-ball.range-5 { background: var(--ball-5); border-color: var(--ball-5); color: #fff; }
.road-ball.range-6 { background: var(--ball-6); border-color: var(--ball-6); color: #fff; }

/* ── My Bets Tab (bottom) ────────────────────────────────────── */
.my-bets-section {
  padding: 12px 16px;
  border-top: 1px solid var(--border-light);
}

.my-bets-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border-light);
  margin-bottom: 10px;
}

.mbt {
  padding: 6px 16px;
  border: none;
  background: none;
  font-family: 'Kantumruy Pro', 'Hanuman', sans-serif;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-mid);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
}

.mbt.active {
  color: var(--blue-accent);
  border-color: var(--blue-accent);
}

.my-bet-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
  font-size: 12px;
}

.mbr-type {
  font-weight: 700;
  color: var(--text-dark);
}

.mbr-round {
  color: var(--text-light);
}

.mbr-amount {
  font-weight: 700;
}

.mbr-status {
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 700;
}

.mbr-status.win {
  background: #dcfce7;
  color: #15803d;
}

.mbr-status.lose {
  background: #fee2e2;
  color: #b91c1c;
}

.mbr-status.pending {
  background: #fef3c7;
  color: #92400e;
}

/* ── Toast ───────────────────────────────────────────────────── */
#toast-container {
  position: fixed;
  bottom: 70px;
  right: 16px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #1e293b;
  border-radius: var(--radius-md);
  padding: 12px 16px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  font-size: 13px;
  font-weight: 600;
  color: white;
  max-width: 300px;
  border-left: 3px solid;
  animation: slideUp 0.3s ease;
}

.toast.success {
  border-color: #22c55e;
}

.toast.error {
  border-color: #ef4444;
}

.toast.info {
  border-color: #3b82f6;
}

@keyframes slideUp {
  from {
    transform: translateY(16px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 768px) {
  .main-layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    display: none;
  }

  .number-grid-section {
    grid-template-columns: 1fr;
  }

  .number-grid-wrap {
    min-width: 0;
    max-width: none;
    width: 100%;
  }

  .bet-options-panel {
    min-width: 0;
    width: 100%;
    border-top: 1px solid var(--border-light);
  }

  .brand-panel {
    min-width: 0;
    width: 100%;
    border-left: none;
    border-top: 1px solid var(--border-light);
  }

  .ou-section {
    padding: 8px;
    gap: 6px;
  }

  .range-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .combo-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .combo-cell {
    padding: 8px 2px;
  }

  .combo-label {
    font-size: 16px;
  }

  .combo-sub {
    font-size: 12px;
  }
}

@media (max-width: 480px) {
  .number-grid {
    grid-template-columns: repeat(8, 1fr);
  }

  .roadmap-section {
    grid-template-columns: 1fr;
  }
}

/* Loading spinner */
.spin {
  display: inline-block;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}