/* ==========================================================================
   Walla — Premium Sports Betting UI
   Design language: bet365 / DraftKings / FanDuel inspired dark theme
   ========================================================================== */

:root {
  /* Surfaces */
  --bg: #0b0f14;
  --bg-elevated: #10161d;
  --bg-card: #121920;
  --bg-card-hover: #161e27;
  --bg-input: #0d1319;

  /* Borders */
  --border: #1e2833;
  --border-strong: #2a3644;
  --border-faint: rgba(255, 255, 255, 0.05);

  /* Accents */
  --accent: #22c55e;          /* emerald — home / up moves / primary */
  --accent-strong: #16a34a;
  --accent-soft: rgba(34, 197, 94, 0.14);
  --red: #ef4444;             /* down moves / live dot */
  --blue: #3b82f6;            /* away */
  --blue-soft: rgba(59, 130, 246, 0.14);
  --gold: #f59e0b;            /* promos / highlights */
  --gold-soft: rgba(245, 158, 11, 0.14);
  --grey: #64748b;            /* draw / neutral */
  --grey-soft: rgba(100, 116, 139, 0.14);

  /* Text */
  --text: #e6edf3;
  --text-muted: #8b98a5;
  --text-faint: #5b6774;

  /* Misc */
  --radius: 14px;
  --radius-sm: 10px;
  --radius-lg: 18px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  --shadow-sm: 0 4px 14px rgba(0, 0, 0, 0.35);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --topbar-h: 60px;
  --betslip-w: 350px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  font-size: 14px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* Subtle ambient background */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(900px 500px at 15% -10%, rgba(34, 197, 94, 0.06), transparent 60%),
    radial-gradient(800px 500px at 90% 0%, rgba(59, 130, 246, 0.05), transparent 60%);
  pointer-events: none;
  z-index: 0;
}

button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input { font-family: inherit; }
a { color: inherit; text-decoration: none; }

.ico { flex-shrink: 0; }

/* ==========================================================================
   TOP BAR
   ========================================================================== */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11, 15, 20, 0.82);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--border-faint);
}

.topbar-inner {
  max-width: 1560px;
  margin: 0 auto;
  height: var(--topbar-h);
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-shrink: 0;
}

.brand-mark { display: grid; place-items: center; }

.brand-text {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--text);
}

.brand-dot { color: var(--accent); }

/* Sport tabs */
.sport-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  flex: 1;
  min-width: 0;
}
.sport-tabs::-webkit-scrollbar { display: none; }

.sport-tab {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
  transition: color 0.18s var(--ease), background 0.18s var(--ease);
  position: relative;
  flex-shrink: 0;
}
.sport-tab:hover { color: var(--text); background: rgba(255, 255, 255, 0.04); }
.sport-tab.active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.07);
}
.sport-tab.active::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: -1px;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
}
.sport-tab .sport-icon { font-size: 15px; line-height: 1; }

.live-badge {
  background: var(--red);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 6px;
  line-height: 1.3;
}
.sport-tab.active .live-badge { background: var(--red); }

/* Topbar actions */
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  margin-left: auto;
}

.live-toggle {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 13px;
  border-radius: 10px;
  border: 1px solid var(--border);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.4px;
  color: var(--text-muted);
  transition: all 0.18s var(--ease);
}
.live-toggle:hover { border-color: var(--border-strong); color: var(--text); }
.live-toggle .live-toggle-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--text-faint);
  transition: background 0.18s;
}
.live-toggle.active {
  color: #fff;
  border-color: rgba(239, 68, 68, 0.5);
  background: rgba(239, 68, 68, 0.12);
}
.live-toggle.active .live-toggle-dot {
  background: var(--red);
  box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.6);
  animation: pulse-dot 1.6s infinite;
}
@keyframes pulse-dot {
  0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.55); }
  70% { box-shadow: 0 0 0 7px rgba(239, 68, 68, 0); }
  100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

