/* ─── Wynbook Dark Luxury Theme ─── */

:root {
  --bg-primary: #0a0a0c;
  --bg-secondary: #111114;
  --bg-tertiary: #18181c;
  --bg-card: #1a1a1f;
  --bg-hover: #222228;
  --bg-input: #16161a;

  --gold: #d4a843;
  --gold-dim: #b8922e;
  --gold-glow: rgba(212, 168, 67, 0.15);
  --gold-bright: #e6be5a;

  --back-blue: #72bbef;
  --back-blue-dim: #5aa8e0;
  --back-blue-bg: rgba(114, 187, 239, 0.18);
  --back-blue-glow: rgba(114, 187, 239, 0.35);
  --back-blue-solid: #72bbef;

  --lay-pink: #f994ba;
  --lay-pink-dim: #e87da8;
  --lay-pink-bg: rgba(249, 148, 186, 0.18);
  --lay-pink-glow: rgba(249, 148, 186, 0.35);
  --lay-pink-solid: #f994ba;

  --text-primary: #e8e8ed;
  --text-secondary: #9898a4;
  --text-muted: #5a5a6a;
  --text-gold: #d4a843;

  --green: #22c55e;
  --green-bg: rgba(34, 197, 94, 0.12);
  --red: #ef4444;
  --red-bg: rgba(239, 68, 68, 0.12);
  --orange: #f59e0b;

  --border: #2a2a32;
  --border-light: #333340;

  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;

  --sidebar-width: 240px;
  --betslip-width: 320px;
  --header-height: 56px;

  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.4);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.5);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.6);

  --glass-bg: rgba(26, 26, 31, 0.85);
  --glass-border: rgba(255, 255, 255, 0.06);
}

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

html, body {
  height: 100%;
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--gold-dim); }

input, button, select, textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

/* ─── Scrollbar ─── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--border-light); }

/* ─── App Layout ─── */
#app {
  height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ─── Header ─── */
#header {
  height: var(--header-height);
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 20px;
  gap: 16px;
  flex-shrink: 0;
  z-index: 100;
  position: relative;
  overflow: visible;
}

#header::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--gold) 0%, rgba(212, 168, 67, 0.3) 40%, transparent 100%);
}

.header-logo {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  overflow: visible;
}

.header-logo img { display: block; }

@keyframes logoShimmer {
  0%, 100% { filter: brightness(1) drop-shadow(0 0 0px transparent); }
  50% { filter: brightness(1.15) drop-shadow(0 0 8px rgba(212,168,67,0.4)); }
}

@keyframes logoEntrance {
  from { opacity: 0; transform: translateX(-12px) scale(0.95); }
  to { opacity: 1; transform: translateX(0) scale(1); }
}

.header-logo-img {
  animation: logoEntrance 0.6s cubic-bezier(0.16,1,0.3,1), logoShimmer 4s ease-in-out 1s infinite;
  transition: filter 0.3s ease, transform 0.3s ease;
}

.header-logo-img:hover {
  filter: brightness(1.25) drop-shadow(0 0 12px rgba(212,168,67,0.5));
  transform: scale(1.05);
}


.header-nav {
  display: flex;
  gap: 4px;
  margin-left: 24px;
}

.header-nav a {
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  transition: all 0.15s;
}

.header-nav a:hover {
  color: var(--text-primary);
  background: var(--bg-hover);
}

.header-nav a.active {
  color: var(--gold);
  background: var(--gold-glow);
}

.nav-inplay {
  color: var(--green) !important;
  font-weight: 600 !important;
}
.nav-inplay .live-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: var(--green);
  border-radius: 50%;
  margin-right: 2px;
  vertical-align: middle;
}
.nav-live-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  background: var(--green);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  border-radius: 9px;
  padding: 0 4px;
  margin-left: 4px;
}

/* Search Bar */
.header-search {
  margin-left: 12px;
  flex-shrink: 0;
}

.search-input {
  width: 200px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 6px 14px;
  color: var(--text-primary);
  font-size: 12px;
  outline: none;
  transition: all 0.2s;
}

.search-input:focus {
  border-color: var(--gold);
  width: 260px;
  box-shadow: 0 0 8px var(--gold-glow);
}

.search-input::placeholder {
  color: var(--text-muted);
}

.header-spacer { flex: 1; }

.header-balance {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}

.header-balance .balance-item {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  line-height: 1.2;
}

.balance-pill {
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 4px 14px;
}

.header-balance .balance-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.header-balance .balance-value {
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--green);
  font-size: 14px;
}

.header-balance .balance-value.exposure {
  color: var(--red);
}

.header-user {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-user .username {
  font-weight: 500;
  color: var(--text-primary);
  font-size: 13px;
}

.btn-auth {
  padding: 6px 16px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  border: none;
  transition: all 0.15s;
}

.btn-login {
  background: transparent;
  color: var(--gold);
  border: 1px solid var(--gold);
}

.btn-login:hover {
  background: var(--gold-glow);
}

.btn-logout {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
  font-size: 12px;
  padding: 4px 10px;
}

.btn-logout:hover {
  border-color: var(--red);
  color: var(--red);
}

/* ─── Three-Column Layout ─── */
#layout {
  flex: 1;
  display: flex;
  overflow: hidden;
  /* Firefox iPad fix: ensure children can scroll */
  min-height: 0;
}

/* ─── Sidebar ─── */
#sidebar {
  width: var(--sidebar-width);
  background: var(--bg-secondary);
  border-right: 1px solid var(--border);
  overflow-y: auto;
  flex-shrink: 0;
}

.sidebar-section {
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}

.sidebar-title {
  padding: 0 16px 8px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
}

.sidebar-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  cursor: pointer;
  transition: all 0.2s;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  border-left: 3px solid transparent;
}

.sidebar-item:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
  transform: translateX(2px);
}

.sidebar-item.active {
  background: var(--gold-glow);
  color: var(--gold);
  border-left: 3px solid var(--gold);
}

.sidebar-comp-item {
  padding-left: 28px;
  font-size: 12px;
}

.sidebar-comp-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-expand-icon {
  margin-left: auto;
  font-size: 10px;
  color: var(--text-muted);
}

.sidebar-icon {
  font-size: 16px;
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}

.sidebar-count {
  margin-left: auto;
  font-size: 11px;
  background: var(--bg-tertiary);
  padding: 1px 6px;
  border-radius: 10px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.sidebar-item.live .sidebar-icon {
  color: var(--green);
}


/* ─── Main Content ─── */
#main {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 20px 24px;
  background: var(--bg-primary);
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

/* ─── Section Headers ─── */
.section-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.section-header h2 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
}

