/* ═══════════════════════════════════════════════════════════════
   8848Tech V2 — Glassmorphism + Bottom Nav + Odds Flash
   Style C visual  +  Style A bottom nav  +  Style B odds flash
   ═══════════════════════════════════════════════════════════════ */

/* ── Design Tokens ────────────────────────────────────────────── */
:root {
  --bg: #060E1A;
  --bg2: #0F1B2D;
  --glass: rgba(255,255,255,.05);
  --glass2: rgba(255,255,255,.08);
  --glass3: rgba(255,255,255,.12);
  --border: rgba(255,255,255,.08);
  --border2: rgba(255,255,255,.12);
  --text: #F0F4F8;
  --muted: #8E9BB3;
  --accent: #2FA84B;
  --accent-soft: rgba(47,168,75,.15);
  --accent-glow: rgba(47,168,75,.25);
  --blue: #60A5FA;
  --blue-soft: rgba(96,165,250,.12);
  --live: #EF4444;
  --live-soft: rgba(239,68,68,.12);
  --gold: #F5A623;
  --radius: 16px;
  --radius-lg: 24px;
  --shadow: 0 8px 32px rgba(0,0,0,.25);
}

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

body {
  font-family: 'Inter', 'SF Pro Display', 'PingFang SC', 'Hiragino Sans GB', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  overflow-x: hidden;
  background-image:
    radial-gradient(ellipse at 30% 0%, rgba(47,168,75,.1) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 100%, rgba(96,165,250,.06) 0%, transparent 50%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg2) 100%);
  min-height: 100vh;
  padding-bottom: 80px;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Glass Card Base ──────────────────────────────────────────── */
.glass-card {
  background: var(--glass);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: border-color .2s, transform .2s, box-shadow .2s;
}
.glass-card:hover {
  border-color: var(--border2);
  box-shadow: var(--shadow);
}

/* ── Page Shell ───────────────────────────────────────────────── */
.page-shell { max-width: 1200px; margin: 0 auto; padding: 16px; }

/* ── Splash Screen ────────────────────────────────────────────── */
.splash-screen {
  position: fixed; z-index: 9999; inset: 0;
  background:
    radial-gradient(circle at 60% 30%, rgba(47,168,75,.12) 0%, transparent 60%),
    linear-gradient(180deg, #060E1A 0%, #0a1a2f 60%, #000 100%);
  display: flex; align-items: center; justify-content: center;
  transition: opacity .5s cubic-bezier(.4,0,.2,1);
  opacity: 1; pointer-events: all;
}
.splash-screen.hide { opacity: 0; pointer-events: none; }

/* ── Header ───────────────────────────────────────────────────── */
.app-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 0; margin-bottom: 16px;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand-logo {
  width: 36px; height: 36px; border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), #69cf78);
  display: grid; place-items: center;
  font-weight: 900; font-size: 14px; color: #fff;
}
.brand-name { font-size: 20px; font-weight: 800; }
.brand-name span { color: var(--accent); }
.header-actions { display: flex; align-items: center; gap: 10px; }
.balance-pill {
  padding: 8px 16px; border-radius: var(--radius);
  background: var(--glass2); backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  font-weight: 700; font-size: 14px;
  display: flex; align-items: center; gap: 6px;
  cursor: pointer;
}
.balance-pill .amount { color: var(--accent); }

/* ── Bottom Tab Nav (Style A) ─────────────────────────────────── */
.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 100;
  display: flex; justify-content: space-around; align-items: center;
  height: 64px;
  background: rgba(6,14,26,.96);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--border);
}
.bottom-nav a {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  color: var(--muted); text-decoration: none;
  font-size: 11px; font-weight: 600; transition: .2s;
  padding: 4px 0;
}
.bottom-nav a .icon { font-size: 22px; transition: .2s; }
.bottom-nav a.active { color: var(--accent); }
.bottom-nav a.active .icon { filter: drop-shadow(0 0 6px var(--accent)); }

/* ── Top Nav Pills (scrollable) ───────────────────────────────── */
.nav-pills {
  display: flex; gap: 6px; overflow-x: auto;
  padding: 4px; margin-bottom: 20px;
  scrollbar-width: none;
  background: var(--glass); border-radius: var(--radius);
  border: 1px solid var(--border);
  backdrop-filter: blur(12px);
}
.nav-pills::-webkit-scrollbar { display: none; }
.nav-pill {
  white-space: nowrap; padding: 10px 18px; border-radius: 12px;
  background: transparent; color: var(--muted);
  font-weight: 600; font-size: 14px; cursor: pointer;
  transition: .2s; border: none; font-family: inherit;
}
.nav-pill.active {
  background: linear-gradient(135deg, var(--accent), #3cbf5e);
  color: #fff; box-shadow: 0 4px 16px var(--accent-glow);
}
.nav-pill:hover:not(.active) { background: var(--glass2); color: var(--text); }

/* Legacy top-nav compat */
.top-nav { display: none; }
.hero-header { display: contents; }
.brand-block { display: none; }

/* ── Hero Spotlight ───────────────────────────────────────────── */
.hero-spotlight {
  position: relative; padding: 28px 24px; margin-bottom: 20px; overflow: hidden;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(47,168,75,.12), transparent 60%),
    var(--glass);
  backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(47,168,75,.15); border-radius: var(--radius-lg);
}
.hero-kicker {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px; border-radius: 999px;
  font-size: 12px; font-weight: 700; margin-bottom: 14px;
}
.hero-kicker.live { background: var(--live-soft); color: var(--live); }
.hero-kicker.featured { background: var(--accent-soft); color: #90f0b7; }
.hero-kicker .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--live); animation: breathe 2s ease-in-out infinite;
}
@keyframes breathe {
  0%,100% { opacity: 1; transform: scale(1); }
  50% { opacity: .4; transform: scale(.8); }
}

.hero-scoreboard {
  display: grid; grid-template-columns: 1fr auto 1fr;
  align-items: center; gap: 20px; margin-bottom: 18px;
}
.hero-team { text-align: center; }
.hero-badge {
  width: 64px; height: 64px; border-radius: 50%;
  margin: 0 auto 10px; display: grid; place-items: center;
  font-weight: 900; font-size: 22px; color: #fff;
  border: 2px solid var(--border2); position: relative; overflow: hidden;
}
.hero-badge::before { content: ''; position: absolute; inset: 0; border-radius: 50%; }
.hero-badge.home::before { background: linear-gradient(135deg, rgba(96,165,250,.6), rgba(47,168,75,.4)); }
.hero-badge.away::before { background: linear-gradient(135deg, rgba(168,85,247,.6), rgba(239,68,68,.4)); }
.hero-badge span { position: relative; z-index: 1; }
.hero-team-name { font-size: 16px; font-weight: 700; }
.hero-center { text-align: center; }
.hero-score-big {
  font-size: 52px; font-weight: 900; line-height: 1;
  font-variant-numeric: tabular-nums; letter-spacing: 4px;
}
.hero-status { margin-top: 6px; font-size: 13px; color: var(--muted); font-weight: 600; }
.hero-status .live-text { color: var(--live); }
.match-progress { height: 3px; border-radius: 2px; background: rgba(255,255,255,.06); margin-top: 8px; overflow: hidden; }
.match-progress-fill { height: 100%; border-radius: 2px; background: linear-gradient(90deg, var(--accent), var(--blue)); transition: width .5s; }