/* Dropdown */
.dropdown { position: relative; }

.dropdown-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text);
  transition: all 0.18s var(--ease);
}
.dropdown-btn:hover { border-color: var(--border-strong); background: rgba(255,255,255,0.03); }
.dropdown-btn .chev { transition: transform 0.2s var(--ease); color: var(--text-muted); }
.dropdown.open .dropdown-btn .chev { transform: rotate(180deg); }

.dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 170px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 5px;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(-6px) scale(0.98);
  pointer-events: none;
  transition: opacity 0.16s var(--ease), transform 0.16s var(--ease);
  z-index: 60;
}
.dropdown.open .dropdown-menu {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.dropdown-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  transition: all 0.14s;
}
.dropdown-item:hover { background: rgba(255, 255, 255, 0.05); color: var(--text); }
.dropdown-item.active { color: var(--accent); background: var(--accent-soft); }
.dropdown-item .hint { font-size: 11px; font-weight: 500; color: var(--text-faint); }
.dropdown-item.active .hint { color: var(--accent); opacity: 0.7; }

/* Balance chip */
.balance-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 10px;
  background: var(--accent-soft);
  border: 1px solid rgba(34, 197, 94, 0.25);
  color: var(--accent);
  font-weight: 700;
  font-size: 13.5px;
  font-variant-numeric: tabular-nums;
}
.balance-chip .ico { color: var(--accent); }

/* ==========================================================================
   LAYOUT
   ========================================================================== */
.layout {
  position: relative;
  z-index: 1;
  max-width: 1560px;
  margin: 0 auto;
  padding: 20px;
  display: grid;
  grid-template-columns: 1fr var(--betslip-w);
  gap: 20px;
  align-items: start;
}

.content {
  display: flex;
  flex-direction: column;
  gap: 26px;
  min-width: 0;
}

/* ==========================================================================
   PROMO CAROUSEL
   ========================================================================== */
.promo-carousel {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  min-height: 168px;
  border: 1px solid var(--border);
  background: var(--bg-card);
}
.promo-track {
  display: flex;
  transition: transform 0.55s var(--ease);
  height: 100%;
}
.promo-slide {
  flex: 0 0 100%;
  min-height: 168px;
  padding: 28px 34px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  background: linear-gradient(120deg, #17202b 0%, #111822 55%, #0f1a14 100%);
  overflow: hidden;
}
.promo-slide::after {
  content: "";
  position: absolute;
  right: -60px;
  top: -60px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.18), transparent 70%);
  pointer-events: none;
}
.promo-tag {
  align-self: flex-start;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--gold);
  background: var(--gold-soft);
  border: 1px solid rgba(245, 158, 11, 0.3);
  padding: 4px 10px;
  border-radius: 20px;
  margin-bottom: 12px;
}
.promo-title {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.5px;
  line-height: 1.1;
  max-width: 70%;
}
.promo-subtitle { margin-top: 8px; color: var(--text-muted); font-size: 14.5px; max-width: 60%; }

.promo-dots {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 7px;
  z-index: 2;
}
.promo-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
  transition: all 0.25s var(--ease);
  padding: 0;
}
.promo-dot.active { background: var(--gold); width: 22px; border-radius: 4px; }

.promo-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(11, 15, 20, 0.6);
  border: 1px solid var(--border);
  color: var(--text);
  z-index: 2;
  transition: all 0.16s var(--ease);
}
.promo-arrow:hover { background: rgba(11, 15, 20, 0.9); border-color: var(--border-strong); }
.promo-arrow.prev { left: 14px; }
.promo-arrow.next { right: 14px; }

/* ==========================================================================
   SECTION HEADERS
   ========================================================================== */
.section-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 14px;
}
.section-title {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.3px;
}
.section-sub { font-size: 12.5px; color: var(--text-faint); }

/* ==========================================================================
   FEATURED GRID
   ========================================================================== */
.featured-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 14px;
}