.section-header .section-icon {
  font-size: 20px;
}

.section-header .section-badge {
  background: var(--gold-glow);
  color: var(--gold);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 600;
  margin-left: auto;
}

/* ─── Team Badge ─── */
.team-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 22px;
  padding: 0 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.5px;
  flex-shrink: 0;
  font-family: var(--font-body);
  line-height: 1;
  border: 1px solid rgba(255,255,255,0.08);
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

/* ─── Winner Strip (Horizontal) ─── */
.winner-strip {
  margin-bottom: 14px;
}

.winner-strip-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.winner-strip-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.winner-strip-line {
  flex: 1;
  height: 1px;
  background: rgba(212, 168, 67, 0.15);
}

.winner-strip-link {
  font-size: 10px;
  color: var(--text-muted);
  text-decoration: none;
  white-space: nowrap;
}

.winner-strip-link:hover { color: var(--text-secondary); }

.winner-strip-scroll {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: thin;
}

.winner-strip-scroll::-webkit-scrollbar { height: 3px; }
.winner-strip-scroll::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

.winner-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  padding: 6px 10px;
  flex-shrink: 0;
  cursor: pointer;
  transition: all 0.15s;
}

.winner-pill:hover {
  background: var(--bg-hover);
  border-color: var(--border);
}

.winner-pill-active {
  border-color: rgba(212, 168, 67, 0.3);
  box-shadow: 0 0 8px rgba(212, 168, 67, 0.15);
}

.winner-pill-badge {
  width: 24px;
  height: 24px;
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.winner-pill-name {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
}

.winner-pill-price {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 800;
  color: var(--back-blue);
}

.winner-pill-lay {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  color: var(--lay-pink);
  opacity: 0.7;
}

/* ─── Odds Buttons ─── */
.odds-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 74px;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  border: 1px solid transparent;
  font-family: var(--font-mono);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  line-height: 1.2;
  position: relative;
}

.odds-btn .odds-price {
  font-weight: 800;
  font-size: 14px;
  letter-spacing: -0.3px;
}

.odds-btn .odds-size {
  font-size: 10px;
  opacity: 0.75;
  font-weight: 500;
}

.odds-btn.back {
  background: rgba(114, 187, 239, 0.2);
  border-color: rgba(114, 187, 239, 0.15);
  color: var(--back-blue);
}

.odds-btn.back:hover {
  background: rgba(114, 187, 239, 0.32);
  border-color: rgba(114, 187, 239, 0.4);
  box-shadow: 0 0 12px var(--back-blue-glow), inset 0 0 8px rgba(114, 187, 239, 0.08);
  transform: translateY(-1px);
}

.odds-btn.back.selected {
  background: var(--back-blue);
  border-color: var(--back-blue);
  color: #0a1628;
  font-weight: 800;
  box-shadow: 0 0 18px var(--back-blue-glow), 0 4px 12px rgba(114, 187, 239, 0.25);
}

.odds-btn.lay {
  background: rgba(249, 148, 186, 0.18);
  border-color: rgba(249, 148, 186, 0.12);
  color: var(--lay-pink);
}

.odds-btn.lay:hover {
  background: rgba(249, 148, 186, 0.3);
  border-color: rgba(249, 148, 186, 0.4);
  box-shadow: 0 0 12px var(--lay-pink-glow), inset 0 0 8px rgba(249, 148, 186, 0.08);
  transform: translateY(-1px);
}

.odds-btn.lay.selected {
  background: var(--lay-pink);
  border-color: var(--lay-pink);
  color: #1a0812;
  font-weight: 800;
  box-shadow: 0 0 18px var(--lay-pink-glow), 0 4px 12px rgba(249, 148, 186, 0.25);
}

.odds-btn.suspended {
  opacity: 0.25;
  cursor: not-allowed;
  pointer-events: none;
  border-color: transparent;
}

/* Depth level styling for 3-level odds */
.odds-btn.depth-1 {
  opacity: 0.7;
  min-width: 64px;
}

.odds-btn.depth-2 {
  opacity: 0.5;
  min-width: 60px;
}

/* ─── Event Cards ─── */
.event-group {
  margin-bottom: 28px;
}

.event-group-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
}

.event-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--border-light);
  border-radius: var(--radius-md);
  margin-bottom: 6px;
  overflow: hidden;
  transition: all 0.2s;
  cursor: pointer;
}

.event-card:hover {
  border-color: var(--border-light);
  box-shadow: 0 4px 16px rgba(0,0,0,0.25);
  transform: translateY(-1px);
}

.event-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  border-bottom: 1px solid var(--border);
  font-size: 11px;
  color: var(--text-muted);
}

.event-card-header .competition-name {
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
}

.event-card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
}

.event-inplay {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--green);
  font-weight: 600;
  font-size: 11px;
}

/* P&L Badge */
.event-pnl-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
}

.pnl-positive {
  color: var(--green);
  background: var(--green-bg);
}

.pnl-negative {
  color: var(--red);
  background: var(--red-bg);
}

/* Open Bets Badge */
.event-open-bets-badge {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 4px;
  color: #d4a843;
  background: rgba(212, 168, 67, 0.12);
  margin-left: 4px;
  white-space: nowrap;
}

/* Market Type Badges */
.market-type-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1px 5px;
  border-radius: 3px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.3px;
}

.fancy-badge {
  background: rgba(34, 197, 94, 0.15);
  color: var(--green);
}

.bm-badge {
  background: rgba(212, 168, 67, 0.15);
  color: var(--gold);
}

.tv-badge {
  background: rgba(147, 51, 234, 0.15);
  color: #a855f7;
}

/* Matched Amount */
.matched-amount {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
  opacity: 0.8;
}

.event-runner-row {
  display: flex;
  align-items: center;
  padding: 8px 14px;
  gap: 12px;
  border-bottom: 1px solid rgba(42, 42, 50, 0.5);
}

.event-runner-row:last-child {
  border-bottom: none;
}

