/* ─── Season Countdown Overlay ──────────────────────────────────── */

.season-countdown {
  position: fixed;
  top: 60px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  pointer-events: none;
  transition: opacity 0.5s ease;
}

.season-countdown.hidden {
  opacity: 0;
  pointer-events: none;
}

.countdown-content {
  background: linear-gradient(135deg, rgba(20, 10, 30, 0.95), rgba(40, 20, 60, 0.95));
  border: 2px solid #FFD700;
  border-radius: 12px;
  padding: 16px 24px;
  text-align: center;
  box-shadow: 0 4px 20px rgba(255, 215, 0, 0.3);
  min-width: 280px;
  max-width: 400px;
}

.season-countdown.warning .countdown-content {
  border-color: #FF9800;
  box-shadow: 0 4px 20px rgba(255, 152, 0, 0.4);
}

.season-countdown.critical .countdown-content {
  border-color: #F44336;
  box-shadow: 0 4px 25px rgba(244, 67, 54, 0.5);
  animation: countdown-pulse 1s ease-in-out infinite;
}

@keyframes countdown-pulse {
  0%, 100% { transform: scale(1); box-shadow: 0 4px 25px rgba(244, 67, 54, 0.5); }
  50% { transform: scale(1.02); box-shadow: 0 6px 30px rgba(244, 67, 54, 0.7); }
}

.countdown-title {
  font-family: 'Press Start 2P', monospace;
  font-size: 12px;
  color: #FFD700;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 8px;
}

.season-countdown.critical .countdown-title {
  color: #F44336;
  animation: title-flash 0.5s ease-in-out infinite alternate;
}

@keyframes title-flash {
  from { opacity: 1; }
  to { opacity: 0.5; }
}

.countdown-timer {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 8px;
  margin: 8px 0;
}

.countdown-number {
  font-family: 'Press Start 2P', monospace;
  font-size: 28px;
  color: #fff;
  text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.season-countdown.critical .countdown-number {
  color: #F44336;
  text-shadow: 0 0 15px rgba(244, 67, 54, 0.8);
  font-size: 32px;
}

.countdown-label {
  font-size: 11px;
  color: #aaa;
  text-transform: uppercase;
}

/* ─── Race Standings in Countdown ──────────────────────────────── */

.countdown-race {
  margin: 12px 0 8px;
}

.race-entry {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 0;
  font-size: 11px;
}

.race-medal {
  width: 20px;
  text-align: center;
}

.race-name {
  width: 70px;
  color: #ddd;
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
}

.race-bar-container {
  flex: 1;
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  overflow: hidden;
}

.race-bar {
  height: 100%;
  background: linear-gradient(90deg, #FFD700, #FF9800);
  border-radius: 4px;
  transition: width 0.5s ease;
}

.race-entry:nth-child(2) .race-bar {
  background: linear-gradient(90deg, #C0C0C0, #9E9E9E);
}

.race-entry:nth-child(3) .race-bar {
  background: linear-gradient(90deg, #CD7F32, #8B5A2B);
}

.race-score {
  width: 50px;
  text-align: right;
  color: #FFD700;
  font-family: 'Press Start 2P', monospace;
  font-size: 9px;
}

/* ─── Countdown Messages ───────────────────────────────────────── */

.countdown-message {
  font-size: 11px;
  color: #aaa;
  margin-top: 8px;
}

.countdown-message.pulse {
  color: #FF9800;
  animation: msg-pulse 2s ease-in-out infinite;
}

.countdown-message.flash {
  color: #F44336;
  font-weight: bold;
  animation: msg-flash 0.3s ease-in-out infinite alternate;
}

@keyframes msg-pulse {
  0%, 100% { opacity: 0.7; }
  50% { opacity: 1; }
}

@keyframes msg-flash {
  from { opacity: 1; color: #F44336; }
  to { opacity: 0.6; color: #FFD700; }
}

/* ─── Season Progress Bar (Overview Tab) ───────────────────────── */

.season-progress-wrapper {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  overflow: hidden;
  margin: 6px 0;
}

.season-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #4CAF50, #8BC34A);
  border-radius: 4px;
  transition: width 1s ease;
}

.season-progress-bar.warning {
  background: linear-gradient(90deg, #FF9800, #FFC107);
}

.season-progress-bar.critical {
  background: linear-gradient(90deg, #F44336, #FF5722);
  animation: bar-pulse 1s ease-in-out infinite;
}

@keyframes bar-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

/* ─── Hall of Fame ─────────────────────────────────────────────── */

.hof-container {
  padding: 8px;
}

.hof-subtitle {
  font-family: 'Press Start 2P', monospace;
  font-size: 10px;
  color: #FFD700;
  margin: 16px 0 8px;
  padding-bottom: 4px;
  border-bottom: 1px solid rgba(255, 215, 0, 0.3);
}

.hof-season-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 215, 0, 0.2);
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 12px;
}

.hof-season-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.hof-season-number {
  font-family: 'Press Start 2P', monospace;
  font-size: 11px;
  color: #FFD700;
}

.hof-season-ticks {
  font-size: 10px;
  color: #888;
}

.hof-champion {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.1), rgba(255, 152, 0, 0.05));
  border-radius: 6px;
  margin-bottom: 8px;
}

.hof-champion-crown {
  font-size: 20px;
}

.hof-champion-name {
  font-family: 'Press Start 2P', monospace;
  font-size: 11px;
  color: #FFD700;
  flex: 1;
}

.hof-champion-score {
  font-size: 12px;
  color: #fff;
  font-weight: bold;
}

.hof-champion-prestige {
  font-size: 10px;
  color: #9C27B0;
  font-style: italic;
}

.hof-podium {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.hof-podium-entry {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 8px;
  font-size: 11px;
}

.hof-podium-entry.champion {
  background: rgba(255, 215, 0, 0.05);
  border-radius: 4px;
}

.hof-medal { width: 20px; text-align: center; }
.hof-name { flex: 1; color: #ddd; }
.hof-score { color: #FFD700; font-family: monospace; }

/* ─── Prestige Rankings ────────────────────────────────────────── */

.hof-prestige-entry {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.hof-prestige-entry:last-child {
  border-bottom: none;
}

.hof-prestige-rank {
  width: 30px;
  text-align: center;
  font-size: 12px;
}

.hof-prestige-name {
  flex: 1;
  color: #ddd;
  font-size: 12px;
}

.hof-prestige-title {
  font-family: 'Press Start 2P', monospace;
  font-size: 9px;
  text-transform: uppercase;
}

.hof-prestige-points {
  font-size: 11px;
  color: #9C27B0;
  font-weight: bold;
  width: 60px;
  text-align: right;
}

/* ─── Mobile Responsive ────────────────────────────────────────── */

@media (max-width: 768px) {
  .season-countdown {
    top: 50px;
    left: 5%;
    right: 5%;
    transform: none;
  }

  .countdown-content {
    min-width: unset;
    padding: 12px 16px;
  }

  .countdown-number {
    font-size: 22px;
  }

  .season-countdown.critical .countdown-number {
    font-size: 26px;
  }

  .countdown-title {
    font-size: 10px;
  }

  .race-name {
    width: 50px;
    font-size: 10px;
  }

  .hof-champion {
    flex-wrap: wrap;
  }

  .hof-champion-name {
    font-size: 10px;
  }

  .hof-podium-entry {
    font-size: 10px;
  }
}
