body {
  font-family: 'Space Grotesk', sans-serif;
}

.aurora {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at 20% 20%, rgba(35, 181, 211, 0.25), transparent 45%),
    radial-gradient(circle at 80% 0%, rgba(239, 71, 111, 0.15), transparent 40%),
    radial-gradient(circle at 50% 80%, rgba(245, 198, 72, 0.2), transparent 45%),
    linear-gradient(120deg, rgba(5, 6, 15, 0.95), rgba(9, 9, 22, 0.9));
  filter: blur(40px);
  pointer-events: none;
  z-index: 0;
}

.grain {
  position: fixed;
  inset: 0;
  background-image: url('https://www.transparenttextures.com/patterns/asfalt-light.png');
  opacity: 0.08;
  mix-blend-mode: screen;
  pointer-events: none;
  z-index: 1;
}

nav,
main,
section,
.view-toggle,
#playerResults,
#globalSummary,
#globalTables,
#personalSummary,
#personalAchievements,
#personalTables,
#personalMedals {
  position: relative;
  z-index: 2;
}

.timeline-track {
  position: relative;
  border-radius: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: linear-gradient(135deg, rgba(5, 6, 15, 0.95), rgba(9, 9, 22, 0.92));
  padding: 2.5rem 1rem 2rem;
  overflow: hidden;
}

.timeline-vertical {
  position: relative;
  padding: 0.5rem 0 0.5rem;
}

.timeline-vertical::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.35), transparent);
}

.timeline-vertical-item {
  position: relative;
  padding: 1.2rem 0;
}

.timeline-vertical-item::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 1.8rem;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 3px solid #05060f;
  background: var(--timeline-color, #f5c648);
  box-shadow: 0 0 16px var(--timeline-color, #f5c648);
  transform: translate(-50%, -50%);
}

.timeline-card {
  position: relative;
  max-width: 360px;
  border-radius: 1rem;
  padding: 1rem 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(8, 8, 18, 0.9);
  box-shadow: 0 25px 45px rgba(5, 6, 15, 0.65);
}

.timeline-card p {
  margin: 0;
  line-height: 1.4;
}

.timeline-date {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  color: rgba(148, 163, 184, 0.9);
}

.timeline-label {
  margin-top: 0.35rem;
  font-size: 1.1rem;
  font-weight: 600;
  color: #f8fafc;
}

.timeline-description {
  margin-top: 0.4rem;
  font-size: 0.85rem;
  color: rgba(226, 232, 240, 0.9);
}

.timeline-vertical-item[data-side="left"] .timeline-card {
  margin-right: calc(50% + 1.5rem);
  text-align: right;
}

.timeline-vertical-item[data-side="right"] .timeline-card {
  margin-left: calc(50% + 1.5rem);
}

@media (max-width: 768px) {
  .timeline-vertical::before {
    left: 1.25rem;
  }

  .timeline-vertical-item::before {
    left: 1.25rem;
  }

  .timeline-vertical-item[data-side] .timeline-card {
    margin: 0 0 0 3rem;
    text-align: left;
  }
}

.timeline-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
}

.timeline-legend .legend-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: rgba(226, 232, 240, 0.9);
}

.timeline-legend .legend-swatch {
  width: 1rem;
  height: 0.35rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.4);
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.4);
}

.momentum-chart {
  position: relative;
  width: 100%;
  height: 260px;
}

.momentum-chart canvas {
  width: 100% !important;
  height: 100% !important;
}

.view-toggle.active {
  border-color: rgba(245, 198, 72, 0.8);
  color: #f5c648;
  box-shadow: 0 10px 40px rgba(245, 198, 72, 0.15);
}

.results-panel {
  position: absolute;
  inset: auto 0 auto 0;
  top: calc(100% + 0.5rem);
  max-height: 320px;
  overflow-y: auto;
  border-radius: 0.75rem;
  background: rgba(8, 8, 18, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.65);
  padding: 0.25rem;
  display: none;
}

.results-panel.visible {
  display: block;
}

.results-panel button {
  width: 100%;
  text-align: left;
  padding: 0.65rem 0.85rem;
  border-radius: 0.5rem;
  border: none;
  background: transparent;
  color: #f8fafc;
  font-size: 0.95rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  transition: background 0.2s ease, color 0.2s ease;
}

.results-panel button:hover,
.results-panel button:focus-visible {
  background: rgba(245, 198, 72, 0.12);
  color: #f5c648;
}

.results-panel span {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.6);
}

.card-slab {
  border-radius: 1rem;
  background: rgba(17, 18, 41, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: 0 30px 60px rgba(5, 6, 15, 0.55);
}

.stat-value {
  font-family: 'Rajdhani', sans-serif;
  letter-spacing: 0.05em;
}

.player-label {
  font-weight: 600;
  letter-spacing: 0.08em;
  color: #f8fafc;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  transition: color 0.2s ease;
}

.map-cell {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
}

.map-cell img {
  width: 32px;
  height: 32px;
  border-radius: 0.75rem;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 12px 25px rgba(5, 6, 15, 0.6);
  background: rgba(5, 6, 15, 0.6);
}

.recap-table .recap-row {
  height: 48px;
}

@media (max-width: 640px) {
  .map-cell img {
    width: 24px;
    height: 24px;
    border-radius: 0.6rem;
  }
}

.badge-pill {
  border-radius: 999px;
  padding: 0.35rem 0.85rem;
  font-size: 0.8rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.05);
}

.year-switch button {
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 0.4rem 1.2rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.75rem;
  color: rgba(248, 250, 252, 0.85);
  background: rgba(255, 255, 255, 0.04);
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.year-switch button.active {
  border-color: rgba(245, 198, 72, 0.9);
  color: #f5c648;
  background: rgba(245, 198, 72, 0.12);
  box-shadow: 0 8px 24px rgba(245, 198, 72, 0.18);
}

.year-switch button:hover {
  border-color: rgba(245, 198, 72, 0.6);
  color: #f5c648;
}

button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