.runner-name {
  flex: 1;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

.runner-odds {
  display: flex;
  gap: 4px;
}

.depth-odds {
  gap: 3px;
}

.odds-header-row {
  display: flex;
  justify-content: flex-end;
  padding: 4px 14px 0;
  gap: 4px;
}

.odds-header-label {
  width: 74px;
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.odds-header-label.back { color: var(--back-blue); text-shadow: 0 0 8px rgba(114, 187, 239, 0.3); }
.odds-header-label.lay { color: var(--lay-pink); text-shadow: 0 0 8px rgba(249, 148, 186, 0.3); }

/* 3-level depth header */
.depth-header-row {
  display: flex;
  align-items: center;
  padding: 4px 14px 0;
  gap: 3px;
}

.depth-header-row .depth-spacer {
  flex: 1;
}

.depth-header-row .odds-header-label {
  width: 64px;
}

.depth-header-row .odds-header-label.best {
  width: 72px;
  font-weight: 700;
}

.depth-row .runner-odds {
  gap: 3px;
}

/* ─── Match Detail Page ─── */
.match-back-nav {
  margin-bottom: 16px;
}

.match-back-nav a {
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  transition: color 0.15s;
}

.match-back-nav a:hover {
  color: var(--gold);
}

.match-title-bar {
  margin-bottom: 16px;
}

.match-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
}

/* Score Banner */
.score-banner {
  background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-tertiary) 100%);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  margin-bottom: 20px;
}

.score-text {
  font-size: 14px;
  color: var(--text-primary);
  text-align: center;
}

.score-teams {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
}

.score-team {
  display: flex;
  align-items: center;
  gap: 8px;
}

.score-team-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.score-team-score {
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 700;
  color: var(--gold);
}

.score-overs {
  font-size: 12px;
  color: var(--text-secondary);
  font-family: var(--font-mono);
}

.score-vs {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
}

.score-meta {
  text-align: center;
  margin-top: 8px;
  font-size: 12px;
  font-family: var(--font-mono);
  color: var(--text-secondary);
}

.score-status {
  text-align: center;
  margin-top: 4px;
  font-size: 12px;
  color: var(--green);
  font-weight: 600;
}

/* Match Sections */
.match-section {
  margin-bottom: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.match-section-header {
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.odds-header {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.15) 0%, rgba(37, 99, 235, 0.05) 100%);
  color: var(--back-blue);
  border-bottom: 1px solid rgba(37, 99, 235, 0.2);
}

.bookmaker-header {
  background: linear-gradient(135deg, rgba(212, 168, 67, 0.15) 0%, rgba(212, 168, 67, 0.05) 100%);
  color: var(--gold);
  border-bottom: 1px solid rgba(212, 168, 67, 0.2);
}

.fancy-header {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.15) 0%, rgba(34, 197, 94, 0.05) 100%);
  color: var(--green);
  border-bottom: 1px solid rgba(34, 197, 94, 0.2);
}

.other-header {
  background: linear-gradient(135deg, rgba(148, 163, 184, 0.1) 0%, transparent 100%);
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border);
}

/* Market Block */
.market-block {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
}

.market-block:last-child {
  border-bottom: none;
}

.market-block-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  border-bottom: 1px solid rgba(42, 42, 50, 0.5);
}

.market-status-badge {
  font-size: 9px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 3px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.market-status-badge.suspended {
  background: var(--red-bg);
  color: var(--red);
}

.market-status-badge.open {
  background: var(--green-bg);
  color: var(--green);
}

/* Fancy Table */
.fancy-table-header {
  display: flex;
  align-items: center;
  padding: 6px 14px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  background: var(--bg-tertiary);
}

.fancy-name-col {
  flex: 1;
}

.fancy-no-col {
  width: 80px;
  text-align: center;
  color: var(--lay-pink);
}

.fancy-yes-col {
  width: 80px;
  text-align: center;
  color: var(--back-blue);
}

.fancy-category {
  border-top: 1px solid var(--border);
}

.fancy-category-header {
  padding: 6px 14px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  background: rgba(42, 42, 50, 0.3);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.fancy-row {
  display: flex;
  align-items: center;
  padding: 6px 14px;
  border-bottom: 1px solid rgba(42, 42, 50, 0.3);
  gap: 8px;
}

.fancy-row:last-child {
  border-bottom: none;
}

.fancy-row.suspended {
  opacity: 0.4;
}

.fancy-market-name {
  flex: 1;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fancy-no-btn,
.fancy-yes-btn {
  width: 76px;
  min-width: 76px;
  flex-shrink: 0;
}

/* ─── Bet Slip Panel ─── */
#betslip-panel {
  width: var(--betslip-width);
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  border-left: 1px solid var(--glass-border);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  overflow: hidden;
}

.betslip-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.betslip-header h3 {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.betslip-close-mobile { display: none; }

.betslip-count {
  background: var(--gold);
  color: #0a0a0c;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
}

.betslip-clear {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 12px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
}

.betslip-clear:hover {
  color: var(--red);
  background: var(--red-bg);
}

.betslip-body {
  overflow-y: auto;
  padding: 8px;
  max-height: 50vh;
}

.betslip-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 200px;
  color: var(--text-muted);
  font-size: 13px;
  text-align: center;
  gap: 8px;
}

.betslip-empty .empty-icon {
  font-size: 32px;
  opacity: 0.5;
}

/* Single bet slip item */
.slip-item {
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  margin-bottom: 6px;
}

.slip-item-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 6px;
}

.slip-event-name {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 2px;
}

.slip-runner-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

.slip-remove {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 14px;
  padding: 2px;
  line-height: 1;
  border-radius: 4px;
}

.slip-remove:hover {
  color: var(--red);
  background: var(--red-bg);
}

.slip-type-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 6px;
  border: 1px solid transparent;
}

.slip-type-badge.back {
  background: rgba(114, 187, 239, 0.2);
  border-color: rgba(114, 187, 239, 0.25);
  color: var(--back-blue);
}

.slip-type-badge.lay {
  background: rgba(249, 148, 186, 0.2);
  border-color: rgba(249, 148, 186, 0.25);
  color: var(--lay-pink);
}

.slip-odds {
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 14px;
  color: var(--gold);
  margin-left: 6px;
}

.slip-stake-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
}

.slip-stake-input {
  flex: 1;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 13px;
  outline: none;
  transition: border-color 0.15s;
}

.slip-stake-input:focus {
  border-color: var(--gold);
}

.slip-stake-input::placeholder {
  color: var(--text-muted);
}

.quick-stakes {
  display: flex;
  gap: 4px;
  margin-top: 6px;
}

.quick-stake-btn {
  flex: 1;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 4px 2px;
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.quick-stake-btn:hover {
  border-color: var(--gold);
  color: var(--gold);
  background: var(--gold-glow);
}

.slip-return {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  font-size: 12px;
}

.slip-return .label { color: var(--text-muted); }
.slip-return .value {
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--green);
}

