:root {
  --bg:  #d0d9ec;
  --bg-soft: #ADBBDA ;
  --card: #e3e3e6;
  --text: #05090e;
  --muted: #7c8994;
  --border: #8ea3b5;
  --primary: #4caa68;
  --primary-strong: #4ba566;
  --danger: #d9534f;
  --card-bg: var(--card);
  --card-border: var(--border);
  --text-color: var(--text);
  --accent-color: var(--primary);
  --btn-bg: var(--primary);
  --btn-text: #a8a8a8;
  --btn-border: transparent;
  --btn-hover-bg: var(--primary-strong);
  --btn-hover-text: #3c3f3d;
  --btn-secondary-bg: rgba(233, 232, 232, 0.8);
  --btn-secondary-text: var(--muted);
  --btn-secondary-border: var(--border);
  --btn-secondary-hover-bg: var(--primary);
  --btn-secondary-hover-text: #e0e0e0;
  --input-bg: #dfdfdf;
  --input-text: var(--text);
  --input-border: var(--border);
  --topbar-bg: #e3e3e6;
  --topbar-border: var(--border);
  --table-header-bg: #c2c2c2;
  --table-header-text: var(--text);
}

body.dark-mode {
  --bg: #0a1015;
  --bg-soft: #121b23;
  --card: #18232d;
  --text: #edf5fa;
  --muted: #9eb3c2;
  --border: #2c3c49;
  --primary: #62e188;
  --primary-strong: #45c76b;
  --danger: #ff8c8c;
  --btn-bg: var(--primary);
  --btn-text: #07200f;
  --btn-border: transparent;
  --btn-hover-bg: var(--primary-strong);
  --btn-hover-text: #071a10;
  --btn-secondary-bg: rgba(24, 35, 45, 0.9);
  --btn-secondary-text: var(--muted);
  --btn-secondary-border: var(--border);
  --btn-secondary-hover-bg: var(--primary);
  --btn-secondary-hover-text: #071a10;
  --input-bg: #0f1620;
  --input-text: var(--text);
  --input-border: var(--border);
  --topbar-bg: rgba(10, 16, 21, 0.85);
  --topbar-border: var(--border);
  --table-header-bg: #0f1620;
  --table-header-text: var(--text);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Segoe UI", Tahoma, sans-serif;
  background:
    radial-gradient(1000px 500px at 50% -10%, rgba(85, 211, 122, 0.18), transparent 60%),
    linear-gradient(180deg, var(--bg-soft) 0%, var(--bg) 30%, var(--bg) 100%);
  color: var(--text);
}

.page {
  max-width: 1120px;
  margin: 0 auto;
  padding: 20px 16px 32px;
}

.site-header {
  position: sticky;
  top: 12px;
  z-index: 50;
  margin-bottom: 18px;
  padding: 12px 14px;
  border: 1px solid var(--topbar-border);
  border-radius: 14px;
  backdrop-filter: blur(10px);
  background: var(--topbar-bg);
  display: grid;
  grid-template-rows: auto auto;
  align-items: center;
  gap: 12px;
}

.site-header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
}

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

.ios-app-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(90deg, rgba(240, 180, 41, 0.18), rgba(240, 180, 41, 0.08));
  color: #f0b429;
  border: 1px solid rgba(240, 180, 41, 0.4);
  border-radius: 10px;
  padding: 8px 14px;
  margin: 12px 0 4px;
  font-size: 0.9rem;
  font-weight: 600;
  text-align: center;
}

.ios-app-banner-icon {
  font-size: 1.05rem;
}

.ios-app-banner-text {
  letter-spacing: 0.2px;
}

.ios-app-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #f0b429;
  background: rgba(240, 180, 41, 0.08);
  border: 1px solid rgba(240, 180, 41, 0.4);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
  margin-right: 10px;
}

.ios-app-indicator-icon {
  font-size: 0.95rem;
}

@media (max-width: 720px) {
  .ios-app-indicator-text {
    display: none;
  }
  .ios-app-indicator {
    padding: 6px 10px;
  }
}

.brand {
  display: flex;
  align-items: center;
  gap: 5px;
}

.brand-home-btn {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  text-decoration: none;
}

.brand-mark {
  width: 80px;
  height: 80px;
  border-radius: 5px;
  display: block;
  object-fit: cover;
}

.brand-name {
  font-weight: 800;
  font-size: 1.05rem;
}

