/* ==========================================================================
   MARIO KART GRAND PRIX - LEADERBOARD (Tema 100% Mario Kart Arcade com Imagens)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&family=Orbitron:wght@600;800;900&family=Rajdhani:wght@700&family=Outfit:wght@500;700;900&display=swap');

:root {
  --bg-dark: #0b0c10;
  --bg-card: #151821;
  --bg-card-hover: #1f2430;
  --border-card: rgba(255, 255, 255, 0.1);

  --mario-red: #e52521;
  --luigi-green: #43b047;
  --star-yellow: #fbd000;
  --toad-blue: #0099ff;

  --color-gold: #ffd700;
  --color-silver: #e0e0e0;
  --color-bronze: #cd7f32;

  --font-pixel: 'Press Start 2P', monospace;
  --font-timer: 'Orbitron', monospace;
  --font-heading: 'Rajdhani', sans-serif;
  --font-body: 'Outfit', sans-serif;

  --glow-gold: 0 0 25px rgba(255, 215, 0, 0.5);
  --glow-silver: 0 0 20px rgba(224, 224, 224, 0.4);
  --glow-bronze: 0 0 20px rgba(205, 127, 50, 0.4);
  --glow-red: 0 0 20px rgba(229, 37, 33, 0.5);
}

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

body {
  background-color: var(--bg-dark);
  color: #ffffff;
  font-family: var(--font-body);
  min-height: 100vh;
  overflow-x: hidden;
  background-image:
    radial-gradient(circle at 20% 15%, rgba(229, 37, 33, 0.12) 0%, transparent 40%),
    radial-gradient(circle at 80% 85%, rgba(67, 176, 71, 0.12) 0%, transparent 40%),
    radial-gradient(circle at 50% 50%, rgba(251, 208, 0, 0.06) 0%, transparent 60%);
}

/* ==========================================================================
   HEADER MARIO KART GRAND PRIX
   ========================================================================== */
.header-container {
  background: linear-gradient(180deg, #181c27 0%, rgba(11, 12, 16, 0.98) 100%);
  border-bottom: 3px solid var(--star-yellow);
  padding: 1.5rem 2rem 1rem;
  position: relative;
  overflow: visible;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
  z-index: 5;
}

.checkered-banner {
  height: 10px;
  width: 100%;
  position: absolute;
  top: 0;
  left: 0;
  background: repeating-linear-gradient(90deg,
      #ffffff,
      #ffffff 20px,
      #000000 20px,
      #000000 40px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
}

.header-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.brand-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
}

.header-logo-img {
  height: 400px;
  width: 100%;
  max-width: 2200px;
  object-fit: contain;
  margin-top: -90px;
  margin-bottom: -100px;
  position: relative;
  z-index: 10;
  filter: drop-shadow(0 10px 25px rgba(0, 0, 0, 0.85));
  transition: transform 0.3s ease;
}

.header-logo-img:hover {
  transform: scale(1.02);
}

/* ==========================================================================
   CONTAINER E TÍTULOS
   ========================================================================== */
.container {
  max-width: 1200px;
  margin: 2.5rem auto;
  padding: 0 1.5rem;
}

.section-header {
  text-align: center;
  margin-bottom: 2rem;
}

.section-title {
  font-family: var(--font-pixel);
  font-size: 1.3rem;
  color: #ffffff;
  text-shadow: 2px 2px 0px var(--mario-red);
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
}

/* ==========================================================================
   PÓDIO DO GRAND PRIX COM IMAGENS REAIS
   ========================================================================== */
.podium-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.8rem;
  align-items: flex-end;
  margin-bottom: 3rem;
}

@media (max-width: 768px) {
  .podium-container {
    grid-template-columns: 1fr;
  }
}

.podium-card {
  background: var(--bg-card);
  border-radius: 24px;
  padding: 1.5rem 1.2rem;
  text-align: center;
  position: relative;
  border: 3px solid transparent;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Imagens Reais dos Personagens no Pódio */
.podium-avatar-wrapper {
  width: 130px;
  height: 130px;
  margin: 0 auto 0.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.podium-avatar-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 8px 12px rgba(0, 0, 0, 0.6));
  transition: transform 0.3s ease;
}

.podium-card:hover .podium-avatar-img {
  transform: scale(1.1) translateY(-5px);
}

/* Posicionamento do Pódio */
.podium-card.first {
  order: 2;
  border-color: var(--color-gold);
  box-shadow: var(--glow-gold);
  transform: translateY(-20px);
  background: linear-gradient(180deg, rgba(255, 215, 0, 0.12) 0%, var(--bg-card) 100%);
}

