/* ═══════════════════════════════════════════════════════
   FIFA World Cup 2026 — Complete Stylesheet
   ═══════════════════════════════════════════════════════ */

:root {
  --navy:        #060B27;
  --navy-mid:    #0B1A40;
  --blue:        #0B2265;
  --blue-light:  #1a3a8f;
  --gold:        #C8A84B;
  --gold-light:  #e8c96b;
  --red:         #CC0000;
  --red-light:   #ff3333;
  --white:       #FFFFFF;
  --gray:        rgba(255,255,255,0.6);
  --glass:       rgba(255,255,255,0.04);
  --glass-h:     rgba(255,255,255,0.08);
  --glass-b:     rgba(255,255,255,0.1);
  --live-green:  #00e676;
  --live-red:    #ff1744;
  --card-radius: 14px;
  --gap:         1.2rem;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--navy);
  color: var(--white);
  font-family: 'Segoe UI', 'Inter', system-ui, -apple-system, sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ── Background canvas ──────────────────────────────── */
#bg-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.app-shell { position: relative; z-index: 1; }

/* ── Live Ticker ───────────────────────────────────── */
.live-ticker {
  background: linear-gradient(90deg, var(--red) 0%, #8B0000 100%);
  padding: 0.45rem 0;
  overflow: hidden;
  position: relative;
  z-index: 100;
}

.live-ticker__track {
  display: flex;
  gap: 3rem;
  animation: tickerScroll 40s linear infinite;
  white-space: nowrap;
}

.live-ticker:hover .live-ticker__track { animation-play-state: paused; }

.ticker-item {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  transition: color 0.2s;
}

.ticker-item:hover { color: var(--gold-light); }

.ticker-pulse {
  display: inline-block;
  width: 8px; height: 8px;
  background: var(--live-green);
  border-radius: 50%;
  animation: pulse 1.2s infinite;
  box-shadow: 0 0 6px var(--live-green);
}

/* ── Header / Nav ──────────────────────────────────── */
.header {
  background: linear-gradient(180deg, rgba(6,11,39,0.95) 0%, rgba(11,34,101,0.7) 100%);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(200,168,75,0.3);
  position: sticky;
  top: 0;
  z-index: 90;
  padding: 0 2rem;
}

.header__inner {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  height: 64px;
  gap: 1.5rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  flex-shrink: 0;
}

.logo__icon { font-size: 2rem; }
.logo__text { font-size: 1.1rem; font-weight: 700; color: var(--gold); letter-spacing: 0.5px; line-height: 1.1; }
.logo__sub  { font-size: 0.6rem; color: rgba(255,255,255,0.5); letter-spacing: 2px; text-transform: uppercase; }

.nav {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  flex: 1;
}

.nav__item {
  padding: 0.5rem 0.9rem;
  border-radius: 8px;
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  background: none;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  white-space: nowrap;
}

.nav__item:hover { color: var(--gold); background: rgba(200,168,75,0.08); }
.nav__item.active { color: var(--gold); background: rgba(200,168,75,0.15); }
.nav__item .badge {
  background: var(--red);
  color: #fff;
  font-size: 0.65rem;
  padding: 0.1rem 0.35rem;
  border-radius: 10px;
  font-weight: 700;
  animation: pulse 1.5s infinite;
}

.search-wrap {
  position: relative;
  margin-left: auto;
}

.search-input {
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px;
  padding: 0.45rem 1rem 0.45rem 2.2rem;
  color: #fff;
  font-size: 0.85rem;
  width: 200px;
  transition: all 0.2s;
}

.search-input::placeholder { color: rgba(255,255,255,0.35); }
.search-input:focus { outline: none; border-color: var(--gold); width: 260px; background: rgba(255,255,255,0.1); }

.search-icon { position: absolute; left: 0.7rem; top: 50%; transform: translateY(-50%); opacity: 0.5; pointer-events: none; }

.search-results {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  width: 300px;
  background: var(--navy-mid);
  border: 1px solid var(--glass-b);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0,0,0,0.5);
  z-index: 200;
  display: none;
}

