/* ═══════════════════════════════════════════════════════
   2026 FIFA WORLD CUP TRACKER — Design Tokens & Styles
   Art Direction: Bold sports energy — deep navy + gold accent
   ═══════════════════════════════════════════════════════ */

:root {
  /* Type Scale */
  --text-xs:   clamp(0.75rem,  0.7rem  + 0.25vw, 0.875rem);
  --text-sm:   clamp(0.875rem, 0.8rem  + 0.35vw, 1rem);
  --text-base: clamp(1rem,     0.95rem + 0.25vw, 1.125rem);
  --text-lg:   clamp(1.125rem, 1rem    + 0.75vw, 1.5rem);
  --text-xl:   clamp(1.5rem,   1.2rem  + 1.25vw, 2.25rem);
  --text-2xl:  clamp(2rem,     1.2rem  + 2.5vw,  3.5rem);
  --text-3xl:  clamp(2.5rem,   1rem    + 4vw,    5rem);

  /* Spacing (4px base) */
  --space-1: 0.25rem; --space-2: 0.5rem; --space-3: 0.75rem;
  --space-4: 1rem; --space-5: 1.25rem; --space-6: 1.5rem;
  --space-8: 2rem; --space-10: 2.5rem; --space-12: 3rem;
  --space-16: 4rem; --space-20: 5rem; --space-24: 6rem;

  /* Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-full: 9999px;

  /* Transitions */
  --transition-interactive: 180ms cubic-bezier(0.16, 1, 0.3, 1);

  /* Content widths */
  --content-narrow: 640px;
  --content-default: 960px;
  --content-wide: 1200px;
  --content-full: 100%;

  /* Fonts */
  --font-display: 'Cabinet Grotesk', 'Arial Black', sans-serif;
  --font-body: 'General Sans', 'Helvetica Neue', sans-serif;
}

/* ── Light Mode (default) ── */
:root, [data-theme="light"] {
  --color-bg:             #f5f3ee;
  --color-surface:        #ffffff;
  --color-surface-2:      #faf9f6;
  --color-surface-offset: #edeae3;
  --color-border:         #d4d1ca;
  --color-divider:        #e2dfd8;
  --color-text:           #1a1a2e;
  --color-text-muted:     #5a5a6e;
  --color-text-faint:     #9a99a6;
  --color-primary:        #1a1a54;
  --color-primary-hover:  #2d2d7a;
  --color-accent:         #c8a951;
  --color-accent-hover:   #b8952e;
  --color-success:        #2d7a3d;
  --color-error:          #c23b3b;
  --color-warning:        #c87a1a;
  --color-group-a:        #1a1a54;
  --color-group-b:        #8b1538;
  --color-group-c:        #0d6e3e;
  --shadow-sm: 0 1px 3px rgba(26,26,46,0.06);
  --shadow-md: 0 4px 12px rgba(26,26,46,0.08);
  --shadow-lg: 0 12px 32px rgba(26,26,46,0.12);
}

/* ── Dark Mode ── */
[data-theme="dark"] {
  --color-bg:             #0d0d1a;
  --color-surface:        #151528;
  --color-surface-2:      #1a1a32;
  --color-surface-offset: #12121f;
  --color-border:         #2a2a44;
  --color-divider:        #222238;
  --color-text:           #e0dfe8;
  --color-text-muted:     #8a8a9e;
  --color-text-faint:     #5a5a6e;
  --color-primary:        #7a7aff;
  --color-primary-hover:  #9a9aff;
  --color-accent:         #e8c85a;
  --color-accent-hover:   #f0d87a;
  --color-success:        #5ab86a;
  --color-error:          #f06060;
  --color-warning:        #e8a43a;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.4);
  --shadow-lg: 0 12px 32px rgba(0,0,0,0.5);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --color-bg:             #0d0d1a;
    --color-surface:        #151528;
    --color-surface-2:      #1a1a32;
    --color-surface-offset: #12121f;
    --color-border:         #2a2a44;
    --color-divider:        #222238;
    --color-text:           #e0dfe8;
    --color-text-muted:     #8a8a9e;
    --color-text-faint:     #5a5a6e;
    --color-primary:        #7a7aff;
    --color-primary-hover:  #9a9aff;
    --color-accent:         #e8c85a;
    --color-accent-hover:   #f0d87a;
    --color-success:        #5ab86a;
    --color-error:          #f06060;
    --color-warning:        #e8a43a;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.4);
    --shadow-lg: 0 12px 32px rgba(0,0,0,0.5);
  }
}

