/* ═══════════════════════════════════════════════════════════════════
   CRIX Cricket Live — Premium Dark Design System
   Mobile-first · HTMX-powered · Feature-complete
   ═══════════════════════════════════════════════════════════════════ */

/* ─── 1. Design Tokens ─── */
:root {
  /* Core palette */
  --bg: #0D1117;
  --surface: #161B22;
  --surface-2: #1C2333;
  --surface-3: #21262D;
  --border: #30363D;
  --border-light: #3D444D;

  /* Brand */
  --blue: #1A73E8;
  --blue-light: #58A6FF;
  --blue-dim: rgba(26, 115, 232, 0.12);
  --green: #40DFA3;
  --green-dim: rgba(64, 223, 163, 0.10);
  --red: #F85149;
  --red-dim: rgba(248, 81, 73, 0.10);

  /* Gold / Logo */
  --gold: #D4A84B;
  --gold-light: #F0D070;
  --gold-mid: #E0B858;
  --gold-dim: rgba(212, 168, 75, 0.15);

  /* Exchange / Betfair */
  --back: #72BBEF;
  --back-dim: rgba(114, 187, 239, 0.15);
  --back-deep: rgba(114, 187, 239, 0.25);
  --lay: #FAA9BA;
  --lay-dim: rgba(250, 169, 186, 0.15);
  --lay-deep: rgba(250, 169, 186, 0.25);
  --betfair-yellow: #FFB80C;

  /* Text */
  --text-primary: #E6EDF3;
  --text-secondary: #8B949E;
  --text-tertiary: #6E7681;

  /* Medals */
  --gold-medal: #FFD700;
  --silver-medal: #C0C0C0;
  --bronze-medal: #CD7F32;

  /* Fancy category colors */
  --cat-1: #58A6FF;
  --cat-2: #3FB950;
  --cat-3: #F0883E;
  --cat-4: #BC8CFF;
  --cat-5: #39D2C0;
  --cat-6: #56D4DD;
  --cat-7: #6E7FF3;
  --cat-8: #DAAA3F;

  /* Typography */
  --font-display: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', 'Fira Code', monospace;

  /* Type scale (1.25 ratio) */
  --text-xs: 0.688rem;
  --text-sm: 0.813rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;
  --text-4xl: 2.25rem;

  /* Spacing */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 20px;
  --sp-6: 24px;
  --sp-8: 32px;
  --sp-10: 40px;
  --sp-12: 48px;

  /* Radius */
  --radius-xs: 3px;
  --radius-sm: 5px;
  --radius: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.3), 0 1px 2px rgba(0,0,0,0.2);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.4);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.5);
  --shadow-xl: 0 16px 48px rgba(0,0,0,0.6);
  --shadow-glow-blue: 0 0 20px rgba(26, 115, 232, 0.3);
  --shadow-glow-gold: 0 0 20px rgba(212, 168, 75, 0.3);
  --shadow-glow-green: 0 0 16px rgba(64, 223, 163, 0.25);

  /* Transitions */
  --ease-out: cubic-bezier(0.0, 0.0, 0.2, 1);
  --ease-in: cubic-bezier(0.4, 0.0, 1, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --t-fast: 0.15s;
  --t-normal: 0.25s;
  --t-slow: 0.4s;
}

/* ─── 2. Reset + Base ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 14px; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text-primary);
  line-height: 1.55;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  padding-bottom: 64px;
}
a { color: var(--blue-light); text-decoration: none; transition: color var(--t-fast); }
a:hover { color: #79b8ff; }
ul, ol { list-style: none; }
img { max-width: 100%; height: auto; display: block; }
button, input, select, textarea { font: inherit; color: inherit; border: none; outline: none; background: none; }
button { cursor: pointer; }
h1, h2, h3, h4, h5 { font-family: var(--font-display); font-weight: 700; line-height: 1.2; }

/* ─── 3. Layout ─── */
.main { max-width: 1200px; margin: 0 auto; padding: var(--sp-4); }
.page-title {
  font-family: var(--font-display);
  font-size: var(--text-2xl); font-weight: 800;
  margin-bottom: var(--sp-5);
  letter-spacing: -0.3px;
}

/* ─── 4. CRIX Logo ─── */
.logo {
  display: inline-flex; align-items: center;
  position: relative; text-decoration: none;
  flex-shrink: 0;
}
.logo-text {
  font-family: var(--font-display);
  font-size: 26px; font-weight: 900; font-style: italic;
  letter-spacing: -0.8px;
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-mid) 40%, var(--gold-light) 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  position: relative; z-index: 1;
  filter: drop-shadow(1px 2px 2px rgba(0,0,0,0.5));
}
.logo-swoosh {
  position: absolute; bottom: 2px; left: 2px; right: -2px;
  height: 10px; z-index: 0; overflow: visible;
}
.logo-swoosh path {
  fill: url(#swoosh-gradient);
  opacity: 0.85;
}
.logo:hover .logo-text { filter: drop-shadow(1px 2px 4px rgba(212,168,75,0.4)); }
.logo::after {
  content: ''; position: absolute; inset: -2px;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.15) 50%, transparent 100%);
  background-size: 200% 100%;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: logoShimmer 3s linear infinite;
  pointer-events: none; z-index: 2;
  font-family: var(--font-display);
  font-size: 26px; font-weight: 900; font-style: italic;
  letter-spacing: -0.8px;
}

@keyframes logoShimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ─── 5. Header ─── */
.header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(22, 27, 34, 0.92);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; align-items: center;
  height: 54px; padding: 0 var(--sp-4); gap: var(--sp-4);
}

.nav-desktop { display: none; align-items: center; gap: var(--sp-1); margin-left: var(--sp-4); }
.nav-link {
  padding: 6px 14px; border-radius: var(--radius-sm);
  color: var(--text-secondary); font-size: var(--text-sm); font-weight: 500;
  transition: color var(--t-fast), background var(--t-fast);
  white-space: nowrap; font-family: var(--font-display);
}
.nav-link:hover { color: var(--text-primary); background: rgba(255,255,255,0.04); }
.nav-link.active { color: var(--blue-light); background: var(--blue-dim); }

.header-right {
  display: flex; align-items: center; gap: 10px;
  margin-left: auto; flex-shrink: 0;
}
.search-wrap { position: relative; }
.search-input {
  width: 140px; height: 34px; padding: 0 12px 0 32px;
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius-full); color: var(--text-primary);
  font-size: var(--text-sm); transition: border-color var(--t-fast), width var(--t-normal);
}
.search-wrap::before {
  content: ''; position: absolute; left: 10px; top: 50%; transform: translateY(-50%);
  width: 14px; height: 14px; z-index: 1; pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238B949E' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.3-4.3'/%3E%3C/svg%3E") no-repeat center/contain;
}
.search-input::placeholder { color: var(--text-tertiary); }
.search-input:focus { border-color: var(--blue); width: 200px; }
.search-results {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); max-height: 360px;
  overflow-y: auto; z-index: 200; display: none;
  box-shadow: var(--shadow-lg);
}
.search-results.open { display: block; }
.search-results a {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; color: var(--text-primary);
  font-size: var(--text-sm); border-bottom: 1px solid var(--border);
  transition: background var(--t-fast);
}
.search-results a:last-child { border-bottom: none; }
.search-results a:hover { background: var(--surface-2); }

.header-login {
  height: 34px; padding: 0 16px;
  background: var(--blue); color: #fff;
  font-size: var(--text-sm); font-weight: 600;
  border-radius: var(--radius-full);
  transition: all var(--t-fast); white-space: nowrap;
  font-family: var(--font-display);
}
.header-login:hover { background: #2b82f0; box-shadow: var(--shadow-glow-blue); }
.header-wallet {
  height: 34px; padding: 0 14px;
  display: inline-flex; align-items: center; gap: 4px;
  background: var(--green-dim); color: var(--green);
  font-size: var(--text-sm); font-weight: 700;
  border-radius: var(--radius-full); white-space: nowrap;
  font-family: var(--font-mono);
  transition: background var(--t-fast);
}
.header-wallet::before {
  content: '₹'; font-weight: 400; opacity: 0.7;
}
.header-wallet:hover { background: rgba(64, 223, 163, 0.18); color: var(--green); }
.header-user {
  color: var(--text-primary); font-size: var(--text-sm);
  font-weight: 500; white-space: nowrap;
}
.header-logout {
  display: flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: var(--radius-sm);
  color: var(--text-secondary); transition: all var(--t-fast);
}
.header-logout:hover { background: rgba(255,255,255,0.06); color: var(--red); }

@media (min-width: 769px) {
  body { padding-bottom: 0; }
  .nav-desktop { display: flex; }
  .search-input { width: 180px; }
  .search-input:focus { width: 260px; }
}

/* ─── 6. Mobile Bottom Nav ─── */
.nav-mobile {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-around;
  height: 58px; background: rgba(22, 27, 34, 0.95);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--border);
  padding-bottom: env(safe-area-inset-bottom, 0);
}
.nav-mob-item {
  display: flex; flex-direction: column; align-items: center;
  gap: 3px; color: var(--text-tertiary); text-decoration: none;
  padding: 6px 0; min-width: 52px; transition: color var(--t-fast);
  position: relative;
}
.nav-mob-item svg { width: 22px; height: 22px; }
.nav-mob-item span { font-size: 10px; font-weight: 600; letter-spacing: 0.2px; }
.nav-mob-item.active { color: var(--blue-light); }
.nav-mob-item.active::before {
  content: ''; position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 20px; height: 2px; background: var(--blue); border-radius: 0 0 2px 2px;
}
@media (min-width: 769px) { .nav-mobile { display: none; } }

