:root {
  --bg-base: #0B0E14;
  --bg-surface: #141925;
  --bg-surface-2: #10141F;
  --bg-input: #1B2130;
  --border: #232A3A;
  --border-badge: #2A3244;
  --text-primary: #F5F3EE;
  --text-secondary: #8B93A7;
  --text-muted: #6B7280;
  --text-faint: #4A5268;
  --accent-win: #00D97E;
  --accent-lose: #FF4D5E;
  --accent-draw: #FFB800;
  --win-bg: #0F1F18;
  --lose-bg: #FF4D5E10;
  --draw-bg: #241C05;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg-base);
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
}

.container {
  max-width: 760px;
  margin: 0 auto;
  padding: 40px 20px 80px;
}

.eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--accent-win);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 6px;
}

h1 {
  font-family: 'Archivo Black', sans-serif;
  font-size: 32px;
  margin: 0;
  letter-spacing: -0.01em;
}

.nav {
  display: flex;
  gap: 4px;
  background: var(--bg-surface-2);
  border: 1px solid var(--bg-input);
  border-radius: 14px;
  padding: 4px;
  margin-bottom: 28px;
}

.nav-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 11px 8px;
  border-radius: 10px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.nav-btn.active {
  background: var(--accent-win);
  color: var(--bg-base);
}

.card {
  background: linear-gradient(155deg, var(--bg-surface), var(--bg-surface-2));
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 32px;
  position: relative;
  overflow: hidden;
}

.match-switcher {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  margin-bottom: 28px;
}

.match-chip {
  flex-shrink: 0;
  padding: 10px 16px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-surface);
  cursor: pointer;
  text-align: left;
  transition: all 0.2s ease;
}

.match-chip.active {
  border-color: var(--accent-win);
  background: var(--win-bg);
}

.match-chip.played {
  opacity: 0.55;
  cursor: default;
}

.match-chip-stage {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 4px;
}

.match-chip.active .match-chip-stage { color: var(--accent-win); }

.match-chip-teams {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.team-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
}

.team-side {
  display: flex;
  align-items: center;
  gap: 14px;
}

.team-side.right {
  flex-direction: row-reverse;
  text-align: right;
}

.team-badge {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(155deg, var(--bg-input), #0F1420);
  border: 1px solid var(--border-badge);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}

.team-badge img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.team-badge.md { width: 44px; height: 44px; }
.team-badge.sm { width: 32px; height: 32px; }
.team-badge.lg { width: 56px; height: 56px; }

.team-name {
  font-family: 'Archivo Black', sans-serif;
  font-size: 20px;
}

.vs {
  font-family: 'Archivo Black', sans-serif;
  font-size: 24px;
  color: var(--text-faint);
  padding: 0 12px;
}

.stat-chip {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--text-secondary);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 3px 10px;
  letter-spacing: 0.03em;
  display: inline-block;
  margin-top: 4px;
}

.section-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 16px;
}

.prob-bar { margin-bottom: 14px; }

.prob-bar-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
  align-items: baseline;
}

.prob-bar-label {
  font-size: 13px;
  color: var(--text-secondary);
}

.prob-bar-label.winner { font-weight: 700; color: var(--text-primary); }

.prob-bar-value {
  font-family: 'JetBrains Mono', monospace;
  font-size: 15px;
  font-weight: 700;
  color: var(--text-secondary);
}

.prob-bar-track {
  height: 10px;
  border-radius: 5px;
  background: var(--bg-input);
  overflow: hidden;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.4);
}

.prob-bar-fill {
  height: 100%;
  border-radius: 5px;
  width: 0;
  transition: width 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}

.prediction-footer {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-secondary);
}

.context-controls { margin-bottom: 24px; }

.context-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 10px;
}

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

.ctx-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-surface);
  color: var(--text-secondary);
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.ctx-btn.active-win { border-color: var(--accent-win); background: var(--win-bg); color: var(--accent-win); }
.ctx-btn.active-draw { border-color: var(--accent-draw); background: var(--draw-bg); color: var(--accent-draw); }

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

.guess-btn {
  border: 1px solid var(--border);
  background: var(--bg-surface);
  border-radius: 14px;
  padding: 18px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.25s ease;
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 600;
}

.guess-btn:disabled { cursor: default; }

.score-badge {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 6px 14px;
}

.duel-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}

.duel-select {
  width: 100%;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.duel-select option { background: var(--bg-surface); }

.stats-row {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 20px;
}

.stat-block { flex: 1; }

.stat-block-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.stat-block-value {
  font-family: 'Archivo Black', sans-serif;
  font-size: 22px;
  margin-top: 4px;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent-win);
  color: var(--bg-base);
  border: none;
  border-radius: 10px;
  padding: 9px 16px;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.intro-text {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 24px;
  line-height: 1.6;
}

.hidden { display: none !important; }

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

.fade-up { animation: fadeUp 0.4s ease-out; }

.loading {
  text-align: center;
  color: var(--text-muted);
  padding: 40px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
}

.year-switcher {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.year-chip {
  padding: 10px 20px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-surface);
  color: var(--text-secondary);
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.year-chip.active {
  border-color: var(--accent-win);
  background: var(--win-bg);
  color: var(--accent-win);
}

.final-card .team-row { margin-bottom: 16px; }

.match-list-item {
  background: linear-gradient(155deg, var(--bg-surface), var(--bg-surface-2));
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 10px;
}

.match-list-meta {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}

.match-list-teams {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 600;
  flex-wrap: wrap;
}

.match-list-score {
  font-family: 'Archivo Black', sans-serif;
  font-size: 15px;
  color: var(--accent-win);
  padding: 0 8px;
}

.match-list-probs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.prob-chip {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid var(--border);
}

.prob-chip.home { color: var(--accent-win); background: var(--win-bg); }
.prob-chip.draw { color: var(--accent-draw); background: var(--draw-bg); }
.prob-chip.away { color: var(--accent-lose); background: var(--lose-bg); }

.favorites-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.favorite-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: var(--bg-input);
  border-radius: 10px;
  border: 1px solid var(--border);
}

.favorite-rank {
  font-family: 'Archivo Black', sans-serif;
  font-size: 18px;
  color: var(--accent-win);
  min-width: 32px;
}

.favorite-name {
  flex: 1;
  font-weight: 600;
  font-size: 14px;
}

.favorite-score {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--text-secondary);
}

::-webkit-scrollbar { height: 6px; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