.search-results.show { display: block; }

.search-result-item {
  padding: 0.75rem 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  transition: background 0.15s;
}

.search-result-item:hover { background: var(--glass-h); }
.search-result-item .type-badge {
  font-size: 0.65rem;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  font-weight: 700;
  text-transform: uppercase;
  flex-shrink: 0;
}

.type-match { background: rgba(200,168,75,0.2); color: var(--gold); }
.type-team  { background: rgba(0,150,255,0.2); color: #60a5fa; }

/* ── Main Content ─────────────────────────────────── */
.main { max-width: 1400px; margin: 0 auto; padding: 2rem; }

/* ── Views ───────────────────────────────────────── */
.view { display: none; animation: fadeIn 0.3s ease; }
.view.active { display: block; }

/* ── Hero Section ─────────────────────────────────── */
.hero {
  background: linear-gradient(135deg, var(--blue) 0%, #0d3080 50%, var(--navy) 100%);
  border: 1px solid rgba(200,168,75,0.2);
  border-radius: 20px;
  padding: 3rem 2.5rem;
  margin-bottom: 2rem;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '⚽';
  position: absolute;
  right: 2rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 8rem;
  opacity: 0.08;
  animation: rotateBall 8s linear infinite;
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(200,168,75,0.15);
  border: 1px solid rgba(200,168,75,0.3);
  border-radius: 20px;
  padding: 0.3rem 0.8rem;
  font-size: 0.75rem;
  color: var(--gold);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.hero h1 {
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 0.5rem;
  line-height: 1.1;
}

.hero h1 span { color: var(--gold); }

.hero__meta { color: var(--gray); font-size: 0.9rem; margin-bottom: 1.5rem; }

.hero__stats {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
}

.hero__stat { text-align: center; }
.hero__stat-num { font-size: 2rem; font-weight: 800; color: var(--gold); line-height: 1; }
.hero__stat-lbl { font-size: 0.7rem; color: var(--gray); letter-spacing: 1px; text-transform: uppercase; }

/* ── Section Headers ──────────────────────────────── */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.section-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.see-all {
  font-size: 0.8rem;
  color: var(--gold);
  text-decoration: none;
  opacity: 0.7;
  cursor: pointer;
  transition: opacity 0.2s;
}
.see-all:hover { opacity: 1; }

/* ── Match Cards ─────────────────────────────────── */
.matches-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px,1fr));
  gap: var(--gap);
  margin-bottom: 2rem;
}

.match-card {
  background: var(--glass);
  border: 1px solid var(--glass-b);
  border-radius: var(--card-radius);
  padding: 1.2rem;
  cursor: pointer;
  transition: all 0.25s;
  position: relative;
  overflow: hidden;
}

.match-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: transparent;
  transition: background 0.2s;
}

.match-card.status-live::before { background: var(--live-green); }
.match-card.status-finished::before { background: var(--gold); }
.match-card.status-upcoming::before { background: var(--blue-light); }

.match-card:hover {
  background: var(--glass-h);
  border-color: rgba(200,168,75,0.3);
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.4);
}

.match-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  font-size: 0.72rem;
  color: var(--gray);
}

.match-status {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-weight: 700;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.status-live   .match-status { color: var(--live-green); }
.status-finished .match-status { color: var(--gray); }
.status-upcoming .match-status { color: #60a5fa; }

.match-status .dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.status-live .match-status .dot { animation: pulse 1s infinite; }

.match-card__body {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
}

.match-team {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
}

.match-team__flag { font-size: 2.2rem; line-height: 1; }
.match-team__name { font-size: 0.85rem; font-weight: 600; text-align: center; }
.match-team__code { font-size: 0.7rem; color: var(--gray); }

.match-score {
  text-align: center;
  flex-shrink: 0;
}

.match-score__num {
  font-size: 2.2rem;
  font-weight: 900;
  letter-spacing: -1px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.match-score__sep { color: var(--gray); margin: 0 0.2rem; }
.match-score__ht  { font-size: 0.7rem; color: var(--gray); margin-top: 0.3rem; }

.match-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 1rem;
  padding-top: 0.8rem;
  border-top: 1px solid var(--glass-b);
  font-size: 0.72rem;
  color: var(--gray);
}

.event-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  background: rgba(255,255,255,0.06);
  border-radius: 20px;
  padding: 0.2rem 0.5rem;
  font-size: 0.68rem;
}

/* ── Live Score Score Flash ─────────────────────── */
.score-flash {
  animation: scoreFlash 0.6s ease-out;
}

/* ── Standings Table ──────────────────────────────── */
.standings-container { margin-bottom: 2rem; }

.groups-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px,1fr));
  gap: var(--gap);
}