.brand-sub {
  color: var(--muted);
  font-size: 0.78rem;
}

.theme-toggle {
  margin: 0;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  padding: 8px 12px;
  font-size: 0.85rem;
}

.header-link {
  display: inline-block;
  margin: 0;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: transparent;
  color: var(--text);
  padding: 10px 16px;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none !important;
  cursor: pointer;
  line-height: 1.2;
}
.header-link:hover,
.header-link:focus,
.header-link:visited {
  text-decoration: none !important;
}
.header-link:hover {
  background: var(--bg-elev);
}
.header-link.active {
  background: var(--bg-elev);
}

.tab-soon {
  color: var(--muted);
  font-size: 0.78em;
  font-weight: 500;
  margin-left: 4px;
}

.site-nav {
  display: flex;
  gap: 8px;
}

.site-nav-btn {
  margin: 0;
  border: 1px solid var(--btn-secondary-border);
  border-radius: 999px;
  background: var(--btn-secondary-bg);
  color: var(--btn-secondary-text);
  padding: 7px 10px;
  font-size: 0.78rem;
  font-weight: 700;
}

.site-nav-btn:hover {
  color: var(--btn-secondary-hover-text);
  background: var(--btn-secondary-hover-bg);
}

.hero {
  border: 1px solid var(--border);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(85, 211, 122, 0.08), rgba(85, 211, 122, 0.01));
  padding: 28px 20px;
  margin-bottom: 18px;
}

.hero-badge {
  display: inline-flex;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--primary);
  border: 1px solid rgba(85, 211, 122, 0.35);
  background: rgba(85, 211, 122, 0.1);
}

h1 {
  margin: 10px 0 6px;
  font-size: clamp(1.7rem, 4vw, 2.7rem);
  line-height: 1.1;
}

.sub {
  margin: 0;
  color: var(--muted);
}

.hero-stats {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.hero-stat {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  background: rgba(24, 35, 45, 0.8);
}

.hero-stat-value {
  display: block;
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--primary);
}

.hero-stat-label {
  display: block;
  color: var(--muted);
  font-size: 0.8rem;
}

.section-subtitle {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 0.9rem;
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 14px;
}

.main-tabs {
  position: static;
  z-index: 40;
  padding: 0;
  margin: 0;
  background: transparent;
  width: 100%;
}

.site-header .tabs {
  margin: 0;
  justify-content: flex-start;
}

.tab-btn {
  margin: 0;
  border: 1px solid var(--btn-secondary-border);
  border-radius: 12px;
  background: var(--btn-secondary-bg);
  color: var(--btn-secondary-text);
  text-decoration: none;
  padding: 12px 18px;
  font-size: 1rem;
  font-weight: 600;
}

.tab-btn.active {
  color: var(--btn-text);
  border-color: var(--primary);
  background: var(--primary);
}

.tab-btn.cup-tab-empty {
  opacity: 0.72;
}

.tab-btn.world-cup-highlight {
  border-color: #f0b429;
  color: #f0b429;
  background: rgba(240, 180, 41, 0.08);
  font-weight: 700;
  position: relative;
}
.tab-btn.world-cup-highlight:hover {
  background: rgba(240, 180, 41, 0.18);
  color: #f5c14b;
}
.tab-btn.world-cup-highlight.active {
  background: #f0b429;
  color: #1a1300;
  border-color: #f0b429;
}
.tab-btn.world-cup-highlight::after {
  content: "NEW";
  position: absolute;
  top: -8px;
  right: -6px;
  background: #f0b429;
  color: #1a1300;
  font-size: 0.6rem;
  font-weight: 800;
  padding: 2px 5px;
  border-radius: 6px;
  line-height: 1;
  letter-spacing: 0.5px;
}

.position-odds-best {
  background: rgba(85, 211, 122, 0.2);
  color: #0b3b1f;
  font-weight: 800;
}

.card {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--card);
  padding: 16px;
  margin-bottom: 14px;
  box-shadow: 0 10px 20px rgba(4, 8, 11, 0.25);
}

h3 {
  margin: 0 0 8px;
  font-size: 1.24rem;
}

h4 {
  margin: 8px 0;
  font-size: 1.06rem;
}

label {
  display: block;
  margin: 10px 0 6px;
  font-weight: 600;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--input-border);
  border-radius: 10px;
  color: var(--input-text);
  background: var(--input-bg);
  padding: 10px 11px;
}