/* ─── 7. More Sheet ─── */
.more-sheet { position: fixed; inset: 0; z-index: 150; display: none; }
.more-sheet.open { display: block; }
.more-sheet-bg { position: absolute; inset: 0; background: rgba(0,0,0,0.6); }
.more-sheet-content {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: var(--surface);
  border-top-left-radius: var(--radius-xl); border-top-right-radius: var(--radius-xl);
  padding: var(--sp-4) 0 calc(var(--sp-8) + env(safe-area-inset-bottom, 0));
  max-height: 60vh; overflow-y: auto;
  box-shadow: var(--shadow-xl);
}
.more-sheet-content::before {
  content: ''; display: block; width: 36px; height: 4px;
  background: var(--border-light); border-radius: 2px;
  margin: 0 auto var(--sp-4);
}
.more-item {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 20px; color: var(--text-primary);
  font-size: var(--text-base); font-weight: 500; text-decoration: none;
  transition: background var(--t-fast);
}
.more-item:hover { background: var(--surface-2); }

/* ─── 8. Footer ─── */
.footer {
  border-top: 1px solid var(--border);
  padding: var(--sp-8) var(--sp-4); margin-top: var(--sp-12);
  background: var(--surface);
}
.footer-inner {
  max-width: 1200px; margin: 0 auto;
  display: grid; grid-template-columns: 1fr; gap: var(--sp-6);
}
.footer-col h4 {
  font-family: var(--font-display);
  color: var(--text-primary); font-size: var(--text-xs); font-weight: 700;
  text-transform: uppercase; letter-spacing: 1px; margin-bottom: var(--sp-3);
}
.footer-col a {
  display: block; color: var(--text-secondary);
  font-size: var(--text-sm); padding: 4px 0; transition: color var(--t-fast);
}
.footer-col a:hover { color: var(--text-primary); }
.footer-text { color: var(--text-tertiary); font-size: var(--text-xs); line-height: 1.6; }
.footer-bottom {
  max-width: 1200px; margin: var(--sp-6) auto 0;
  padding-top: var(--sp-4); border-top: 1px solid var(--border);
  color: var(--text-tertiary); font-size: var(--text-xs); text-align: center;
}
@media (min-width: 769px) {
  .footer-inner { grid-template-columns: repeat(4, 1fr); }
}

/* ─── 9. Section Headers ─── */
.section-hdr {
  display: flex; align-items: center;
  justify-content: space-between; margin: var(--sp-8) 0 var(--sp-3);
}
.section-hdr h2 {
  font-family: var(--font-display);
  font-size: var(--text-lg); font-weight: 800;
  letter-spacing: -0.2px;
}
.view-all {
  font-size: var(--text-sm); font-weight: 600; color: var(--blue-light);
  transition: color var(--t-fast);
}
.view-all:hover { color: #79b8ff; }

/* ─── 10. Ticker ─── */
.ticker {
  display: flex; gap: 8px; overflow-x: auto;
  padding: var(--sp-3) 0; -webkit-overflow-scrolling: touch;
  scrollbar-width: none; mask-image: linear-gradient(90deg, transparent, #000 2%, #000 98%, transparent);
}
.ticker::-webkit-scrollbar { display: none; }
.ticker-item {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius);
  color: var(--text-primary); font-size: var(--text-xs); font-weight: 600;
  white-space: nowrap; text-decoration: none; flex-shrink: 0;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.ticker-item:hover { border-color: var(--blue); box-shadow: var(--shadow-glow-blue); color: var(--text-primary); }
.ticker-teams { font-size: var(--text-xs); font-weight: 700; }

/* ─── 11. Cards ─── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: border-color var(--t-normal), box-shadow var(--t-normal), transform var(--t-normal);
}
.card:hover {
  border-color: var(--border-light);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

/* ─── 12. Match Grid + Match Card ─── */
.match-grid { display: grid; grid-template-columns: 1fr; gap: var(--sp-3); }
.match-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--sp-4);
  text-decoration: none; color: var(--text-primary);
  display: block;
  transition: border-color var(--t-normal), box-shadow var(--t-normal), transform var(--t-normal);
  position: relative; overflow: hidden;
}
.match-card:hover {
  border-color: var(--border-light);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
  color: var(--text-primary);
}
.match-card.live { border-left: 3px solid var(--red); }
.match-card.live::before {
  content: ''; position: absolute; top: 0; left: 0; bottom: 0; width: 3px;
  background: var(--red);
  animation: livePulse 2s ease-in-out infinite;
}
@keyframes livePulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 6px var(--red); }
  50% { opacity: 0.5; box-shadow: 0 0 12px var(--red); }
}

.mc-top {
  display: flex; align-items: center;
  justify-content: space-between; margin-bottom: 10px; gap: 8px;
}
.mc-series {
  font-size: var(--text-xs); color: var(--text-secondary); font-weight: 500;
  overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; max-width: 65%;
}
.mc-time { font-size: var(--text-xs); color: var(--text-tertiary); font-weight: 500; }
.mc-team {
  display: flex; align-items: center; gap: 10px; padding: 5px 0;
}
.mc-logo {
  width: 24px; height: 24px; border-radius: 50%;
  object-fit: cover; flex-shrink: 0;
  background: var(--bg); border: 1px solid var(--border);
}
.mc-name {
  flex: 1; font-size: var(--text-sm); font-weight: 600;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.mc-score {
  font-size: var(--text-sm); font-weight: 800;
  text-align: right; white-space: nowrap; flex-shrink: 0;
  font-family: var(--font-display);
  letter-spacing: -0.3px;
}
.mc-overs {
  font-size: var(--text-xs); color: var(--text-tertiary);
  margin-left: 4px; font-weight: 500;
}
.mc-toss {
  font-size: var(--text-xs); color: var(--text-tertiary);
  padding: 2px 0; font-style: italic;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.mc-status {
  font-size: var(--text-xs); color: var(--green); font-weight: 600;
  padding: 4px 0 2px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.mc-odds {
  display: flex; gap: 6px; margin-top: 10px;
  padding-top: 10px; border-top: 1px solid var(--border);
  overflow-x: auto; scrollbar-width: none;
}
.mc-odds::-webkit-scrollbar { display: none; }

.odds-pill {
  padding: 5px 12px; border-radius: var(--radius-sm);
  font-size: var(--text-xs); font-weight: 700; white-space: nowrap;
  cursor: pointer; border: none;
  transition: all var(--t-fast); flex-shrink: 0;
  font-family: var(--font-mono);
}
.odds-pill:hover { transform: scale(1.05); }
.odds-pill.back { background: var(--back-dim); color: var(--back); }
.odds-pill.back:hover { background: var(--back-deep); }
.odds-pill.lay { background: var(--lay-dim); color: var(--lay); }
.odds-pill.lay:hover { background: var(--lay-deep); }

@media (min-width: 769px) {
  .match-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ─── 13. Badges ─── */
.live-badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 10px; font-weight: 800;
  text-transform: uppercase; letter-spacing: 0.5px;
  padding: 3px 8px; background: var(--red); color: #fff;
  border-radius: var(--radius-sm); line-height: 1;
  font-family: var(--font-display);
}
.live-badge::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
  background: #fff; animation: liveDot 1.5s ease-in-out infinite;
}
@keyframes liveDot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}
.format-badge {
  display: inline-block; font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.4px;
  padding: 3px 8px; background: rgba(255,255,255,0.06);
  color: var(--text-secondary); border-radius: var(--radius-sm); line-height: 1;
}
.status-badge {
  display: inline-block; font-size: 10px; font-weight: 700;
  padding: 3px 8px; border-radius: var(--radius-sm); line-height: 1;
  text-transform: uppercase; letter-spacing: 0.3px;
}
.status-badge.won { background: var(--green-dim); color: var(--green); }
.status-badge.lost { background: var(--red-dim); color: var(--red); }
.status-badge.open { background: var(--blue-dim); color: var(--blue-light); }
.status-badge.void { background: rgba(255,255,255,0.06); color: var(--text-secondary); }

/* ─── 14. Tabs ─── */
.tabs {
  display: flex; gap: 0;
  border-bottom: 1px solid var(--border);
  overflow-x: auto; scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  position: relative;
}
.tabs::-webkit-scrollbar { display: none; }
.tabs::after {
  content: ''; position: sticky; right: 0; top: 0; bottom: 0;
  width: 24px; flex-shrink: 0;
  background: linear-gradient(90deg, transparent, var(--bg));
  pointer-events: none;
}
.tab {
  padding: 12px 16px; font-size: var(--text-sm); font-weight: 600;
  color: var(--text-secondary); background: none; border: none;
  border-bottom: 2px solid transparent; cursor: pointer;
  white-space: nowrap; transition: color var(--t-fast), border-color var(--t-fast);
  flex-shrink: 0; font-family: var(--font-display);
}
.tab:hover { color: var(--text-primary); }
.tab.active { color: var(--blue-light); border-bottom-color: var(--blue); }
.sub-tabs {
  border-bottom: none; gap: 6px; padding: var(--sp-3) 0;
}
.sub-tabs .tab {
  padding: 6px 14px; border-bottom: none;
  background: rgba(255,255,255,0.04);
  border-radius: var(--radius-full); font-size: var(--text-xs);
}
.sub-tabs .tab.active {
  background: var(--blue-dim); color: var(--blue-light);
}
.sub-tabs .tab:hover { background: rgba(255,255,255,0.08); }

/* Tab content loading */
.tab-loading {
  display: flex; align-items: center; justify-content: center;
  min-height: 200px; color: var(--text-tertiary);
}

/* ─── 15. Skeleton Loaders ─── */
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
.skeleton {
  background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface-3) 50%, var(--surface-2) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
  border-radius: var(--radius-sm);
}
.skeleton-text { height: 14px; margin-bottom: 8px; border-radius: 4px; }
.skeleton-text:last-child { width: 60%; }
.skeleton-card {
  height: 120px; border-radius: var(--radius-lg); margin-bottom: var(--sp-3);
}
.skeleton-circle { border-radius: 50%; }