.feature-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: transform 0.2s var(--ease), border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
  cursor: pointer;
  overflow: hidden;
}
.feature-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-sm);
}
.feature-card .card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.feature-league {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.feature-sport {
  font-size: 11px;
  color: var(--text-faint);
  display: flex;
  align-items: center;
  gap: 4px;
}
.feature-teams {
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.team-row {
  display: flex;
  align-items: center;
  gap: 9px;
}
.team-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-faint);
  flex-shrink: 0;
}
.team-name { font-size: 14.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.feature-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--border-faint);
}
.feature-time {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ==========================================================================
   EVENTS LIST
   ========================================================================== */
.league-group { margin-bottom: 20px; }

.league-header {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 4px 10px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.league-header .league-sport-icon { font-size: 14px; }

.event-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 10px;
  transition: border-color 0.18s var(--ease);
  overflow: hidden;
}
.event-card:hover { border-color: var(--border-strong); }

.event-main {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 14px 16px;
  cursor: pointer;
}

.event-info { min-width: 0; }
.event-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 7px;
  font-size: 12px;
  color: var(--text-muted);
  flex-wrap: wrap;
}

.live-dot {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--red);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
}
.live-dot::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--red);
  animation: live-blink 1.3s infinite;
}
@keyframes live-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

.event-teams { display: flex; flex-direction: column; gap: 3px; }
.event-team-row {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 14.5px;
  font-weight: 600;
}
.event-team-row .team-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.event-score {
  font-size: 14.5px;
  font-weight: 800;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  min-width: 16px;
  text-align: center;
}
.event-score.lead { color: var(--accent); }

.event-odds {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-shrink: 0;
}

/* ==========================================================================
   ODDS BUTTONS
   ========================================================================== */
.odds-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-width: 74px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-input);
  transition: all 0.16s var(--ease);
  position: relative;
}
.odds-btn .odds-name {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  line-height: 1.2;
}
.odds-btn .odds-value {
  font-size: 14.5px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  transition: color 0.15s;
}
.odds-btn:hover { border-color: var(--border-strong); background: var(--bg-card-hover); transform: translateY(-1px); }
.odds-btn:active { transform: translateY(0) scale(0.97); }

/* Color coding by outcome */
.odds-btn.home { border-color: rgba(34, 197, 94, 0.28); background: var(--accent-soft); }
.odds-btn.home .odds-value { color: var(--accent); }
.odds-btn.draw { border-color: rgba(100, 116, 139, 0.3); background: var(--grey-soft); }
.odds-btn.draw .odds-value { color: #a7b3c0; }
.odds-btn.away { border-color: rgba(59, 130, 246, 0.28); background: var(--blue-soft); }
.odds-btn.away .odds-value { color: var(--blue); }
.odds-btn.neutral .odds-value { color: var(--text); }

/* Selected state */
.odds-btn.selected {
  background: var(--accent-soft);
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent) inset;
}
.odds-btn.selected .odds-name { color: var(--accent); }
.odds-btn.selected .odds-value { color: var(--accent); }

/* Live odds flash */
.odds-btn.flash-up { animation: flash-up 0.9s var(--ease); }
.odds-btn.flash-down { animation: flash-down 0.9s var(--ease); }
@keyframes flash-up {
  0% { background: rgba(34, 197, 94, 0.45); border-color: var(--accent); }
  100% { background: var(--bg-input); }
}
@keyframes flash-down {
  0% { background: rgba(239, 68, 68, 0.45); border-color: var(--red); }
  100% { background: var(--bg-input); }
}
.odds-btn.flash-up.home { animation: flash-up-home 0.9s var(--ease); }
@keyframes flash-up-home {
  0% { background: rgba(34, 197, 94, 0.6); }
  100% { background: var(--accent-soft); }
}
.odds-btn.flash-down.home { animation: flash-down-home 0.9s var(--ease); }
@keyframes flash-down-home {
  0% { background: rgba(239, 68, 68, 0.5); border-color: var(--red); }
  100% { background: var(--accent-soft); border-color: rgba(34, 197, 94, 0.28); }
}
.odds-btn.flash-up.away { animation: flash-up-away 0.9s var(--ease); }
@keyframes flash-up-away {
  0% { background: rgba(34, 197, 94, 0.6); }
  100% { background: var(--blue-soft); }
}
.odds-btn.flash-down.away { animation: flash-down-away 0.9s var(--ease); }
@keyframes flash-down-away {
  0% { background: rgba(239, 68, 68, 0.5); border-color: var(--red); }
  100% { background: var(--blue-soft); border-color: rgba(59, 130, 246, 0.28); }
}

