/* SportPulse API — Production Dark Navy / Indigo / Cyan Stylesheet (Pure CSS3) */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600&family=Plus+Jakarta+Sans:wght@600;700;800&display=swap');

:root {
  --bg: #060913;
  --surface: #0c1222;
  --surface-elevated: #111a2e;
  --border: rgba(148, 163, 184, 0.14);
  --border-strong: rgba(56, 189, 248, 0.28);
  --text: #f1f5f9;
  --text-muted: #94a3b8;
  --accent: #06b6d4;
  --accent-blue: #3b82f6;
  --accent-indigo: #6366f1;
  --green: #16a34a;
  --amber: #d97706;
  --red: #dc2626;
  --radius: 12px;
  --radius-sm: 8px;
  --font-display: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  margin: 0 0 0.75rem;
  letter-spacing: -0.02em;
  line-height: 1.2;
  text-wrap: balance;
}
a { color: var(--accent); text-decoration: none; transition: color 150ms ease; }
a:hover { color: #67e8f9; }
code, pre, .mono { font-family: var(--font-mono); }
.num { font-variant-numeric: tabular-nums; font-family: var(--font-mono); text-align: right; }
.muted { color: var(--text-muted); }
.text-green { color: #4ade80; }
.text-amber { color: #fbbf24; }
.text-red { color: #f87171; }
.text-cyan { color: #22d3ee; }

.container { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 24px; }

/* Announcement bar */
.announcement-bar {
  background: linear-gradient(90deg, #0f172a, #1e1b4b, #0f172a);
  border-bottom: 1px solid var(--border);
  text-align: center;
  padding: 8px 16px;
  font-size: 13px;
  color: #cbd5e1;
}

/* Top Navigation — Strict 3-Zone Contract */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(6, 9, 19, 0.88);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  height: 68px;
}
.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 800;
  color: #ffffff;
  white-space: nowrap;
  flex-shrink: 0;
}
.brand-link img { width: 28px; height: 28px; }
.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}
.nav-links a {
  color: #cbd5e1;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  flex-shrink: 0;
  padding: 4px 0;
  border-bottom: 2px solid transparent;
}
.nav-links a:hover, .nav-links a.active {
  color: #ffffff;
  border-bottom-color: var(--accent);
}
.header-cta { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.mobile-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  white-space: nowrap;
  flex-shrink: 0;
  transition: transform 140ms ease, background 150ms ease, border-color 150ms ease;
}
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn-primary {
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-indigo));
  color: #ffffff;
}
.btn-primary:hover { color: #ffffff; filter: brightness(1.08); }
.btn-cyan { background: var(--accent); color: #04131c; }
.btn-cyan:hover { color: #04131c; background: #22d3ee; }
.btn-secondary {
  background: var(--surface-elevated);
  border-color: var(--border);
  color: var(--text);
}
.btn-secondary:hover { border-color: var(--border-strong); color: #ffffff; }
.btn-danger { background: rgba(220, 38, 38, 0.16); border-color: rgba(220, 38, 38, 0.4); color: #fca5a5; }
.btn-sm { padding: 6px 12px; font-size: 13px; }

/* Sections & Cards (Single Elevation, Hairline Borders) */
.section { padding: 72px 0; }
.section-tight { padding: 40px 0; }
.hero {
  padding: 88px 0 64px;
  background: radial-gradient(75% 60% at 50% 0%, rgba(59, 130, 246, 0.16), transparent 70%);
  border-bottom: 1px solid var(--border);
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 40px;
  align-items: stretch;
}
.hero h1 { font-size: clamp(2.25rem, 4vw, 3.5rem); }
.hero-sub { font-size: 17px; color: var(--text-muted); max-width: 60ch; margin: 16px 0 28px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }

.surface-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}
.surface-glass {
  background: rgba(12, 18, 34, 0.78);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }

/* Metric Strip */
.kpi-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
}
.kpi-label { font-size: 13px; color: var(--text-muted); margin-bottom: 6px; }
.kpi-value {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 26px;
  font-weight: 700;
  color: #ffffff;
}
.kpi-meta { font-size: 12px; color: var(--text-muted); margin-top: 4px; }

/* Code Blocks */
.code-box {
  background: #04070f;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.code-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  background: #090e1c;
  font-size: 12px;
  color: var(--text-muted);
}
.code-box pre {
  margin: 0;
  padding: 16px;
  overflow-x: auto;
  font-size: 13px;
  line-height: 1.6;
  color: #e2e8f0;
}

/* Segmented Tabs (Interactive Controls) */
.tab-bar {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  background: #090e1c;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.tab-btn {
  background: transparent;
  border: 0;
  color: var(--text-muted);
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}
.tab-btn.active { background: var(--surface-elevated); color: #ffffff; }

/* Tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.data-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.data-table th {
  text-align: left;
  padding: 12px 16px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  background: #090e1c;
  white-space: nowrap;
}
.data-table td {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.08);
  vertical-align: middle;
}
.data-table tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover { background: rgba(56, 189, 248, 0.04); }

/* Forms */
.form-grid { display: grid; gap: 16px; }
label { display: grid; gap: 6px; font-size: 13px; font-weight: 500; color: #cbd5e1; }
input[type="text"], input[type="email"], input[type="password"], input[type="number"],
input[type="url"], input[type="date"], select, textarea {
  width: 100%;
  padding: 10px 14px;
  background: #070c18;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: #ffffff;
  font-family: inherit;
  font-size: 14px;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); }
textarea { min-height: 110px; resize: vertical; }
.divider { border: 0; border-top: 1px solid var(--border); margin: 16px 0; }

/* Alerts */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  font-size: 14px;
  margin-bottom: 16px;
}
.alert-success { background: rgba(22, 163, 74, 0.14); border-color: rgba(74, 222, 128, 0.35); color: #bbf7d0; }
.alert-error { background: rgba(220, 38, 38, 0.14); border-color: rgba(248, 113, 113, 0.35); color: #fecaca; }
.alert-info { background: rgba(6, 182, 212, 0.12); border-color: rgba(34, 211, 238, 0.35); color: #cffafe; }

/* Breadcrumbs */
.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 20px;
}
.breadcrumbs a { color: var(--text-muted); }
.breadcrumbs a:hover { color: var(--accent); }

/* Auth Pages */
.auth-body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 16px;
  background: radial-gradient(60% 50% at 50% 0%, rgba(59, 130, 246, 0.14), transparent 70%), var(--bg);
}
.auth-card {
  width: 100%;
  max-width: 440px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
}

/* Dashboard & Admin Workspace Layout */
.workspace-shell { display: grid; grid-template-columns: 256px minmax(0, 1fr); min-height: 100vh; }
.sidebar {
  background: #090e1c;
  border-right: 1px solid var(--border);
  padding: 20px 14px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}
.sidebar-nav { display: grid; gap: 4px; }
.sidebar-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: #cbd5e1;
  font-size: 14px;
  font-weight: 500;
}
.sidebar-link:hover { background: rgba(148, 163, 184, 0.08); color: #ffffff; }
.sidebar-link.active {
  background: rgba(59, 130, 246, 0.16);
  color: #ffffff;
  border: 1px solid rgba(56, 189, 248, 0.25);
}
.workspace-main { display: flex; flex-direction: column; min-width: 0; }
.workspace-topbar {
  height: 64px;
  padding: 0 28px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: rgba(6, 9, 19, 0.85);
  position: sticky;
  top: 0;
  z-index: 20;
}
.workspace-content { padding: 28px; max-width: 1320px; width: 100%; }

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  background: #080c18;
  padding: 48px 0 32px;
  margin-top: 64px;
}
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 32px; margin-bottom: 32px; }
.footer-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; font-size: 14px; }
.footer-list a { color: var(--text-muted); }
.footer-list a:hover { color: #ffffff; }

/* =====================================================================
   HOMEPAGE SLIDER / CAROUSEL SYSTEM
   ===================================================================== */
.home-slider-section { padding: 24px 0 0; }
.hero-carousel {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
}
.carousel-track {
  display: flex;
  transition: transform 380ms cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}
.carousel-slide {
  position: relative;
  min-width: 100%;
  aspect-ratio: 16 / 5.4;
  min-height: 240px;
  max-height: 440px;
  overflow: hidden;
}
.carousel-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.carousel-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(6, 9, 19, 0.9) 0%, rgba(6, 9, 19, 0.55) 52%, rgba(6, 9, 19, 0.12) 100%);
  display: flex;
  align-items: center;
  padding: 28px 48px;
}
.carousel-caption { max-width: 560px; }
.carousel-caption h2 { font-size: clamp(1.35rem, 3vw, 2.2rem); margin: 0 0 8px; color: #fff; }
.carousel-caption p { margin: 0 0 16px; color: #cbd5e1; font-size: 14px; }
.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: rgba(6, 9, 19, 0.72);
  border: 1px solid var(--border);
  color: #fff;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
}
.carousel-arrow:hover { border-color: var(--accent); background: rgba(6, 9, 19, 0.92); }
.carousel-prev { left: 12px; }
.carousel-next { right: 12px; }
.carousel-dots {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
}
.carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  border: 0;
  background: rgba(255, 255, 255, 0.35);
  cursor: pointer;
  padding: 0;
}
.carousel-dot.active { width: 22px; background: var(--accent); }

/* =====================================================================
   LIVE SPORTS DASHBOARD & MATCH DETAILS (MOBILE-FIRST)
   ===================================================================== */
.live-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 20px;
}
.sync-status-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  min-width: 240px;
}
.sync-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.sync-indicator { font-size: 12px; font-weight: 700; font-family: var(--font-mono); }
.sync-indicator.is-online { color: #4ade80; }
.sync-indicator.is-stale { color: #fbbf24; }
.sync-indicator.is-offline { color: #f87171; }

.sport-tabs-scroll {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 6px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--border);
  -webkit-overflow-scrolling: touch;
}
.sport-tab {
  padding: 10px 18px;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
  border-bottom: 2px solid transparent;
}
.sport-tab.active, .sport-tab:hover { color: #fff; border-bottom-color: var(--accent); }

.filter-bar-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
}
.swipe-tabs, .swipe-tabs-bar {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  max-width: 100%;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.swipe-tabs::-webkit-scrollbar, .swipe-tabs-bar::-webkit-scrollbar { display: none; }
.swipe-tabs-bar {
  background: #090e1c;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 6px;
  margin: 20px 0 16px;
}
.swipe-tabs-bar .tab-btn { white-space: nowrap; min-height: 38px; padding: 8px 14px; }

.live-search-wrap { display: flex; align-items: center; gap: 12px; flex: 1; max-width: 380px; }
.match-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.match-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  color: var(--text);
  transition: border-color 150ms ease, transform 150ms ease;
}
.match-card:hover { border-color: var(--border-strong); color: var(--text); transform: translateY(-1px); }
.match-card-top, .match-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
}
.match-tournament { color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.match-status-text { font-family: var(--font-mono); font-weight: 700; font-size: 11px; flex-shrink: 0; }
.status-live { color: #4ade80; }
.status-upcoming { color: #38bdf8; }
.status-completed { color: #94a3b8; }

.match-teams { display: grid; gap: 8px; }
.team-row { display: flex; align-items: center; gap: 10px; }
.team-logo { width: 24px; height: 24px; border-radius: 6px; object-fit: contain; background: #090e1c; }
.team-monogram {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  background: #13203b;
  border: 1px solid var(--border);
  color: #7dd3fc;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.team-name { font-weight: 600; font-size: 14px; color: #f8fafc; }
.match-score-line {
  background: #080d1a;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 13px;
  color: #e2e8f0;
}

.match-hero-top { display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 16px; }
.match-live-score-box {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  background: #070c18;
  border: 1px solid var(--border-strong);
}
.odds-back { color: #38bdf8; font-weight: 700; }
.odds-lay { color: #fb7185; font-weight: 700; }
.stream-frame-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border);
}
.stream-frame-wrap iframe { width: 100%; height: 100%; border: 0; }

/* =====================================================================
   MOBILE-FRIENDLY ADMIN DRAWER & COLLAPSIBLE DESKTOP SIDEBAR
   ===================================================================== */
html, body { overflow-x: clip; max-width: 100%; }
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface-elevated);
  color: var(--text);
  cursor: pointer;
  flex-shrink: 0;
}
.icon-btn:hover { border-color: var(--border-strong); color: #fff; }
.mobile-drawer-btn, .drawer-close-btn { display: none; }
.drawer-close-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  width: 34px;
  height: 34px;
  border-radius: 8px;
  font-size: 20px;
  cursor: pointer;
}
.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 23, 0.72);
  backdrop-filter: blur(2px);
  z-index: 45;
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms ease;
}
.drawer-backdrop.open { opacity: 1; pointer-events: auto; }

/* Desktop Collapsible Sidebar State */
.workspace-shell { transition: grid-template-columns 220ms ease; }
.workspace-shell.sidebar-collapsed { grid-template-columns: 0px minmax(0, 1fr); }
.workspace-shell.sidebar-collapsed .sidebar { padding: 0; border-right: 0; overflow: hidden; }

@media (max-width: 1024px) {
  .hero-grid, .grid-3, .grid-4, .footer-grid { grid-template-columns: 1fr 1fr; }
  .match-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .workspace-shell, .workspace-shell.sidebar-collapsed { grid-template-columns: 1fr; }
  .desktop-collapse-btn { display: none; }
  .mobile-drawer-btn, .drawer-close-btn { display: inline-flex; align-items: center; justify-content: center; }
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 280px;
    max-width: 85vw;
    height: 100vh;
    z-index: 50;
    transform: translateX(-105%);
    transition: transform 240ms cubic-bezier(0.22, 1, 0.36, 1);
    box-shadow: 12px 0 36px rgba(0, 0, 0, 0.55);
    padding: 20px 14px !important;
    border-right: 1px solid var(--border) !important;
  }
  .sidebar.drawer-open { transform: translateX(0); }
  .workspace-topbar { padding: 0 16px; }
  .workspace-content { padding: 18px 16px; }
}

@media (max-width: 720px) {
  .container { padding: 0 16px; }
  .hero { padding: 48px 0 40px; }
  .section { padding: 44px 0; }
  .hero-grid, .grid-2, .grid-3, .grid-4, .footer-grid, .match-grid { grid-template-columns: 1fr; }
  .nav-links { display: none; flex-direction: column; position: absolute; top: 68px; left: 0; right: 0; background: #090e1c; padding: 16px 24px; border-bottom: 1px solid var(--border); gap: 14px; }
  .nav-links.open { display: flex; }
  .mobile-toggle { display: inline-flex; }
  .carousel-slide { aspect-ratio: 16 / 10; min-height: 220px; }
  .carousel-overlay { padding: 20px; align-items: flex-end; background: linear-gradient(0deg, rgba(6, 9, 19, 0.92) 0%, rgba(6, 9, 19, 0.35) 70%, transparent 100%); }
  .carousel-arrow { display: none; }
  .hide-xs { display: none !important; }
  .sync-status-box { width: 100%; }
  .live-search-wrap { max-width: 100%; width: 100%; }
  .btn { min-height: 44px; }
  input, select, textarea { min-height: 44px; font-size: 16px; }
}

/* =====================================================================
   SCORECARDS, UNAVAILABLE STATE BOXES & MOBILE OVERFLOW PROTECTION
   ===================================================================== */
.unavailable-box {
  background: rgba(15, 23, 42, 0.72);
  border: 1px dashed rgba(148, 163, 184, 0.28);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  color: #e2e8f0;
}
.scorecard-innings-block {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  background: #080d1a;
  margin-bottom: 16px;
}
.scorecard-innings-block:last-child { margin-bottom: 0; }
.scorecard-innings-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding-bottom: 10px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--border);
  font-size: 15px;
}
.scorecard-table th, .scorecard-table td { padding: 8px 10px; font-size: 13px; }
.table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--radius-sm);
}
.code-box, pre {
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.workspace-main, .workspace-content, .surface-card, .stat-card, .match-card {
  min-width: 0;
  max-width: 100%;
}
@media (max-width: 720px) {
  .surface-card { padding: 16px; }
  .workspace-topbar { height: 60px; }
  .header-inner { height: 60px; gap: 12px; }
  .brand-link { font-size: 16px; }
  .brand-link img { width: 24px; height: 24px; }
  .scorecard-innings-block { padding: 12px; }
  .scorecard-table th:first-child,
  .scorecard-table td:first-child {
    position: sticky;
    left: 0;
    background: #0b1121;
    z-index: 2;
    min-width: 120px;
  }
  .data-table th, .data-table td { padding: 9px 10px; font-size: 12.5px; }
  .nav-links {
    top: 60px;
    max-height: calc(100vh - 60px);
    overflow-y: auto;
    box-shadow: 0 18px 36px rgba(0, 0, 0, 0.55);
    z-index: 45;
  }
  .nav-links a { padding: 10px 4px; font-size: 15px; }
}
@media (max-width: 480px) {
  .container { padding: 0 12px; }
  .workspace-content { padding: 14px 12px; }
  .match-card { padding: 14px; }
  .btn-sm { min-height: 38px; padding: 6px 10px; font-size: 12px; }
}

/* =====================================================================
   MOBILE-FRIENDLY DOCUMENTATION LAYOUT
   ===================================================================== */
.docs-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}
.docs-sidebar {
  padding: 16px;
  position: sticky;
  top: 84px;
}
.docs-main {
  display: grid;
  gap: 20px;
  min-width: 0;
  max-width: 100%;
}
.docs-mobile-nav {
  display: none;
  gap: 6px;
  overflow-x: auto;
  padding: 6px;
  margin-bottom: 16px;
  background: #090e1c;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  -webkit-overflow-scrolling: touch;
}
.docs-mobile-nav a {
  white-space: nowrap;
  flex-shrink: 0;
  text-decoration: none;
}
@media (max-width: 960px) {
  .docs-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .docs-sidebar {
    display: none;
  }
  .docs-mobile-nav {
    display: flex;
  }
}

