/* =============================================================================
   PIALA DUNIA 2026 — Stylesheet (original)
   Dark, modern, sports-tech aesthetic with gold accents
   ============================================================================= */

:root {
  --bg:         #0a0e1a;
  --bg-alt:     #070a13;
  --card:       #131826;
  --card-2:     #181d2e;
  --card-hover: #1a2036;
  --border:     #1f2433;
  --border-2:   #2a3041;

  --text:       #f5f5f7;
  --text-dim:   #a8aab3;
  --text-mute:  #6b6b75;

  --gold:       #fbbf24;
  --gold-2:     #f59e0b;
  --red:        #ef4444;
  --red-2:      #dc2626;
  --green:      #22c55e;
  --blue:       #3b82f6;

  --group-a: #ef4444;  --group-b: #f97316;  --group-c: #eab308;
  --group-d: #22c55e;  --group-e: #14b8a6;  --group-f: #06b6d4;
  --group-g: #3b82f6;  --group-h: #6366f1;  --group-i: #8b5cf6;
  --group-j: #a855f7;  --group-k: #d946ef;  --group-l: #ec4899;

  --container: 1240px;
  --radius-sm: 8px;
  --radius:    12px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --t-fast: 0.15s;
  --t-med:  0.3s;
  --t-slow: 0.6s;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; padding: 0; }
img { max-width: 100%; display: block; }
ul { list-style: none; padding: 0; margin: 0; }

/* ---------- Container ---------- */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Nav ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(10, 14, 26, 0.7);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid transparent;
  transition: border-color var(--t-med) var(--ease), background var(--t-med) var(--ease);
}
.nav.scrolled {
  background: rgba(10, 14, 26, 0.92);
  border-bottom-color: var(--border);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 24px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -0.01em;
  flex-shrink: 0;
}
.brand-trophy { font-size: 22px; }
.brand-year {
  background: linear-gradient(135deg, var(--gold), var(--red));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.nav-links {
  display: flex;
  gap: 4px;
}
.nav-links a {
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  color: var(--text-dim);
  font-weight: 500;
  font-size: 14px;
  transition: color var(--t-fast), background var(--t-fast);
}
.nav-links a:hover { color: var(--text); background: var(--card); }
.nav-toggle {
  display: none;
  font-size: 22px;
  padding: 8px;
  color: var(--text);
}
@media (max-width: 640px) {
  .nav-links { display: none; }
  .nav-links.open {
    display: flex;
    position: absolute;
    top: 64px; left: 0; right: 0;
    background: var(--bg-alt);
    flex-direction: column;
    padding: 16px;
    border-bottom: 1px solid var(--border);
    gap: 4px;
  }
  .nav-links.open a { padding: 12px 16px; }
  .nav-toggle { display: block; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 100px 0 80px;
  overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% 0%, rgba(251, 191, 36, 0.12), transparent 70%),
    radial-gradient(ellipse 60% 40% at 80% 80%, rgba(239, 68, 68, 0.08), transparent 70%),
    radial-gradient(ellipse 60% 40% at 20% 60%, rgba(59, 130, 246, 0.06), transparent 70%),
    var(--bg);
  z-index: 0;
}
.hero-bg::before {
  content: '';
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 60% 60% at 50% 50%, black, transparent);
  -webkit-mask-image: radial-gradient(ellipse 60% 60% at 50% 50%, black, transparent);
}
.hero-content {
  position: relative;
  z-index: 1;
  width: 100%;
  text-align: center;
}
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: rgba(251, 191, 36, 0.1);
  border: 1px solid rgba(251, 191, 36, 0.2);
  border-radius: 100px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--gold);
  margin-bottom: 32px;
}
.hero-eyebrow .dot {
  width: 6px; height: 6px;
  background: var(--gold);
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.5; transform: scale(0.8); }
}
.hero-title {
  font-size: clamp(56px, 12vw, 140px);
  font-weight: 900;
  line-height: 0.9;
  letter-spacing: -0.04em;
  margin: 0 0 28px;
}
.title-line-1 { display: block; color: var(--text); }
.title-line-2 {
  display: block;
  background: linear-gradient(135deg, var(--gold) 0%, var(--red) 50%, var(--gold) 100%);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: gradientShift 6s ease-in-out infinite;
}
@keyframes gradientShift {
  0%, 100% { background-position: 0% 50%; }
  50%      { background-position: 100% 50%; }
}
.hero-subtitle {
  font-size: clamp(16px, 2vw, 20px);
  color: var(--text-dim);
  margin: 0 auto 48px;
  max-width: 600px;
}
.hero-subtitle strong { color: var(--text); font-weight: 600; }