/* ── Hero Quick Odds ──────────────────────────────────────────── */
.hero-odds { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.hero-odd-btn {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 14px 10px; border-radius: 14px;
  background: var(--glass2); border: 1px solid var(--border);
  cursor: pointer; transition: .2s; color: var(--text);
}
.hero-odd-btn:hover {
  background: var(--glass3); border-color: var(--accent);
  transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,.2);
}
.hero-odd-btn.selected { background: var(--accent-soft); border-color: var(--accent); }
.hero-odd-label { font-size: 12px; color: var(--muted); }
.hero-odd-price { font-size: 20px; font-weight: 800; }

/* ── Section ──────────────────────────────────────────────────── */
.section { margin-bottom: 24px; }
.section-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 14px;
}
.section-head h3 {
  margin: 0; font-size: 18px; font-weight: 800;
  display: flex; align-items: center; gap: 8px;
}
.section-head a { color: var(--accent); text-decoration: none; font-size: 13px; font-weight: 600; }

/* ── Content Grid ─────────────────────────────────────────────── */
.content-grid { display: grid; gap: 24px; }
.content-two-col { display: grid; gap: 24px; }

/* ── Match Cards (glass) ──────────────────────────────────────── */
.match-grid { display: grid; gap: 12px; }
.match-card, .mc-card {
  display: grid; grid-template-columns: 56px 1fr auto;
  align-items: center; gap: 14px;
  padding: 16px 18px; cursor: pointer;
  background: var(--glass);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  transition: border-color .2s, transform .2s, box-shadow .2s;
}
.match-card:hover, .mc-card:hover {
  border-color: var(--border2); transform: translateY(-2px); box-shadow: var(--shadow);
}
.mc-time { text-align: center; }
.mc-time .minute { font-size: 15px; font-weight: 800; color: var(--live); }
.mc-time .scheduled { font-size: 15px; font-weight: 700; color: var(--blue); }
.mc-time .label { font-size: 11px; color: var(--muted); }
.mc-teams { display: grid; gap: 6px; }
.mc-team { display: flex; align-items: center; gap: 8px; }
.mc-badge {
  width: 26px; height: 26px; border-radius: 50%;
  display: grid; place-items: center;
  font-size: 11px; font-weight: 800; color: #fff;
  flex-shrink: 0; border: 1px solid var(--border);
}
.mc-badge.h { background: linear-gradient(135deg, rgba(96,165,250,.7), rgba(47,168,75,.5)); }
.mc-badge.a { background: linear-gradient(135deg, rgba(168,85,247,.7), rgba(239,68,68,.5)); }
.mc-team span { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mc-score { font-size: 16px; font-weight: 800; font-variant-numeric: tabular-nums; margin-left: auto; }

/* ── Odds flash (Style B) ─────────────────────────────────────── */
.mc-odds { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.mc-odd {
  padding: 10px 8px; border-radius: 10px; text-align: center;
  background: var(--glass2); border: 1px solid var(--border);
  cursor: pointer; transition: .15s;
}
.mc-odd:hover { border-color: var(--accent); background: var(--accent-soft); }
.mc-odd.selected { background: var(--accent-soft); border-color: var(--accent); }
.mc-odd-label { font-size: 10px; color: var(--muted); display: block; }
.mc-odd-price { font-size: 15px; font-weight: 700; display: block; font-variant-numeric: tabular-nums; }

@keyframes flashUp   { 0% { background: rgba(47,168,75,.35); } 100% { background: var(--glass2); } }
@keyframes flashDown { 0% { background: rgba(239,68,68,.35); } 100% { background: var(--glass2); } }
.mc-odd.flash-up   { animation: flashUp   .6s ease-out; }
.mc-odd.flash-down  { animation: flashDown .6s ease-out; }
.odds-change-up   { color: var(--accent) !important; }
.odds-change-down { color: var(--live)   !important; }

/* same flash for .odds-btn used in detail pages */
.odds-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(80px, 1fr)); gap: 10px; }
.odds-btn {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 12px 10px; border-radius: 12px;
  background: var(--glass2); border: 1px solid var(--border);
  cursor: pointer; transition: .2s; color: var(--text); font-family: inherit;
}
.odds-btn:hover { background: var(--accent-soft); border-color: var(--accent); transform: translateY(-3px); box-shadow: 0 6px 20px rgba(0,0,0,.25); }
.odds-btn.selected { background: var(--accent-soft); border-color: var(--accent); }
.odds-btn.flash-up   { animation: flashUp   .6s ease-out; }
.odds-btn.flash-down  { animation: flashDown .6s ease-out; }
.odds-label { font-size: 11px; color: var(--muted); }
.odds-price { font-size: 18px; font-weight: 700; }

/* ── Market Group ─────────────────────────────────────────────── */
.market-group { margin-bottom: 20px; }
.market-title {
  font-size: 13px; font-weight: 600; text-transform: uppercase;
  letter-spacing: .06em; color: var(--muted); margin: 0 0 10px;
  display: flex; align-items: center; gap: 8px;
}