/* ─── 16. Ball Chips ─── */
.ball-chip {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; border-radius: 50%;
  font-size: 11px; font-weight: 800;
  font-family: var(--font-mono);
  flex-shrink: 0;
  transition: transform var(--t-fast);
}
.ball-chip:hover { transform: scale(1.15); }
.b-0 { background: var(--surface-3); color: var(--text-secondary); }
.b-1, .b-2, .b-3 { background: var(--surface-3); color: var(--text-primary); }
.b-4 { background: rgba(64, 223, 163, 0.2); color: var(--green); border: 1px solid rgba(64, 223, 163, 0.3); }
.b-6 { background: rgba(88, 166, 255, 0.2); color: var(--blue-light); border: 1px solid rgba(88, 166, 255, 0.3); }
.b-w { background: rgba(248, 81, 73, 0.2); color: var(--red); border: 1px solid rgba(248, 81, 73, 0.3); }
.b-wd, .b-nb, .b-lb, .b-b { background: rgba(255, 184, 12, 0.15); color: var(--betfair-yellow); }

/* ─── 17. Big Ball Indicator ─── */
.big-ball {
  width: 80px; height: 80px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; font-weight: 900;
  font-family: var(--font-display);
  margin: var(--sp-4) auto;
  position: relative;
  transition: all 0.3s var(--ease-spring);
}
.big-ball.result-0 { background: var(--surface-3); color: var(--text-secondary); border: 2px solid var(--border); }
.big-ball.result-1, .big-ball.result-2, .big-ball.result-3 { background: var(--surface-3); color: var(--text-primary); border: 2px solid var(--border-light); }
.big-ball.result-4 { background: rgba(64,223,163,0.15); color: var(--green); border: 2px solid rgba(64,223,163,0.4); box-shadow: var(--shadow-glow-green); }
.big-ball.result-6 { background: rgba(88,166,255,0.15); color: var(--blue-light); border: 2px solid rgba(88,166,255,0.4); box-shadow: var(--shadow-glow-blue); }
.big-ball.result-w { background: rgba(248,81,73,0.15); color: var(--red); border: 2px solid rgba(248,81,73,0.4); box-shadow: 0 0 20px rgba(248,81,73,0.3); }
.big-ball.pulse { animation: ballPulse 0.6s var(--ease-spring); }
@keyframes ballPulse {
  0% { transform: scale(0.8); }
  50% { transform: scale(1.15); }
  100% { transform: scale(1); }
}

/* ─── 18. Live Tab Components ─── */
.live-overs {
  display: flex; gap: 5px; flex-wrap: wrap;
  justify-content: center; padding: var(--sp-2) 0;
}
.batsman-card, .bowler-card {
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: var(--sp-3);
}
.batsman-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-3); margin: var(--sp-3) 0; }
.player-name { font-size: var(--text-sm); font-weight: 700; margin-bottom: var(--sp-1); }
.player-name.on-strike { color: var(--gold-light); }
.player-stat-row {
  display: flex; gap: var(--sp-3); font-size: var(--text-xs); color: var(--text-secondary);
}
.player-stat { display: flex; flex-direction: column; align-items: center; }
.player-stat-val {
  font-size: var(--text-base); font-weight: 800; color: var(--text-primary);
  font-family: var(--font-display);
}
.player-stat-label { font-size: 9px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-tertiary); }

.live-stats-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--sp-2);
  margin: var(--sp-3) 0;
}
.live-stat-item {
  background: var(--surface-2); border-radius: var(--radius-sm);
  padding: var(--sp-2) var(--sp-3); text-align: center;
}
.live-stat-label { font-size: var(--text-xs); color: var(--text-tertiary); font-weight: 500; }
.live-stat-val {
  font-size: var(--text-base); font-weight: 800; color: var(--text-primary);
  font-family: var(--font-display);
}

.need-bar {
  background: linear-gradient(135deg, var(--blue-dim), var(--surface-2));
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: var(--sp-3) var(--sp-4);
  text-align: center; font-size: var(--text-sm); font-weight: 600;
  margin: var(--sp-3) 0;
}
.need-bar strong { color: var(--gold-light); font-weight: 800; }

/* Win Probability Bar */
.win-prob-wrap { margin: var(--sp-3) 0; }
.win-prob-bar {
  display: flex; height: 28px; border-radius: var(--radius-full);
  overflow: hidden; background: var(--surface-3);
}
.win-prob-fill {
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 800; color: #fff;
  transition: width 0.5s var(--ease-out);
  font-family: var(--font-display);
}
.win-prob-fill.team-a { background: var(--blue); }
.win-prob-fill.team-b { background: var(--red); }
.win-prob-labels {
  display: flex; justify-content: space-between;
  font-size: var(--text-xs); color: var(--text-secondary);
  margin-top: var(--sp-1); font-weight: 600;
}

/* Status banners */
.status-banner {
  background: var(--gold-dim); border: 1px solid rgba(212,168,75,0.3);
  border-radius: var(--radius); padding: var(--sp-3) var(--sp-4);
  text-align: center; font-size: var(--text-sm); font-weight: 600;
  color: var(--gold-light); margin: var(--sp-3) 0;
}

/* ─── 19. Scorecard ─── */
.scorecard-innings { margin-bottom: var(--sp-6); }
.innings-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--sp-3) var(--sp-4);
  background: var(--surface-2); border-radius: var(--radius) var(--radius) 0 0;
  font-weight: 700; font-size: var(--text-sm);
  font-family: var(--font-display);
}
.innings-total { color: var(--blue-light); font-family: var(--font-mono); }

.sc-table { width: 100%; border-collapse: collapse; font-size: var(--text-xs); }
.sc-table th {
  padding: 8px 6px; text-align: right; color: var(--text-tertiary);
  font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border); font-size: 10px;
  background: var(--surface);
}
.sc-table th:first-child { text-align: left; padding-left: var(--sp-4); }
.sc-table td {
  padding: 8px 6px; text-align: right; color: var(--text-primary);
  border-bottom: 1px solid var(--border); font-family: var(--font-mono);
}
.sc-table td:first-child {
  text-align: left; padding-left: var(--sp-4);
  font-family: var(--font-body); font-weight: 600;
  color: var(--text-primary);
}
.sc-table tr:hover td { background: rgba(255,255,255,0.02); }
.sc-dismissal { color: var(--text-tertiary); font-style: italic; font-family: var(--font-body); font-weight: 400; }
.sc-extras, .sc-fow {
  padding: var(--sp-2) var(--sp-4);
  font-size: var(--text-xs); color: var(--text-secondary);
  border-bottom: 1px solid var(--border);
}
.sc-batting { color: var(--green); }

/* ─── 20. Commentary ─── */
.commo-entry {
  display: flex; gap: var(--sp-3); padding: var(--sp-3) 0;
  border-bottom: 1px solid var(--border);
  align-items: flex-start;
}
.commo-over-label {
  font-size: var(--text-xs); font-weight: 800; color: var(--text-tertiary);
  min-width: 36px; text-align: center;
  font-family: var(--font-mono);
  padding-top: 2px;
}
.commo-text { font-size: var(--text-sm); color: var(--text-secondary); line-height: 1.5; flex: 1; }
.commo-text strong { color: var(--text-primary); }
.commo-over-sep {
  padding: var(--sp-2) var(--sp-3);
  background: var(--surface-2); border-radius: var(--radius-sm);
  margin: var(--sp-2) 0;
  display: flex; align-items: center; justify-content: space-between;
  font-size: var(--text-xs); font-weight: 700;
  color: var(--text-secondary);
}
.commo-over-runs { color: var(--text-primary); font-family: var(--font-mono); }