/* Countdown (one line) */
.countdown-wrap {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-bottom: 56px;
}
.countdown-label-top {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--text-mute);
  font-weight: 600;
}
.countdown {
  display: inline-flex;
  align-items: baseline;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2px 4px;
  padding: 12px 20px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  font-family: 'JetBrains Mono', monospace;
  white-space: nowrap;
}
.countdown-item {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
}
.countdown-num {
  font-size: clamp(20px, 2.6vw, 28px);
  font-weight: 700;
  color: var(--gold);
  line-height: 1;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.countdown-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-mute);
  font-family: 'Inter', sans-serif;
  font-weight: 600;
}
.countdown-sep {
  color: var(--border-2);
  font-weight: 700;
  font-size: clamp(14px, 1.8vw, 18px);
  margin: 0 4px;
  user-select: none;
}
@media (max-width: 520px) {
  .countdown { padding: 10px 14px; gap: 1px 3px; }
  .countdown-num { font-size: 18px; }
  .countdown-label { font-size: 9px; }
  .countdown-sep { font-size: 12px; margin: 0 2px; }
}

/* Hero stats */
.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  max-width: 720px;
  margin: 0 auto;
}
.stat {
  padding: 20px 16px;
  background: rgba(19, 24, 38, 0.5);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  backdrop-filter: blur(10px);
  text-align: center;
}
.stat-num {
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, var(--gold), var(--gold-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  line-height: 1;
}
.stat-label {
  font-size: 12px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-top: 8px;
  font-weight: 500;
}
@media (max-width: 520px) {
  .hero-stats { grid-template-columns: repeat(2, 1fr); }
}

.hero-scroll-hint {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: var(--text-mute);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  opacity: 0.6;
  z-index: 1;
}
.hero-scroll-hint .arrow {
  font-size: 18px;
  animation: bounce 2s ease-in-out infinite;
}
@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(6px); }
}

/* ---------- Stats Panel (Compact) ---------- */
.stats-overview {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.stats-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 140px;
}

.stats-card-icon {
  font-size: 16px;
}

.stats-card-value {
  font-size: 18px;
  font-weight: 800;
  color: var(--gold);
  line-height: 1;
}

.stats-card-label {
  font-size: 11px;
  color: var(--text-mute);
  white-space: nowrap;
}

.stats-section {
  margin-bottom: 24px;
}

.stats-section-title {
  font-size: 14px;
  font-weight: 700;
  margin: 0 0 12px;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.latest-matches,
.upcoming-matches {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stats-match-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  transition: background var(--t-fast);
}

.stats-match-card:hover {
  background: var(--card-hover);
}

.stats-match-team {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  min-width: 0;
}

.stats-match-team.home {
  flex: 1;
  justify-content: flex-end;
  text-align: right;
}

.stats-match-team.away {
  flex: 1;
  justify-content: flex-start;
  text-align: left;
}

.stats-match-team .team-flag {
  font-size: 16px;
  flex-shrink: 0;
}

.stats-match-team .team-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stats-match-center {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 60px;
  justify-content: center;
}

.stats-match-score {
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  font-weight: 800;
  color: var(--gold);
}

.stats-match-vs {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--text-mute);
  font-weight: 600;
}

.stats-match-time {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--text-dim);
  min-width: 50px;
  text-align: right;
}

.stats-match-venue {
  font-size: 10px;
  color: var(--text-mute);
  min-width: 80px;
  text-align: right;
  white-space: nowrap;
}