button {
  margin-top: 12px;
  border: 1px solid var(--btn-border);
  border-radius: 10px;
  color: var(--btn-text);
  background: var(--btn-bg);
  padding: 10px 13px;
  font-weight: 700;
}

button:hover {
  color: var(--btn-hover-text);
  background: var(--btn-hover-bg);
}

.top-picks-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.pick-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  background: #0e1620;
  position: relative;
  color: var(--text);
}

.pick-card:hover {
  background: #0a121b;
}

.pick-rank {
  margin: 0;
  position: absolute;
  top: 10px;
  right: 10px;
  color: var(--primary);
  font-weight: 800;
  font-size: 0.78rem;
}

.pick-league {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 0.78rem;
}

.pick-match {
  margin: 0;
  font-weight: 700;
}

.pick-prediction,
.pick-confidence {
  margin: 6px 0 0;
  font-size: 0.86rem;
  color: var(--muted);
}

.muted-placeholder {
  color: var(--muted);
  margin: 0;
}

.hidden {
  display: none;
}

.error {
  border-color: #5f2a2a;
  color: #ffd1d1;
  background: #2b1717;
}

.match-row {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 10px;
  margin: 8px 0;
  background: #101822;
}

.day-title {
  font-size: 0.95rem;
  color: var(--muted);
  margin: 8px 0 10px;
  font-weight: 700;
}

.kick-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.kick-match-card {
  padding: 0;
  overflow: hidden;
  border-radius: 12px;
}

.kick-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.kick-league {
  color: var(--muted);
  font-size: 0.76rem;
}

.confidence-pill {
  border-radius: 999px;
  border: 1px solid rgba(85, 211, 122, 0.4);
  color: var(--primary);
  background: rgba(85, 211, 122, 0.12);
  font-size: 0.75rem;
  padding: 2px 8px;
  font-weight: 700;
}