/* ─── 21. Playing XI ─── */
.xi-grid { display: grid; grid-template-columns: 1fr; gap: var(--sp-4); }
@media (min-width: 769px) { .xi-grid { grid-template-columns: 1fr 1fr; } }
.xi-team { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
.xi-team-header {
  padding: var(--sp-3) var(--sp-4);
  background: var(--surface-2);
  font-weight: 800; font-size: var(--text-sm);
  font-family: var(--font-display);
  display: flex; align-items: center; gap: 8px;
}
.xi-player {
  display: flex; align-items: center; gap: var(--sp-3);
  padding: var(--sp-2) var(--sp-4);
  border-bottom: 1px solid var(--border);
  font-size: var(--text-sm); transition: background var(--t-fast);
}
.xi-player:hover { background: var(--surface-2); }
.xi-player:last-child { border-bottom: none; }
.xi-player-name { flex: 1; font-weight: 500; }
.role-badge {
  display: inline-block; font-size: 9px; font-weight: 800;
  padding: 2px 6px; border-radius: var(--radius-xs);
  text-transform: uppercase; letter-spacing: 0.3px;
}
.role-badge.bat { background: var(--blue-dim); color: var(--blue-light); }
.role-badge.bowl { background: var(--green-dim); color: var(--green); }
.role-badge.ar { background: rgba(188,140,255,0.15); color: #BC8CFF; }
.role-badge.wk { background: var(--gold-dim); color: var(--gold-light); }
.captain-badge {
  display: inline-flex; align-items: center; justify-content: center;
  width: 20px; height: 20px; border-radius: 50%;
  font-size: 10px; font-weight: 900;
  background: var(--gold-dim); color: var(--gold);
  border: 1px solid rgba(212,168,75,0.3);
}

/* ─── 22. AI Predictions ─── */
.pred-section { margin: var(--sp-4) 0; }
.pred-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: var(--sp-4);
  margin-bottom: var(--sp-3);
}
.pred-card h3 {
  font-size: var(--text-sm); font-weight: 700; margin-bottom: var(--sp-3);
  color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.5px;
}
.pred-gauge {
  display: flex; align-items: center; gap: var(--sp-4);
  margin-bottom: var(--sp-3);
}
.pred-gauge-bar {
  flex: 1; height: 8px; border-radius: var(--radius-full);
  background: var(--surface-3); overflow: hidden;
}
.pred-gauge-fill {
  height: 100%; border-radius: var(--radius-full);
  transition: width 0.5s var(--ease-out);
}
.pred-gauge-fill.team-a { background: linear-gradient(90deg, var(--blue), var(--blue-light)); }
.pred-gauge-fill.team-b { background: linear-gradient(90deg, var(--red), #ff7b72); }
.pred-pct {
  font-size: var(--text-2xl); font-weight: 900;
  font-family: var(--font-display);
  min-width: 60px; text-align: center;
}
.pred-team-name { font-size: var(--text-xs); color: var(--text-secondary); font-weight: 600; }

.score-range-bar {
  display: flex; align-items: center; gap: var(--sp-2);
  padding: var(--sp-3);
  background: var(--surface-2); border-radius: var(--radius);
  font-size: var(--text-sm);
}
.score-range-track {
  flex: 1; height: 6px; border-radius: 3px;
  background: var(--surface-3); position: relative;
}
.score-range-fill {
  position: absolute; height: 100%; border-radius: 3px;
  background: linear-gradient(90deg, var(--blue), var(--green));
}
.score-range-marker {
  position: absolute; top: -5px; width: 3px; height: 16px;
  background: var(--gold); border-radius: 1px;
  transform: translateX(-50%);
}
.score-range-val { font-weight: 800; font-family: var(--font-mono); min-width: 32px; text-align: center; }

/* ─── 23. Expert Tips ─── */
.expert-card {
  display: flex; gap: var(--sp-3);
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: var(--sp-4);
  margin-bottom: var(--sp-3);
  transition: border-color var(--t-fast);
}
.expert-card:hover { border-color: var(--border-light); }
.expert-avatar {
  width: 44px; height: 44px; border-radius: 50%;
  object-fit: cover; flex-shrink: 0;
  border: 2px solid var(--border);
}
.expert-info { flex: 1; min-width: 0; }
.expert-name { font-size: var(--text-sm); font-weight: 700; margin-bottom: 2px; }
.expert-tip {
  font-size: var(--text-sm); color: var(--text-secondary);
  line-height: 1.5; margin-top: var(--sp-2);
}
.streak-badge {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: 10px; font-weight: 800; padding: 2px 8px;
  border-radius: var(--radius-full);
}
.streak-badge.positive { background: var(--green-dim); color: var(--green); }
.streak-badge.negative { background: var(--red-dim); color: var(--red); }
.accuracy-bar {
  display: flex; align-items: center; gap: var(--sp-2);
  margin-top: var(--sp-2);
}
.accuracy-track {
  flex: 1; height: 4px; border-radius: 2px;
  background: var(--surface-3); max-width: 80px;
}
.accuracy-fill {
  height: 100%; border-radius: 2px;
  background: var(--green);
}
.accuracy-pct { font-size: var(--text-xs); color: var(--text-secondary); font-weight: 700; }

/* ─── 24. Fancy Markets ─── */
.fancy-cats {
  display: flex; gap: 6px; overflow-x: auto;
  padding: var(--sp-3) 0; scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.fancy-cats::-webkit-scrollbar { display: none; }
.fancy-cat-chip {
  padding: 6px 14px; border-radius: var(--radius-full);
  font-size: var(--text-xs); font-weight: 700;
  white-space: nowrap; cursor: pointer; border: none;
  transition: all var(--t-fast); flex-shrink: 0;
  background: rgba(255,255,255,0.06); color: var(--text-secondary);
}
.fancy-cat-chip.active, .fancy-cat-chip:hover {
  color: #fff;
}
.fancy-cat-chip[data-cat="all"].active { background: var(--blue); }
.fancy-cat-chip[data-cat="over"].active { background: var(--cat-1); }
.fancy-cat-chip[data-cat="total"].active { background: var(--cat-2); }
.fancy-cat-chip[data-cat="wickets"].active { background: var(--cat-3); }
.fancy-cat-chip[data-cat="boundaries"].active { background: var(--cat-4); }
.fancy-cat-chip[data-cat="player"].active { background: var(--cat-5); }
.fancy-cat-chip[data-cat="lambi"].active { background: var(--cat-6); }
.fancy-cat-chip[data-cat="extras"].active { background: var(--cat-7); }
.fancy-cat-chip[data-cat="other"].active { background: var(--cat-8); }

.fancy-card {
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--sp-3) var(--sp-4);
  border-bottom: 1px solid var(--border);
  transition: background var(--t-fast);
}
.fancy-card:hover { background: var(--surface-2); }
.fancy-name { font-size: var(--text-sm); font-weight: 600; flex: 1; min-width: 0; }
.fancy-prices { display: flex; gap: 6px; flex-shrink: 0; }
.fancy-yes, .fancy-no {
  padding: 6px 14px; border-radius: var(--radius-sm);
  font-size: var(--text-xs); font-weight: 700;
  cursor: pointer; border: none;
  font-family: var(--font-mono);
  transition: all var(--t-fast); min-width: 60px; text-align: center;
}
.fancy-yes { background: var(--back-dim); color: var(--back); }
.fancy-yes:hover { background: var(--back-deep); }
.fancy-no { background: var(--lay-dim); color: var(--lay); }
.fancy-no:hover { background: var(--lay-deep); }

/* ─── 25. Odds Table (Exchange) ─── */
.odds-table { width: 100%; border-collapse: collapse; }
.odds-table-header {
  display: grid; grid-template-columns: 1fr repeat(6, 60px);
  padding: var(--sp-2) 0;
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.5px; color: var(--text-tertiary);
}
.odds-table-header .back-label { grid-column: 2 / 5; text-align: center; color: var(--back); }
.odds-table-header .lay-label { grid-column: 5 / 8; text-align: center; color: var(--lay); }

.odds-row {
  display: grid; grid-template-columns: 1fr repeat(6, 60px);
  align-items: center;
  border-bottom: 1px solid var(--border);
  padding: 2px 0;
}
.odds-runner { font-size: var(--text-sm); font-weight: 700; padding: 0 var(--sp-3); }
.odds-cell {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center;
  padding: 6px 4px; margin: 2px;
  border-radius: var(--radius-xs);
  cursor: pointer; transition: all var(--t-fast);
  min-height: 40px;
}
.odds-cell:hover { transform: scale(1.05); }
.odds-cell.back-1 { background: var(--back-deep); }
.odds-cell.back-2 { background: var(--back-dim); }
.odds-cell.back-3 { background: rgba(114, 187, 239, 0.08); }
.odds-cell.lay-1 { background: var(--lay-deep); }
.odds-cell.lay-2 { background: var(--lay-dim); }
.odds-cell.lay-3 { background: rgba(250, 169, 186, 0.08); }
.odds-price {
  font-size: var(--text-sm); font-weight: 800;
  font-family: var(--font-mono);
}
.odds-size {
  font-size: 9px; color: var(--text-tertiary); font-weight: 500;
}
.odds-cell.suspended {
  opacity: 0.3; cursor: not-allowed;
}

/* Odds flash animations */
.odds-flash-up { animation: flashUp 0.6s ease-out; }
.odds-flash-down { animation: flashDown 0.6s ease-out; }
@keyframes flashUp {
  0% { background-color: rgba(64, 223, 163, 0.3); }
  100% { background-color: transparent; }
}
@keyframes flashDown {
  0% { background-color: rgba(248, 81, 73, 0.3); }
  100% { background-color: transparent; }
}

.odds-direction {
  display: inline-flex; font-size: 10px; font-weight: 900;
}
.odds-direction.up { color: var(--green); }
.odds-direction.down { color: var(--red); }

/* Responsive odds table */
@media (max-width: 768px) {
  .odds-table-header { grid-template-columns: 1fr repeat(4, 56px); }
  .odds-row { grid-template-columns: 1fr repeat(4, 56px); }
  .odds-cell.back-3, .odds-cell.lay-3 { display: none; }
}

/* ─── 26. Graphs ─── */
.graph-wrap {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: var(--sp-4);
  margin-bottom: var(--sp-4);
}
.graph-title {
  font-size: var(--text-sm); font-weight: 700; margin-bottom: var(--sp-3);
  color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.5px;
  font-family: var(--font-display);
}
.graph-canvas { width: 100%; height: 200px; }
@media (min-width: 769px) { .graph-canvas { height: 280px; } }

/* ─── 27. Leaderboard ─── */
.lb-table { width: 100%; }
.lb-row {
  display: flex; align-items: center; gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  border-bottom: 1px solid var(--border);
  transition: background var(--t-fast);
}
.lb-row:hover { background: var(--surface-2); }
.lb-rank {
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: var(--text-sm); font-weight: 900;
  font-family: var(--font-display); flex-shrink: 0;
  background: var(--surface-3); color: var(--text-secondary);
}
.lb-row:nth-child(1) .lb-rank {
  background: linear-gradient(135deg, #FFD700, #FFA500);
  color: #1a1a1a; box-shadow: 0 0 12px rgba(255,215,0,0.3);
}
.lb-row:nth-child(2) .lb-rank {
  background: linear-gradient(135deg, #E0E0E0, #A0A0A0);
  color: #1a1a1a; box-shadow: 0 0 12px rgba(192,192,192,0.3);
}
.lb-row:nth-child(3) .lb-rank {
  background: linear-gradient(135deg, #CD7F32, #A0522D);
  color: #fff; box-shadow: 0 0 12px rgba(205,127,50,0.3);
}
.lb-user { flex: 1; font-size: var(--text-sm); font-weight: 600; }
.lb-stats { display: flex; gap: var(--sp-4); font-size: var(--text-xs); color: var(--text-secondary); }
.lb-pnl { font-weight: 800; font-family: var(--font-mono); }
.lb-pnl.positive { color: var(--green); }
.lb-pnl.negative { color: var(--red); }

/* ─── 28. Wallet ─── */
.wallet-hero {
  background: linear-gradient(135deg, var(--surface-2), var(--surface));
  border: 1px solid var(--border); border-radius: var(--radius-xl);
  padding: var(--sp-6);
  margin-bottom: var(--sp-6);
  position: relative; overflow: hidden;
}
.wallet-hero::before {
  content: ''; position: absolute; top: -50%; right: -20%;
  width: 200px; height: 200px; border-radius: 50%;
  background: radial-gradient(circle, rgba(64,223,163,0.08), transparent 70%);
  pointer-events: none;
}
.wallet-label { font-size: var(--text-xs); color: var(--text-tertiary); font-weight: 600; text-transform: uppercase; letter-spacing: 1px; }
.wallet-balance {
  font-size: var(--text-4xl); font-weight: 900;
  font-family: var(--font-display);
  color: var(--green);
  margin: var(--sp-2) 0;
  letter-spacing: -1px;
}
.wallet-balance::before { content: '₹'; font-size: var(--text-2xl); opacity: 0.6; margin-right: 2px; }
.wallet-details { display: flex; gap: var(--sp-6); margin-top: var(--sp-3); }
.wallet-detail { }
.wallet-detail-label { font-size: var(--text-xs); color: var(--text-tertiary); }
.wallet-detail-val {
  font-size: var(--text-lg); font-weight: 800;
  font-family: var(--font-mono); color: var(--text-primary);
}
.wallet-actions {
  display: flex; gap: var(--sp-3); margin-top: var(--sp-4);
}
.wallet-btn {
  flex: 1; height: 42px;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  font-size: var(--text-sm); font-weight: 700;
  border-radius: var(--radius); transition: all var(--t-fast);
  font-family: var(--font-display);
}
.wallet-btn.primary { background: var(--green); color: var(--bg); }
.wallet-btn.primary:hover { box-shadow: var(--shadow-glow-green); }
.wallet-btn.secondary { background: var(--surface-3); color: var(--text-primary); border: 1px solid var(--border); }
.wallet-btn.secondary:hover { border-color: var(--border-light); }

/* Bet cards */
.bet-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: var(--sp-4);
  margin-bottom: var(--sp-3);
  transition: border-color var(--t-fast);
}
.bet-card:hover { border-color: var(--border-light); }
.bet-top {
  display: flex; align-items: center; gap: var(--sp-2);
  margin-bottom: var(--sp-2); flex-wrap: wrap;
}
.bet-type-badge {
  font-size: 10px; font-weight: 800;
  text-transform: uppercase; letter-spacing: 0.5px;
  padding: 3px 8px; border-radius: var(--radius-sm);
}
.bet-type-badge.back { background: var(--back-dim); color: var(--back); }
.bet-type-badge.lay { background: var(--lay-dim); color: var(--lay); }
.bet-type-badge.fancy_yes { background: var(--back-dim); color: var(--back); }
.bet-type-badge.fancy_no { background: var(--lay-dim); color: var(--lay); }
.bet-market { font-size: var(--text-xs); color: var(--text-secondary); font-weight: 500; }
.bet-status-badge {
  margin-left: auto;
  font-size: 10px; font-weight: 800; padding: 3px 8px;
  border-radius: var(--radius-sm); text-transform: uppercase;
}
.bet-card.won .bet-status-badge { background: var(--green-dim); color: var(--green); }
.bet-card.lost .bet-status-badge { background: var(--red-dim); color: var(--red); }
.bet-card.open .bet-status-badge { background: var(--blue-dim); color: var(--blue-light); }
.bet-card.void .bet-status-badge { background: rgba(255,255,255,0.06); color: var(--text-secondary); }
.bet-card.cashed_out .bet-status-badge { background: var(--gold-dim); color: var(--gold); }
.bet-selection { font-size: var(--text-base); font-weight: 700; margin-bottom: var(--sp-2); }
.bet-details-row {
  display: flex; gap: var(--sp-4);
  font-size: var(--text-xs); color: var(--text-secondary);
  font-family: var(--font-mono);
}
.bet-result { font-size: var(--text-sm); font-weight: 700; margin-top: var(--sp-2); }
.bet-card.won .bet-result { color: var(--green); }
.bet-card.lost .bet-result { color: var(--red); }
.bet-time { font-size: var(--text-xs); color: var(--text-tertiary); margin-top: var(--sp-2); }
.bet-cashout-btn {
  margin-top: var(--sp-3); padding: 8px 16px;
  background: var(--gold-dim); color: var(--gold);
  font-size: var(--text-xs); font-weight: 700;
  border-radius: var(--radius-sm); border: 1px solid rgba(212,168,75,0.3);
  cursor: pointer; transition: all var(--t-fast);
  font-family: var(--font-display);
}
.bet-cashout-btn:hover { background: rgba(212,168,75,0.25); box-shadow: var(--shadow-glow-gold); }

/* ─── 29. Deposit Flow ─── */
.deposit-steps { max-width: 480px; margin: 0 auto; }
.deposit-step {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-xl); padding: var(--sp-6);
  text-align: center;
}
.deposit-step h2 {
  font-family: var(--font-display); font-size: var(--text-xl);
  margin-bottom: var(--sp-4);
}
.amount-presets { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-3); margin-bottom: var(--sp-4); }
.amount-btn {
  padding: var(--sp-3); background: var(--surface-2);
  border: 1px solid var(--border); border-radius: var(--radius);
  font-size: var(--text-lg); font-weight: 800;
  font-family: var(--font-mono); color: var(--text-primary);
  cursor: pointer; transition: all var(--t-fast);
}
.amount-btn:hover { border-color: var(--green); color: var(--green); }
.amount-btn.selected { border-color: var(--green); background: var(--green-dim); color: var(--green); }
.qr-wrap {
  background: #fff; border-radius: var(--radius-lg);
  padding: var(--sp-4); display: inline-block;
  margin: var(--sp-4) 0;
}
.qr-wrap img { width: 200px; height: 200px; }
.upi-id-copy {
  display: flex; align-items: center; justify-content: center; gap: var(--sp-2);
  background: var(--surface-2); border-radius: var(--radius);
  padding: var(--sp-3); margin: var(--sp-3) 0;
  font-family: var(--font-mono); font-size: var(--text-sm);
  cursor: pointer; transition: background var(--t-fast);
}
.upi-id-copy:hover { background: var(--surface-3); }

/* ─── 30. Info Grid (Match Detail) ─── */
.info-grid { display: grid; grid-template-columns: 1fr; gap: var(--sp-3); }
.info-item {
  display: flex; align-items: flex-start; gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius);
}
.info-icon {
  width: 32px; height: 32px; border-radius: var(--radius-sm);
  background: var(--surface-2);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; color: var(--text-secondary);
}
.info-icon svg { width: 16px; height: 16px; }
.info-label { font-size: var(--text-xs); color: var(--text-tertiary); font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }
.info-value { font-size: var(--text-sm); font-weight: 600; margin-top: 1px; }
@media (min-width: 769px) { .info-grid { grid-template-columns: 1fr 1fr; } }

/* ─── 31. Rankings ─── */
.rankings-table { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
.rankings-header {
  display: flex; padding: var(--sp-3) var(--sp-4);
  background: var(--surface-2);
  font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.5px;
  color: var(--text-tertiary);
}
.rankings-row {
  display: flex; align-items: center;
  padding: var(--sp-3) var(--sp-4);
  border-bottom: 1px solid var(--border);
  transition: background var(--t-fast);
}
.rankings-row:last-child { border-bottom: none; }
.rankings-row:hover { background: var(--surface-2); }
.rankings-row.top-rank { background: rgba(255,215,0,0.03); }
.rank-col { width: 40px; text-align: center; flex-shrink: 0; }
.rank-num {
  font-weight: 900; font-family: var(--font-display);
  font-size: var(--text-base);
}
.name-col {
  flex: 1; display: flex; align-items: center; gap: 10px;
  font-weight: 600; font-size: var(--text-sm);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.rank-img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.team-col { width: 80px; font-size: var(--text-xs); color: var(--text-secondary); flex-shrink: 0; }
.rating-col {
  width: 60px; text-align: right; font-weight: 800;
  font-family: var(--font-mono); flex-shrink: 0;
}

/* ─── 32. News ─── */
.news-grid { display: grid; grid-template-columns: 1fr; gap: var(--sp-3); }
.news-card {
  display: block; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  overflow: hidden; text-decoration: none;
  color: var(--text-primary);
  transition: border-color var(--t-normal), box-shadow var(--t-normal), transform var(--t-normal);
}
.news-card:hover {
  border-color: var(--border-light); box-shadow: var(--shadow-md);
  transform: translateY(-1px); color: var(--text-primary);
}
.news-img {
  width: 100%; aspect-ratio: 16 / 9;
  object-fit: cover; display: block; background: var(--surface-2);
}
.news-body { padding: var(--sp-3); }
.news-title {
  font-family: var(--font-display);
  font-size: var(--text-sm); font-weight: 700; line-height: 1.4;
  margin-bottom: 6px;
  display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
}
.news-meta { font-size: var(--text-xs); color: var(--text-tertiary); }
.news-featured {
  display: block; text-decoration: none; color: var(--text-primary);
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-xl); overflow: hidden;
  margin-bottom: var(--sp-6);
  transition: border-color var(--t-normal), box-shadow var(--t-normal);
}
.news-featured:hover {
  border-color: var(--border-light); box-shadow: var(--shadow-lg);
  color: var(--text-primary);
}
.news-featured-img { width: 100%; aspect-ratio: 2 / 1; object-fit: cover; }
.news-featured-body { padding: var(--sp-5); }
.news-featured-title { font-family: var(--font-display); font-size: var(--text-xl); font-weight: 800; margin-bottom: var(--sp-2); }
.news-featured-desc { font-size: var(--text-sm); color: var(--text-secondary); line-height: 1.6; margin-bottom: var(--sp-2); }
@media (min-width: 769px) {
  .news-grid { grid-template-columns: repeat(3, 1fr); }
}

/* News carousel */
.news-carousel {
  display: flex; gap: var(--sp-3); overflow-x: auto;
  scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch;
  scrollbar-width: none; padding: var(--sp-3) 0;
  mask-image: linear-gradient(90deg, transparent, #000 2%, #000 98%, transparent);
}
.news-carousel::-webkit-scrollbar { display: none; }
.news-carousel-item {
  min-width: 280px; max-width: 320px; flex-shrink: 0;
  scroll-snap-align: start;
  border-radius: var(--radius-lg); overflow: hidden;
  position: relative; text-decoration: none; color: #fff;
}
.news-carousel-item img { width: 100%; aspect-ratio: 16/10; object-fit: cover; }
.news-carousel-item .overlay {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: var(--sp-4);
  background: linear-gradient(transparent, rgba(0,0,0,0.85));
}
.news-carousel-item .overlay h3 {
  font-family: var(--font-display); font-size: var(--text-sm); font-weight: 700;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

/* Series pills */
.series-pills {
  display: flex; gap: 8px; overflow-x: auto;
  padding: var(--sp-3) 0; scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.series-pills::-webkit-scrollbar { display: none; }
.series-pill {
  padding: 7px 16px; border-radius: var(--radius-full);
  font-size: var(--text-xs); font-weight: 700;
  white-space: nowrap; cursor: pointer; border: none;
  transition: all var(--t-fast); flex-shrink: 0;
  background: var(--surface); color: var(--text-secondary);
  border: 1px solid var(--border); text-decoration: none;
  font-family: var(--font-display);
}
.series-pill:hover { border-color: var(--blue); color: var(--blue-light); }
.series-pill.active { background: var(--blue); border-color: var(--blue); color: #fff; }
.series-pill.live-pill {
  background: var(--red-dim); border-color: rgba(248,81,73,0.3); color: var(--red);
}

/* Series cards */
.series-carousel {
  display: flex; gap: var(--sp-3); overflow-x: auto;
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
  padding: var(--sp-2) 0;
}
.series-carousel::-webkit-scrollbar { display: none; }
.series-card {
  min-width: 160px; padding: var(--sp-3) var(--sp-4);
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); flex-shrink: 0;
  text-decoration: none; color: var(--text-primary);
  transition: all var(--t-fast);
}
.series-card:hover { border-color: var(--blue); transform: translateY(-2px); color: var(--text-primary); }
.series-card-name {
  font-size: var(--text-sm); font-weight: 700;
  font-family: var(--font-display);
  margin-bottom: 4px;
}
.series-card-meta { font-size: var(--text-xs); color: var(--text-tertiary); }

/* ─── 33. Match Detail Header ─── */
.match-header {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: var(--sp-5);
  margin-bottom: var(--sp-4);
  position: relative; overflow: hidden;
}
.match-header::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--blue), var(--green), var(--gold));
}
.match-header-top {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: var(--sp-3);
}
.match-header-series { font-size: var(--text-xs); color: var(--text-secondary); font-weight: 600; }
.match-header-teams {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--sp-4);
}
.match-header-team {
  display: flex; flex-direction: column; align-items: center;
  text-align: center; flex: 1;
}
.match-header-logo {
  width: 44px; height: 44px; border-radius: 50%;
  object-fit: cover; margin-bottom: var(--sp-2);
  border: 2px solid var(--border);
  background: var(--bg);
}
.match-header-name {
  font-size: var(--text-sm); font-weight: 700;
  font-family: var(--font-display);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  max-width: 200px;
}
.match-header-score {
  font-size: var(--text-2xl); font-weight: 900;
  font-family: var(--font-display);
  letter-spacing: -0.5px;
  margin-top: var(--sp-1);
}
.match-header-overs { font-size: var(--text-xs); color: var(--text-tertiary); }
.match-header-vs {
  font-size: var(--text-xs); color: var(--text-tertiary);
  font-weight: 800; flex-shrink: 0;
}
.match-header-status {
  text-align: center; margin-top: var(--sp-3);
  font-size: var(--text-xs); font-weight: 600; color: var(--green);
}
.match-exchange-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px; border-radius: var(--radius);
  background: var(--gold-dim); color: var(--gold);
  font-size: var(--text-xs); font-weight: 700;
  border: 1px solid rgba(212,168,75,0.3);
  transition: all var(--t-fast); text-decoration: none;
  font-family: var(--font-display);
  margin-top: var(--sp-3);
}
.match-exchange-btn:hover { background: rgba(212,168,75,0.25); color: var(--gold-light); }

/* ─── 34. Bet Slip ─── */
.betslip-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.6); z-index: 200; display: none;
}
.betslip-overlay.open { display: block; }
.betslip {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 201;
  background: var(--surface);
  border-top-left-radius: var(--radius-xl); border-top-right-radius: var(--radius-xl);
  border: 1px solid var(--border); border-bottom: none;
  transform: translateY(100%); transition: transform 0.3s var(--ease-out);
  max-width: 480px; margin: 0 auto;
  box-shadow: var(--shadow-xl);
}
.betslip.open { transform: translateY(0); }
.betslip-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--sp-4) var(--sp-4) var(--sp-3);
  border-bottom: 1px solid var(--border);
}
.betslip-title { font-size: var(--text-lg); font-weight: 800; font-family: var(--font-display); }
.betslip-close {
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; color: var(--text-secondary);
  border-radius: var(--radius-sm); transition: all var(--t-fast);
}
.betslip-close:hover { background: rgba(255,255,255,0.06); color: var(--text-primary); }
.betslip-body { padding: var(--sp-4); }
.betslip-market { font-size: var(--text-sm); color: var(--text-secondary); margin-bottom: var(--sp-1); }
.betslip-selection { font-size: var(--text-base); font-weight: 700; margin-bottom: var(--sp-3); }
.betslip-type {
  display: inline-block; font-size: 11px; font-weight: 800;
  text-transform: uppercase; letter-spacing: 0.5px;
  padding: 3px 10px; border-radius: var(--radius-sm); margin-bottom: var(--sp-3);
}
.betslip-type.back { background: var(--back-dim); color: var(--back); }
.betslip-type.lay { background: var(--lay-dim); color: var(--lay); }
.betslip-odds-row {
  display: flex; align-items: center;
  justify-content: space-between; margin-bottom: var(--sp-3);
}
.betslip-label { font-size: var(--text-sm); color: var(--text-secondary); }
.betslip-odds {
  font-size: var(--text-xl); font-weight: 900; color: var(--text-primary);
  font-family: var(--font-mono);
}
.betslip-stake-row {
  display: flex; align-items: center;
  justify-content: space-between; margin-bottom: var(--sp-3);
}
.betslip-input {
  width: 140px; height: 40px; padding: 0 var(--sp-3);
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius); color: var(--text-primary);
  font-size: var(--text-base); font-weight: 700; text-align: right;
  font-family: var(--font-mono);
  transition: border-color var(--t-fast);
}
.betslip-input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-dim); }
.betslip-presets { display: flex; gap: 8px; margin-bottom: var(--sp-4); }
.betslip-presets button {
  flex: 1; height: 36px;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius); color: var(--text-secondary);
  font-size: var(--text-sm); font-weight: 700;
  transition: all var(--t-fast);
  font-family: var(--font-mono);
}
.betslip-presets button:hover { border-color: var(--blue); color: var(--blue-light); background: var(--blue-dim); }
.betslip-return {
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--sp-3) 0; border-top: 1px solid var(--border);
  margin-bottom: var(--sp-3); font-size: var(--text-sm);
}
.betslip-return span:first-child { color: var(--text-secondary); }
.betslip-return span:last-child { color: var(--green); font-weight: 800; font-family: var(--font-mono); font-size: var(--text-lg); }
.betslip-error { color: var(--red); font-size: var(--text-xs); margin-bottom: var(--sp-3); font-weight: 500; }
.betslip-submit {
  width: 100%; height: 46px;
  background: linear-gradient(135deg, var(--green), #34c894);
  color: var(--bg); font-size: var(--text-base); font-weight: 800;
  border-radius: var(--radius); transition: all var(--t-fast);
  font-family: var(--font-display);
  letter-spacing: 0.3px;
}
.betslip-submit:hover { box-shadow: var(--shadow-glow-green); transform: translateY(-1px); }
.betslip-submit:disabled { opacity: 0.4; cursor: not-allowed; transform: none; box-shadow: none; }

/* ─── 35. Auth Modal ─── */
.auth-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.7); z-index: 300; display: none;
}
.auth-overlay.open { display: block; }
.auth-modal {
  position: fixed; top: 50%; left: 50%;
  transform: translate(-50%, -50%); z-index: 301;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-xl); padding: var(--sp-8) var(--sp-6);
  width: 90%; max-width: 400px; display: none;
  box-shadow: var(--shadow-xl);
}
.auth-modal.open { display: block; }
.auth-close {
  position: absolute; top: var(--sp-4); right: var(--sp-4);
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; color: var(--text-secondary);
  border-radius: var(--radius); transition: all var(--t-fast);
}
.auth-close:hover { background: rgba(255,255,255,0.06); color: var(--text-primary); }
.auth-title {
  font-family: var(--font-display);
  font-size: var(--text-2xl); font-weight: 800; margin-bottom: var(--sp-2);
}
.auth-subtitle {
  font-size: var(--text-sm); color: var(--text-secondary);
  margin-bottom: var(--sp-5); line-height: 1.5;
}
.auth-input {
  display: block; width: 100%; height: 44px; padding: 0 var(--sp-4);
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius); color: var(--text-primary);
  font-size: var(--text-base); margin-bottom: var(--sp-3);
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.auth-input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-dim); }
.auth-input::placeholder { color: var(--text-tertiary); }
.auth-error { color: var(--red); font-size: var(--text-xs); margin-bottom: var(--sp-3); display: none; font-weight: 500; }
.auth-error.show { display: block; }
.auth-submit {
  width: 100%; height: 44px;
  background: var(--blue); color: #fff;
  font-size: var(--text-base); font-weight: 700;
  border-radius: var(--radius); margin-top: var(--sp-1);
  transition: all var(--t-fast);
  font-family: var(--font-display);
}
.auth-submit:hover { background: #2b82f0; box-shadow: var(--shadow-glow-blue); }
.auth-submit:disabled { opacity: 0.4; cursor: not-allowed; }
.auth-switch {
  text-align: center; margin-top: var(--sp-5);
  font-size: var(--text-sm); color: var(--text-secondary);
}
.auth-switch a { color: var(--blue-light); font-weight: 600; }

/* ─── 36. Empty State ─── */
.empty-state {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: var(--sp-12) var(--sp-4);
  color: var(--text-tertiary); text-align: center;
}
.empty-state svg { width: 48px; height: 48px; margin-bottom: var(--sp-4); opacity: 0.4; }
.empty-state p { font-size: var(--text-sm); max-width: 300px; line-height: 1.6; }
.empty-state a { color: var(--blue-light); font-weight: 600; }

/* ─── 37. Toast ─── */
.toast-container {
  position: fixed; top: var(--sp-4); right: var(--sp-4);
  z-index: 9999; display: flex; flex-direction: column; gap: var(--sp-2);
  pointer-events: none;
}
.toast {
  padding: var(--sp-3) var(--sp-4); border-radius: var(--radius);
  font-size: var(--text-sm); font-weight: 600;
  box-shadow: var(--shadow-lg);
  animation: toastIn 0.3s var(--ease-spring), toastOut 0.3s var(--ease-in) 2.7s forwards;
  pointer-events: auto;
  font-family: var(--font-display);
}
.toast.success { background: var(--green); color: var(--bg); }
.toast.error { background: var(--red); color: #fff; }
.toast.info { background: var(--blue); color: #fff; }
@keyframes toastIn {
  0% { transform: translateX(100%) scale(0.8); opacity: 0; }
  100% { transform: translateX(0) scale(1); opacity: 1; }
}
@keyframes toastOut {
  0% { transform: translateX(0); opacity: 1; }
  100% { transform: translateX(120%); opacity: 0; }
}

/* ─── 38. Animations ─── */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes scoreFlash {
  0% { transform: scale(1); }
  50% { transform: scale(1.15); color: var(--gold-light); }
  100% { transform: scale(1); }
}
.animate-in { animation: slideUp 0.3s var(--ease-out) both; }

/* Stagger children */
.stagger > * { animation: slideUp 0.3s var(--ease-out) both; }
.stagger > *:nth-child(1) { animation-delay: 0.03s; }
.stagger > *:nth-child(2) { animation-delay: 0.06s; }
.stagger > *:nth-child(3) { animation-delay: 0.09s; }
.stagger > *:nth-child(4) { animation-delay: 0.12s; }
.stagger > *:nth-child(5) { animation-delay: 0.15s; }
.stagger > *:nth-child(6) { animation-delay: 0.18s; }
.stagger > *:nth-child(n+7) { animation-delay: 0.21s; }

/* ─── 39. Exchange Page ─── */
.exchange-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: var(--sp-4);
}
.exchange-wallet-bar {
  display: flex; gap: var(--sp-4); font-size: var(--text-xs); color: var(--text-secondary);
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: var(--sp-3) var(--sp-4);
  margin-bottom: var(--sp-4);
}
.exchange-wallet-item { display: flex; flex-direction: column; }
.exchange-wallet-val { font-weight: 800; color: var(--text-primary); font-family: var(--font-mono); }

/* ─── 40. Utilities ─── */
.text-green { color: var(--green); }
.text-red { color: var(--red); }
.text-blue { color: var(--blue-light); }
.text-gold { color: var(--gold); }
.text-secondary { color: var(--text-secondary); }
.text-center { text-align: center; }
.hidden { display: none !important; }
.mt-2 { margin-top: var(--sp-2); }
.mt-3 { margin-top: var(--sp-3); }
.mt-4 { margin-top: var(--sp-4); }
.mb-2 { margin-bottom: var(--sp-2); }
.mb-3 { margin-bottom: var(--sp-3); }
.mb-4 { margin-bottom: var(--sp-4); }
.flex { display: flex; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.gap-2 { gap: var(--sp-2); }
.gap-3 { gap: var(--sp-3); }
.font-mono { font-family: var(--font-mono); }

/* ─── 41. Responsive Desktop Enhancements ─── */
@media (min-width: 1024px) {
  .main { padding: var(--sp-6); }
  .page-title { font-size: var(--text-3xl); }
  .match-header-logo { width: 56px; height: 56px; }
  .match-header-score { font-size: var(--text-3xl); }
  .match-header-name { max-width: 180px; font-size: var(--text-base); }
  .live-stats-grid { grid-template-columns: repeat(4, 1fr); }
}

/* ─── 42. Premium Exchange / Sportsbook ─── */

/* --- 42a. Exchange Event Card --- */
.exchange-event-card {
  background: linear-gradient(135deg, var(--surface) 0%, var(--surface-2) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--sp-4);
  position: relative;
  overflow: hidden;
  transition: transform var(--t-normal) var(--ease-out),
              box-shadow var(--t-normal) var(--ease-out),
              border-color var(--t-normal);
  display: block;
  text-decoration: none;
  color: var(--text-primary);
}
.exchange-event-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45), 0 0 0 1px var(--border-light);
  border-color: var(--border-light);
}
.exchange-event-card.in-play {
  border-left: 3px solid var(--gold);
}
.exchange-event-card.in-play::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--gold-light), var(--gold));
  box-shadow: 0 0 8px var(--gold-dim);
}
.exchange-event-card + .exchange-event-card {
  margin-top: var(--sp-3);
}