.more-markets-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  border: 1px dashed var(--border-strong);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  transition: all 0.16s var(--ease);
}
.more-markets-btn:hover { color: var(--text); border-color: var(--text-faint); }

/* ==========================================================================
   BET SLIP
   ========================================================================== */
.betslip {
  position: sticky;
  top: calc(var(--topbar-h) + 20px);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - var(--topbar-h) - 40px);
  overflow: hidden;
}

.betslip-grabber { display: none; }

.betslip-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border-faint);
}
.betslip-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 800;
}
.betslip-title .ico { color: var(--accent); }
.betslip-count {
  background: var(--accent);
  color: #06110a;
  font-size: 11.5px;
  font-weight: 800;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 10px;
  display: grid;
  place-items: center;
}
.betslip-clear {
  margin-left: auto;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  padding: 5px 9px;
  border-radius: 7px;
  transition: all 0.14s;
}
.betslip-clear:hover { color: var(--red); background: rgba(239, 68, 68, 0.1); }

.betslip-body {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  min-height: 80px;
}
.betslip-body::-webkit-scrollbar { width: 6px; }
.betslip-body::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 3px; }

.betslip-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 34px 10px;
  text-align: center;
  color: var(--text-faint);
}
.betslip-empty .ico-empty { color: var(--text-faint); opacity: 0.5; margin-bottom: 6px; }
.betslip-empty p { font-size: 13.5px; font-weight: 600; color: var(--text-muted); }
.betslip-empty span { font-size: 12px; }

.betslip-selections { list-style: none; display: flex; flex-direction: column; gap: 10px; }

.slip-selection {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px;
  position: relative;
  animation: slide-in 0.22s var(--ease);
}
@keyframes slide-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
.slip-selection .slip-top {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.slip-selection .slip-remove {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  color: var(--text-faint);
  transition: all 0.14s;
}
.slip-selection .slip-remove:hover { color: var(--red); background: rgba(239, 68, 68, 0.12); }
.slip-event { font-size: 13px; font-weight: 700; padding-right: 22px; }
.slip-market {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 3px;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.slip-market .sel-name { color: var(--text); font-weight: 600; }
.slip-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border-faint);
}
.slip-odds {
  font-size: 14px;
  font-weight: 800;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.slip-odds.flash-up { color: var(--accent); animation: text-flash-up 0.8s var(--ease); }
.slip-odds.flash-down { color: var(--red); animation: text-flash-down 0.8s var(--ease); }
@keyframes text-flash-up { 0% { transform: scale(1.3); } 100% { transform: scale(1); } }
@keyframes text-flash-down { 0% { transform: scale(1.3); } 100% { transform: scale(1); } }

.betslip-foot {
  padding: 14px 18px;
  border-top: 1px solid var(--border-faint);
  background: var(--bg-card);
}
.stake-row { margin-bottom: 14px; }
.stake-row label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin-bottom: 7px;
}
.stake-input {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0 12px;
  height: 44px;
  transition: border-color 0.16s;
}
.stake-input:focus-within { border-color: var(--accent); }
.stake-input .currency { font-weight: 700; color: var(--text-muted); }
.stake-input input {
  flex: 1;
  min-width: 0;
  background: none;
  border: none;
  outline: none;
  color: var(--text);
  font-size: 15px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.stake-input input::-webkit-outer-spin-button,
.stake-input input::-webkit-inner-spin-button { -webkit-appearance: none; }
.stake-quick { display: flex; gap: 5px; }
.stake-quick button {
  padding: 5px 9px;
  border-radius: 7px;
  border: 1px solid var(--border);
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-muted);
  transition: all 0.14s;
}
.stake-quick button:hover { color: var(--text); border-color: var(--border-strong); }