.stats-empty {
  text-align: center;
  padding: 16px;
  color: var(--text-mute);
  font-size: 12px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.stats-highlight {
  border-left: 2px solid var(--gold);
}

.winner {
  color: var(--gold);
}

@media (max-width: 640px) {
  .stats-overview {
    flex-direction: column;
  }
  
  .stats-card {
    min-width: auto;
  }
  
  .stats-match-card {
    flex-wrap: wrap;
  }
  
  .stats-match-team.home,
  .stats-match-team.away {
    flex: auto;
    min-width: 40%;
  }
  
  .stats-match-center {
    order: -1;
    width: 100%;
    justify-content: flex-start;
    padding-bottom: 4px;
    border-bottom: 1px dashed var(--border);
    margin-bottom: 4px;
  }
}

/* ---------- Main Tabs ---------- */
.main-tabs-wrap {
  position: sticky;
  top: 64px;
  z-index: 50;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: 16px 0;
}
.main-tabs {
  display: flex;
  gap: 8px;
  justify-content: center;
}
.main-tab {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 15px;
  color: var(--text-dim);
  background: var(--card);
  border: 1px solid var(--border);
  transition: all var(--t-fast) var(--ease);
  min-width: 100px;
  justify-content: center;
}
.main-tab:hover {
  color: var(--text);
  border-color: var(--border-2);
  background: var(--card-hover);
}
.main-tab.active {
  background: linear-gradient(135deg, var(--gold), var(--gold-2));
  color: var(--bg);
  border-color: var(--gold);
  box-shadow: 0 4px 16px rgba(251, 191, 36, 0.3);
}
.main-tab-icon { font-size: 18px; }
.main-tab-label { font-size: 14px; }

@media (max-width: 640px) {
  .main-tabs { gap: 6px; }
  .main-tab {
    padding: 10px 16px;
    min-width: 80px;
    flex-direction: column;
    gap: 4px;
  }
  .main-tab-icon { font-size: 20px; }
  .main-tab-label { font-size: 12px; }
}

/* ---------- Tab Panels ---------- */
.tab-panels {
  min-height: 60vh;
}
.tab-panel {
  display: none;
  padding: 48px 0 64px;
  animation: fadeIn 0.3s var(--ease);
}
.tab-panel.active {
  display: block;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- Sub-tabs (within schedule) ---------- */
.sub-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 6px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 16px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}
.sub-tab {
  flex: 1;
  min-width: 80px;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 13px;
  color: var(--text-dim);
  transition: all var(--t-fast) var(--ease);
  white-space: nowrap;
}
.sub-tab:hover { color: var(--text); }
.sub-tab.active {
  background: linear-gradient(135deg, var(--gold), var(--gold-2));
  color: var(--bg);
  box-shadow: 0 4px 12px rgba(251, 191, 36, 0.25);
}

/* ---------- Section ---------- */
.section {
  padding: 96px 0;
  position: relative;
}
.section-alt { background: var(--bg-alt); }
.section-head {
  text-align: center;
  margin-bottom: 56px;
}
.section-eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--gold);
  margin-bottom: 16px;
}
.section-title {
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin: 0 0 12px;
}
.section-sub {
  font-size: 16px;
  color: var(--text-dim);
  margin: 0;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}
.section-sub strong { color: var(--text); font-weight: 600; }

/* ---------- Filter chips ---------- */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  margin-bottom: 24px;
}
.filter-chip {
  padding: 6px 14px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 600;
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--text-dim);
  transition: all var(--t-fast) var(--ease);
}
.filter-chip:hover { color: var(--text); border-color: var(--border-2); }
.filter-chip.active {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}

/* ---------- Groups grid ---------- */
.groups-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}
.group-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  transition: transform var(--t-med) var(--ease), border-color var(--t-med) var(--ease);
  position: relative;
  overflow: hidden;
}
.group-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--group-color, var(--gold));
  opacity: 0.8;
}
.group-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-2);
}
.group-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.group-badge {
  width: 36px; height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--group-color, var(--gold));
  color: var(--bg);
  border-radius: var(--radius-sm);
  font-weight: 800;
  font-size: 18px;
}
.group-title {
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -0.01em;
}
.group-subtitle {
  font-size: 11px;
  color: var(--text-mute);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-top: 2px;
}
.team-list { display: flex; flex-direction: column; gap: 8px; }
.team-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  background: var(--bg-alt);
  border-radius: var(--radius-sm);
  font-size: 14px;
  transition: background var(--t-fast);
}
.team-row:hover { background: var(--card-2); }
.team-flag { font-size: 20px; line-height: 1; }
.team-name { flex: 1; font-weight: 500; }
.team-conf {
  font-size: 10px;
  color: var(--text-mute);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
  padding: 2px 6px;
  background: var(--card);
  border-radius: 4px;
}