/* Betslip footer */
.betslip-footer {
  border-top: 1px solid var(--border);
  padding: 12px 16px;
  flex-shrink: 0;
  position: sticky;
  bottom: 0;
  background: var(--bg-card);
  z-index: 5;
}

.betslip-total {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
  font-size: 13px;
}

.betslip-total .label {
  color: var(--text-secondary);
  font-weight: 500;
}

.betslip-total .value {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--text-primary);
}

.btn-place-bets {
  width: 100%;
  padding: 10px;
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-bright) 100%);
  color: #0a0a0c;
  border: none;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 2px 8px rgba(212, 168, 67, 0.2);
}

.btn-place-bets:hover {
  background: linear-gradient(135deg, var(--gold-dim) 0%, var(--gold) 100%);
  box-shadow: 0 4px 20px rgba(212, 168, 67, 0.35);
  transform: translateY(-1px);
}

.btn-place-bets:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

/* ─── Auth Pages ─── */
.auth-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100%;
}

.auth-card {
  width: 100%;
  max-width: 380px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 32px;
}

.auth-card h2 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 4px;
}

.auth-card .auth-subtitle {
  color: var(--text-muted);
  margin-bottom: 24px;
  font-size: 13px;
}

.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-input {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  color: var(--text-primary);
  font-size: 14px;
  outline: none;
  transition: border-color 0.15s;
}

.form-input:focus {
  border-color: var(--gold);
}

.form-error {
  color: var(--red);
  font-size: 12px;
  margin-top: 6px;
}

.btn-primary {
  width: 100%;
  padding: 10px;
  background: var(--gold);
  color: #0a0a0c;
  border: none;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.15s;
  margin-top: 8px;
}

.btn-primary:hover {
  background: var(--gold-dim);
}

.btn-primary:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.auth-link {
  text-align: center;
  margin-top: 16px;
  font-size: 13px;
  color: var(--text-muted);
}

.auth-link a {
  color: var(--gold);
  font-weight: 600;
}

/* ─── My Bets Page ─── */
.bets-filters {
  display: flex;
  gap: 6px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 6px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.filter-btn:hover {
  border-color: var(--border-light);
  color: var(--text-primary);
}

.filter-btn.active {
  background: var(--gold-glow);
  border-color: var(--gold);
  color: var(--gold);
}

.bet-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: 6px;
  transition: all 0.15s;
}

.bet-row:hover {
  border-color: var(--border-light);
}

.bet-info { flex: 1; }

.bet-event {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 2px;
}

.bet-selection {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.bet-market {
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.bet-details {
  text-align: right;
  flex-shrink: 0;
}

.bet-odds {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 14px;
  color: var(--text-primary);
}

.bet-stake {
  font-size: 12px;
  color: var(--text-secondary);
  font-family: var(--font-mono);
}

.bet-pnl {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 13px;
}

.bet-pnl.positive { color: var(--green); }
.bet-pnl.negative { color: var(--red); }

/* Status badges */
.status-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.status-badge.open, .status-badge.pending {
  background: rgba(245, 158, 11, 0.12);
  color: var(--orange);
}

.status-badge.won {
  background: var(--green-bg);
  color: var(--green);
}

.status-badge.lost {
  background: var(--red-bg);
  color: var(--red);
}

.status-badge.void, .status-badge.cashout {
  background: rgba(148, 163, 184, 0.12);
  color: #94a3b8;
}

.type-badge {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.type-badge.back {
  background: var(--back-blue-bg);
  color: var(--back-blue);
}

.type-badge.lay {
  background: var(--lay-pink-bg);
  color: var(--lay-pink);
}

/* ─── Wallet Page ─── */
.wallet-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

.wallet-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
}

.wallet-card .wallet-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.wallet-card .wallet-value {
  font-family: var(--font-mono);
  font-size: 24px;
  font-weight: 700;
}

.wallet-card .wallet-value.balance { color: var(--text-primary); }
.wallet-card .wallet-value.exposure { color: var(--red); }
.wallet-card .wallet-value.available { color: var(--green); }

.btn-reset {
  padding: 10px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-reset:hover {
  border-color: var(--orange);
  color: var(--orange);
}

/* ─── Leaderboard ─── */
.leaderboard-table {
  width: 100%;
  border-collapse: collapse;
}

.leaderboard-table th {
  padding: 10px 14px;
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}

.leaderboard-table td {
  padding: 10px 14px;
  font-size: 13px;
  border-bottom: 1px solid rgba(42, 42, 50, 0.5);
}

.leaderboard-table tr:hover td {
  background: var(--bg-hover);
}

.lb-rank {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--text-muted);
  width: 40px;
}

.lb-rank.gold { color: var(--gold); }
.lb-rank.silver { color: #c0c0c0; }
.lb-rank.bronze { color: #cd7f32; }

.lb-profit {
  font-family: var(--font-mono);
  font-weight: 700;
}

.lb-profit.positive { color: var(--green); }
.lb-profit.negative { color: var(--red); }

.lb-winrate {
  font-family: var(--font-mono);
  color: var(--text-secondary);
}

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

.toast {
  padding: 12px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  animation: toastIn 0.3s ease;
  max-width: 340px;
}

.toast.success {
  border-color: var(--green);
  background: rgba(34, 197, 94, 0.08);
}

.toast.error {
  border-color: var(--red);
  background: rgba(239, 68, 68, 0.08);
}

@keyframes toastIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

.toast.fade-out {
  animation: toastOut 0.3s ease forwards;
}

@keyframes toastOut {
  from { opacity: 1; transform: translateY(0); }
  to { opacity: 0; transform: translateY(-10px); }
}

/* ─── Loading / Empty States ─── */
.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px;
  color: var(--text-muted);
  gap: 10px;
}

.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid var(--border);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  color: var(--text-muted);
  text-align: center;
  gap: 8px;
}

.empty-state .empty-icon {
  font-size: 40px;
  opacity: 0.5;
  margin-bottom: 8px;
}

/* ═══════════════════════════════════════════════════════════════════
   Ultra-Premium Animations, Effects & Polish
   ═══════════════════════════════════════════════════════════════════ */

/* ─── 1. Smooth Page Transitions ─── */
@keyframes fadeSlideIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

#main > * {
  animation: fadeSlideIn 0.3s ease-out;
}

/* ─── 2. Event Card Hover Effects ─── */
.event-card {
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.event-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.4), 0 0 0 1px rgba(212,168,67,0.1);
}

/* ─── 3. Odds Button Pulse on Price Change ─── */
@keyframes oddsFlash {
  0%   { box-shadow: inset 0 0 0 2px var(--gold); }
  100% { box-shadow: none; }
}