.group-card {
  background: var(--glass);
  border: 1px solid var(--glass-b);
  border-radius: var(--card-radius);
  overflow: hidden;
}

.group-card__header {
  background: linear-gradient(90deg, var(--blue) 0%, var(--blue-light) 100%);
  padding: 0.8rem 1.2rem;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 1px;
  text-transform: uppercase;
}

.standings-table { width: 100%; border-collapse: collapse; }
.standings-table th {
  font-size: 0.68rem;
  color: var(--gray);
  font-weight: 600;
  letter-spacing: 0.5px;
  padding: 0.5rem 0.8rem;
  text-align: center;
  border-bottom: 1px solid var(--glass-b);
}

.standings-table th:first-child { text-align: left; }

.standings-table td {
  padding: 0.6rem 0.8rem;
  font-size: 0.83rem;
  text-align: center;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  transition: background 0.15s;
}

.standings-table tr:last-child td { border-bottom: none; }
.standings-table tr:hover td { background: var(--glass-h); }

.standings-table td:first-child { text-align: left; }

.team-cell {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  white-space: nowrap;
}

.team-cell:hover .team-cell__name { color: var(--gold); }

.team-cell__flag { font-size: 1.1rem; }
.team-cell__name { font-weight: 500; font-size: 0.83rem; }

.pts-cell { font-weight: 800; color: var(--gold); }

.qualified-row td:first-child { border-left: 3px solid var(--live-green); }
.playoff-row   td:first-child { border-left: 3px solid var(--gold); }
.eliminated-row { opacity: 0.5; }

/* ── Top Scorers ─────────────────────────────────── */
.scorers-list { display: flex; flex-direction: column; gap: 0.7rem; }

.scorer-card {
  background: var(--glass);
  border: 1px solid var(--glass-b);
  border-radius: 10px;
  padding: 0.9rem 1.2rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: all 0.2s;
  cursor: pointer;
}

.scorer-card:hover { background: var(--glass-h); border-color: rgba(200,168,75,0.3); }

.scorer-rank {
  font-size: 1.4rem;
  font-weight: 900;
  color: var(--gray);
  min-width: 2rem;
  text-align: center;
}

.scorer-rank.top3 { color: var(--gold); }

.scorer-info { flex: 1; }
.scorer-name { font-weight: 700; font-size: 0.95rem; margin-bottom: 0.2rem; }
.scorer-team { font-size: 0.75rem; color: var(--gray); display: flex; align-items: center; gap: 0.3rem; }

.scorer-stats { display: flex; gap: 1.5rem; text-align: center; }
.scorer-stat { }
.scorer-stat-num { font-size: 1.3rem; font-weight: 800; color: var(--gold); line-height: 1; }
.scorer-stat-lbl { font-size: 0.65rem; color: var(--gray); text-transform: uppercase; letter-spacing: 0.5px; }

/* ── Teams Grid ──────────────────────────────────── */
.teams-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px,1fr));
  gap: var(--gap);
}

.team-card {
  background: var(--glass);
  border: 1px solid var(--glass-b);
  border-radius: var(--card-radius);
  padding: 1.5rem 1rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.25s;
  position: relative;
}

.team-card:hover {
  background: var(--glass-h);
  border-color: rgba(200,168,75,0.4);
  transform: translateY(-3px);
  box-shadow: 0 15px 40px rgba(0,0,0,0.4);
}