/* ---------- Schedule list ---------- */
.schedule-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.schedule-day {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.day-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: var(--card-2);
  border-bottom: 1px solid var(--border);
}
.day-date {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 12px;
  background: var(--bg);
  border-radius: var(--radius-sm);
  min-width: 56px;
}
.day-date-num { font-size: 20px; font-weight: 800; line-height: 1; }
.day-date-month {
  font-size: 10px;
  text-transform: uppercase;
  color: var(--text-mute);
  margin-top: 2px;
  letter-spacing: 0.1em;
}
.day-weekday {
  font-size: 13px;
  color: var(--text-dim);
  font-weight: 600;
}
.day-count {
  margin-left: auto;
  font-size: 12px;
  color: var(--text-mute);
  font-weight: 500;
}
.day-matches { display: flex; flex-direction: column; }

.match {
  display: grid;
  grid-template-columns: 90px 1fr auto 1fr 140px;
  align-items: center;
  gap: 16px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  transition: background var(--t-fast);
}
.match:last-child { border-bottom: none; }
.match:hover { background: var(--card-hover); }

.match-time {
  font-family: 'JetBrains Mono', monospace;
  font-size: 15px;
  font-weight: 700;
  color: var(--gold);
  text-align: center;
  line-height: 1.2;
}
.match-time small {
  display: block;
  font-size: 10px;
  color: var(--text-mute);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 3px;
  font-weight: 500;
  font-family: 'Inter', sans-serif;
}

.match-team {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 14px;
  min-width: 0;
}
.match-team.home { justify-content: flex-end; text-align: right; }
.match-team.away { justify-content: flex-start; text-align: left; }
.match-team .team-flag { font-size: 22px; flex-shrink: 0; }
.match-team .team-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.match-vs {
  font-family: 'JetBrains Mono', monospace;
  color: var(--text-mute);
  font-size: 11px;
  font-weight: 600;
  text-align: center;
  letter-spacing: 0.1em;
}

.match-venue {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 12px;
  color: var(--text-dim);
  text-align: right;
}
.match-venue-name { font-weight: 600; }
.match-venue-city { font-size: 11px; color: var(--text-mute); }
.match-venue-flag { font-size: 14px; }

.match-group-badge {
  display: inline-block;
  padding: 2px 8px;
  background: var(--group-color, var(--gold));
  color: var(--bg);
  font-size: 11px;
  font-weight: 800;
  border-radius: 4px;
  vertical-align: middle;
}

@media (max-width: 768px) {
  .match {
    grid-template-columns: 1fr;
    grid-template-areas:
      "teams"
      "venue";
    gap: 10px;
    padding: 14px 16px;
  }
  .match-time {
    grid-area: teams;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 8px;
  }
  .match-time small { margin-top: 0; }
  .match-teams-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 14px;
  }
  .match-teams-row .team-flag { font-size: 20px; }
  .match-teams-row .team-name { white-space: nowrap; }
  .match-teams-row .vs { color: var(--text-mute); font-size: 11px; font-weight: 600; }
  .match-venue {
    grid-area: venue;
    text-align: left;
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    padding-top: 8px;
    border-top: 1px dashed var(--border);
  }
}

/* ---------- Results (Match Results) ---------- */
.bracket-wrapper {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.results-round {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.results-round-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  background: var(--card-2);
  border-bottom: 1px solid var(--border);
}

.results-round-emoji {
  font-size: 24px;
}

.results-round-title {
  font-size: 18px;
  font-weight: 700;
  margin: 0;
  flex: 1;
}

.results-round-count {
  font-size: 12px;
  color: var(--text-mute);
  font-weight: 500;
}

.results-matches {
  display: flex;
  flex-direction: column;
}

.result-match {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  transition: background var(--t-fast);
}

.result-match:last-child {
  border-bottom: none;
}

.result-match:hover {
  background: var(--card-hover);
}

.result-match.result-final {
  background: rgba(251, 191, 36, 0.05);
  border-left: 3px solid var(--gold);
}

.result-match-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.result-match-id {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-mute);
  background: var(--bg);
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid var(--border);
}

.result-match-date {
  font-size: 12px;
  color: var(--text-dim);
  font-weight: 500;
}