.podium-card.first .podium-avatar-wrapper {
  width: 150px;
  height: 150px;
}

.podium-card.second {
  order: 1;
  border-color: var(--color-silver);
  box-shadow: var(--glow-silver);
  background: linear-gradient(180deg, rgba(224, 224, 224, 0.08) 0%, var(--bg-card) 100%);
}

.podium-card.third {
  order: 3;
  border-color: var(--color-bronze);
  box-shadow: var(--glow-bronze);
  background: linear-gradient(180deg, rgba(205, 127, 50, 0.08) 0%, var(--bg-card) 100%);
}

.podium-badge {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-pixel);
  font-size: 1.1rem;
  margin: 0 auto 0.8rem;
  color: #000;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.6);
}

.podium-card.first .podium-badge {
  background: linear-gradient(135deg, #ffd700, #ff9000);
}

.podium-card.second .podium-badge {
  background: linear-gradient(135deg, #ffffff, #9ca3af);
}

.podium-card.third .podium-badge {
  background: linear-gradient(135deg, #e67e22, #d35400);
}

.podium-name {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 0.8rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.podium-timer {
  background: rgba(0, 0, 0, 0.5);
  border: 2px solid var(--border-card);
  border-radius: 12px;
  padding: 0.7rem 1.2rem;
  display: inline-block;
}

.podium-timer-val {
  font-family: var(--font-timer);
  font-size: 1.7rem;
  font-weight: 900;
}

.podium-card.first .podium-timer-val {
  color: var(--star-yellow);
  text-shadow: 0 0 10px var(--star-yellow);
}

.podium-card.second .podium-timer-val {
  color: #ffffff;
}

.podium-card.third .podium-timer-val {
  color: #f39c12;
}

.podium-date {
  font-size: 0.85rem;
  color: #9ca3af;
  margin-top: 0.6rem;
}

/* ==========================================================================
   TABELA DO RANKING COM IMAGENS/ÍCONES REAIS
   ========================================================================== */
.leaderboard-list {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.leaderboard-item {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 14px;
  padding: 1rem 1.6rem;
  display: grid;
  grid-template-columns: 70px 60px 1fr 200px 160px;
  align-items: center;
  transition: all 0.3s ease;
}

.leaderboard-item:hover {
  background: var(--bg-card-hover);
  border-color: var(--star-yellow);
  transform: translateX(6px);
}

@media (max-width: 680px) {
  .leaderboard-item {
    grid-template-columns: 50px 45px 1fr 130px;
  }

  .leaderboard-item .item-date {
    display: none;
  }
}

.item-rank-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  font-family: var(--font-pixel);
  font-size: 0.85rem;
  background: rgba(255, 255, 255, 0.05);
  color: #9ca3af;
  border: 1px solid var(--border-card);
}

.leaderboard-item.rank-1 .item-rank-badge {
  background: linear-gradient(135deg, #ffd700, #ff9000);
  color: #000000;
  box-shadow: 0 0 12px rgba(255, 215, 0, 0.5);
  border: none;
}

.leaderboard-item.rank-2 .item-rank-badge {
  background: linear-gradient(135deg, #ffffff, #9ca3af);
  color: #000000;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.4);
  border: none;
}

.leaderboard-item.rank-3 .item-rank-badge {
  background: linear-gradient(135deg, #e67e22, #d35400);
  color: #ffffff;
  box-shadow: 0 0 10px rgba(230, 126, 34, 0.4);
  border: none;
}

.item-avatar-img {
  width: 42px;
  height: 42px;
  object-fit: contain;
  filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.5));
}

.item-driver-name {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 700;
  color: #ffffff;
}

.item-timer {
  font-family: var(--font-timer);
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--star-yellow);
  text-align: right;
  text-shadow: 0 0 8px rgba(251, 208, 0, 0.3);
}

.item-date {
  font-size: 0.9rem;
  color: #9ca3af;
  text-align: right;
}

.empty-state {
  text-align: center;
  padding: 4rem 1rem;
  background: var(--bg-card);
  border-radius: 16px;
  color: #9ca3af;
  border: 2px dashed var(--border-card);
}

.empty-icon {
  font-size: 3.5rem;
  margin-bottom: 1rem;
}

.empty-title {
  font-family: var(--font-pixel);
  font-size: 1rem;
  color: var(--star-yellow);
  margin-bottom: 0.5rem;
}