/* ── Inplay Live Odds ─────────────────────────────────────────── */
.live-odds-banner {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px; margin-bottom: 16px; border-radius: 10px;
  background: rgba(239,68,68,.1); border: 1px solid rgba(239,68,68,.25);
  font-size: 13px; font-weight: 600; color: var(--live, #ef4444);
}
.live-dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--live, #ef4444);
  animation: livePulse 1.5s ease-in-out infinite;
}
@keyframes livePulse { 0%,100% { opacity: 1; } 50% { opacity: .3; } }
.market-live-tag {
  display: inline-block; padding: 2px 6px; border-radius: 4px;
  background: var(--live, #ef4444); color: #fff;
  font-size: 10px; font-weight: 700; letter-spacing: .08em;
  line-height: 1; vertical-align: middle;
}
.inplay-market { border-left: 3px solid var(--live, #ef4444); padding-left: 12px; }
.inplay-odd {
  border-color: rgba(239,68,68,.3);
}
.inplay-odd:hover {
  border-color: var(--live, #ef4444); background: rgba(239,68,68,.12);
}

/* ── Odds Table (multi-line markets) ──────────────────────────── */
.odds-table {
  width: 100%; border-collapse: collapse; margin-top: 6px;
}
.odds-table th {
  padding: 6px 8px; font-size: 12px; color: var(--muted, #8E9BB3);
  font-weight: 600; text-align: center; border-bottom: 1px solid var(--border, rgba(255,255,255,.08));
}
.odds-table td { padding: 4px 4px; text-align: center; }
.odds-table-line {
  font-size: 13px; font-weight: 700; color: var(--text, #F0F4F8);
  text-align: left !important; padding-left: 4px !important; white-space: nowrap; min-width: 48px;
}
.odds-table .odds-btn.table-odd {
  width: 100%; min-height: 40px; padding: 6px 8px;
  border-radius: 8px; border: 1px solid var(--border2, rgba(255,255,255,.12));
  background: var(--glass2, rgba(255,255,255,.08));
  cursor: pointer; transition: border-color .15s, background .15s;
}
.odds-table .odds-btn.table-odd:hover {
  border-color: var(--accent, #2FA84B); background: var(--accent-soft, rgba(47,168,75,.15));
}
.odds-table .odds-btn.table-odd.inplay-odd { border-color: rgba(239,68,68,.3); }
.odds-table .odds-btn.table-odd.inplay-odd:hover {
  border-color: var(--live, #ef4444); background: rgba(239,68,68,.12);
}
.odds-table .odds-price { font-size: 14px; font-weight: 700; color: var(--accent, #2FA84B); }

/* ── League Cards ─────────────────────────────────────────────── */
.league-grid { display: grid; gap: 10px; margin-top: 16px; }
.league-card {
  padding: 18px; cursor: pointer;
  display: flex; align-items: center; gap: 14px;
  background:
    radial-gradient(ellipse at top left, rgba(47,168,75,.08), transparent 60%),
    var(--glass);
  backdrop-filter: blur(16px); border: 1px solid var(--border);
  border-radius: var(--radius-lg); transition: .2s;
}
.league-card:hover { border-color: rgba(47,168,75,.3); transform: translateY(-2px); }
.league-card.active { border-color: var(--accent); background: rgba(47,168,75,.1); }
.league-card-info { min-width: 0; }
.league-card strong { display: block; font-size: 15px; font-weight: 700; margin-bottom: 4px; }
.league-card strong a { color: var(--text); }
.league-card p { margin: 0; font-size: 12px; color: var(--muted); }
.league-card-logo { width: 32px; height: 32px; object-fit: contain; flex-shrink: 0; }

/* ── Date Filter Tabs ─────────────────────────────────────────── */
.date-filter-tabs { display: inline-flex; align-items: center; gap: 6px; }
.date-filter-btn {
  border: 1px solid var(--border); background: var(--glass);
  color: var(--muted); border-radius: 999px; padding: 8px 14px;
  font: inherit; cursor: pointer; transition: .15s; font-size: 13px;
}
.date-filter-btn:hover { border-color: var(--accent); color: var(--text); }
.date-filter-btn.active {
  background: var(--accent-soft); border-color: var(--accent); color: var(--accent);
}
.date-filter-btn:disabled { cursor: not-allowed; opacity: .4; }

/* ── Live Hub ─────────────────────────────────────────────────── */
.live-hub { display: grid; gap: 18px; margin-top: 16px; }
.live-hub-list { margin-top: 0; }
.live-hub-detail {
  min-height: 100%; border-radius: var(--radius-lg);
  background: var(--glass); backdrop-filter: blur(20px);
  border: 1px solid var(--border); padding: 22px;
}

/* ── Live Scoreboard Match Rows ───────────────────────────────── */
.live-group {
  padding: 18px; border-radius: var(--radius-lg);
  background: var(--glass); backdrop-filter: blur(16px);
  border: 1px solid var(--border);
}
.live-group + .live-group { margin-top: 14px; }
.live-group-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 12px; margin-bottom: 14px;
}
.live-group-head h4 { margin: 0; font-size: 18px; font-weight: 800; }
.live-group-head p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.live-scoreboard-list { display: grid; gap: 10px; }
.live-scoreboard-match {
  display: grid; grid-template-columns: 60px minmax(0,1fr) 44px;
  align-items: center; gap: 14px; padding: 12px 14px;
  border-radius: 16px; background: var(--glass2);
  border: 1px solid var(--border); color: var(--text);
  text-align: left; font: inherit; cursor: pointer; transition: .15s;
}
.live-scoreboard-match:hover {
  border-color: rgba(47,168,75,.3); background: var(--glass3);
  transform: translateY(-1px);
}
.live-scoreboard-match.selected {
  border-color: rgba(47,168,75,.5); background: rgba(47,168,75,.08);
  box-shadow: inset 0 0 0 1px rgba(47,168,75,.15);
}
.live-scoreboard-time { display: grid; gap: 4px; justify-items: start; }
.live-scoreboard-time span { color: var(--muted); font-size: 11px; line-height: 1; }
.live-scoreboard-time strong { margin: 0; font-size: 20px; line-height: 1; color: var(--live); }
.live-scoreboard-teams { display: grid; gap: 6px; min-width: 0; }
.live-scoreboard-team-row {
  display: grid; grid-template-columns: 24px minmax(0,1fr);
  align-items: center; gap: 8px; min-width: 0;
}
.live-scoreboard-badge {
  width: 24px; height: 24px; border-radius: 50%;
  display: grid; place-items: center; overflow: hidden;
  font-size: 10px; font-weight: 800; color: #fff;
  border: 1px solid var(--border);
}
.live-scoreboard-badge.team-logo {
  background: linear-gradient(135deg, rgba(96,165,250,.7), rgba(47,168,75,.5));
  font-size: 9px; letter-spacing: -0.5px;
}
/* Team logo images — inherit size from context class */
.team-logo-img {
  object-fit: contain; border-radius: 50%;
}
.team-logo-img.live-scoreboard-badge { width: 24px; height: 24px; }
.team-logo-img.match-modal-badge { width: 40px; height: 40px; }
.team-logo-img.match-hero-badge { width: 48px; height: 48px; }
.live-detail-team .team-logo-img { width: 56px; height: 56px; }
/* Featured / Hub / Listing card badges */
.featured-badge.team-logo, .featured-badge.team-logo-img { width: 40px; height: 40px; margin: 0 auto 6px; display: block; border-radius: 50%; }
.hub-badge.team-logo, .hub-badge.team-logo-img { width: 22px; height: 22px; border-radius: 50%; flex-shrink: 0; }
.listing-badge.team-logo, .listing-badge.team-logo-img { width: 22px; height: 22px; border-radius: 50%; flex-shrink: 0; }
.match-card-teams { display: flex; align-items: center; gap: 8px; min-width: 0; }
.match-card-teams strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.live-scoreboard-teams span {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: 14px; font-weight: 600;
}
.live-scoreboard-score { display: grid; gap: 6px; justify-items: end; }
.live-scoreboard-score strong { margin: 0; font-size: 24px; line-height: 1; font-variant-numeric: tabular-nums; }

/* ── Live Detail Panel ────────────────────────────────────────── */
.live-detail-shell { display: grid; gap: 18px; }
.live-detail-topbar { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; }
.live-detail-kicker { margin: 0 0 8px; color: var(--blue); font-size: 14px; font-weight: 700; }
.live-detail-topbar h4 { margin: 0; font-size: 24px; line-height: 1.1; }
.live-detail-datetime {
  width: fit-content; padding: 8px 14px; border-radius: 999px;
  background: rgba(0,0,0,.22); border: 1px solid var(--border);
  color: var(--muted); font-weight: 600; font-size: 13px;
}
.live-detail-scoreboard {
  display: grid; grid-template-columns: 1fr auto 1fr;
  gap: 18px; align-items: center; padding: 22px 18px;
  border-radius: var(--radius-lg);
  background: radial-gradient(circle at top center, rgba(96,165,250,.1), transparent 50%), var(--glass2);
  border: 1px solid var(--border);
}
.live-detail-team { display: grid; justify-items: center; gap: 8px; text-align: center; }
.live-detail-team strong { margin: 0; font-size: 20px; }
.live-detail-team span { color: var(--muted); font-size: 12px; }
.live-detail-badge {
  width: 56px; height: 56px; border-radius: 50%;
  display: grid; place-items: center; font-weight: 800; font-size: 20px;
  color: #fff; border: 2px solid var(--border2);
}
.live-detail-badge.team-logo {
  background: linear-gradient(135deg, rgba(96,165,250,.7), rgba(47,168,75,.5));
  font-size: 16px; letter-spacing: -0.5px;
}
.live-detail-scorewrap { display: grid; justify-items: center; gap: 8px; }
.live-detail-score { font-size: clamp(36px, 5vw, 56px); font-weight: 800; line-height: 1; }
.live-detail-scorewrap span { color: var(--muted); font-size: 13px; font-weight: 600; }
.live-detail-summary, .live-detail-meta { display: flex; flex-wrap: wrap; gap: 8px; }
.live-detail-summary span, .live-detail-meta span {
  padding: 6px 12px; border-radius: 999px;
  background: var(--glass2); border: 1px solid var(--border); font-size: 12px;
}
.live-detail-meta span { color: var(--muted); }

/* ── Live Detail Tabs ─────────────────────────────────────────── */
.live-detail-tabs {
  display: flex; flex-wrap: wrap; gap: 8px;
  padding-bottom: 6px; border-bottom: 1px solid var(--border);
}
.live-detail-tab {
  border: 0; background: transparent; color: var(--muted);
  font: inherit; font-size: 14px; font-weight: 700;
  padding: 8px 2px; border-bottom: 3px solid transparent;
  cursor: pointer; transition: .15s;
}
.live-detail-tab.active { color: var(--blue); border-bottom-color: var(--blue); }
.live-detail-tabpanel { display: grid; gap: 16px; }
.live-detail-columns { display: grid; gap: 16px; }
.live-detail-section {
  padding: 16px; border-radius: 16px;
  background: var(--glass2); border: 1px solid var(--border);
}
.compact-head h5 { margin: 0; font-size: 15px; }
.live-detail-timeline, .live-detail-stats { display: grid; gap: 12px; }
.live-detail-timeline article { display: grid; gap: 4px; }
.live-detail-timeline strong, .live-detail-stat-row strong { margin: 0; font-size: 15px; }
.live-detail-timeline p { margin: 0; color: var(--muted); font-size: 13px; }
.live-detail-copy { margin: 4px 0; color: var(--muted); line-height: 1.7; font-size: 13px; }
.live-detail-copy strong { display: inline; margin: 0 6px 0 0; font-size: inherit; color: var(--text); }
.live-detail-stat-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.live-detail-stat-row span { color: var(--muted); font-size: 13px; }
.live-detail-odds { display: grid; gap: 12px; }
.live-detail-odds h4 { margin: 0; font-size: 16px; }
.live-detail-actions { display: flex; justify-content: flex-start; }

/* ── Status Badges ────────────────────────────────────────────── */
.status-pill {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 700; letter-spacing: .04em;
  background: var(--glass2); color: var(--muted);
}
.status-pill.live {
  background: var(--live-soft); color: var(--live);
  animation: live-pulse 1.8s ease-in-out infinite;
}
.status-pill.live::before {
  content: ''; display: inline-block; width: 7px; height: 7px;
  border-radius: 50%; background: var(--live); flex-shrink: 0;
}
@keyframes live-pulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(239,68,68,.4); }
  50% { box-shadow: 0 0 0 6px rgba(239,68,68,0); }
}

.eyebrow, .panel-tag, .mini-tag, .league-pill {
  display: inline-flex; align-items: center; width: fit-content;
  padding: 5px 10px; border-radius: 999px;
  font-size: 12px; letter-spacing: .04em;
  background: var(--accent-soft); color: #90f0b7;
}

/* ── Panels (legacy sections) ─────────────────────────────────── */
.panel {
  padding: 22px; border-radius: var(--radius-lg);
  background: var(--glass); backdrop-filter: blur(20px);
  border: 1px solid var(--border); margin-bottom: 20px;
}
.hero-panel {
  display: grid; gap: 20px; padding: 24px;
  border-radius: var(--radius-lg);
  background: var(--glass); backdrop-filter: blur(20px);
  border: 1px solid var(--border); margin-bottom: 20px;
}
.hero-copy h2 { margin: 12px 0 10px; font-size: 28px; overflow-wrap: break-word; word-break: break-word; }
.hero-copy p { margin: 0; color: var(--muted); line-height: 1.6; font-size: 15px; }
.featured-match-card {
  padding: 20px; border-radius: 20px;
  background: var(--glass2); border: 1px solid var(--border);
}
.league-row {
  display: flex; justify-content: space-between; gap: 12px; align-items: center;
}
.teams-row {
  display: grid; grid-template-columns: 1fr auto 1fr;
  gap: 14px; align-items: center; margin: 18px 0;
}
.teams-row div { text-align: center; }
.teams-row div strong { display: block; font-size: 16px; }
.teams-row div span { display: block; margin-top: 4px; font-size: 12px; color: var(--muted); }
.match-hero-badge {
  width: 48px; height: 48px; border-radius: 50%; margin: 0 auto 6px;
  display: grid; place-items: center; font-size: 16px; font-weight: 800;
  color: #fff; border: 2px solid rgba(255,255,255,.15);
  letter-spacing: -0.5px;
}
.score { font-size: 36px; font-weight: 800; text-align: center; font-variant-numeric: tabular-nums; }
.score-live { color: var(--live); }

/* ── Wallet Panel ─────────────────────────────────────────────── */
.wallet-panel { margin-bottom: 20px; }
.wallet-grid {
  margin-top: 18px; padding: 18px; border-radius: 16px;
  background: var(--glass2);
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
}
.wallet-label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.wallet-value { display: block; font-size: 28px; font-weight: 900; color: var(--accent); margin: 4px 0; }
.wallet-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.wallet-actions button {
  padding: 10px 18px; border-radius: 12px; border: none;
  font-weight: 700; font-size: 14px; cursor: pointer; transition: .15s;
  font-family: inherit;
}
.wallet-actions button:first-child {
  background: linear-gradient(135deg, var(--accent), #3cbf5e); color: #fff;
  box-shadow: 0 4px 16px var(--accent-glow);
}
.wallet-actions button:first-child:hover { filter: brightness(1.1); }
.wallet-actions button:not(:first-child) {
  background: var(--glass2); color: var(--text); border: 1px solid var(--border);
}

.wallet-summary-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 16px; margin-top: 8px;
}
.wallet-stat { background: var(--glass2); border-radius: 12px; padding: 14px 18px; border: 1px solid var(--border); }
.wallet-stat .wallet-label { display: block; font-size: 12px; opacity: .6; margin-bottom: 4px; }
.wallet-stat .wallet-value { font-size: 22px; font-weight: 700; color: var(--accent); }

/* ── Action Buttons ───────────────────────────────────────────── */
.action-btn {
  padding: 10px 20px; border: none; border-radius: 12px;
  font-size: 14px; font-weight: 700; cursor: pointer; transition: .15s;
  font-family: inherit; text-decoration: none;
  background: linear-gradient(135deg, var(--accent), #3cbf5e);
  color: #fff; box-shadow: 0 4px 16px var(--accent-glow);
}
.action-btn:hover { filter: brightness(1.1); transform: translateY(-1px); text-decoration: none; }
.action-btn.secondary { background: var(--glass2); border: 1px solid var(--border); color: var(--text); box-shadow: none; }
.action-btn.full-width { width: 100%; margin-top: 8px; }
.btn-link {
  display: inline-block; padding: 8px 16px;
  border: 1px solid var(--accent); border-radius: 10px;
  color: var(--accent); font-size: 14px; font-weight: 600; transition: .15s;
}
.btn-link:hover { background: var(--accent); color: #fff; text-decoration: none; }
.odds-cta {
  white-space: nowrap; font-size: 13px; color: var(--accent);
  text-decoration: none; padding: 4px 10px;
  border: 1px solid var(--accent); border-radius: 10px; flex-shrink: 0;
}
.odds-cta:hover { background: var(--accent-soft); }

/* ── Timeline Items ───────────────────────────────────────────── */
.timeline-grid { display: grid; gap: 12px; margin-top: 16px; }
.timeline-item {
  display: grid; grid-template-columns: 60px 1fr auto;
  align-items: center; gap: 8px; padding: 12px 16px;
  border-radius: 14px; background: var(--glass2);
  border: 1px solid var(--border); transition: .15s;
}
.timeline-item:hover { border-color: var(--border2); transform: translateY(-3px); box-shadow: var(--shadow); }
.timeline-item span { color: var(--muted); font-size: 12px; }
.timeline-item strong { font-size: 14px; }
.timeline-item strong a { color: var(--text); }
.timeline-item p { color: var(--muted); font-size: 12px; margin: 0; }

/* ── Match Listing Card ───────────────────────────────────────── */
.match-list { display: grid; gap: 12px; margin-top: 16px; }
.listing-card {
  display: block; /* override .match-card grid */
  padding: 18px; border-radius: var(--radius-lg);
  background: var(--glass); backdrop-filter: blur(16px);
  border: 1px solid var(--border); cursor: pointer; transition: .2s;
}
.listing-card .league-row { margin-bottom: 8px; }
.listing-card .match-card-row { margin-bottom: 6px; }
.listing-card:hover { border-color: var(--border2); transform: translateY(-3px); box-shadow: var(--shadow); }
.match-card-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }

/* ── Compact headers (sub-pages) ──────────────────────────────── */
.compact-header { margin-bottom: 20px; }
.compact-block {
  padding: 24px; border-radius: var(--radius-lg);
  background: var(--glass); backdrop-filter: blur(20px);
  border: 1px solid var(--border);
}
.compact-block h1 { font-size: clamp(24px, 5vw, 38px); margin: 8px 0; }
.detail-hero { margin-bottom: 14px; }
.detail-tabs { margin-bottom: 16px; }
.filters-grid { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.listing-cards { gap: 14px; }
.small-odds button { padding: 12px 10px; }
.stage-block + .stage-block { margin-top: 18px; }

/* ── Utilities ────────────────────────────────────────────────── */
.muted { color: var(--muted); font-size: 14px; padding: 12px 0; }
.hidden { display: none !important; }

/* ── Animations ───────────────────────────────────────────────── */
@keyframes slideUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
.panel, .hero-panel, .glass-card, .league-card, .timeline-item {
  animation: slideUp .4s ease-out both;
}

/* ── Login Modal ──────────────────────────────────────────────── */
.login-modal-overlay {
  position: fixed; inset: 0; z-index: 8000;
  background: rgba(0,0,0,.55); backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity .3s ease;
}
.login-modal-overlay.visible { opacity: 1; }
.login-modal-box {
  position: relative;
  background: linear-gradient(160deg, rgba(15,32,53,.98), rgba(10,24,37,.98));
  backdrop-filter: blur(20px); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 32px 28px 28px;
  width: min(400px, calc(100vw - 40px));
  box-shadow: 0 24px 64px rgba(0,0,0,.5);
  transform: translateY(20px) scale(.96);
  transition: transform .3s ease, opacity .3s ease; opacity: 0;
}
.login-modal-overlay.visible .login-modal-box { transform: translateY(0) scale(1); opacity: 1; }
.login-modal-close {
  position: absolute; top: 12px; right: 14px;
  background: none; border: none; color: var(--muted); font-size: 26px;
  cursor: pointer; line-height: 1; padding: 4px 8px; border-radius: 6px;
  transition: .15s;
}
.login-modal-close:hover { background: var(--glass2); color: #fff; }
.oauth-btn:hover { border-color: var(--accent) !important; transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,.3); }

/* ── World Cup Modal ──────────────────────────────────────────── */
.worldcup-modal {
  position: fixed; inset: 0; z-index: 9999;
  display: none; align-items: center; justify-content: center;
  background: rgba(6,14,26,.8); backdrop-filter: blur(8px);
  transition: opacity .25s;
}
.worldcup-modal[style*="display: flex"] { animation: worldcupModalFadeIn .25s; }
@keyframes worldcupModalFadeIn { from { opacity: 0; } to { opacity: 1; } }
.worldcup-modal-content {
  background: var(--glass); backdrop-filter: blur(24px);
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 32px rgba(0,0,0,.5), 0 1.5px 8px rgba(47,168,75,.15);
  padding: 32px 18px 24px; max-width: 98vw; width: 420px;
  position: relative; display: flex; flex-direction: column; gap: 18px;
  border: 1px solid rgba(47,168,75,.2);
}
.worldcup-modal-close {
  position: absolute; top: 12px; right: 18px; font-size: 28px;
  background: none; border: none; color: #fff; cursor: pointer; z-index: 2;
}
.worldcup-modal-close:hover { color: var(--accent); }
.worldcup-widget-iframe {
  min-height: 480px; width: 100%; border: none;
  border-radius: 12px; background: rgba(6,14,26,.6);
}

/* ── Live Match Modal (bet365 style) ──────────────────────────── */
.match-modal-overlay {
  position: fixed; inset: 0; z-index: 8500;
  background: rgba(0,0,0,.6); backdrop-filter: blur(4px);
  display: flex; align-items: flex-end; justify-content: center;
  opacity: 0; transition: opacity .3s ease;
}
.match-modal-overlay.visible { opacity: 1; }
.match-modal-sheet {
  width: 100%; max-width: 480px; max-height: 92vh;
  display: flex; flex-direction: column;
  background: linear-gradient(180deg, #0c1e2c 0%, #0a1520 100%);
  border-radius: 20px 20px 0 0;
  box-shadow: 0 -8px 40px rgba(0,0,0,.6);
  transform: translateY(100%);
  transition: transform .35s cubic-bezier(.22,1,.36,1);
  overflow: hidden;
}
.match-modal-overlay.visible .match-modal-sheet { transform: translateY(0); }

/* Header */
.match-modal-header {
  position: relative; padding: 16px 16px 14px; text-align: center;
  background: linear-gradient(180deg, #1a3a52 0%, #0f2535 100%);
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.match-modal-close {
  position: absolute; top: 10px; right: 12px;
  background: none; border: none; color: rgba(255,255,255,.6);
  font-size: 28px; cursor: pointer; line-height: 1; padding: 4px 8px;
  border-radius: 8px; transition: .15s;
}
.match-modal-close:hover { color: #fff; background: rgba(255,255,255,.1); }
.match-modal-league {
  margin: 0 0 10px; color: rgba(255,255,255,.5); font-size: 12px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .04em;
}
.match-modal-scoreboard {
  display: grid; grid-template-columns: 1fr auto 1fr;
  align-items: center; gap: 12px;
}
.match-modal-team {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
}
.match-modal-badge {
  width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center; font-size: 14px; font-weight: 800;
  color: #fff; border: 2px solid rgba(255,255,255,.15);
}
.match-modal-badge.team-logo {
  background: linear-gradient(135deg, rgba(96,165,250,.7), rgba(47,168,75,.5));
  font-size: 12px; letter-spacing: -0.5px;
}
.match-modal-team > span {
  color: #fff; font-size: 13px; font-weight: 600;
  max-width: 100px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.match-modal-result { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.match-modal-result > strong {
  color: #fff; font-size: 32px; font-weight: 800; line-height: 1;
  font-variant-numeric: tabular-nums;
}
.match-modal-result > span {
  color: var(--live, #2fa84b); font-size: 13px; font-weight: 700;
}

/* Tabs */
.match-modal-tabs {
  display: flex; gap: 0;
  background: rgba(0,0,0,.3); border-bottom: 1px solid rgba(255,255,255,.06);
}
.match-modal-tab {
  flex: 1; border: none; background: transparent; color: rgba(255,255,255,.45);
  font: inherit; font-size: 14px; font-weight: 700;
  padding: 12px 8px; cursor: pointer; transition: .15s;
  border-bottom: 3px solid transparent;
}
.match-modal-tab.active {
  color: #fff; border-bottom-color: var(--accent, #2fa84b);
  background: rgba(255,255,255,.04);
}

/* Body */
.match-modal-body {
  flex: 1; overflow-y: auto; padding: 16px;
  min-height: 40vh;
  -webkit-overflow-scrolling: touch;
}
.match-modal-body .modal-loading {
  display: flex; align-items: center; justify-content: center;
  min-height: 30vh; color: rgba(255,255,255,.4); font-size: 14px;
}
.modal-loading-spinner {
  width: 28px; height: 28px; border: 3px solid rgba(255,255,255,.1);
  border-top-color: var(--accent, #2fa84b); border-radius: 50%;
  animation: modal-spin .8s linear infinite; margin-right: 10px;
}
@keyframes modal-spin { to { transform: rotate(360deg); } }

/* Footer */
.match-modal-footer { padding: 12px 16px; border-top: 1px solid rgba(255,255,255,.06); }

/* ── Stats (bet365 bar style) ─────────────────────────────────── */
.modal-stats-list { display: grid; gap: 16px; }
.modal-stat-row {
  display: grid; grid-template-columns: 36px 1fr 36px;
  align-items: center; gap: 10px;
}
.modal-stat-home-val, .modal-stat-away-val {
  font-size: 14px; font-weight: 700; color: #fff;
  font-variant-numeric: tabular-nums;
}
.modal-stat-home-val { text-align: right; }
.modal-stat-away-val { text-align: left; }
.modal-stat-center { display: flex; flex-direction: column; gap: 4px; }
.modal-stat-label {
  font-size: 11px; color: rgba(255,255,255,.5); text-align: center;
  text-transform: uppercase; letter-spacing: .04em;
}
.modal-stat-bar {
  display: flex; height: 6px; border-radius: 3px; overflow: hidden;
  background: rgba(255,255,255,.06);
}
.modal-stat-bar-home {
  background: linear-gradient(90deg, #3b82f6, #60a5fa);
  border-radius: 3px 0 0 3px; transition: width .4s ease;
}
.modal-stat-bar-away {
  background: linear-gradient(90deg, #ef4444, #f87171);
  border-radius: 0 3px 3px 0; transition: width .4s ease;
}

/* ── Timeline ─────────────────────────────────────────────────── */
.modal-timeline { display: grid; gap: 2px; }
.modal-timeline-item {
  display: grid; grid-template-columns: 40px 28px 1fr;
  align-items: center; gap: 4px; padding: 10px 8px;
  border-radius: 10px; transition: .15s;
}
.modal-timeline-item:nth-child(odd) { background: rgba(255,255,255,.02); }
.modal-timeline-minute {
  font-size: 14px; font-weight: 700; color: var(--live, #2fa84b);
  text-align: center; font-variant-numeric: tabular-nums;
}
.modal-timeline-icon { font-size: 16px; text-align: center; }
.modal-timeline-text { font-size: 13px; color: rgba(255,255,255,.8); line-height: 1.4; }

/* ── Modal Table overrides ────────────────────────────────────── */
.match-modal-body table {
  width: 100%; border-collapse: collapse; font-size: 13px;
}
.match-modal-body table th {
  color: rgba(255,255,255,.5); font-size: 11px; text-transform: uppercase;
  padding: 8px 6px; border-bottom: 1px solid rgba(255,255,255,.08);
  text-align: left;
}
.match-modal-body table td {
  padding: 8px 6px; border-bottom: 1px solid rgba(255,255,255,.04);
}

/* Desktop: center the modal */
@media (min-width: 720px) {
  .match-modal-overlay { align-items: center; }
  .match-modal-sheet {
    border-radius: 20px; max-height: 85vh;
    transform: translateY(30px) scale(.96);
  }
  .match-modal-overlay.visible .match-modal-sheet { transform: translateY(0) scale(1); }
}

/* ── Bet Slip ─────────────────────────────────────────────────── */
.bet-slip-drawer {
  position: fixed; bottom: 64px; right: 16px; width: 320px; max-height: 60vh;
  background: rgba(6,14,26,.96); backdrop-filter: blur(24px);
  border: 1px solid var(--border); border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  box-shadow: 0 -4px 24px rgba(0,0,0,.4);
  display: flex; flex-direction: column; z-index: 99;
}
.bet-slip-drawer[hidden] { display: none; }
.bet-slip-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 16px; border-bottom: 1px solid var(--border);
  font-weight: 700; font-size: 15px;
}
.bet-slip-header button { background: none; border: none; color: var(--text); font-size: 20px; cursor: pointer; }
.bet-slip-body { flex: 1; overflow-y: auto; padding: 12px 16px; }
.bet-slip-selection {
  display: flex; justify-content: space-between; align-items: flex-start;
  padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 13px; gap: 8px;
}
.bet-slip-selection:last-child { border-bottom: none; }
.slip-remove { background: none; border: none; color: var(--live); cursor: pointer; font-size: 16px; }
.bet-slip-footer { padding: 12px 16px; border-top: 1px solid var(--border); }
.stake-label { display: flex; flex-direction: column; font-size: 12px; color: var(--muted); gap: 4px; margin-bottom: 8px; }
.stake-label input {
  padding: 8px 12px; background: var(--glass2); border: 1px solid var(--border);
  border-radius: 8px; color: var(--text); font-size: 15px; width: 100%;
}
.bet-slip-payout { font-size: 13px; margin-bottom: 8px; color: var(--muted); }
.slip-fab {
  position: fixed; bottom: 76px; right: 20px; z-index: 98;
  display: flex; align-items: center; gap: 8px;
  padding: 12px 20px; border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), #3cbf5e);
  color: #fff; font-weight: 800; font-size: 14px;
  cursor: pointer; border: none; font-family: inherit;
  box-shadow: 0 6px 24px var(--accent-glow); transition: .2s;
}
.slip-fab:hover { transform: translateY(-2px) scale(1.02); }
.slip-count {
  background: rgba(255,255,255,.25); padding: 2px 8px; border-radius: 999px; font-size: 12px;
}

/* ── Auth Form Inputs ─────────────────────────────────────────── */
.tx-input {
  display: block; background: var(--glass2); border: 1px solid var(--border);
  border-radius: 8px; color: var(--text); font-size: 14px; padding: 10px 14px;
  outline: none; transition: border-color .15s;
}
.tx-input:focus { border-color: var(--accent); }

/* ── Bet Card / Ticket ────────────────────────────────────────── */
.bet-card { background: var(--glass2); border: 1px solid var(--border); border-radius: 14px; padding: 14px 16px; margin-bottom: 10px; }
.bet-card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.bet-status { font-size: 11px; font-weight: 700; text-transform: uppercase; padding: 3px 8px; border-radius: 6px; }
.bet-status.pending { background: rgba(255,200,0,.15); color: #ffc800; }
.bet-status.won { background: rgba(47,168,75,.2); color: var(--accent); }
.bet-status.lost { background: rgba(239,68,68,.15); color: var(--live); }
.bet-status.void { background: var(--glass2); color: var(--muted); }
.bet-selection-row { font-size: 13px; padding: 3px 0; border-bottom: 1px solid var(--border); }
.bet-selection-row:last-child { border-bottom: none; }
.bet-amounts { display: flex; gap: 20px; margin-top: 10px; font-size: 13px; }
.tx-table { overflow-x: auto; }
.tx-table table { width: 100%; border-collapse: collapse; font-size: 13px; }
.tx-table th { text-align: left; padding: 8px 10px; opacity: .5; font-weight: 600; text-transform: uppercase; font-size: 11px; border-bottom: 1px solid var(--border); }
.tx-table td { padding: 8px 10px; border-bottom: 1px solid rgba(255,255,255,.04); }
.tx-amt.credit { color: var(--accent); }
.tx-amt.debit { color: var(--live); }
.tx-form { margin-top: 16px; }
.tx-form h4 { margin: 0 0 10px; font-size: 15px; }
.tx-form-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.tx-form-row input {
  flex: 1; min-width: 100px; padding: 8px 12px;
  background: var(--glass2); border: 1px solid var(--border);
  border-radius: 8px; color: var(--text); font-size: 15px;
}

/* ═══════════════════════════════════════════════════════════════
   MATCH DETAIL — Bet365-style Two-Column Layout
   ═══════════════════════════════════════════════════════════════ */
.md-shell { display: flex; gap: 20px; flex-wrap: wrap; }
.md-left { flex: 1; min-width: 0; }
.md-right {
  width: 380px; flex-shrink: 0;
  position: sticky; top: 16px; align-self: flex-start;
  background: var(--glass); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 20px; max-height: calc(100vh - 32px); overflow-y: auto;
}

/* Header / breadcrumb */
.md-header { margin-bottom: 16px; }
.md-breadcrumb { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; font-size: 13px; }
.md-breadcrumb a { color: var(--muted); font-weight: 500; }
.md-breadcrumb a:hover { color: var(--accent); }
.md-league-tag {
  padding: 2px 10px; border-radius: 6px; font-size: 11px; font-weight: 700;
  background: var(--accent-soft); color: var(--accent);
}
.md-match-title { font-size: 20px; font-weight: 800; }

/* Market category tabs */
.md-market-tabs {
  display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px;
  margin-bottom: 16px; scrollbar-width: none;
}
.md-market-tabs::-webkit-scrollbar { display: none; }
.md-tab {
  padding: 8px 16px; border-radius: 10px; border: 1px solid var(--border);
  background: transparent; color: var(--muted); font-size: 13px; font-weight: 600;
  cursor: pointer; white-space: nowrap; transition: .15s; font-family: inherit;
}
.md-tab:hover { background: var(--glass2); color: var(--text); }
.md-tab.active { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }

/* Score header */
.md-score-header { text-align: center; margin-bottom: 12px; }
.md-score-teams { display: flex; align-items: center; justify-content: center; gap: 14px; font-size: 15px; font-weight: 600; }
.md-score-num { font-size: 28px; font-weight: 900; color: var(--accent); font-variant-numeric: tabular-nums; }
.status-pill {
  display: inline-block; margin-top: 6px; padding: 3px 10px; border-radius: 6px;
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  background: var(--glass2); color: var(--muted);
}
.status-pill.live { background: var(--live-soft); color: var(--live); }

/* Badge row */
.md-badge-row { display: flex; justify-content: center; gap: 40px; margin-bottom: 16px; }
.md-badge-cell { text-align: center; }
.md-badge-cell span {
  display: inline-flex; align-items: center; justify-content: center;
  width: 48px; height: 48px; border-radius: 50%; font-size: 18px; font-weight: 800;
  border: 2px solid var(--border); background: var(--glass2); color: #fff;
}

/* Right-panel tabs */
.md-right-tabs {
  display: flex; gap: 0; border-bottom: 2px solid var(--border); margin-bottom: 14px;
}
.md-rtab {
  flex: 1; padding: 10px 0; text-align: center; font-size: 13px; font-weight: 600;
  color: var(--muted); background: none; border: none; cursor: pointer;
  border-bottom: 2px solid transparent; margin-bottom: -2px; transition: .15s; font-family: inherit;
}
.md-rtab:hover { color: var(--text); }
.md-rtab.active { color: var(--accent); border-bottom-color: var(--accent); }

/* Right panels */
.md-right-panels { }
.md-rpanel { display: none; }
.md-rpanel.active { display: block; }

/* Stats grid inside right panel */
.md-stats-grid { display: grid; gap: 10px; }
.md-stat-row {
  display: grid; grid-template-columns: 1fr auto 1fr; gap: 8px; align-items: center;
  font-size: 13px; padding: 6px 0;
}
.md-stat-row .label { text-align: center; color: var(--muted); font-size: 12px; }
.md-stat-row .home { text-align: right; font-weight: 700; }
.md-stat-row .away { text-align: left; font-weight: 700; }
.md-stat-bar {
  height: 4px; border-radius: 2px; background: var(--glass2); overflow: hidden; margin-top: 2px;
}
.md-stat-bar .fill { height: 100%; border-radius: 2px; background: var(--accent); }

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════ */
@media (min-width: 900px) {
  .content-two-col { grid-template-columns: 1fr 340px; align-items: start; }
  .hero-panel { grid-template-columns: 1.15fr .85fr; align-items: stretch; }
  .live-hub { grid-template-columns: minmax(0,.94fr) minmax(340px,.86fr); align-items: start; }
  .live-hub-detail { position: sticky; top: 24px; }
  .live-detail-columns { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .league-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .timeline-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .match-card, .mc-card { grid-template-columns: 56px 1fr auto auto; }
  .bottom-nav {
    position: static; height: auto; border: none;
    background: var(--glass); backdrop-filter: blur(16px);
    border-radius: var(--radius); padding: 6px; margin-bottom: 20px;
    gap: 4px; justify-content: flex-start;
    border: 1px solid var(--border);
  }
  .bottom-nav a {
    flex-direction: row; gap: 6px; padding: 10px 18px;
    border-radius: 12px; font-size: 14px;
  }
  .bottom-nav a.active { background: var(--accent-soft); }
  body { padding-bottom: 0; }
  .bet-slip-drawer { bottom: 0; right: 20px; border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
  .slip-fab { bottom: 24px; }
}

@media (max-width: 899px) {
  .hero-score-big { font-size: 40px; }
  .hero-badge { width: 52px; height: 52px; font-size: 18px; }
  .content-two-col { grid-template-columns: 1fr; }
}

@media (max-width: 899px) {
  .md-shell { flex-direction: column; }
  .md-right { width: 100%; position: static; max-height: none; }
}

@media (max-width: 719px) {
  .page-shell { padding: 12px; }
  .hero-spotlight { padding: 20px 16px; border-radius: 20px; }
  .hero-scoreboard { gap: 12px; }
  .hero-badge { width: 44px; height: 44px; font-size: 16px; }
  .hero-team-name { font-size: 14px; }
  .hero-score-big { font-size: 34px; }
  .hero-odds { gap: 6px; }
  .hero-odd-btn { padding: 10px 6px; }
  .hero-odd-price { font-size: 17px; }
  .match-card, .mc-card { grid-template-columns: 48px 1fr; padding: 14px; }
  .mc-odds { display: none; }
  .nav-pill { padding: 8px 14px; font-size: 13px; }
  .section-head { flex-direction: column; align-items: flex-start; gap: 8px; }
  .date-filter-tabs { width: 100%; flex-wrap: wrap; }
  .panel, .hero-panel { padding: 18px; border-radius: 20px; }
  .hero-copy h2 { font-size: 20px; margin: 8px 0 6px; }
  .hero-copy p { font-size: 13px; }
  .teams-row { margin: 12px 0; gap: 8px; }
  .teams-row div strong { font-size: 14px; }
  .score { font-size: 28px; }
  .featured-match-card { padding: 14px; }
  .detail-hero { padding: 16px; gap: 12px; }
  .detail-hero .panel-tag { font-size: 11px; }
  .detail-tabs { margin-bottom: 12px; }
  .teams-row { grid-template-columns: 1fr; text-align: center; }
  .live-detail-topbar, .live-detail-scoreboard, .live-detail-columns, .live-hub {
    grid-template-columns: 1fr;
  }
  .live-detail-topbar { display: grid; }
  .live-detail-tabs { overflow-x: auto; flex-wrap: nowrap; }
  .wallet-grid { flex-direction: column; align-items: stretch; text-align: center; }
  .wallet-actions { justify-content: center; }
  .bet-slip-drawer { right: 0; width: 100%; bottom: 64px; }
  .worldcup-modal-content {
    width: 98vw; max-width: 99vw; padding: 16px 2vw 12px; border-radius: 16px;
  }
  .worldcup-widget-iframe { min-height: 380px; }
  .worldcup-modal-close { top: 6px; right: 8px; font-size: 22px; }
}