.result-match-time {
  font-size: 12px;
  color: var(--gold);
  font-weight: 600;
  font-family: 'JetBrains Mono', monospace;
  margin-left: auto;
}

.result-match-teams {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  margin-bottom: 12px;
}

.result-team {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 14px;
}

.result-team.home {
  justify-content: flex-end;
  text-align: right;
}

.result-team.away {
  justify-content: flex-start;
  text-align: left;
}

.result-team .team-flag,
.result-team-flag {
  font-size: 22px;
  flex-shrink: 0;
}

.result-team-name,
.result-team .team-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.result-team.winner {
  color: var(--gold);
}

.result-team.winner .result-score {
  background: var(--gold);
  color: var(--bg);
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 16px;
}

.result-score {
  font-family: 'JetBrains Mono', monospace;
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  min-width: 24px;
  text-align: center;
}

.result-vs {
  font-family: 'JetBrains Mono', monospace;
  color: var(--text-mute);
  font-size: 12px;
  font-weight: 600;
  text-align: center;
  letter-spacing: 0.1em;
}

.result-match-venue {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 12px;
  color: var(--text-dim);
  padding-top: 12px;
  border-top: 1px dashed var(--border);
}

.result-venue-name {
  font-weight: 600;
}

.result-venue-city {
  font-size: 11px;
  color: var(--text-mute);
}

.result-match.result-played {
  opacity: 0.9;
}

.result-match.result-played .result-team:not(.winner) {
  color: var(--text-mute);
}

@media (max-width: 768px) {
  .result-match-teams {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  
  .result-team.home,
  .result-team.away {
    justify-content: flex-start;
    text-align: left;
  }
  
  .result-vs {
    text-align: left;
    padding-left: 32px;
  }
}

/* ---------- Venues grid ---------- */
.venues-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.venue-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  transition: transform var(--t-med) var(--ease), border-color var(--t-med) var(--ease);
  position: relative;
  overflow: hidden;
}
.venue-card::after {
  content: '';
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: 4px;
  background: var(--country-color, var(--gold));
}
.venue-card:hover { transform: translateY(-2px); border-color: var(--border-2); }
.venue-card.country-mx { --country-color: #22c55e; }
.venue-card.country-us { --country-color: var(--blue); }
.venue-card.country-ca { --country-color: var(--red); }
.venue-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}
.venue-country { font-size: 24px; }
.venue-capacity {
  font-size: 11px;
  color: var(--text-mute);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  text-align: right;
}
.venue-capacity strong { display: block; color: var(--text); font-size: 18px; font-weight: 700; margin-top: 2px; }
.venue-stadium {
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -0.01em;
  margin-bottom: 4px;
}
.venue-city {
  font-size: 13px;
  color: var(--text-dim);
}
.venue-tag {
  display: inline-block;
  margin-top: 12px;
  padding: 3px 8px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  background: var(--gold);
  color: var(--bg);
  border-radius: 4px;
}

/* ---------- Back to top ---------- */
.back-to-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 60;
  width: 44px;
  height: 44px;
  background: var(--card);
  border: 1px solid var(--border-2);
  border-radius: 50%;
  color: var(--text);
  font-size: 18px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  opacity: 0;
  pointer-events: none;
  transform: translateY(20px);
  transition: all var(--t-med) var(--ease);
}
.back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
.back-to-top:hover {
  background: var(--gold);
  color: var(--bg);
  border-color: var(--gold);
  transform: translateY(-2px);
}

/* ---------- Footer ---------- */
.footer {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  padding: 48px 0;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 32px;
  flex-wrap: wrap;
}
.footer-brand { font-weight: 800; font-size: 18px; margin-bottom: 8px; }
.footer-tag { font-size: 13px; color: var(--text-mute); margin: 0; }
.footer-meta {
  font-size: 12px;
  color: var(--text-mute);
  text-align: right;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
@media (max-width: 640px) {
  .footer-inner { flex-direction: column; }
  .footer-meta { text-align: left; }
}

/* ---------- Fade in on scroll (JS-gated) ---------- */
.js .reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
  will-change: opacity, transform;
}
.js .reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- Focus styles ---------- */
:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* ---------- Selection ---------- */
::selection {
  background: var(--gold);
  color: var(--bg);
}

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-mute); }