.exchange-event-title {
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.3;
  margin-bottom: var(--sp-1);
}
.exchange-event-meta {
  font-size: var(--text-xs);
  color: var(--text-tertiary);
  font-weight: 500;
  letter-spacing: 0.2px;
  margin-bottom: var(--sp-3);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* --- 42b. Exchange Runner Row --- */
.exchange-runner-row {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-2) 0;
  border-bottom: 1px solid var(--border);
  transition: background var(--t-fast);
}
.exchange-runner-row:last-child {
  border-bottom: none;
}
.exchange-runner-row:hover {
  background: rgba(255, 255, 255, 0.02);
}

.exchange-runner-logo {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid var(--border-light);
  background: var(--bg);
}

.exchange-runner-name {
  flex: 1;
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.exchange-runner-prices {
  display: flex;
  gap: var(--sp-1);
  flex-shrink: 0;
}

.exchange-runner-back,
.exchange-runner-lay {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 56px;
  padding: 6px 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: transform var(--t-fast) var(--ease-spring),
              background var(--t-fast),
              box-shadow var(--t-fast);
  text-align: center;
}
.exchange-runner-back {
  background: var(--back-dim);
}
.exchange-runner-lay {
  background: var(--lay-dim);
}
.exchange-runner-back:hover {
  transform: scale(1.06);
  background: var(--back-deep);
  box-shadow: 0 0 12px rgba(114, 187, 239, 0.2);
}
.exchange-runner-lay:hover {
  transform: scale(1.06);
  background: var(--lay-deep);
  box-shadow: 0 0 12px rgba(250, 169, 186, 0.2);
}

.exchange-runner-back .exchange-runner-price {
  color: var(--back);
}
.exchange-runner-lay .exchange-runner-price {
  color: var(--lay);
}

.exchange-runner-price {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  font-weight: 800;
  line-height: 1.2;
}

.exchange-runner-size {
  font-size: 9px;
  font-weight: 500;
  color: var(--text-tertiary);
  line-height: 1;
  margin-top: 1px;
  font-family: var(--font-mono);
}

/* --- 42c. Betfair / Exchange Badge --- */
.betfair-badge {
  display: inline-flex;
  align-items: center;
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--gold);
  border: 1px solid var(--gold);
  border-radius: var(--radius-sm);
  padding: 2px 6px;
  line-height: 1;
  font-family: var(--font-display);
  background: rgba(212, 168, 75, 0.08);
  flex-shrink: 0;
}
.betfair-badge.blue {
  color: var(--back);
  border-color: var(--back);
  background: rgba(114, 187, 239, 0.08);
}