.odds-btn.flash {
  animation: oddsFlash 0.6s ease-out;
}

@keyframes oddsFlashUp {
  0%   { box-shadow: inset 0 0 0 2px var(--green); background-color: var(--green-bg); }
  100% { box-shadow: none; }
}

.odds-btn.flash-up {
  animation: oddsFlashUp 0.6s ease-out;
}

@keyframes oddsFlashDown {
  0%   { box-shadow: inset 0 0 0 2px var(--red); background-color: var(--red-bg); }
  100% { box-shadow: none; }
}

.odds-btn.flash-down {
  animation: oddsFlashDown 0.6s ease-out;
}

/* ─── 4. Gold Shimmer on Header Logo ─── */
@keyframes shimmer {
  0%   { background-position: -200% center; }
  100% { background-position: 200% center; }
}

.header-logo span {
  background: linear-gradient(
    90deg,
    var(--gold) 0%,
    var(--gold-bright) 25%,
    #fff 50%,
    var(--gold-bright) 75%,
    var(--gold) 100%
  );
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shimmer 4s linear infinite;
}

/* ─── 5. Betslip Slide Animation ─── */
@keyframes slipSlideIn {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: translateX(0); }
}

.slip-item {
  animation: slipSlideIn 0.3s ease-out;
}

/* ─── 6. Live Dot Pulse (Enhanced) ─── */
@keyframes livePulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.5; transform: scale(1.5); }
}

.live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  flex-shrink: 0;
  animation: livePulse 1.5s ease-in-out infinite;
}

/* ─── 7. Toast Notification Slide-In (Enhanced) ─── */
@keyframes toastSlideIn {
  from { opacity: 0; transform: translateY(-20px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.toast {
  animation: toastSlideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ─── 8. Button Press Effect ─── */
.btn-primary:active,
.btn-place-bets:active,
.odds-btn:active {
  transform: scale(0.97);
  transition-duration: 0.05s;
}

/* ─── 9. Glassmorphism on Header ─── */
#header {
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background: rgba(17, 17, 20, 0.85);
}

/* ─── 11. Skeleton Loading Animation ─── */
@keyframes skeletonShimmer {
  0%   { background-position: -400px 0; }
  100% { background-position: 400px 0; }
}

.skeleton {
  background: linear-gradient(
    90deg,
    var(--bg-tertiary) 0%,
    var(--bg-hover) 40%,
    var(--bg-tertiary) 80%
  );
  background-size: 800px 100%;
  animation: skeletonShimmer 1.5s ease-in-out infinite;
  border-radius: var(--radius-sm);
}

.skeleton-line {
  height: 14px;
  margin-bottom: 8px;
  border-radius: var(--radius-sm);
}

.skeleton-line.short { width: 40%; }
.skeleton-line.medium { width: 65%; }
.skeleton-line.long { width: 90%; }

.skeleton-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 6px;
}

/* ─── 12. Smooth Number Transitions ─── */
.balance-amount,
.odds-price,
.header-balance {
  transition: color 0.3s ease;
}

.balance-amount.changed {
  color: var(--gold-bright);
  transition: color 0.1s ease;
}

.odds-price.price-up {
  color: var(--green) !important;
  transition: color 0.1s ease;
}

.odds-price.price-down {
  color: var(--red) !important;
  transition: color 0.1s ease;
}

/* ─── 13. Gold Focus Ring for Accessibility ─── */
:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.odds-btn:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 1px;
  box-shadow: 0 0 0 4px var(--gold-glow);
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 0;
  box-shadow: 0 0 8px var(--gold-glow);
}

button:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px var(--gold-glow);
}

/* ─── Runner Exposure (SkyExch-style) ─── */
.runner-exposure {
  display: inline-block;
  margin-left: 8px;
  font-size: 11px;
  font-weight: 700;
  font-family: var(--font-mono);
  padding: 1px 6px;
  border-radius: 3px;
  vertical-align: middle;
}
.runner-exp-positive {
  color: var(--green);
  background: var(--green-bg);
}
.runner-exp-negative {
  color: var(--red);
  background: var(--red-bg);
}

/* Match title bar flex layout */
.match-title-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* ═══════════════════════════════════════════════════════════════════
   End Premium Animations
   ═══════════════════════════════════════════════════════════════════ */

/* ─── Home Tab Pills ─── */
.home-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 16px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.home-tab-btn {
  padding: 8px 18px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}
.home-tab-btn:hover {
  border-color: var(--gold-dim);
  color: var(--text-primary);
}
.home-tab-btn.active {
  background: var(--gold);
  color: #111;
  border-color: var(--gold);
}

/* ─── Skeleton Loading ─── */
.skeleton-page {
  padding: 20px;
}
.skeleton-card {
  background: var(--bg-card);
  border-radius: 8px;
  height: 80px;
  margin-bottom: 8px;
  position: relative;
  overflow: hidden;
}
.skeleton-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.03), transparent);
  animation: skeletonShimmer 1.5s infinite;
}
.skeleton-hero {
  height: 200px;
  border-radius: 12px;
  margin-bottom: 16px;
}

.skel-hero {
  background: linear-gradient(135deg, #0d0d10 0%, #111118 50%, #0d0d10 100%);
  border: 1px solid rgba(212, 168, 67, 0.08);
  border-radius: var(--radius-lg);
  padding: 18px 24px;
  margin-bottom: 16px;
  position: relative;
  overflow: hidden;
}

.skel-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.02), transparent);
  animation: skeletonShimmer 1.5s infinite;
}

/* ─── View All Link ─── */
.view-all-link {
  display: block;
  text-align: center;
  padding: 12px;
  color: var(--gold);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  border: 1px dashed var(--border);
  border-radius: 8px;
  margin-top: 8px;
  transition: all 0.2s;
}
.view-all-link:hover {
  background: var(--gold-glow);
  border-color: var(--gold-dim);
}

/* ─── Responsive ─── */
@media (max-width: 1100px) {
  #sidebar { display: none; }
  :root { --sidebar-width: 0px; }
}

@media (max-width: 768px) {
  :root { --betslip-width: 0px; }
  .header-search { display: none; }
  .score-teams { flex-direction: column; gap: 12px; }
  .depth-header-row .odds-header-label { width: 50px; font-size: 10px; }
  .odds-btn.depth-1, .odds-btn.depth-2 { min-width: 50px; }
}

