/* ═══════════════════════════════════════════════════
   WORLD CUP PREDICTOR — SA Flag Dark Theme
   Colours: Green #00A86B | Gold #FFB81C | Black #0A0A0A
   Navy (sparingly) #001489 | Red (sparingly) #E03C31
   ═══════════════════════════════════════════════════ */

:root {
  --bg-primary: #0A0A0A;
  --bg-secondary: #111111;
  --bg-card: #1A1A1A;
  --bg-card-hover: #222222;
  --border-subtle: #2A2A2A;
  --border-accent: #00A86B33;
  --text-primary: #F5F5F5;
  --text-secondary: #bbb;
  --text-muted: #999;
  --accent-green: #00A86B;
  --accent-green-glow: #00A86B44;
  --accent-gold: #FFB81C;
  --accent-gold-glow: #FFB81C33;
  --accent-red: #E03C31;
  --accent-navy: #001489;
  --win: #00A86B;
  --draw: #FFB81C;
  --loss: #E03C31;
  --font-heading: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-body: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --shadow-card: 0 2px 8px rgba(0,0,0,0.4);
  --shadow-card-hover: 0 4px 20px rgba(0,168,107,0.15);
  --transition: 200ms cubic-bezier(0.16, 1, 0.3, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { width: 100%; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
}

/* ── Container ── */
.container {
  width: 100%;
  max-width: none;
  margin: 0 auto;
  padding: 0 1.5rem;
}
main.container {
  display: block;
  width: 100%;
}

/* ── Typography ── */
h1, h2, h3, h4 { font-family: var(--font-heading); font-weight: 700; line-height: 1.2; }
h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }
a { color: var(--accent-green); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent-gold); }

/* ── Header ── */
.site-header {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-subtle);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.5rem;
  margin: 0 auto;
}
.site-logo {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  text-decoration: none;
}
.site-logo .ball { font-size: 1.5rem; }
.site-logo-icon { height: 36px; width: auto; vertical-align: middle; }
.site-logo span { background: linear-gradient(135deg, var(--accent-green), var(--accent-gold)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }

/* ── Nav ── */
.site-nav { display: flex; gap: 0.25rem; }
.nav-tab {
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  border: none;
  background: transparent;
  transition: all var(--transition);
  font-family: var(--font-body);
  white-space: nowrap;
}
.nav-tab.active { color: #000; background: var(--accent-green); font-weight: 700; }
.nav-tab:hover { color: var(--accent-green); background: var(--bg-card); }
.nav-tab[data-tab="share"] {
  animation: shareGlow 2s ease-in-out infinite;
}
@keyframes shareGlow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(0,168,107,0); }
  50% { box-shadow: 0 0 10px 3px rgba(0,168,107,0.45); }
}

/* ── Tab Content ── */
.tab-panel { display: none; padding: 2rem 0; width: 100%; }
.tab-panel.active { display: block; }

/* ── Cards ── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  transition: all var(--transition);
}
.card:hover { border-color: var(--border-accent); box-shadow: var(--shadow-card-hover); }

/* ── Match Card ── */
.match-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  transition: all var(--transition);
  overflow: hidden;
}
.match-card:hover { border-color: var(--accent-green-glow); box-shadow: var(--shadow-card-hover); }
.match-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 1.25rem;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-subtle);
}
.match-card-body {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  padding: 1rem 1.25rem;
}
.match-card .team { display: flex; flex-direction: column; align-items: center; gap: 0.35rem; min-width: 120px; text-align: center; }
.match-card .team-name { font-weight: 700; font-size: 0.95rem; }
.match-card .team .team-flag { font-size: 1.8rem; }
.match-card.played { background: rgba(244, 26, 26, 0.22); border-color: rgba(244, 26, 26, 0.35); }
.match-card.upcoming { background: rgba(52, 244, 26, 0.13); border-color: rgba(52, 244, 26, 0.25); }
.match-card.inprogress { background: rgba(255, 184, 27, 0.25); border-color: rgba(255, 184, 27, 0.40); }
.match-card .score {
  font-size: 1.5rem;
  font-weight: 800;
  font-family: var(--font-mono);
  color: var(--text-primary);
}
.live-timer {
  font-family: var(--font-mono);
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--accent-gold);
  margin-left: 0.5rem;
}
.match-card .score.predicted { color: #c084fc; font-size: 0.9rem; }
.match-card .vs { color: var(--text-muted); font-size: 0.75rem; font-weight: 600; text-transform: uppercase; }
.match-card .match-time {
  font-size: 1.05rem;
  color: var(--text-secondary);
  font-weight: 600;
}
.match-card .match-group {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  position: absolute;
  top: 0.5rem;
  left: 0.75rem;
}

/* ── Today's Games ── */
.today-section { margin-bottom: 2rem; }
.today-section h2 { color: var(--accent-gold); margin-bottom: 1rem; font-size: 1.1rem; text-transform: uppercase; letter-spacing: 0.05em; }
.today-games { display: flex; flex-direction: column; gap: 0.75rem; }

/* ── Standings Table ── */
.standings-table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.standings-table th {
  text-align: left;
  padding: 0.625rem 0.75rem;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--border-subtle);
}
.standings-table td {
  padding: 0.625rem 0.75rem;
  border-bottom: 1px solid var(--border-subtle);
}
.standings-table tr:hover td { background: var(--bg-card-hover); }
.standings-table .pos { width: 2rem; text-align: center; font-weight: 700; }
.standings-table .team-cell { display: flex; align-items: center; gap: 0.5rem; }
.standings-table .pts { font-weight: 800; color: var(--accent-gold); }