.team-card__flag   { font-size: 3rem; margin-bottom: 0.7rem; display: block; }
.team-card__name   { font-weight: 700; font-size: 0.9rem; margin-bottom: 0.2rem; }
.team-card__group  { font-size: 0.72rem; color: var(--gray); }

/* ── Predictions ─────────────────────────────────── */
.predictions-list { display: flex; flex-direction: column; gap: 1rem; }

.prediction-card {
  background: var(--glass);
  border: 1px solid var(--glass-b);
  border-radius: var(--card-radius);
  padding: 1.5rem;
  cursor: pointer;
  transition: all 0.2s;
}

.prediction-card:hover { background: var(--glass-h); border-color: rgba(200,168,75,0.3); }

.prediction-card__teams {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 1.2rem;
  font-size: 1.1rem;
  font-weight: 700;
}

.prediction-bar {
  display: flex;
  border-radius: 6px;
  overflow: hidden;
  height: 28px;
  margin-bottom: 0.8rem;
  font-size: 0.78rem;
  font-weight: 700;
}

.prediction-bar__home { background: linear-gradient(90deg, #1a3a8f, #2a5abf); display: flex; align-items: center; justify-content: center; transition: width 1s ease; }
.prediction-bar__draw { background: rgba(255,255,255,0.1); display: flex; align-items: center; justify-content: center; }
.prediction-bar__away { background: linear-gradient(90deg, #8B0000, #CC0000); display: flex; align-items: center; justify-content: center; transition: width 1s ease; }

.prediction-card__score {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--gold);
  margin-bottom: 0.8rem;
}

.prediction-card__analysis {
  font-size: 0.82rem;
  color: var(--gray);
  line-height: 1.5;
  border-top: 1px solid var(--glass-b);
  padding-top: 0.8rem;
  margin-top: 0.5rem;
}

.ai-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: rgba(138,43,226,0.2);
  border: 1px solid rgba(138,43,226,0.4);
  border-radius: 20px;
  padding: 0.2rem 0.6rem;
  font-size: 0.7rem;
  color: #c084fc;
  font-weight: 600;
}

/* ── Modal ───────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(8px);
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
}

.modal-overlay.show { opacity: 1; pointer-events: all; }

.modal {
  background: linear-gradient(180deg, #0d1f4a 0%, var(--navy) 100%);
  border: 1px solid var(--glass-b);
  border-radius: 20px;
  width: 100%;
  max-width: 700px;
  max-height: 90vh;
  overflow-y: auto;
  transform: scale(0.95) translateY(20px);
  transition: transform 0.25s;
  box-shadow: 0 40px 80px rgba(0,0,0,0.6);
}

.modal-overlay.show .modal { transform: scale(1) translateY(0); }

.modal__header {
  background: linear-gradient(135deg, var(--blue) 0%, #1a3a8f 100%);
  padding: 1.5rem;
  border-radius: 20px 20px 0 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 1;
}

.modal__title { font-size: 1rem; font-weight: 700; color: var(--gold); }

.modal__close {
  background: rgba(255,255,255,0.1);
  border: none;
  border-radius: 50%;
  width: 32px; height: 32px;
  cursor: pointer;
  color: #fff;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.modal__close:hover { background: rgba(255,255,255,0.2); }

.modal__body { padding: 1.5rem; }

/* Match detail modal */
.modal-match-score {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
  text-align: center;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--glass-b);
  margin-bottom: 1.5rem;
}

.modal-team-flag { font-size: 3.5rem; margin-bottom: 0.5rem; }
.modal-team-name { font-size: 1rem; font-weight: 700; }
.modal-team-code { font-size: 0.75rem; color: var(--gray); }

.modal-big-score {
  font-size: 3.5rem;
  font-weight: 900;
  color: var(--gold);
  letter-spacing: -2px;
  line-height: 1;
}

.modal-score-sep { color: var(--gray); }
.modal-ht { font-size: 0.75rem; color: var(--gray); margin-top: 0.3rem; }

/* Lineup */
.lineup-pitch {
  background: linear-gradient(180deg, #1a5c2a 0%, #2d8c42 40%, #2d8c42 60%, #1a5c2a 100%);
  border-radius: 12px;
  padding: 1.5rem;
  margin: 1rem 0;
  position: relative;
  min-height: 350px;
}

.lineup-pitch::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 10%;
  right: 10%;
  height: 2px;
  background: rgba(255,255,255,0.2);
  transform: translateY(-50%);
}

.lineup-pitch::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80px; height: 80px;
  border: 2px solid rgba(255,255,255,0.2);
  border-radius: 50%;
}