/* =====================================================================
   EXCHANGE-STYLE LIVE BOARD ODDS STRIP & LIVE PULSE
   ===================================================================== */
.live-pulse-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #22c55e;
  box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
  animation: spPulse 1.6s infinite;
}
@keyframes spPulse {
  0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7); }
  70% { box-shadow: 0 0 0 7px rgba(34, 197, 94, 0); }
  100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}
.exchange-odds-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}
.ex-col {
  display: grid;
  gap: 3px;
}
.ex-head {
  text-align: center;
  font-size: 10px;
  font-family: var(--font-mono);
  color: var(--text-muted);
}
.ex-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px;
}
.ex-back, .ex-lay {
  text-align: center;
  padding: 5px 2px;
  border-radius: 5px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
}
.ex-back {
  background: rgba(56, 189, 248, 0.18);
  border: 1px solid rgba(56, 189, 248, 0.32);
  color: #7dd3fc;
}
.ex-lay {
  background: rgba(251, 113, 133, 0.18);
  border: 1px solid rgba(251, 113, 133, 0.32);
  color: #fda4af;
}
.exchange-board-badges {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.ex-flag {
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 18px;
  padding: 0 4px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
}
.ex-flag-f { background: rgba(56, 189, 248, 0.2); color: #7dd3fc; }
.ex-flag-tv { background: rgba(16, 185, 129, 0.2); color: #6ee7b7; }
.ex-flag-bm { background: rgba(225, 29, 72, 0.28); color: #fda4af; }

/* =====================================================================
   STADIUM LIVE CRICKET SCOREBOARD BANNER
   ===================================================================== */
.stadium-scoreboard {
  border-radius: var(--radius);
  border: 1px solid rgba(56, 189, 248, 0.28);
  overflow: hidden;
  background: linear-gradient(180deg, #0b1636 0%, #0f2557 42%, #133c1e 68%, #0c2614 100%);
  box-shadow: 0 18px 40px rgba(2, 6, 23, 0.45);
}
.stadium-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 12px;
  padding: 16px 20px;
  background: rgba(6, 9, 19, 0.72);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.stadium-score-strip {
  padding: 16px 20px;
  display: grid;
  gap: 12px;
}
.stadium-innings-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.stadium-score-box {
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 8px;
  padding: 8px 14px;
  min-width: 150px;
}
.stadium-team-abbr {
  font-size: 11px;
  color: #93c5fd;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.stadium-team-score {
  font-size: 17px;
  font-weight: 700;
  color: #ffffff;
  margin-top: 2px;
}
.stadium-status-line {
  font-size: clamp(14px, 2.2vw, 17px);
  font-weight: 700;
  color: #f8fafc;
  overflow-wrap: anywhere;
}
.stadium-balls-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}
.stadium-over-tag {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #fff;
  background: rgba(0, 0, 0, 0.35);
}
.ball-circle {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  background: rgba(120, 53, 15, 0.85);
  border: 1px solid rgba(251, 191, 36, 0.45);
}
.ball-circle.ball-b { background: #0284c7; border-color: #7dd3fc; }
.ball-circle.ball-w { background: #dc2626; border-color: #fca5a5; }
.stadium-pitch-panel {
  padding: 14px 20px 18px;
  background: rgba(7, 24, 12, 0.72);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}
@media (max-width: 600px) {
  .stadium-top-bar, .stadium-score-strip, .stadium-pitch-panel { padding: 14px; }
  .stadium-score-box { flex: 1 1 130px; min-width: 0; }
}



