* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: 'Barlow', sans-serif;
  background: #0d1117;
  color: #e6edf3;
  min-height: 100vh;
}

@keyframes pulse-green {
  0%, 100% { box-shadow: 0 0 8px rgba(0, 255, 100, 0.4); }
  50% { box-shadow: 0 0 24px rgba(0, 255, 100, 0.8); }
}

@keyframes countdown-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.02); }
}

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

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes flagWave {
  0%, 100% { transform: rotate(-3deg); }
  50% { transform: rotate(3deg); }
}

.animate-slide-in { animation: slideIn 0.3s ease-out; }
.animate-fade-in { animation: fadeIn 0.25s ease-out; }
.animate-pulse-green { animation: pulse-green 2s infinite; }
.animate-countdown { animation: countdown-pulse 2s infinite; }
.animate-flag { animation: flagWave 1.5s ease-in-out infinite; }

.checkered-bg {
  background-image:
    linear-gradient(45deg, rgba(255,255,255,0.03) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(255,255,255,0.03) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(255,255,255,0.03) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(255,255,255,0.03) 75%);
  background-size: 20px 20px;
  background-position: 0 0, 0 10px, 10px -10px, -10px 0;
}

.racing-stripe {
  height: 3px;
  background: linear-gradient(90deg, #e63946, #f4a261, #e63946);
}

.card-hover {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card-hover:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.4);
}

.scrollbar-thin::-webkit-scrollbar { width: 6px; }
.scrollbar-thin::-webkit-scrollbar-track { background: rgba(255,255,255,0.05); border-radius: 3px; }
.scrollbar-thin::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 3px; }

input, select, textarea {
  font-family: 'Barlow', sans-serif;
}

.toast-container {
  position: fixed;
  top: 80px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  padding: 12px 20px;
  border-radius: 8px;
  color: white;
  font-weight: 600;
  font-size: 14px;
  animation: slideIn 0.3s ease-out;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: fadeIn 0.2s ease-out;
}

.modal-content {
  background: #161b22;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  padding: 24px;
  max-width: 520px;
  width: 90%;
  max-height: 85vh;
  overflow-y: auto;
  animation: slideIn 0.3s ease-out;
}

.tab-active {
  color: #e63946;
  border-bottom: 3px solid #e63946;
}

.badge-superspeedway { background: #e63946; }
.badge-road-course { background: #3b82f6; }
.badge-short-track { background: #f4a261; }
.badge-intermediate { background: #22c55e; }

.gold-row { background: rgba(255, 215, 0, 0.08); border-left: 3px solid #ffd700; }
.silver-row { background: rgba(192, 192, 192, 0.06); border-left: 3px solid #c0c0c0; }
.bronze-row { background: rgba(205, 127, 50, 0.06); border-left: 3px solid #cd7f32; }
.playoff-cutline { border-bottom: 2px dashed #e63946; }

@media (max-width: 768px) {
  .modal-content { width: 95%; padding: 16px; }
}