/* ─── Misc Utilities ─── */
.text-mono { font-family: var(--font-mono); }
.text-gold { color: var(--gold); }
.text-green { color: var(--green); }
.text-red { color: var(--red); }
.text-muted { color: var(--text-muted); }
.mt-4 { margin-top: 16px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }

/* ─── Team Logo in Badge ─── */
.team-badge-with-logo {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.team-logo-img {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  vertical-align: middle;
}

/* ─── Market Tabs (SkyExch-style) ─── */
.market-tabs {
  display: flex;
  gap: 4px;
  padding: 8px 0;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.market-tab-btn {
  padding: 8px 18px;
  border: 1px solid var(--border);
  border-bottom: none;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.market-tab-btn:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.market-tab-btn.active {
  background: var(--gold);
  color: #111;
  border-color: var(--gold);
  box-shadow: 0 -2px 8px rgba(212, 168, 67, 0.25);
}

/* ─── Enhanced Score Banner ─── */
.score-target {
  text-align: center;
  margin-top: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 0.5px;
}

.score-football {
  justify-content: center;
}

.score-football-middle {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.score-football-goals {
  font-family: var(--font-mono);
  font-size: 28px;
  font-weight: 800;
  color: var(--text-primary);
}

.score-football-minute {
  font-size: 12px;
  color: var(--green);
  font-weight: 600;
}

/* ─── Responsive additions ─── */
@media (max-width: 800px) {
  .one-click-toggle { display: none; }
  .market-tabs { gap: 2px; }
  .market-tab-btn { padding: 6px 12px; font-size: 11px; }
}

/* Team logo images (transparent PNGs) */
.team-logo-img {
  border-radius: 4px;
  vertical-align: middle;
  margin-right: 6px;
}

/* ─── Mobile (phones) ─── */
@media (max-width: 768px) {
  #layout { flex-direction: column; }
  #sidebar { display: none; }

  /* Betslip: slides up from bottom */
  #betslip-panel {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    width: 100%;
    max-height: 65vh;
    overflow-y: auto;
    z-index: 200;
    transform: translateY(100%);
    visibility: hidden;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), visibility 0s 0.3s;
    border-top: 2px solid var(--gold-dim);
    border-radius: 16px 16px 0 0;
    background: var(--bg-card);
    padding-bottom: env(safe-area-inset-bottom);
    -webkit-overflow-scrolling: touch;
    box-shadow: 0 -8px 32px rgba(0,0,0,0.5);
  }
  #betslip-panel.open {
    transform: translateY(0);
    visibility: visible;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), visibility 0s;
  }
  /* Lock body scroll when betslip is open */
  body.betslip-open { overflow: hidden; }
  .betslip-close-mobile { display: block !important; }

  /* Header — compact on mobile */
  .header-nav { display: none; }
  .header-search { display: none; }
  #header { padding: 0 10px; gap: 6px; min-height: 48px; }
  .header-logo img { height: 98px !important; margin: -25px 0 -25px 0 !important; }
  /* Keep spacer on mobile to push login/balance to the right */
  .header-balance {
    font-size: 11px;
    margin-left: auto;
    gap: 4px !important;
  }
  .header-balance .balance-item { padding: 2px 8px; }
  .header-balance .balance-label { font-size: 8px; }
  .header-balance .balance-value { font-size: 12px; }
  /* Hide exposure on mobile - show only balance */
  .header-balance .balance-item:nth-child(2) { display: none; }
  .header-user .username { display: none; }
  .header-user .btn-logout { font-size: 10px; padding: 3px 8px; }
  .one-click-toggle { display: none; }
  .header-username { display: none; }
  .balance-label { display: none; }
  .balance-divider { display: none; }
  .balance-col:last-child { display: none; }
  .balance-value { font-size: 12px !important; }
  .balance-combined-pill { padding: 2px 10px; gap: 6px; }
  .header-avatar-wrap { padding: 8px; margin: -8px; }
  .header-avatar { width: 32px; height: 32px; font-size: 13px; }
  .home-tab-btn { padding: 4px 10px; font-size: 11px; }
  .mobile-nav { height: 52px; }

  /* Mobile bottom nav bar */
  .mobile-nav {
    display: flex !important;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    z-index: 150;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    padding: 6px 0 calc(6px + env(safe-area-inset-bottom));
    justify-content: space-around;
  }
  .mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    color: var(--text-muted);
    font-size: 10px;
    font-weight: 600;
    text-decoration: none;
    padding: 4px 6px;
    border-radius: 6px;
    transition: color 0.2s;
    cursor: pointer;
    white-space: nowrap;
    min-width: 44px;
    min-height: 44px;
    justify-content: center;
    flex: 1;
  }
  .mobile-nav-item.active { color: var(--gold); }
  .mobile-nav-item:hover { color: var(--text-primary); }
  .mobile-nav-icon { font-size: 20px; line-height: 1; }

  /* Main content - give room for bottom nav */
  #main {
    padding: 12px 10px calc(72px + env(safe-area-inset-bottom)) 10px;
  }

  /* Cards and odds - fit on narrow screens */
  .event-card { padding: 8px; overflow: hidden; }
  .event-card-header { font-size: 11px; flex-wrap: wrap; }
  .event-card-meta { font-size: 10px; }
  .event-runner-row {
    gap: 4px;
    flex-wrap: nowrap;
    overflow: hidden;
  }
  .runner-name {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 12px;
  }
  .runner-odds {
    flex-shrink: 0;
    gap: 3px;
  }
  .odds-btn {
    min-width: 54px;
    min-height: 44px;
    font-size: 12px;
    padding: 6px 4px;
    border-radius: 4px;
  }
  .odds-btn .odds-price { font-size: 12px; }
  .odds-btn .odds-size { font-size: 8px; }
  .odds-header-row { font-size: 10px; }
  .odds-header-label { width: 54px; font-size: 9px; }
  .team-badge { font-size: 8px; min-width: 22px; height: 18px; padding: 0 3px; }
  .team-logo-img { width: 20px !important; height: 20px !important; margin-right: 3px; }
  .btn-place-bets { min-height: 48px; font-size: 15px; }
  .form-input, input[type="text"], input[type="number"], input[type="password"] { min-height: 44px; }
  .market-tab-btn { min-height: 36px; padding: 6px 10px; font-size: 10px; }
  .market-type-badge { font-size: 9px; }
  .matched-amount { font-size: 9px; }
  .event-pnl-badge, .event-open-bets-badge { font-size: 9px; padding: 1px 4px; }

  /* Live TV iframe smaller on mobile */
  #live-tv-container iframe { height: 200px !important; }
}