/* ═══════════════════════════════════════════════════════
   GLOBAL STYLES
   ═══════════════════════════════════════════════════════ */

/* Container */
.container {
  max-width: var(--content-wide);
  margin-inline: auto;
  padding-inline: var(--space-4);
}

/* Navigation */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-divider);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background: oklch(from var(--color-bg) l c h / 0.92);
}

.nav-inner {
  max-width: var(--content-wide);
  margin-inline: auto;
  padding: var(--space-3) var(--space-4);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  text-decoration: none;
  color: var(--color-text);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--text-lg);
  white-space: nowrap;
}
.nav-logo .logo-icon { color: var(--color-accent); }

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  list-style: none;
  overflow-x: auto;
  scrollbar-width: none;
}
.nav-links::-webkit-scrollbar { display: none; }

.nav-link {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  text-decoration: none;
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  font-weight: 500;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md);
  white-space: nowrap;
  transition: all var(--transition-interactive);
}
.nav-link:hover { color: var(--color-text); background: var(--color-surface-offset); }
.nav-link.active { color: var(--color-primary); background: var(--color-surface); font-weight: 600; }

.nav-actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.theme-toggle {
  padding: var(--space-2);
  border-radius: var(--radius-md);
  color: var(--color-text-muted);
  transition: all var(--transition-interactive);
}
.theme-toggle:hover { color: var(--color-text); background: var(--color-surface-offset); }

/* Mobile menu */
.mobile-menu-btn {
  display: none;
  padding: var(--space-2);
  color: var(--color-text-muted);
}
@media (max-width: 900px) {
  .nav-links { display: none; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-divider);
    padding: var(--space-4);
    gap: var(--space-1);
  }
  .mobile-menu-btn { display: block; }
}

/* Page content */
.page { display: none; animation: fadeIn 0.3s ease; }
.page.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

main { padding-bottom: var(--space-16); }

/* Section headers */
.section-header {
  margin-bottom: var(--space-8);
}
.section-title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 800;
  color: var(--color-text);
  margin-bottom: var(--space-2);
}
.section-subtitle {
  font-size: var(--text-base);
  color: var(--color-text-muted);
}

/* ═══════════════════════════════════════════════════════
   HOME PAGE
   ═══════════════════════════════════════════════════════ */