/* ── Prediction Input ── */
.prediction-input {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.prediction-input input {
  width: 135px;
  padding: 0.375rem 0.5rem;
  background: var(--bg-primary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 1rem;
  font-family: var(--font-mono);
  text-align: center;
  transition: border-color var(--transition);
}
.prediction-input input:focus {
  outline: none;
  border-color: var(--accent-green);
  box-shadow: 0 0 0 2px var(--accent-green-glow);
}
.prediction-input input.actual { border-color: var(--accent-gold); }
.prediction-input input.actual:focus { border-color: var(--accent-gold); box-shadow: 0 0 0 2px var(--accent-gold-glow); }
.prediction-input .dash { color: var(--text-muted); font-weight: 700; }

/* ── Mobile spin buttons ── */
.spin-btn {
  display: none;
}
.spin-group {
  display: flex;
  align-items: center;
}
@media (max-width: 768px) {
  .spin-group { position: relative; display: inline-flex; }
  .spin-group .actual { width: 70px !important; padding: 0.35rem 24px 0.35rem 24px !important; text-align: center; }
  .spin-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: calc(100% - 4px);
    background: rgba(255,255,255,0.08);
    border: none;
    color: var(--text-secondary);
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    z-index: 1;
    user-select: none;
    -webkit-user-select: none;
  }
  .spin-btn.spin-down { left: 2px; border-radius: 3px 0 0 3px; }
  .spin-btn.spin-up { right: 2px; border-radius: 0 3px 3px 0; }
  .spin-btn:active { background: var(--accent-green); color: #000; }
  .prediction-input.mobile-spin { gap: 0.25rem; }
}
.prediction-input .label { font-size: 0.65rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; }

/* ── Result Badge ── */
.result-badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.result-badge.correct { background: rgba(74,222,128,0.28); color: #4ade80; }
.result-badge.partial { background: rgba(245,158,11,0.28); color: #f59e0b; }
.result-badge.outcome-only { background: rgba(250,204,21,0.28); color: #facc15; }
.result-badge.wrong { background: rgba(239,68,68,0.28); color: #ef4444; }

/* ── Results Grid ── */
.results-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  width: 100%;
}
.results-grid > .card {
  flex: 0 0 calc(33.333% - 0.34rem);
  padding: 0.5rem;
  width: calc(33.333% - 0.34rem);
  max-width: calc(33.333% - 0.34rem);
  box-sizing: border-box;
}
.result-row {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.76rem;
  white-space: nowrap;
}
.result-teams {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  flex: 1;
  min-width: 0;
}
.result-teams .team-side {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  flex: 1;
  min-width: 0;
}
.result-teams .team-side:first-child { justify-content: flex-end; }
.result-teams .team-side .flag { flex-shrink: 0; }
.result-teams .team-side .name { overflow: hidden; text-overflow: ellipsis; }
.result-vs { color: var(--text-muted); font-size: 0.65rem; flex-shrink: 0; }
.result-scores { font-family: var(--font-mono); text-align: center; flex-shrink: 0; min-width: 70px; }
.result-scores strong { color: var(--text-primary); font-size: 0.85rem; }
.result-pred { font-size: 0.65rem; color: var(--text-muted); display: inline; margin-left: 0.3rem; }

@media (max-width: 768px) {
  .results-grid { 
    display: flex; 
    flex-direction: column; 
    gap: 0.75rem; 
    padding: 0 0.5rem;
  }
  .results-grid > .card {
    flex: none;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }
  .result-row { font-size: 0.85rem; }
}

/* ── Group Grid ── */
.groups-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.25rem; }
.group-card h3 {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-gold);
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--accent-green);
}

/* ── Team Profile ── */
.team-profile { margin-bottom: 1.5rem; }
.team-profile .team-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.team-profile .team-header .flag { font-size: 2rem; }
.team-profile .team-header .name { font-size: 1.25rem; font-weight: 800; }
.team-profile .team-header .rank {
  background: var(--accent-gold);
  color: #000;
  font-weight: 800;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-size: 0.75rem;
}

/* ── Stat Bar ── */
.stat-row { display: flex; gap: 0.5rem; margin-bottom: 0.5rem; font-size: 0.8rem; }
.stat-label { color: var(--text-muted); min-width: 100px; }
.stat-bar-bg { flex: 1; background: var(--bg-primary); border-radius: 999px; height: 8px; align-self: center; overflow: hidden; }
.stat-bar-fill { height: 100%; border-radius: 999px; transition: width 400ms ease; }
.stat-bar-fill.green { background: var(--accent-green); }
.stat-bar-fill.gold { background: var(--accent-gold); }
.stat-bar-fill.red { background: var(--accent-red); }

/* ── League Table ── */
.league-table-container {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.league-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.league-table thead { background: var(--bg-secondary); }
.league-table thead.orange { background: #f39c12; }
.league-table thead.orange th { color: #fff; border-bottom-color: #e67e22; }
.league-table thead.blue { background: #3498db; }
.league-table thead.blue th { color: #fff; border-bottom-color: #2980b9; }
.league-table th {
  text-align: center;
  padding: 0.75rem 0.5rem;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 2px solid var(--accent-green);
  border-right: 1px solid var(--border-subtle);
}
.league-table th:last-child { border-right: none; }
.league-table th:first-child { width: 2.5rem; }
.league-table td {
  padding: 0.75rem 0.5rem;
  border-bottom: 1px solid var(--border-subtle);
  border-right: 1px solid var(--border-subtle);
  vertical-align: middle;
  text-align: center;
}
.league-table td:first-child { text-align: center; }
.league-table td:nth-child(2) { text-align: left; }
.league-table td:last-child { border-right: none; }
.league-table tbody tr { transition: background var(--transition); }
.league-table tbody tr:hover { background: var(--bg-card-hover); }
.league-table tbody tr:last-child td { border-bottom: none; }
.league-table .rank { font-weight: 800; font-size: 1.1rem; }
.league-table .rank.gold { color: #FFD700; }
.league-table .rank.silver { color: #C0C0C0; }
.league-table .rank.bronze { color: #CD7F32; }
.league-table .player-name { font-weight: 700; }
.league-table .player-name .ai-badge {
  display: inline-block;
  background: var(--accent-green-glow);
  color: var(--accent-green);
  font-size: 0.6rem;
  padding: 0.1rem 0.4rem;
  border-radius: 99px;
  margin-left: 0.35rem;
  font-weight: 600;
  vertical-align: middle;
}
.league-table .pts-total {
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--accent-gold);
}
.league-table .pts-breakdown {
  font-size: 0.75rem;
  color: var(--text-muted);
}
.league-table .pts-breakdown span { margin-right: 0.5rem; }
.league-table .pts-breakdown .exact { color: var(--win); }
.league-table .pts-breakdown .margin { color: var(--accent-gold); }
.league-table .pts-breakdown .outcome { color: var(--draw); }

.league-table .form-mini {
  display: flex;
  gap: 3px;
}
.league-table .form-dot {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6rem;
  font-weight: 800;
  color: #fff;
}
.form-dot.win { background: var(--win); }
.form-dot.loss { background: var(--loss); }
.form-dot.draw { background: var(--draw); color: #000; }

.scoring-key { width: 100%; border-collapse: collapse; }
.scoring-key td { padding: 0.4rem 0.5rem; border-bottom: 1px solid var(--border-subtle); font-size: 0.85rem; color: var(--text-secondary); }
.scoring-key tr:last-child td { border-bottom: none; }
.sk-badge { font-weight: 800; font-size: 0.9rem; text-align: center; width: 6rem; }

.check-icon {
  width: 16px;
  height: 16px;
  vertical-align: middle;
  mix-blend-mode: multiply;
}
.checks {
  display: inline-flex;
  gap: 2px;
  align-items: center;
}
.methodology { max-width: 700px; }
.methodology p { margin-bottom: 0.75rem; color: var(--text-secondary); }
.methodology strong { color: var(--accent-gold); }

/* ── Share Page ── */
.share-card {
  max-width: 650px;
  margin: 0 auto;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2.5rem 2rem;
  text-align: center;
}
.share-stat-row {
  display: flex;
  justify-content: center;
  gap: 3rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}
.share-stat-number {
  font-size: 2rem;
  font-weight: 800;
  font-family: var(--font-mono);
  background: linear-gradient(135deg, var(--accent-green), var(--accent-gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.share-stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 0.15rem;
}
.share-divider {
  width: 60px;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-green), var(--accent-gold));
  margin: 1.5rem auto;
  border-radius: 1px;
}
.share-body {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--text-secondary);
  max-width: 500px;
  margin: 0 auto;
}
.share-body strong { color: var(--accent-gold); }
.share-cta {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 1rem;
}
.share-link-btn {
  display: inline-block;
  padding: 0.85rem 2rem;
  background: linear-gradient(135deg, var(--accent-green), #008055);
  color: #fff;
  border-radius: var(--radius-md);
  font-size: 1.1rem;
  font-weight: 700;
  text-decoration: none;
  transition: all var(--transition);
  box-shadow: 0 4px 20px rgba(0,168,107,0.3);
}
.share-link-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0,168,107,0.4);
  color: #fff;
}
.share-thanks {
  margin-top: 1.5rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}
.share-disclaimer {
  margin-top: 1rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  max-width: 450px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
  font-style: italic;
}
.share-disclaimer a { color: var(--accent-green); }

/* ── About Page ── */
.formula-box {
  background: var(--bg-primary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-secondary);
  overflow-x: auto;
}
.formula-box strong { color: var(--accent-gold); }
.about-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}
.about-table th {
  text-align: left;
  padding: 0.4rem 0;
  color: var(--text-muted);
  font-weight: 600;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.about-table td {
  padding: 0.5rem 0.25rem;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}

/* ── Cost Comparison ── */
.cost-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}
.cost-card {
  background: var(--bg-primary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  text-align: center;
  position: relative;
}
.cost-card.winner {
  border-color: var(--accent-green);
  box-shadow: 0 0 20px var(--accent-green-glow);
}
.cost-badge {
  position: absolute;
  top: -0.6rem;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent-green);
  color: #000;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 0.15rem 0.75rem;
  border-radius: 99px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.cost-model {
  font-size: 1rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 0.15rem;
}
.cost-provider {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}
.cost-per {
  font-size: 1.3rem;
  font-weight: 800;
  font-family: var(--font-mono);
  color: var(--accent-gold);
  margin-bottom: 0.75rem;
}
.cost-per span { font-size: 0.65rem; font-weight: 400; color: var(--text-muted); }
.cost-breakdown div {
  display: flex;
  justify-content: space-between;
  padding: 0.3rem 0;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.8rem;
}
.cost-breakdown div:last-child { border-bottom: none; }
.cost-breakdown div span:first-child { color: var(--text-muted); }
.cost-breakdown div span:last-child { font-weight: 600; font-family: var(--font-mono); }

.savings-box {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--bg-primary);
  border: 1px solid var(--accent-green);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  max-width: 600px;
  margin: 0 auto 1rem;
}
.savings-box strong { color: var(--accent-green); font-size: 0.95rem; }
.savings-box p { font-size: 0.75rem; color: var(--text-muted); margin-top: 0.15rem; }
.savings-pill {
  background: var(--accent-green);
  color: #000;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 0.2rem 0.6rem;
  border-radius: 99px;
  white-space: nowrap;
}
.share-insight {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 550px;
  margin: 0 auto;
  text-align: center;
}
.share-insight strong { color: var(--accent-gold); }
.welcome-banner {
  background: linear-gradient(135deg, var(--accent-green), #008055);
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--accent-green);
  position: sticky;
  top: 0;
  z-index: 99;
}
.welcome-banner span { color: #fff; }

#syncStatusTop, #syncStatus { 
  text-shadow: 0 0 0 1px rgba(255,255,255,0.5), 0 0 0 2px rgba(255,255,255,0.25);
}
.sync-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1px solid #fff;
  margin-right: 4px;
  vertical-align: middle;
}

/* ── Sign-in Overlay ── */
.signin-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}
.signin-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2rem 2.5rem;
  max-width: 420px;
  width: 90%;
  text-align: center;
}
.signin-icon { font-size: 3rem; margin-bottom: 0.5rem; }
.signin-field {
  text-align: left;
  margin-bottom: 1rem;
}
.signin-field label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.25rem;
}
.signin-field input {
  width: 100%;
  padding: 0.625rem 0.75rem;
  background: var(--bg-primary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 1rem;
  font-family: var(--font-body);
  transition: border-color var(--transition);
}
.signin-field input:focus {
  outline: none;
  border-color: var(--accent-green);
  box-shadow: 0 0 0 3px var(--accent-green-glow);
}
.signin-btn {
  width: 100%;
  padding: 0.75rem;
  background: var(--accent-green);
  color: #000;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-weight: 700;
  font-family: var(--font-body);
  cursor: pointer;
  transition: all var(--transition);
}
.signin-btn:hover { background: var(--accent-gold); }

/* ── Responsive ── */
@media (max-width: 768px) {
  .header-inner { flex-direction: column; gap: 0.5rem; padding: 0.5rem 0.75rem; }
  .site-nav { flex-wrap: wrap; justify-content: center; overflow-x: visible; width: 100%; padding-bottom: 0.25rem; }
  .nav-tab { font-size: 0.7rem; padding: 0.3rem 0.5rem; white-space: nowrap; }
  h1 { font-size: 1.35rem; }
  h2 { font-size: 1.15rem; }
  .groups-grid { grid-template-columns: 1fr; }
  .container { padding: 0 0.75rem; }
  
  /* Match cards */
  .match-card-body { flex-wrap: nowrap; gap: 0.5rem; padding: 0.75rem 0.5rem; }
  .match-card .team { min-width: 0; flex: 0 1 auto; }
  .match-card .team-name { font-size: 0.8rem; }
  .match-card .team .team-flag { font-size: 1.4rem; }
  .match-card .score { font-size: 1.2rem; }
  .match-card-header { padding: 0.4rem 0.5rem; }
  .match-card .match-group { font-size: 0.65rem; }
  .match-card .match-time { font-size: 0.65rem; }
  .prediction-input input { width: 70px !important; padding: 0.35rem 0.4rem; font-size: 0.9rem; -webkit-appearance: auto; }
  .actualScoreInput { margin-left: 0 !important; }
  
  /* League tables scrollable */
  .league-table-container { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .league-table { font-size: 0.75rem; }
  .league-table td, .league-table th { padding: 0.5rem 0.35rem; }

  /* Share page */
  .share-stat-row { gap: 1rem; }
  .share-stat-number { font-size: 1.5rem; }
  .cost-cards { grid-template-columns: 1fr; }
  .savings-box { flex-direction: column; text-align: center; }
  .share-card { padding: 1.5rem 1rem; }

  /* Sign-in */
  .signin-card { padding: 1.5rem 1.25rem; width: 95%; }

  /* Welcome banner */
  .welcome-banner .container { flex-direction: column; gap: 0.5rem; text-align: center; }
  #welcomeText { font-size: 1.1rem !important; }

  /* Tab panels */
  .tab-panel { padding: 1rem 0; }

  /* Standings */
  .standings-table { font-size: 0.75rem; }
  .standings-table td, .standings-table th { padding: 0.4rem 0.35rem; }
}

@media (max-width: 768px) {
  .hide-mobile { display: none !important; }
}
@media (max-width: 480px) {
  .match-card-body { flex-wrap: nowrap; gap: 0.35rem; padding: 0.5rem 0.35rem; }
  .match-card .team { min-width: 0; flex: 0 1 auto; }
  .match-card .team .team-flag { font-size: 1.1rem; }
  .match-card .team-name { font-size: 0.72rem; }
  .match-card .score { font-size: 1rem; }
  .match-card-header { padding: 0.3rem 0.35rem; flex-wrap: wrap; gap: 0.25rem; }
  .match-card .match-group { font-size: 0.6rem; }
  .match-card .match-time { font-size: 0.6rem; }
  .prediction-input input { width: 70px !important; padding: 0.25rem; font-size: 0.85rem; -webkit-appearance: auto; }
  .prediction-input .label { font-size: 0.55rem; }
  .site-logo span { font-size: 0.9rem; }
  .nav-tab { font-size: 0.7rem; padding: 0.3rem 0.5rem; }
  .welcome-banner #welcomeText { font-size: 1rem !important; }
}

/* ── Animations ── */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.tab-panel.active { animation: fadeIn 300ms ease; }

/* ── Score ticker ── */
.ticker {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.5rem 1rem;
  margin-bottom: 1.5rem;
  overflow: hidden;
  font-size: 0.8rem;
  color: var(--text-secondary);
}
.ticker strong { color: var(--accent-gold); }