/* Small phones (iPhone SE / 360px) */
@media (max-width: 375px) {
  #header { padding: 0 6px; gap: 4px; }
  .header-logo img { height: 85px !important; margin: -20px 0 -20px 0 !important; }
  #main { padding: 6px 6px calc(72px + env(safe-area-inset-bottom)) 6px; }
  .odds-btn { min-width: 46px; padding: 4px 3px; }
  .odds-btn .odds-price { font-size: 11px; }
  .event-card { padding: 6px; }
  .market-tab-btn { padding: 5px 8px; font-size: 9px; min-height: 32px; }
  .market-tabs { gap: 1px; }
  .runner-name { font-size: 11px; }
  .team-badge { display: none; }
  .team-logo-img { width: 16px !important; height: 16px !important; }
}

/* iOS viewport fix */
html {
  height: -webkit-fill-available;
}
body {
  min-height: -webkit-fill-available;
  min-height: 100dvh;
  -webkit-overflow-scrolling: touch;
}

/* Safe area for notched phones */
body {
  padding-bottom: env(safe-area-inset-bottom);
}
#header {
  padding-top: env(safe-area-inset-top);
}

/* Dimmed sidebar items (no live events) */
.sidebar-item.dimmed {
  opacity: 0.4;
}
.sidebar-item.dimmed:hover {
  opacity: 0.7;
}
.sidebar-count.live {
  background: var(--green-bg);
  color: var(--green);
}

/* ─── Header: Combined Balance Pill ─── */
.balance-combined-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 4px 14px;
}

.balance-col {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  line-height: 1.2;
}

.balance-divider {
  width: 1px;
  height: 22px;
  background: var(--border);
}

/* ─── Header: Avatar + Dropdown ─── */
.header-avatar-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  position: relative;
}

.header-avatar {
  width: 30px;
  height: 30px;
  background: linear-gradient(135deg, var(--gold), var(--gold-dim));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 13px;
  color: #000;
  flex-shrink: 0;
}

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

.avatar-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 200px;
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  z-index: 200;
  overflow: hidden;
  padding: 4px 0;
}

.avatar-dropdown.show { display: block; }

.avatar-dropdown-item {
  display: block;
  padding: 14px 18px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  transition: all 0.15s;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.avatar-dropdown-item:hover,
.avatar-dropdown-item:active {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.avatar-dropdown-divider {
  height: 1px;
  background: var(--border);
  margin: 4px 0;
}

/* ─── Sidebar Widgets ─── */
.sb-widget {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
}

.sb-widget-header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
}

.sb-widget-title {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--text-muted);
}

.sb-live-dot {
  width: 5px;
  height: 5px;
  background: var(--green);
  border-radius: 50%;
  animation: pulse 1.5s infinite;
}

.sb-sport-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 6px;
  cursor: pointer;
  margin-bottom: 2px;
  transition: all 0.15s;
}

.sb-sport-row:hover { background: var(--bg-hover); }
.sb-sport-row.active { background: rgba(212, 168, 67, 0.08); }
.sb-sport-icon { font-size: 13px; }

.sb-sport-name {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  flex: 1;
}

.sb-sport-row.active .sb-sport-name {
  color: var(--gold);
  font-weight: 600;
}

.sb-live-badge {
  background: var(--green);
  color: #fff;
  font-size: 8px;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 6px;
  min-width: 16px;
  text-align: center;
}

.sb-total-count {
  font-size: 10px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.sb-ticker-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 280px;
  overflow-y: auto;
}

.sb-ticker-card {
  background: rgba(26, 26, 31, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 6px;
  padding: 8px 10px;
  cursor: pointer;
  transition: all 0.15s;
}

.sb-ticker-card:hover {
  background: var(--bg-hover);
  border-color: var(--border);
}

.sb-ticker-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

.sb-ticker-name {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-primary);
}

.sb-ticker-score {
  font-size: 9px;
  color: var(--green);
  font-weight: 600;
  font-family: var(--font-mono);
}

.sb-ticker-odds { display: flex; gap: 3px; }

.sb-ticker-back, .sb-ticker-lay {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 3px;
}

.sb-ticker-back {
  color: var(--back-blue);
  background: rgba(114, 187, 239, 0.12);
}

.sb-ticker-lay {
  color: var(--lay-pink);
  background: rgba(249, 148, 186, 0.12);
}

.sb-view-all {
  display: block;
  text-align: center;
  font-size: 10px;
  color: var(--text-muted);
  padding: 6px 0 2px;
  text-decoration: none;
}

.sb-view-all:hover { color: var(--text-secondary); }

.sb-position-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 3px 0;
}

.sb-position-label { font-size: 11px; color: var(--text-secondary); }

.sb-position-value {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
}

.sb-position-name { font-size: 10px; color: var(--text-secondary); }
.sb-position-amt { font-family: var(--font-mono); font-size: 10px; color: var(--red); }

.sb-position-divider {
  height: 1px;
  background: var(--border);
  margin: 6px 0;
}

.sb-games-grid { display: flex; gap: 8px; }

.sb-game-card {
  flex: 1;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 6px;
  text-align: center;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s;
  overflow: hidden;
}

.sb-game-card:hover { transform: translateY(-2px); box-shadow: 0 4px 16px rgba(0,0,0,0.3); border-color: var(--gold-dim); }
.sb-game-logo { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 6px; }
.sb-game-icon { display: block; font-size: 16px; margin-bottom: 2px; }
.sb-game-name { display: block; font-size: 10px; font-weight: 700; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.05em; padding: 2px 0 4px; }