.hero {
  position: relative;
  padding: clamp(var(--space-12), 8vw, var(--space-24)) var(--space-4);
  text-align: center;
  overflow: hidden;
  background: linear-gradient(135deg, var(--color-primary) 0%, #2d1b69 50%, var(--color-primary) 100%);
  color: #fff;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: 
    radial-gradient(ellipse 80% 60% at 20% 80%, rgba(200,169,81,0.2) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 80% 20%, rgba(122,122,255,0.15) 0%, transparent 50%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
  margin-inline: auto;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  background: rgba(255,255,255,0.12);
  backdrop-filter: blur(8px);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: 500;
  margin-bottom: var(--space-6);
  border: 1px solid rgba(255,255,255,0.15);
}
.hero-badge .pulse {
  width: 8px; height: 8px;
  border-radius: var(--radius-full);
  background: #5af06a;
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.4; } }

.hero h1 {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: 900;
  line-height: 1.05;
  margin-bottom: var(--space-4);
  letter-spacing: -0.02em;
}
.hero h1 span { color: var(--color-accent); }

.hero-subtitle {
  font-size: var(--text-lg);
  opacity: 0.85;
  margin-bottom: var(--space-8);
  max-width: 600px;
  margin-inline: auto;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: var(--space-8);
  flex-wrap: wrap;
}
.hero-stat {
  text-align: center;
}
.hero-stat-value {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.hero-stat-label {
  font-size: var(--text-xs);
  opacity: 0.7;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* Countdown */
.countdown-section {
  padding: var(--space-10) var(--space-4);
  text-align: center;
}
.countdown {
  display: flex;
  justify-content: center;
  gap: var(--space-4);
  flex-wrap: wrap;
  margin-top: var(--space-6);
}
.countdown-item {
  background: var(--color-surface);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-lg);
  padding: var(--space-4) var(--space-6);
  min-width: 100px;
  box-shadow: var(--shadow-sm);
}
.countdown-value {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 800;
  color: var(--color-primary);
  font-variant-numeric: tabular-nums;
}
.countdown-label {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* Rotating Facts Ticker */
.facts-ticker {
  background: var(--color-surface);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-lg);
  padding: var(--space-4) var(--space-6);
  max-width: var(--content-default);
  margin: var(--space-8) auto 0;
  display: flex;
  align-items: center;
  gap: var(--space-4);
  overflow: hidden;
}
.facts-ticker-icon {
  flex-shrink: 0;
  width: 40px; height: 40px;
  background: oklch(from var(--color-accent) l c h / 0.12);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-accent);
  font-size: 20px;
}
.facts-ticker-text {
  font-size: var(--text-base);
  color: var(--color-text);
  font-weight: 500;
  animation: fadeIn 0.5s ease;
}

/* Nav Cards Grid */
.nav-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr));
  gap: var(--space-4);
  margin-top: var(--space-8);
}
.nav-card {
  background: var(--color-surface);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  text-decoration: none;
  color: var(--color-text);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  cursor: pointer;
}
.nav-card:hover {
  border-color: var(--color-accent);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.nav-card-icon {
  width: 48px; height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}
.nav-card-icon.blue { background: oklch(from var(--color-primary) l c h / 0.1); color: var(--color-primary); }
.nav-card-icon.gold { background: oklch(from var(--color-accent) l c h / 0.12); color: var(--color-accent); }
.nav-card-icon.green { background: oklch(from var(--color-success) l c h / 0.1); color: var(--color-success); }
.nav-card-icon.red { background: oklch(from var(--color-error) l c h / 0.1); color: var(--color-error); }

.nav-card h3 {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 700;
}
.nav-card p {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.5;
}

/* ═══════════════════════════════════════════════════════
   NEWS PAGE
   ═══════════════════════════════════════════════════════ */

.news-section {
  padding: var(--space-8) var(--space-4);
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(340px, 100%), 1fr));
  gap: var(--space-4);
}

.news-card {
  background: var(--color-surface);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all 0.25s ease;
}
.news-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.news-card-body {
  padding: var(--space-4) var(--space-5);
}
.news-card-meta {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  margin-bottom: var(--space-2);
}
.news-card-source {
  font-weight: 600;
  color: var(--color-primary);
}
.news-card h3 {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 700;
  margin-bottom: var(--space-2);
  line-height: 1.3;
}
.news-card h3 a {
  text-decoration: none;
  color: inherit;
}
.news-card h3 a:hover {
  color: var(--color-primary);
}
.news-card p {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.6;
}
.news-loading {
  text-align: center;
  padding: var(--space-10);
  color: var(--color-text-muted);
}

/* ═══════════════════════════════════════════════════════
   GROUPS / TABLES PAGE
   ═══════════════════════════════════════════════════════ */

.groups-section {
  padding: var(--space-8) var(--space-4);
}

.groups-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr));
  gap: var(--space-4);
}