.lineup-section { display: flex; flex-direction: column; gap: 0.5rem; }

.lineup-row {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.lineup-player {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  cursor: pointer;
  transition: transform 0.2s;
  min-width: 55px;
}

.lineup-player:hover { transform: scale(1.1); }

.player-circle {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: rgba(255,255,255,0.9);
  color: var(--navy);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.85rem;
  border: 2px solid rgba(255,255,255,0.5);
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.home-player .player-circle { background: #0B2265; color: #fff; border-color: var(--gold); }
.away-player .player-circle { background: #CC0000; color: #fff; border-color: rgba(255,255,255,0.7); }

.player-name {
  font-size: 0.6rem;
  color: rgba(255,255,255,0.9);
  text-align: center;
  max-width: 55px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-shadow: 0 1px 3px rgba(0,0,0,0.8);
}

/* Events Timeline */
.events-timeline { display: flex; flex-direction: column; gap: 0.5rem; }

.event-item {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}

.event-minute {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--gray);
  min-width: 35px;
}

.event-icon { font-size: 1rem; }
.event-text { font-size: 0.82rem; }
.event-team { font-size: 0.7rem; color: var(--gray); }

/* Stats bars */
.stats-container { display: flex; flex-direction: column; gap: 0.8rem; }

.stat-row { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 0.5rem; }
.stat-label { font-size: 0.75rem; color: var(--gray); text-align: center; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }
.stat-bar-wrap { display: flex; height: 6px; border-radius: 3px; overflow: hidden; }
.stat-bar-home { background: #1a3a8f; border-radius: 3px 0 0 3px; }
.stat-bar-away { background: #CC0000; border-radius: 0 3px 3px 0; }

.stat-num-home { font-size: 0.85rem; font-weight: 700; text-align: right; }
.stat-num-away { font-size: 0.85rem; font-weight: 700; }

/* Tab navigation inside modal */
.modal-tabs {
  display: flex;
  gap: 0.3rem;
  border-bottom: 1px solid var(--glass-b);
  margin-bottom: 1.2rem;
}

.modal-tab {
  padding: 0.5rem 1rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--gray);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
  color: rgba(255,255,255,0.5);
}

.modal-tab.active { color: var(--gold); border-bottom-color: var(--gold); }
.modal-tab:hover { color: var(--gold); }

.modal-panel { display: none; }
.modal-panel.active { display: block; }

/* Team modal */
.team-modal-header {
  text-align: center;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--glass-b);
  margin-bottom: 1.5rem;
}

.team-modal-flag { font-size: 4rem; margin-bottom: 0.5rem; }
.team-modal-name { font-size: 1.5rem; font-weight: 800; }
.team-modal-info { font-size: 0.82rem; color: var(--gray); margin-top: 0.3rem; display: flex; justify-content: center; gap: 1.5rem; }

/* ── Filters / Tabs ───────────────────────────────── */
.filter-tabs {
  display: flex;
  gap: 0.3rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.filter-tab {
  padding: 0.45rem 1rem;
  border-radius: 20px;
  border: 1px solid var(--glass-b);
  background: var(--glass);
  color: rgba(255,255,255,0.6);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.filter-tab:hover  { border-color: var(--gold); color: var(--gold); }
.filter-tab.active { background: var(--gold); color: #000; border-color: var(--gold); }

/* ── Loading / Skeleton ───────────────────────────── */
.skeleton {
  background: linear-gradient(90deg, rgba(255,255,255,0.04) 25%, rgba(255,255,255,0.08) 50%, rgba(255,255,255,0.04) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 6px;
}

.loader {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4rem;
  gap: 1rem;
  color: var(--gray);
}

.loader-ball {
  width: 20px; height: 20px;
  background: var(--gold);
  border-radius: 50%;
  animation: bounce 0.6s infinite alternate;
}

.loader-ball:nth-child(2) { animation-delay: 0.2s; }
.loader-ball:nth-child(3) { animation-delay: 0.4s; }

/* ── Toast Notifications ─────────────────────────── */
.toast-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 500;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.toast {
  background: var(--navy-mid);
  border: 1px solid var(--glass-b);
  border-radius: 10px;
  padding: 0.8rem 1.2rem;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-size: 0.85rem;
  min-width: 250px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.4);
  animation: slideInToast 0.3s ease;
}

.toast.goal    { border-left: 3px solid var(--live-green); }
.toast.card    { border-left: 3px solid var(--gold); }
.toast.info    { border-left: 3px solid #60a5fa; }

/* ── Empty State ─────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--gray);
}

.empty-state .icon { font-size: 3rem; margin-bottom: 1rem; opacity: 0.5; }
.empty-state h3 { font-size: 1.1rem; margin-bottom: 0.5rem; }
.empty-state p  { font-size: 0.85rem; }

/* ── Schedule / Calendar ─────────────────────────── */
.schedule-day { margin-bottom: 2rem; }

.schedule-day__header {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(200,168,75,0.2);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.schedule-day__header.today-header { color: var(--live-green); }

.countdown {
  font-size: 0.75rem;
  color: var(--gray);
  font-variant-numeric: tabular-nums;
}

/* ── Demo Banner ─────────────────────────────────── */
.demo-banner {
  background: linear-gradient(90deg, rgba(200,168,75,0.1), rgba(200,168,75,0.05));
  border: 1px solid rgba(200,168,75,0.3);
  border-radius: 10px;
  padding: 0.8rem 1.2rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  font-size: 0.82rem;
}

.demo-banner a { color: var(--gold); text-decoration: none; font-weight: 600; }
.demo-banner a:hover { text-decoration: underline; }

/* ── Scrollbar ────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(200,168,75,0.3); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(200,168,75,0.6); }

/* ── Responsive ──────────────────────────────────── */
@media (max-width: 768px) {
  .header__inner { padding: 0 1rem; }
  .nav .nav__item span:not(.badge) { display: none; }
  .nav__item { padding: 0.5rem 0.6rem; font-size: 1.1rem; }
  .main { padding: 1rem; }
  .hero { padding: 1.5rem 1.2rem; }
  .hero__stats { gap: 1.2rem; }
  .matches-grid { grid-template-columns: 1fr; }
  .groups-grid { grid-template-columns: 1fr; }
  .teams-grid { grid-template-columns: repeat(auto-fill, minmax(120px,1fr)); }
  .search-input { width: 120px; }
  .search-input:focus { width: 160px; }
  .modal { max-height: 95vh; border-radius: 16px 16px 0 0; }
  .modal-overlay { align-items: flex-end; padding: 0; }
}

/* ── Animations ──────────────────────────────────── */
@keyframes tickerScroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.5; transform: scale(0.8); }
}

@keyframes rotateBall {
  from { transform: translateY(-50%) rotate(0deg); }
  to   { transform: translateY(-50%) rotate(360deg); }
}

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

@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

@keyframes bounce {
  from { transform: translateY(0); }
  to   { transform: translateY(-12px); }
}

@keyframes scoreFlash {
  0%   { color: var(--live-green); transform: scale(1.2); }
  100% { color: var(--gold); transform: scale(1); }
}

@keyframes slideInToast {
  from { transform: translateX(100px); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}

@keyframes goalCelebration {
  0%   { transform: scale(1); }
  30%  { transform: scale(1.15); }
  60%  { transform: scale(0.95); }
  100% { transform: scale(1); }
}