/* Light mode polish for stats + predictions */
body:not(.dark-mode) .hero-stat {
  background: linear-gradient(180deg, #f6f8fc, #eef3f9);
  border-color: #b8c7d7;
}

body:not(.dark-mode) .hero-stat-value {
  color: #2f7d4f;
}

body:not(.dark-mode) .stat-chip {
  background: #eef2f7;
  color: #2b3a4a;
  border-color: #b8c7d7;
}

body:not(.dark-mode) .match-row {
  background: #f7f9fc;
  color: #0a1118;
  border-color: #b8c7d7;
}

body:not(.dark-mode) .match-toggle:hover {
  background: rgba(76, 170, 104, 0.08);
}

body:not(.dark-mode) .confidence-pill {
  border-color: rgba(47, 125, 79, 0.35);
  color: #1e6a40;
  background: rgba(47, 125, 79, 0.12);
}

body:not(.dark-mode) .pick-card {
  background: #f7f9fc;
  color: #0a1118;
  border-color: #b8c7d7;
}

body:not(.dark-mode) .pick-card:hover {
  background: #eef3f9;
}

body:not(.dark-mode) .match-card {
  background: #f7f9fc;
  color: #0a1118;
  border-color: #b8c7d7;
}

body:not(.dark-mode) .player-card {
  background: #f7f9fc;
  color: #0a1118;
  border-color: #b8c7d7;
}

body:not(.dark-mode) .prediction-card {
  background: #f7f9fc;
  color: #0a1118;
  border-color: #b8c7d7;
}

body:not(.dark-mode) .conference-title {
  background: #eef2f7;
  color: #0a1118;
  border-color: #b8c7d7;
}

body:not(.dark-mode) .world-cup-summary-item,
body:not(.dark-mode) .world-cup-odds-card,
body:not(.dark-mode) .world-cup-table-card,
body:not(.dark-mode) .world-cup-match-card {
  background: #f7f9fc;
  color: #0a1118;
  border-color: #b8c7d7;
}

body:not(.dark-mode) .world-cup-probabilities {
  background: #d6dde7;
}

body:not(.dark-mode) .probability-track {
  background: #d6dde7;
}

body:not(.dark-mode) .notification {
  background: #ffffff;
  color: #0a1118;
  border-color: #b8c7d7;
}

body:not(.dark-mode) .position-odds-best {
  background: rgba(76, 170, 104, 0.18);
  color: #1e6a40;
}

body:not(.dark-mode) .position-odds-cell {
  background: rgba(15, 26, 36, 0.06);
}

.match-row.match-correct {
  border-color: #3a7d51;
  background: #122118;
}

body:not(.dark-mode) .match-row.match-correct {
  border-color: rgba(76, 170, 104, 0.55);
  background: rgba(76, 170, 104, 0.12);
  color: #0a1118;
}

.match-row.match-wrong {
  border-color: #824646;
  background: #291718;
}

body:not(.dark-mode) .match-row.match-wrong {
  border-color: rgba(217, 83, 79, 0.55);
  background: rgba(217, 83, 79, 0.12);
  color: #0a1118;
}

.match-toggle {
  display: block;
  width: 100%;
  text-align: left;
  margin: 0;
  padding: 8px 8px 6px;
  border: 0;
  color: inherit;
  background: transparent;
}

.match-toggle:hover {
  background: rgba(85, 211, 122, 0.05);
}

.matchup {
  font-weight: 800;
  margin-bottom: 4px;
  font-size: 1.06rem;
}

.match-meta {
  color: var(--muted);
  font-size: 0.9rem;
}

.winner-line {
  color: var(--text);
  font-weight: 700;
}

.match-details {
  border-top: 1px dashed var(--border);
  margin-top: 8px;
  padding: 8px 8px 2px;
}

.probability-wrap {
  margin: 12px 0;
}

.probability-track {
  display: flex;
  height: 8px;
  width: 100%;
  border-radius: 999px;
  overflow: hidden;
  background: #2b3947;
  margin: 7px 0;
}

.probability-track > div {
  height: 100%;
}

.probability-labels {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.76rem;
}

.result-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.stats-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.stat-chip {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 10px;
  color: var(--muted);
  background: #111922;
  font-size: 0.8rem;
}

.table-controls {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 12px;
  align-items: center;
}

.league-table {
  width: 100%;
  border-collapse: collapse;
}

.league-table th,
.league-table td {
  border-bottom: 1px solid var(--border);
  padding: 8px 6px;
  text-align: left;
  font-size: 0.9rem;
}

.league-table th {
  background: var(--table-header-bg);
  color: var(--table-header-text);
  font-weight: 700;
}

.table-first td {
  background: rgba(81, 179, 104, 0.18);
}

.table-bottom td {
  background: rgba(179, 81, 81, 0.2);
}

.table-playoff-orange td {
  background: rgba(194, 142, 70, 0.2);
}

.table-promo-blue td {
  background: rgba(69, 115, 179, 0.22);
}

.cup-top8-chip {
  border-color: rgba(81, 179, 104, 0.45);
  background: rgba(81, 179, 104, 0.18);
}

.cup-playoff-chip {
  border-color: rgba(69, 115, 179, 0.45);
  background: rgba(69, 115, 179, 0.22);
}

.table-playoff-purple td {
  background: rgba(113, 78, 163, 0.23);
}

.table-second-pink td {
  background: rgba(174, 84, 122, 0.23);
}

.bracket-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
  overflow-x: auto;
}

.cup-bracket-container {
  flex-direction: row;
  align-items: flex-start;
  padding-bottom: 6px;
}

.conference-title {
  margin-bottom: 12px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #111922;
  text-align: center;
  font-weight: 700;
}

.bracket-tree {
  display: flex;
  gap: 14px;
}

.bracket-round {
  min-width: 180px;
}

.match-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 9px;
  margin-bottom: 10px;
  background: #111922;
}

.match-card .match-title {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 0.74rem;
}

.match-card .team {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
  padding: 4px 0;
}

.match-card .team:last-child {
  border-bottom: 0;
}

.match-card .team.winner {
  color: var(--primary);
  font-weight: 700;
}

.mls-cup-container {
  border-top: 1px solid var(--border);
  margin-top: 8px;
  padding-top: 14px;
}

.mls-cup-card {
  border: 1px solid var(--primary);
  border-radius: 12px;
  padding: 16px;
  text-align: center;
}

.mls-cup-winner {
  margin-top: 8px;
  color: var(--primary);
  font-weight: 800;
  font-size: 1.12rem;
}

.player-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}

.player-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #111922;
  padding: 12px;
  text-align: center;
}

.player-team {
  color: var(--muted);
}

.player-stat-badge {
  display: inline-block;
  border-radius: 999px;
  background: #233141;
  color: var(--text);
  padding: 3px 8px;
  font-size: 0.8rem;
}