/* --- 42d. Exchange Section Header --- */
.exchange-section-header {
  border-left: 3px solid var(--gold);
  padding-left: var(--sp-3);
  margin-bottom: var(--sp-4);
  margin-top: var(--sp-6);
}
.exchange-section-header:first-child {
  margin-top: 0;
}
.exchange-section-title {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 800;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  line-height: 1.3;
}
.exchange-section-subtitle {
  font-size: var(--text-xs);
  color: var(--text-tertiary);
  font-weight: 500;
  margin-top: 2px;
  letter-spacing: 0.2px;
}

/* --- 42e. In-Play Pulse --- */
.in-play-pulse {
  position: relative;
}
.in-play-pulse::after {
  content: '';
  position: absolute;
  top: -1px;
  left: -1px;
  right: -1px;
  bottom: -1px;
  border-radius: inherit;
  pointer-events: none;
  animation: inPlayGlow 2.5s ease-in-out infinite;
}
@keyframes inPlayGlow {
  0%, 100% {
    box-shadow: 0 0 4px rgba(64, 223, 163, 0.15), inset 0 0 4px rgba(64, 223, 163, 0.05);
  }
  50% {
    box-shadow: 0 0 16px rgba(64, 223, 163, 0.3), inset 0 0 8px rgba(64, 223, 163, 0.08);
  }
}