.slip-metrics {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 14px;
}
.metric {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12.5px;
  color: var(--text-muted);
}
.metric-value { font-weight: 800; color: var(--text); font-variant-numeric: tabular-nums; }
.metric-value.accent { color: var(--accent); font-size: 15px; }

.place-btn {
  width: 100%;
  height: 48px;
  border-radius: var(--radius-sm);
  background: linear-gradient(180deg, #34d399, #16a34a);
  color: #06110a;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.2px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.18s var(--ease);
  box-shadow: 0 6px 18px rgba(22, 163, 74, 0.35);
}
.place-btn:hover:not(:disabled) { filter: brightness(1.06); transform: translateY(-1px); box-shadow: 0 8px 22px rgba(22, 163, 74, 0.45); }
.place-btn:active:not(:disabled) { transform: translateY(0) scale(0.99); }
.place-btn:disabled {
  background: var(--bg-input);
  color: var(--text-faint);
  border: 1px solid var(--border);
  box-shadow: none;
  cursor: not-allowed;
}
.place-btn .place-btn-amount { font-variant-numeric: tabular-nums; }
.place-btn.loading { pointer-events: none; opacity: 0.8; }

/* ==========================================================================
   BET SLIP FAB (mobile)
   ========================================================================== */
.betslip-fab {
  display: none;
  position: fixed;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 40;
  align-items: center;
  gap: 9px;
  padding: 14px 20px;
  border-radius: 30px;
  background: linear-gradient(180deg, #34d399, #16a34a);
  color: #06110a;
  font-size: 14px;
  font-weight: 800;
  box-shadow: 0 10px 30px rgba(22, 163, 74, 0.5);
}
.fab-count {
  background: #06110a;
  color: #34d399;
  font-size: 11px;
  font-weight: 800;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 10px;
  display: grid;
  place-items: center;
}

/* ==========================================================================
   MODAL
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(5, 8, 11, 0.72);
  backdrop-filter: blur(6px);
  z-index: 100;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s var(--ease);
}
.modal-backdrop.open { opacity: 1; pointer-events: auto; }

.modal {
  width: 100%;
  max-width: 640px;
  max-height: 86vh;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-bottom: none;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  display: flex;
  flex-direction: column;
  transform: translateY(30px);
  transition: transform 0.28s var(--ease);
  overflow: hidden;
}
.modal-backdrop.open .modal { transform: translateY(0); }

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-faint);
}
.modal-league {
  font-size: 12.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
}
.modal-close {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  color: var(--text-muted);
  background: var(--bg-card);
  border: 1px solid var(--border);
  transition: all 0.14s;
}
.modal-close:hover { color: var(--text); border-color: var(--border-strong); }

.modal-body { overflow-y: auto; padding: 18px 20px 26px; }
.modal-body::-webkit-scrollbar { width: 6px; }
.modal-body::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 3px; }

.modal-event-head { text-align: center; margin-bottom: 20px; }
.modal-event-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 10px;
}
.modal-event-status .live-dot { margin: 0 2px; }
.modal-teams {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 14px;
}
.modal-team { font-size: 19px; font-weight: 800; letter-spacing: -0.3px; }
.modal-team.home { text-align: right; }
.modal-team.away { text-align: left; }
.modal-score {
  font-size: 26px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  padding: 6px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.modal-vs { font-size: 13px; color: var(--text-faint); font-weight: 700; }

.market-block { margin-bottom: 22px; }
.market-block:last-child { margin-bottom: 0; }
.market-title {
  font-size: 12.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-faint);
}
.outcome-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 9px;
}
.outcome-grid .odds-btn { min-width: 0; width: 100%; }
.outcome-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.outcome-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }

/* ==========================================================================
   TOASTS
   ========================================================================== */
.toast-container {
  position: fixed;
  bottom: 22px;
  right: 22px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}
.toast {
  min-width: 280px;
  max-width: 360px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  box-shadow: var(--shadow);
  display: flex;
  gap: 12px;
  align-items: flex-start;
  animation: toast-in 0.28s var(--ease);
  pointer-events: auto;
}
.toast.out { animation: toast-out 0.28s var(--ease) forwards; }
@keyframes toast-in { from { opacity: 0; transform: translateX(30px); } to { opacity: 1; transform: translateX(0); } }
@keyframes toast-out { to { opacity: 0; transform: translateX(30px); } }
.toast-icon {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.toast.success .toast-icon { background: var(--accent-soft); color: var(--accent); }
.toast.error .toast-icon { background: rgba(239, 68, 68, 0.14); color: var(--red); }
.toast.info .toast-icon { background: var(--blue-soft); color: var(--blue); }
.toast-title { font-size: 13.5px; font-weight: 700; }
.toast-msg { font-size: 12.5px; color: var(--text-muted); margin-top: 2px; }
.toast-msg strong { color: var(--accent); }

/* ==========================================================================
   SKELETONS / LOADING
   ========================================================================== */
.skeleton {
  background: linear-gradient(90deg, var(--bg-card) 25%, var(--bg-card-hover) 50%, var(--bg-card) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: var(--radius-sm);
}
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 50px 20px;
  text-align: center;
  color: var(--text-faint);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
}
.empty-state .ico-empty { opacity: 0.5; }
.empty-state p { font-size: 14px; font-weight: 600; color: var(--text-muted); }
.empty-state span { font-size: 12.5px; }

.demo-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  background: var(--gold-soft);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: var(--gold);
  font-size: 12.5px;
  font-weight: 600;
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 1100px) {
  .layout { grid-template-columns: 1fr; }
  .betslip {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    top: auto;
    z-index: 90;
    max-height: 78vh;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    transform: translateY(105%);
    transition: transform 0.32s var(--ease);
    box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.6);
  }
  .betslip.open { transform: translateY(0); }
  .betslip-grabber {
    display: block;
    width: 44px;
    height: 4px;
    border-radius: 3px;
    background: var(--border-strong);
    margin: 10px auto 0;
  }
  .betslip-fab { display: flex; }
  .promo-title { font-size: 20px; max-width: 100%; }
  .promo-subtitle { max-width: 100%; }
}

@media (max-width: 720px) {
  .topbar-inner { gap: 12px; padding: 0 14px; }
  .brand-text { font-size: 19px; }
  .topbar-actions { gap: 7px; }
  .live-toggle { padding: 7px 10px; }
  .live-toggle .live-toggle-label { display: none; }
  .dropdown-btn span:not(.ico) { display: none; }
  .dropdown-btn { padding: 8px 9px; }
  .balance-chip { padding: 7px 10px; font-size: 12.5px; }
  .layout { padding: 14px; gap: 18px; }
  .featured-grid { grid-template-columns: 1fr 1fr; }
  .event-main { grid-template-columns: 1fr; gap: 12px; }
  .event-odds { width: 100%; }
  .event-odds .odds-btn { flex: 1; min-width: 0; }
  .promo-slide { padding: 20px 22px; min-height: 150px; }
  .modal { max-height: 92vh; }
  .modal-team { font-size: 16px; }
  .modal-score { font-size: 20px; }
  .outcome-grid { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); }
}

@media (max-width: 460px) {
  .featured-grid { grid-template-columns: 1fr; }
  .toast-container { left: 14px; right: 14px; bottom: 90px; }
  .toast { min-width: 0; max-width: 100%; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