.h2h-container {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.h2h-col {
  flex: 1;
  min-width: 260px;
}

.stat-row {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
  padding: 6px 0;
}

.stat-label {
  color: var(--muted);
}

.stat-header-row {
  font-weight: 700;
  border-bottom: 1px solid var(--primary);
}

.leaderboard-table {
  width: 100%;
  border-collapse: collapse;
}

.leaderboard-table th,
.leaderboard-table td {
  border-bottom: 1px solid var(--border);
  padding: 8px 6px;
}

.prediction-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #111922;
  padding: 10px;
  margin-bottom: 9px;
}

/* World Cup summary cards keep key projection facts visible above the long tables. */
.world-cup-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.world-cup-summary-item,
.world-cup-odds-card,
.world-cup-table-card,
.world-cup-match-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #111922;
  padding: 12px;
}

.summary-label {
  color: var(--muted);
  display: block;
  font-size: 0.82rem;
  margin-bottom: 4px;
}

/* World Cup sections separate standings, fixtures, and knockout rounds without nested cards. */
.world-cup-section {
  border-top: 1px solid var(--border);
  margin-top: 18px;
  padding-top: 14px;
}

.world-cup-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.world-cup-section h4,
.world-cup-round h5,
.world-cup-table-card h5 {
  margin: 0 0 10px;
}

.world-cup-round {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #111922;
  padding: 10px 12px;
  margin-bottom: 10px;
}

.world-cup-round > summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 4px 0;
  user-select: none;
}

.world-cup-round > summary::-webkit-details-marker {
  display: none;
}

.world-cup-round > summary::before {
  content: "▸";
  display: inline-block;
  margin-right: 6px;
  color: var(--muted);
  transition: transform 0.15s ease;
}

.world-cup-round[open] > summary::before {
  content: "▾";
  color: var(--primary);
}

.world-cup-round-label {
  flex: 1;
}

.world-cup-round-hint {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 500;
  font-style: italic;
}

.world-cup-round[open] .world-cup-round-hint {
  display: none;
}

.world-cup-round > .world-cup-fixture-grid {
  margin-top: 10px;
}

.world-cup-rules {
  margin: 0;
  padding-left: 20px;
}

/* Position-odds cell: small bar with a percentage label, used in the toggle view. */
.position-odds-cell {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 22px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 6px;
  overflow: hidden;
}

.position-odds-bar {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  background: linear-gradient(90deg, rgba(85, 211, 122, 0.55), rgba(85, 211, 122, 0.85));
  z-index: 0;
}

.position-odds-label {
  position: relative;
  z-index: 1;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text);
}

.world-cup-odds-grid,
.world-cup-group-grid,
.world-cup-fixture-grid {
  display: grid;
  gap: 12px;
}

.world-cup-odds-grid {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.world-cup-group-grid {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

/* World Cup page: 2 columns × 6 rows so the 12 group tables fit side by side
   without forcing a horizontal scroll on the section. */
.world-cup-group-grid.world-cup-groups-2x6 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-flow: row;
}

@media (max-width: 900px) {
  .world-cup-group-grid.world-cup-groups-2x6 {
    grid-template-columns: 1fr;
  }
}

.world-cup-fixture-grid {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.group-fixtures-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 12px;
}

.group-fixtures-btn {
  border: 1px solid var(--border);
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  padding: 6px 12px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  min-width: 38px;
  line-height: 1.2;
}

.group-fixtures-btn:hover {
  background: var(--bg-elev);
}

.group-fixtures-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--btn-text);
}