.group-card {
  background: var(--color-surface);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.group-card-header {
  padding: var(--space-3) var(--space-4);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--text-sm);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #fff;
  background: var(--color-primary);
}
.group-card-header.warm { background: linear-gradient(135deg, #8b1538, #c23b3b); }
.group-card-header.cool { background: linear-gradient(135deg, #1a1a54, #2d2d7a); }
.group-card-header.green { background: linear-gradient(135deg, #0d6e3e, #2d7a3d); }
.group-card-header.gold { background: linear-gradient(135deg, #8b6914, #c8a951); }

.group-table {
  width: 100%;
  font-size: var(--text-sm);
}
.group-table th {
  padding: var(--space-2) var(--space-3);
  text-align: left;
  font-weight: 600;
  color: var(--color-text-muted);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--color-divider);
}
.group-table th:not(:first-child) { text-align: center; }
.group-table td {
  padding: var(--space-2) var(--space-3);
  border-bottom: 1px solid var(--color-divider);
  font-variant-numeric: tabular-nums;
}
.group-table td:not(:first-child) { text-align: center; }
.group-table tr:last-child td { border-bottom: none; }
.group-table .team-cell {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-weight: 500;
}
.team-flag {
  width: 24px;
  height: 16px;
  border-radius: 2px;
  object-fit: cover;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.1);
}
.group-table .debut-badge {
  font-size: 9px;
  background: var(--color-accent);
  color: #fff;
  padding: 1px 5px;
  border-radius: var(--radius-full);
  font-weight: 700;
  margin-left: var(--space-1);
  text-transform: uppercase;
}

/* Filter tabs */
.filter-tabs {
  display: flex;
  gap: var(--space-1);
  margin-bottom: var(--space-6);
  flex-wrap: wrap;
}
.filter-tab {
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-muted);
  background: var(--color-surface);
  border: 1px solid var(--color-divider);
  cursor: pointer;
  transition: all var(--transition-interactive);
}
.filter-tab:hover { border-color: var(--color-primary); color: var(--color-text); }
.filter-tab.active {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}

/* ═══════════════════════════════════════════════════════
   SCHEDULE PAGE
   ═══════════════════════════════════════════════════════ */

.schedule-section {
  padding: var(--space-8) var(--space-4);
}

.schedule-day {
  margin-bottom: var(--space-8);
}
.schedule-day-header {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--color-text);
  padding-bottom: var(--space-2);
  border-bottom: 2px solid var(--color-accent);
  margin-bottom: var(--space-4);
  display: flex;
  align-items: center;
  gap: var(--space-3);
}
.schedule-day-badge {
  font-size: var(--text-xs);
  font-weight: 600;
  background: oklch(from var(--color-accent) l c h / 0.12);
  color: var(--color-accent);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  font-family: var(--font-body);
}

.match-card {
  background: var(--color-surface);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  margin-bottom: var(--space-3);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: var(--space-4);
  transition: all var(--transition-interactive);
}
.match-card:hover { box-shadow: var(--shadow-sm); }

.match-team {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-weight: 600;
  font-size: var(--text-sm);
}
.match-team.right { justify-content: flex-end; text-align: right; }

.match-info {
  text-align: center;
  min-width: 100px;
}
.match-time {
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--color-primary);
}
.match-group {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  font-weight: 500;
}
.match-venue {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-top: var(--space-1);
}

@media (max-width: 600px) {
  .match-card {
    grid-template-columns: 1fr;
    text-align: center;
    gap: var(--space-2);
  }
  .match-team, .match-team.right {
    justify-content: center;
    text-align: center;
  }
}

/* ═══════════════════════════════════════════════════════
   FACTS PAGE
   ═══════════════════════════════════════════════════════ */

.facts-section {
  padding: var(--space-8) var(--space-4);
}

.facts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(340px, 100%), 1fr));
  gap: var(--space-4);
}

.fact-card {
  background: var(--color-surface);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}
.fact-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 4px;
  height: 100%;
}
.fact-card.record::before { background: var(--color-accent); }
.fact-card.debut::before { background: var(--color-success); }
.fact-card.history::before { background: var(--color-primary); }
.fact-card.quirky::before { background: var(--color-error); }
.fact-card.venue::before { background: var(--color-warning); }

.fact-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.fact-category {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: var(--space-3);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
}
.fact-category.record { background: oklch(from var(--color-accent) l c h / 0.12); color: var(--color-accent); }
.fact-category.debut { background: oklch(from var(--color-success) l c h / 0.1); color: var(--color-success); }
.fact-category.history { background: oklch(from var(--color-primary) l c h / 0.1); color: var(--color-primary); }
.fact-category.quirky { background: oklch(from var(--color-error) l c h / 0.1); color: var(--color-error); }
.fact-category.venue { background: oklch(from var(--color-warning) l c h / 0.12); color: var(--color-warning); }