/* In-play pulse dot (standalone) */
.in-play-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  animation: inPlayDotPulse 1.8s ease-in-out infinite;
  flex-shrink: 0;
}
@keyframes inPlayDotPulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 4px var(--green); }
  50% { opacity: 0.4; box-shadow: 0 0 10px var(--green); }
}

/* --- 42f. Odds Pill Enhancements --- */
.odds-pill {
  min-width: 54px;
  text-align: center;
  font-weight: 800;
  font-family: var(--font-mono);
  padding: 5px 12px;
  font-size: var(--text-xs);
  letter-spacing: -0.2px;
}

/* --- 42g. Exchange Responsive --- */
@media (max-width: 400px) {
  .exchange-runner-back,
  .exchange-runner-lay {
    min-width: 48px;
    padding: 5px 6px;
  }
  .exchange-runner-price {
    font-size: var(--text-xs);
  }
  .exchange-event-title {
    font-size: var(--text-sm);
  }
}

/* --- 42h. Tournament Winner Grid --- */
.tournament-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--sp-2);
}
@media (min-width: 540px) {
  .tournament-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 769px) {
  .tournament-grid { grid-template-columns: repeat(5, 1fr); }
}
.tournament-runner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: var(--sp-3) var(--sp-2);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all var(--t-normal) var(--ease-out);
  cursor: pointer;
  text-align: center;
  min-width: 0;
}
.tournament-runner:hover,
.tournament-runner:active {
  border-color: var(--back);
  background: var(--back-dim);
  box-shadow: 0 0 0 2px var(--back), 0 4px 16px rgba(114, 187, 239, 0.2);
}
.tournament-runner-logo {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border);
  background: var(--bg);
  transition: border-color var(--t-fast);
  flex-shrink: 0;
}
.tournament-runner:hover .tournament-runner-logo {
  border-color: var(--back);
}
.tournament-runner-name {
  font-size: 10px;
  font-weight: 700;
  font-family: var(--font-display);
  color: var(--text-primary);
  line-height: 1.25;
  width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tournament-runner-odds {
  margin-top: auto;
}
.tournament-runner-odds .exchange-runner-back {
  min-width: auto;
  padding: 3px 10px;
  border-radius: var(--radius-sm);
}
.tournament-runner-odds .exchange-runner-price {
  font-size: var(--text-xs);
}

/* Ensure tournament runner hover effects aren't clipped */
.exchange-event-card {
  overflow: visible;
}
.tournament-grid {
  position: relative;
  z-index: 1;
}

/* --- 42i. Betfair Logo --- */
.bf-logo {
  display: inline-flex;
  align-items: center;
  background: #FFB80C;
  border-radius: 5px;
  padding: 3px 10px;
  font-family: 'Arial', 'Helvetica Neue', sans-serif;
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.3px;
  flex-shrink: 0;
}
.bf-logo-bet { color: #1E1E1E; }
.bf-logo-fair { color: #4A4A4A; }

.exchange-section-header .exchange-section-title {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}

/* ─── 42b. Live Tab Fixes ─── */
.live-result-banner {
  text-align: center; padding: var(--sp-3) var(--sp-4); margin-bottom: var(--sp-4);
  background: var(--green-dim); border: 1px solid rgba(64,223,163,0.2);
  border-radius: var(--radius); color: var(--green); font-weight: 700;
  font-size: var(--text-sm);
}
.live-section-label {
  font-size: 10px; font-weight: 700; color: var(--text-secondary);
  letter-spacing: 0.5px; text-transform: uppercase; margin: var(--sp-3) 0 var(--sp-2);
}

/* ─── 43. H2H Section ─── */
.h2h-section { margin-top: var(--sp-4); }
.h2h-section .section-title {
  font-size: var(--text-sm); font-weight: 700; color: var(--text-secondary);
  text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: var(--sp-3);
}
.h2h-item {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: var(--sp-3);
  margin-bottom: var(--sp-2);
}
.h2h-summary { font-size: var(--text-base); font-weight: 700; color: var(--text-primary); }
.h2h-result { font-size: var(--text-sm); color: var(--green); font-weight: 500; }
.h2h-scores { font-size: var(--text-xs); color: var(--text-secondary); margin-top: var(--sp-1); }

/* ─── 44. Pulsing Live Dot ─── */
.live-dot {
  display: inline-block; width: 6px; height: 6px; border-radius: 50%;
  background: var(--red); margin-right: 4px; vertical-align: middle;
  animation: livePulse 1.5s ease-in-out infinite;
}
@keyframes livePulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }

/* ─── 45. Score Flash on WS Update ─── */
.match-header-score { transition: color 0.3s; }
.score-flash { color: var(--green) !important; }

/* ─── 46. Print ─── */
@media print {
  .header, .nav-mobile, .footer, .betslip, .betslip-overlay,
  .auth-modal, .auth-overlay, .more-sheet, .toast-container { display: none !important; }
  body { background: #fff; color: #000; padding: 0; }
  .main { max-width: none; }
}