.world-cup-odds-card {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

/* World Cup tables use compact cells so all football stats remain scannable. */
.world-cup-table {
  font-size: 0.82rem;
  width: 100%;
  table-layout: fixed;
}
.world-cup-table th,
.world-cup-table td {
  padding: 6px 4px;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Best Third-Place table: very tight cell padding + row spacing so all 12 columns
   fit compactly. */
.world-cup-table.third-place-table th,
.world-cup-table.third-place-table td {
  padding: 3px 2px;
  font-size: 0.78rem;
  line-height: 1.15;
}
.world-cup-table.third-place-table th:nth-child(1),
.world-cup-table.third-place-table td:nth-child(1) {
  width: 8%;
}
.world-cup-table.third-place-table th:nth-child(2),
.world-cup-table.third-place-table td:nth-child(2) {
  width: 7%;
}
.world-cup-table.third-place-table th:nth-child(3),
.world-cup-table.third-place-table td:nth-child(3) {
  width: 25%;
  text-align: left;
  font-size: 0.85rem;
  font-weight: 600;
}
.world-cup-table.third-place-table th:nth-child(n+4),
.world-cup-table.third-place-table td:nth-child(n+4) {
  width: 6%;
}
.world-cup-table th:nth-child(1),
.world-cup-table td:nth-child(1) {
  width: 38%;
  text-align: left;
  font-size: 0.95rem;
  font-weight: 600;
}
.world-cup-table th:nth-child(n+2),
.world-cup-table td:nth-child(n+2) {
  width: 7.75%;
}

/* Position-odds table: 5 columns (Team + 1st/2nd/3rd/4th) needs a different split. */
.world-cup-table.position-odds-table {
  table-layout: fixed;
}
.world-cup-table.position-odds-table th:nth-child(1),
.world-cup-table.position-odds-table td:nth-child(1) {
  width: 30%;
  text-align: left;
}
.world-cup-table.position-odds-table th:nth-child(n+2),
.world-cup-table.position-odds-table td:nth-child(n+2) {
  width: 17.5%;
}

.world-cup-table th:first-child,
.world-cup-table td:first-child {
  text-align: left;
}

.qualified-row td:first-child,
.winner-team {
  color: var(--primary);
  font-weight: 800;
}

.table-scroll {
  overflow-x: auto;
}

/* World Cup match cards show scorelines and probability splits in a stable layout. */
.match-card-top,
.match-card-score,
.match-card-meta {
  display: flex;
  gap: 8px;
  justify-content: space-between;
}

.match-card-top {
  color: var(--muted);
  font-size: 0.8rem;
  margin-bottom: 8px;
}

.match-card-score {
  align-items: center;
  font-size: 0.95rem;
}

.match-card-score strong {
  color: var(--primary);
  font-size: 1.15rem;
  white-space: nowrap;
}

.match-card-meta {
  color: var(--muted);
  font-size: 0.84rem;
  margin-top: 8px;
}

.world-cup-probabilities {
  display: flex;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #233141;
  margin-top: 10px;
}

.world-cup-probabilities span:nth-child(1) {
  background: #55d37a;
}

.world-cup-probabilities span:nth-child(2) {
  background: #93a4b3;
}

.world-cup-probabilities span:nth-child(3) {
  background: #7297ff;
}

.pred-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pred-btn {
  margin-top: 8px;
  border: 1px solid var(--btn-secondary-border);
  border-radius: 999px;
  color: var(--btn-secondary-text);
  background: var(--btn-secondary-bg);
  padding: 6px 10px;
}

.pred-btn.selected {
  color: var(--btn-text);
  border-color: var(--primary);
  background: var(--primary);
}

.notification-area {
  position: fixed;
  top: 14px;
  right: 14px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.notification {
  background: #0f1a24;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  animation: fadeIn 0.2s forwards;
}

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

@keyframes fadeOut {
  to { opacity: 0; transform: translateY(-8px); }
}

.site-footer {
  margin-top: 14px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.85rem;
  padding: 16px 4px 6px;
}

@media (max-width: 900px) {
  .hero-stats,
  .top-picks-grid {
    grid-template-columns: 1fr;
  }


.error-message {
  color: #ff6b6b;
  background-color: rgba(255, 107, 107, 0.1);
  border-left: 4px solid #ff6b6b;
  padding: 12px;
  border-radius: 4px;
  margin: 8px 0;
  font-size: 0.95rem;
}

.info-message {
  color: #4ecdc4;
  background-color: rgba(78, 205, 196, 0.1);
  border-left: 4px solid #4ecdc4;
  padding: 12px;
  border-radius: 4px;
  margin: 8px 0;
  font-size: 0.95rem;
}

.loading-message {
  color: var(--muted);
  background-color: rgba(155, 155, 155, 0.1);
  border-left: 4px solid var(--muted);
  padding: 12px;
  border-radius: 4px;
  margin: 8px 0;
  font-size: 0.95rem;
  font-style: italic;
}

  .kick-card-grid {
    grid-template-columns: 1fr;
  }

  .tabs {
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 4px;
  }

  .tab-btn {
    white-space: nowrap;
  }

  .site-nav {
    display: none;
  }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.match-card-probability-labels {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.78rem;
  margin-top: 4px;
}

.match-card-probability-labels span {
  flex: 1;
  text-align: center;
}

.match-card-probability-labels strong {
  color: var(--text);
  font-weight: 600;
}