.fact-card h3 {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 700;
  margin-bottom: var(--space-2);
  line-height: 1.3;
}
.fact-card p {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.6;
}

/* ═══════════════════════════════════════════════════════
   VENUES PAGE
   ═══════════════════════════════════════════════════════ */

.venues-section {
  padding: var(--space-8) var(--space-4);
}

.venue-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(350px, 100%), 1fr));
  gap: var(--space-4);
}

.venue-card {
  background: var(--color-surface);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all 0.25s ease;
}
.venue-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.venue-card-header {
  padding: var(--space-4) var(--space-5);
  background: linear-gradient(135deg, var(--color-primary) 0%, #2d1b69 100%);
  color: #fff;
}
.venue-card-header h3 {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 700;
  margin-bottom: var(--space-1);
}
.venue-card-city {
  font-size: var(--text-sm);
  opacity: 0.8;
}
.venue-card-body {
  padding: var(--space-4) var(--space-5);
}
.venue-stat-row {
  display: flex;
  justify-content: space-between;
  padding: var(--space-2) 0;
  border-bottom: 1px solid var(--color-divider);
  font-size: var(--text-sm);
}
.venue-stat-row:last-child { border-bottom: none; }
.venue-stat-label { color: var(--color-text-muted); }
.venue-stat-value { font-weight: 600; font-variant-numeric: tabular-nums; }

.venue-country-tag {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  font-size: var(--text-xs);
  font-weight: 600;
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-full);
  margin-top: var(--space-2);
}
.venue-country-tag.usa { background: oklch(from #006494 l c h / 0.12); color: #006494; }
.venue-country-tag.mexico { background: oklch(from #0d6e3e l c h / 0.1); color: #0d6e3e; }
.venue-country-tag.canada { background: oklch(from #a13544 l c h / 0.1); color: #a13544; }

[data-theme="dark"] .venue-country-tag.usa { background: rgba(85,145,199,0.15); color: #5591c7; }
[data-theme="dark"] .venue-country-tag.mexico { background: rgba(90,184,106,0.15); color: #5ab86a; }
[data-theme="dark"] .venue-country-tag.canada { background: rgba(221,105,116,0.15); color: #dd6974; }

/* ═══════════════════════════════════════════════════════
   LIVE SCORES PAGE
   ═══════════════════════════════════════════════════════ */

.scores-section {
  padding: var(--space-8) var(--space-4);
}

.scores-status {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-full);
  background: var(--color-surface);
  border: 1px solid var(--color-divider);
  white-space: nowrap;
}
.scores-status .live-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--color-success);
  animation: pulse 2s ease-in-out infinite;
}
.scores-status .pre-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--color-text-faint);
}

.scores-round-header {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--color-text);
  padding-bottom: var(--space-2);
  border-bottom: 2px solid var(--color-accent);
  margin: var(--space-8) 0 var(--space-4);
  display: flex;
  align-items: center;
  gap: var(--space-3);
}
.scores-round-header:first-child { margin-top: 0; }

.score-card {
  background: var(--color-surface);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-lg);
  padding: var(--space-4) var(--space-5);
  margin-bottom: var(--space-3);
  transition: all var(--transition-interactive);
}
.score-card:hover {
  box-shadow: var(--shadow-sm);
}
.score-card.is-live {
  border-color: var(--color-success);
  box-shadow: 0 0 0 1px var(--color-success), var(--shadow-sm);
}

.score-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-3);
  font-size: var(--text-xs);
  color: var(--color-text-faint);
}
.score-card-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: 2px 10px;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.score-card-badge.live {
  background: var(--color-success);
  color: #fff;
}
.score-card-badge.ft {
  background: var(--color-surface-offset);
  color: var(--color-text-muted);
}
.score-card-badge.upcoming {
  background: oklch(from var(--color-primary) l c h / 0.1);
  color: var(--color-primary);
}

.score-card-match {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: var(--space-4);
}