/* ─── Featured Match Hero ─── */
.featured-hero {
  background: linear-gradient(135deg, #0d0d10 0%, #111118 50%, #0d0d10 100%);
  border: 1px solid rgba(212, 168, 67, 0.15);
  border-radius: var(--radius-lg);
  padding: 18px 24px;
  margin-bottom: 16px;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.2s;
}

.featured-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.featured-hero:hover {
  border-color: rgba(212, 168, 67, 0.3);
}

@keyframes heroFadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.featured-hero {
  animation: heroFadeIn 0.3s ease-out;
}

.hero-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.hero-comp {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hero-comp-name {
  font-size: 11px;
  color: var(--text-secondary);
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.hero-live-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--green);
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 10px;
  letter-spacing: 0.5px;
}

.hero-upcoming-badge {
  font-size: 9px;
  font-weight: 700;
  color: var(--gold);
  background: var(--gold-glow);
  padding: 2px 8px;
  border-radius: 10px;
}

.hero-matched {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
}

.hero-teams {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.hero-team {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 12px;
}

.hero-team-right {
  justify-content: flex-end;
}

.hero-team-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
}

.hero-score {
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 800;
  color: var(--gold);
  margin-top: 2px;
}

.hero-vs {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  min-width: 60px;
}

.hero-vs-text {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
}

.hero-status {
  font-size: 10px;
  color: var(--green);
  font-weight: 600;
  text-align: center;
}

.hero-countdown {
  font-size: 10px;
  color: var(--gold);
  font-weight: 500;
}

.hero-odds-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.hero-odds-group {
  flex: 1;
  display: flex;
  gap: 6px;
}

.hero-odds-group .odds-btn {
  flex: 1;
  min-width: 0;
}

.hero-odds-labels {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  flex-shrink: 0;
  width: 50px;
}

.hero-odds-label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.hero-odds-label.back { color: var(--back-blue); }
.hero-odds-label.lay { color: var(--lay-pink); }

.hero-pills {
  display: flex;
  gap: 6px;
  margin-top: 12px;
}

.hero-pill {
  font-size: 10px;
  color: var(--gold);
  background: rgba(212, 168, 67, 0.1);
  padding: 3px 10px;
  border-radius: 10px;
  border: 1px solid rgba(212, 168, 67, 0.15);
  cursor: pointer;
}

.hero-pill-green { color: var(--green); background: rgba(34, 197, 94, 0.1); border-color: rgba(34, 197, 94, 0.15); }
.hero-pill-purple { color: #a855f7; background: rgba(168, 85, 247, 0.1); border-color: rgba(168, 85, 247, 0.15); }
.hero-pill-blue { color: var(--back-blue); background: rgba(114, 187, 239, 0.1); border-color: rgba(114, 187, 239, 0.15); }

/* Hero odds team labels */
.hero-odds-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.hero-odds-team {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-align: center;
}

/* Winner strip scroll fade indicator */
.winner-strip-scroll {
  -webkit-mask-image: linear-gradient(to right, #000 85%, transparent 100%);
  mask-image: linear-gradient(to right, #000 85%, transparent 100%);
}

@media (max-width: 768px) {
  .featured-hero { padding: 12px 14px; }
  .hero-teams { flex-direction: row; gap: 8px; }
  .hero-team { gap: 8px; }
  .hero-team-name { font-size: 13px; }
  .hero-score { font-size: 16px; }
  .hero-odds-labels { display: none; }
  .hero-odds-team { font-size: 9px; }
  .hero-odds-row { gap: 6px; }
  .hero-pills { flex-wrap: wrap; }
  .hero-odds-group .odds-btn { padding: 4px 4px; }
}

/* ─── Dense Event Rows ─── */
.comp-group {
  margin-bottom: 12px;
  animation: heroFadeIn 0.25s ease-out;
}

.comp-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  margin-bottom: 2px;
}

.comp-icon { font-size: 12px; }

.comp-name {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-primary);
}

.comp-matched {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
}

.comp-odds-labels {
  display: flex;
  gap: 3px;
}

.comp-odds-label {
  width: 56px;
  text-align: center;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.comp-odds-label.back { color: var(--back-blue); }
.comp-odds-label.lay { color: var(--lay-pink); }

.comp-events {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.ev-row {
  display: flex;
  align-items: center;
  padding: 7px 12px;
  background: var(--bg-card);
  border-bottom: 1px solid rgba(42, 42, 50, 0.5);
  cursor: pointer;
  gap: 8px;
  transition: background 0.15s;
}

.ev-row:last-child { border-bottom: none; }

.ev-row:hover { background: var(--bg-hover); }

.ev-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex;
  align-items: center;
  gap: 6px;
}

.ev-live-score {
  font-size: 10px;
  color: var(--green);
  font-weight: 600;
  font-family: var(--font-mono);
  flex-shrink: 0;
}

.ev-live-tag {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 9px;
  color: #fff;
  font-weight: 700;
  flex-shrink: 0;
  background: var(--red);
  padding: 2px 6px;
  border-radius: 3px;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.ev-date {
  font-size: 10px;
  color: var(--gold);
  font-weight: 500;
  flex-shrink: 0;
}

.ev-badges {
  display: flex;
  gap: 3px;
  flex-shrink: 0;
}

/* Two-line event card (one row per team) */
.ev-card {
  background: var(--bg-card);
  border-bottom: 1px solid rgba(42, 42, 50, 0.5);
  cursor: pointer;
  padding: 6px 12px;
  transition: background 0.15s;
}
.ev-card:last-child { border-bottom: none; }
.ev-card:hover { background: var(--bg-hover); }

.ev-card-header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}

.ev-runner-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 3px 0;
}

.ev-runner-info {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  min-width: 0;
}

.ev-runner-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ev-odds {
  display: flex;
  gap: 3px;
  flex-shrink: 0;
}

.ev-odds .odds-btn {
  min-width: 56px;
  width: 56px;
  padding: 4px 6px;
  border-radius: 4px;
}

.ev-odds .odds-btn .odds-price {
  font-size: 13px;
}

.ev-odds .odds-btn .odds-size {
  font-size: 9px;
}

@media (max-width: 768px) {
  .comp-odds-labels { display: none; }
  .ev-card { padding: 5px 8px; }
  .ev-card-header { margin-bottom: 2px; }
  .ev-runner-row { gap: 6px; padding: 2px 0; }
  .ev-runner-name { font-size: 11px; }
  .ev-odds .odds-btn { min-width: 48px; width: 48px; min-height: 44px; padding: 3px 2px; }
  .ev-odds .odds-btn .odds-price { font-size: 12px; }
  .ev-odds .odds-btn .odds-size { display: none; }
  .ev-badges { display: none; }
  .ev-live-score { font-size: 9px; }
  .ev-live-tag { font-size: 8px; padding: 1px 4px; }
}

/* ─── Hybrid Betslip ─── */
@media (min-width: 1024px) and (max-width: 1439px) {
  #betslip-panel {
    position: fixed;
    right: -340px;
    top: var(--header-height);
    bottom: 0;
    z-index: 150;
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.5);
    width: var(--betslip-width);
  }

  #betslip-panel.open {
    right: 0;
  }

  .betslip-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 149;
  }

  .betslip-overlay.show { display: block; }
}

@media (min-width: 1440px) {
  #betslip-panel {
    position: relative;
    right: auto;
  }
}

/* ─── Mobile Header (compact) — merged into 768px breakpoint above ───
   Removed duplicate 767px queries — all mobile styles now in the 768px block */