.score-team {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-weight: 600;
  font-size: var(--text-base);
}
.score-team.right {
  justify-content: flex-end;
  text-align: right;
  flex-direction: row-reverse;
}
.score-team-flag {
  font-size: 28px;
  line-height: 1;
}

.score-result {
  text-align: center;
  min-width: 80px;
}
.score-nums {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 800;
  color: var(--color-text);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}
.score-nums.upcoming-time {
  font-size: var(--text-lg);
  color: var(--color-primary);
}
.score-halftime {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  margin-top: 2px;
}

.score-card-goals {
  margin-top: var(--space-3);
  padding-top: var(--space-3);
  border-top: 1px solid var(--color-divider);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-2);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}
.score-card-goals .goal-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.score-card-goals .goal-list.right {
  text-align: right;
}
.goal-item {
  display: flex;
  align-items: center;
  gap: var(--space-1);
}
.goal-item.right {
  justify-content: flex-end;
}
.goal-minute {
  font-variant-numeric: tabular-nums;
  color: var(--color-text-faint);
  font-size: var(--text-xs);
  min-width: 32px;
}
.goal-item.right .goal-minute {
  order: 1;
}
.goal-scorer {
  font-weight: 500;
  color: var(--color-text);
}

.score-card-venue {
  margin-top: var(--space-2);
  text-align: center;
  font-size: var(--text-xs);
  color: var(--color-text-faint);
}

.scores-empty {
  text-align: center;
  padding: var(--space-12) var(--space-4);
  color: var(--color-text-muted);
}
.scores-empty-icon {
  font-size: 48px;
  margin-bottom: var(--space-4);
  opacity: 0.4;
}
.scores-empty h3 {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 700;
  margin-bottom: var(--space-2);
}

@media (max-width: 600px) {
  .score-card-match {
    grid-template-columns: 1fr;
    text-align: center;
    gap: var(--space-2);
  }
  .score-team, .score-team.right {
    justify-content: center;
    text-align: center;
    flex-direction: row;
  }
  .score-card-goals {
    grid-template-columns: 1fr;
  }
  .score-card-goals .goal-list.right {
    text-align: left;
  }
  .goal-item.right {
    justify-content: flex-start;
    flex-direction: row;
  }
  .goal-item.right .goal-minute { order: 0; }
}

/* ═══════════════════════════════════════════════════════
   SHIMMER / SKELETON
   ═══════════════════════════════════════════════════════ */
@keyframes shimmer { 0%{background-position:-200% 0} 100%{background-position:200% 0} }
.skeleton {
  background: linear-gradient(90deg,var(--color-surface-offset) 25%,var(--color-surface) 50%,var(--color-surface-offset) 75%);
  background-size:200% 100%; animation:shimmer 1.5s ease-in-out infinite; border-radius:var(--radius-sm);
}
.skeleton-text { height:1em; margin-bottom:var(--space-2) }
.skeleton-text:last-child { width:60% }
.skeleton-heading { height:1.5em; width:40%; margin-bottom:var(--space-4) }

/* ═══════════════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════════════ */
.site-footer {
  border-top: 1px solid var(--color-divider);
  padding: var(--space-8) var(--space-4);
  text-align: center;
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}
.site-footer a {
  color: var(--color-primary);
  text-decoration: none;
}
.site-footer a:hover { text-decoration: underline; }

/* Map container */
#venues-map {
  width: 100%;
  height: 400px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-divider);
  margin-bottom: var(--space-8);
}

/* ═══════════════════════════════════════════════════════
   UTILITY
   ═══════════════════════════════════════════════════════ */
.text-accent { color: var(--color-accent); }
.text-muted { color: var(--color-text-muted); }
.mt-4 { margin-top: var(--space-4); }
.mt-8 { margin-top: var(--space-8); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-8 { margin-bottom: var(--space-8); }

/* Scrollbar styling */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--color-bg); }
::-webkit-scrollbar-thumb { background: var(--color-border); border-radius: var(--radius-full); }
::-webkit-scrollbar-thumb:hover { background: var(--color-text-faint); }
