/* ═══════════════════════════════════════════
   PitLane — F1 TV Broadcast HUD Style
   Asphalt dark + Neon Yellow (F1 timing board)
   ═══════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Share+Tech+Mono&family=Orbitron:wght@400;500;600;700;800;900&family=Inter:wght@400;500;600;700;900&display=swap');

:root {
  --bg-primary: #1e1e2a;
  --bg-secondary: #272738;
  --bg-card: #2f2f42;
  --bg-card-hover: #383850;
  --gold: #e8ff00;
  --gold-light: #f0ff44;
  --gold-dark: #b8cc00;
  --red: #E10600;
  --green: #00D2BE;
  --blue: #00b0ff;
  --purple: #A020F0;
  --text-primary: #ffffff;
  --text-secondary: #b0b0c8;
  --text-muted: #787890;
  --border: rgba(255,255,255,0.12);
  --border-gold: rgba(232,255,0,0.25);
  --radius: 6px;
  --radius-sm: 4px;
  --shadow: 0 4px 24px rgba(0,0,0,0.6);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-hud: 'Share Tech Mono', 'Orbitron', monospace;
  --scanline: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(232,255,0,0.015) 2px,
    rgba(232,255,0,0.015) 4px
  );
  --noise: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
}

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

body {
  font-family: var(--font);
  background: var(--bg-primary);
  background-image: var(--noise);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ─── SCROLLBAR ─── */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: #333; border-radius: 2px; }
::-webkit-scrollbar-thumb:hover { background: var(--gold); }

/* ─── TYPOGRAPHY ─── */
h1, h2, h3, h4 { font-weight: 700; letter-spacing: -0.01em; }
h1 { font-size: 2.5rem; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.25rem; }
a { color: var(--gold); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--gold-light); }

/* HUD numbers */
.hud-num, .hud-value {
  font-family: var(--font-hud);
  font-weight: 700;
  letter-spacing: 0.05em;
}

/* ─── SCANLINE OVERLAY ─── */
.scanline-overlay {
  pointer-events: none;
  position: fixed; inset: 0; z-index: 9999;
  background: var(--scanline);
  opacity: 0.4;
}

/* ─── LAYOUT ─── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* ─── NAV ─── */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(21,21,30,0.95);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
}
.nav-inner {
  max-width: 1200px; margin: 0 auto;
  display: grid; grid-template-columns: 1fr auto 1fr;
  align-items: center; height: 56px;
}
.nav-links  { grid-column: 2; }
.nav-auth   { grid-column: 3; justify-self: end; }
.nav-brand {
  grid-column: 1;
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-hud);
  font-size: 1.1rem; font-weight: 900; color: var(--gold);
  letter-spacing: 0.15em; text-transform: uppercase;
}
.nav-brand .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 8px var(--gold), 0 0 20px rgba(232,255,0,0.3);
  animation: pulse 1.5s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 8px var(--gold); }
  50% { opacity: 0.5; box-shadow: 0 0 4px var(--gold); }
}
.nav-links { display: flex; gap: 6px; align-items: center; }
.nav-links a {
  color: var(--text-secondary); font-size: 12px; font-weight: 600;
  font-family: var(--font-hud);
  text-transform: uppercase; letter-spacing: 0.08em;
  transition: all 0.2s; padding: 6px 12px;
  border-radius: var(--radius-sm);
}
.nav-links a:hover { color: var(--text-primary); background: rgba(255,255,255,0.04); }
.nav-links a.active {
  color: #0d0d0d; background: var(--gold);
  box-shadow: 0 0 12px rgba(232,255,0,0.3);
}
.nav-auth { display: flex; gap: 12px; align-items: center; }
.nav-coins {
  color: var(--gold); font-weight: 700; font-size: 13px;
  font-family: var(--font-hud);
  display: flex; align-items: center; gap: 6px;
  padding: 4px 12px; border-radius: var(--radius-sm);
  background: rgba(232,255,0,0.06); border: 1px solid var(--border-gold);
}

/* ─── BUTTONS ─── */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; padding: 10px 24px; border-radius: var(--radius-sm);
  font-weight: 700; font-size: 13px; cursor: pointer;
  transition: all 0.15s; border: none;
  font-family: var(--font-hud); text-transform: uppercase;
  letter-spacing: 0.08em;
}
.btn-gold {
  background: var(--gold);
  color: #0d0d0d;
  box-shadow: 0 0 12px rgba(232,255,0,0.2);
}
.btn-gold:hover {
  box-shadow: 0 0 24px rgba(232,255,0,0.4), 0 0 48px rgba(232,255,0,0.1);
  transform: translateY(-1px);
}
.btn-outline {
  background: transparent; border: 1px solid var(--border);
  color: var(--text-primary);
}
.btn-outline:hover { border-color: var(--gold); color: var(--gold); }
.btn-sm { padding: 6px 14px; font-size: 11px; }
.btn-red { background: var(--red); color: #fff; }

/* ─── HERO ─── */
.hero {
  padding: 120px 0 60px; text-align: center;
  position: relative;
  background: radial-gradient(ellipse at 50% 0%, rgba(232,255,0,0.04) 0%, transparent 60%);
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 5px 14px; border-radius: var(--radius-sm);
  background: rgba(232,255,0,0.06); border: 1px solid var(--border-gold);
  color: var(--gold); font-size: 11px; font-weight: 700;
  font-family: var(--font-hud); text-transform: uppercase;
  letter-spacing: 0.1em; margin-bottom: 24px;
}
.hero h1 {
  font-family: var(--font-hud);
  font-size: 3rem; font-weight: 900;
  color: var(--text-primary);
  margin-bottom: 16px; line-height: 1.15;
  letter-spacing: 0.02em;
}
.hero h1 span { color: var(--gold); }
.hero p {
  color: var(--text-secondary); font-size: 1.05rem;
  max-width: 560px; margin: 0 auto 36px;
}
.hero-actions { display: flex; gap: 12px; justify-content: center; }

/* ─── SECTION ─── */
.section { padding: 72px 0; }
.section-header {
  text-align: center; margin-bottom: 40px;
}
.section-header h2 {
  font-family: var(--font-hud);
  font-size: 1.2rem; text-transform: uppercase;
  letter-spacing: 0.12em; margin-bottom: 8px;
  color: var(--text-primary);
}
.section-header p { color: var(--text-secondary); font-size: 14px; }

/* ─── CARDS GRID ─── */
.card-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

/* ─── DRIVER CARD ─── */
.driver-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px;
  transition: all 0.2s; cursor: pointer; position: relative;
  overflow: hidden;
}
.driver-card:hover {
  border-color: var(--border-gold);
  box-shadow: 0 0 20px rgba(232,255,0,0.06);
}
.driver-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--gold), transparent);
}
.driver-card .number {
  font-family: var(--font-hud);
  font-size: 3rem; font-weight: 900; color: var(--gold);
  opacity: 0.08; position: absolute; top: 8px; right: 16px;
}
.driver-card .name {
  font-size: 1rem; font-weight: 700; margin-bottom: 3px;
}
.driver-card .team {
  font-size: 0.8rem; color: var(--text-secondary); margin-bottom: 14px;
}

/* ─── STAT BARS (Telemetry style) ─── */
.stat-row {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 6px; font-size: 12px;
}
.stat-label {
  width: 72px; color: var(--text-secondary); flex-shrink: 0;
  font-size: 10px; font-family: var(--font-hud);
  text-transform: uppercase; letter-spacing: 0.05em;
}
.stat-bar {
  flex: 1; height: 4px; background: rgba(255,255,255,0.04);
  border-radius: 2px; overflow: hidden;
  position: relative;
}
.stat-bar::after {
  content: ''; position: absolute; inset: 0;
  background: var(--scanline);
  opacity: 0.3;
}
.stat-bar-fill {
  height: 100%; border-radius: 2px;
  transition: width 1s cubic-bezier(0.22, 1, 0.36, 1);
  position: relative;
}
.stat-value {
  width: 28px; text-align: right; font-weight: 700; font-size: 11px;
  font-family: var(--font-hud); color: var(--text-primary);
}

.stat-bar-fill.high {
  background: linear-gradient(90deg, var(--gold-dark), var(--gold));
  box-shadow: 0 0 8px rgba(232,255,0,0.3);
}
.stat-bar-fill.mid { background: linear-gradient(90deg, #0066cc, var(--blue)); }
.stat-bar-fill.low { background: linear-gradient(90deg, #333, #555); }

/* ─── RACE INFO ─── */
.race-banner {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 28px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; margin-bottom: 32px;
  position: relative; overflow: hidden;
}
.race-banner::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0;
  height: 2px; background: var(--gold);
}
.race-banner .race-info h3 {
  font-family: var(--font-hud);
  font-size: 1.2rem; margin-bottom: 4px;
  text-transform: uppercase; letter-spacing: 0.05em;
}
.race-banner .race-meta {
  display: flex; gap: 16px; color: var(--text-secondary); font-size: 13px;
}
.race-banner .race-meta span { display: flex; align-items: center; gap: 6px; }

/* ─── RARITY BADGES (Racing livery style) ─── */
.rarity-badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px; border-radius: 2px;
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.08em; font-family: var(--font-hud);
}
.rarity-silverstone { background: rgba(120,120,120,0.2); color: #888; border: 1px solid #333; }
.rarity-monza { background: rgba(0,176,255,0.12); color: var(--blue); border: 1px solid rgba(0,176,255,0.3); }
.rarity-suzuka { background: rgba(213,0,249,0.12); color: var(--purple); border: 1px solid rgba(213,0,249,0.3); }
.rarity-monaco {
  background: rgba(232,255,0,0.1); color: var(--gold);
  border: 1px solid var(--border-gold);
  box-shadow: 0 0 8px rgba(232,255,0,0.1);
}

/* ─── BET PANEL ─── */
.bet-panel {
  background: var(--bg-card); border: 1px solid var(--border-gold);
  border-radius: var(--radius); padding: 24px;
  position: relative;
}
.bet-panel::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0;
  height: 2px; background: var(--gold);
}
.bet-panel h3 {
  color: var(--gold); margin-bottom: 16px;
  font-family: var(--font-hud); text-transform: uppercase;
  font-size: 0.9rem; letter-spacing: 0.1em;
}
.bet-driver-select {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 8px; margin-bottom: 20px;
}
.bet-option {
  padding: 10px 14px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--bg-secondary);
  cursor: pointer; transition: all 0.15s;
  display: flex; justify-content: space-between; align-items: center;
}
.bet-option:hover { border-color: rgba(232,255,0,0.3); }
.bet-option.selected {
  border-color: var(--gold); background: rgba(232,255,0,0.04);
  box-shadow: 0 0 12px rgba(232,255,0,0.08);
}
.bet-option .driver-name { font-weight: 600; font-size: 13px; }
.bet-option .odds {
  color: var(--gold); font-weight: 700;
  font-family: var(--font-hud); font-size: 12px;
}

.bet-amount-row {
  display: flex; gap: 10px; align-items: center; margin-bottom: 14px;
}
.bet-amount-row input {
  flex: 1; padding: 10px 14px; background: var(--bg-secondary);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  color: var(--gold); font-size: 16px;
  font-family: var(--font-hud); letter-spacing: 0.05em;
}
.bet-amount-row input:focus {
  outline: none; border-color: var(--gold);
  box-shadow: 0 0 8px rgba(232,255,0,0.1);
}
.bet-quick-amounts { display: flex; gap: 6px; }
.bet-quick-amounts button {
  padding: 6px 10px; border-radius: var(--radius-sm);
  background: var(--bg-secondary); border: 1px solid var(--border);
  color: var(--text-secondary); cursor: pointer; font-size: 11px;
  font-family: var(--font-hud); letter-spacing: 0.05em;
  transition: all 0.15s;
}
.bet-quick-amounts button:hover { border-color: var(--gold); color: var(--gold); }

/* ─── MODAL ─── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,0.8); backdrop-filter: blur(6px);
  display: none; align-items: center; justify-content: center;
}
.modal-overlay.active { display: flex; }
.modal {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 32px;
  max-width: 420px; width: 90%;
  position: relative;
}
.modal::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0;
  height: 2px; background: var(--gold);
}
.modal h2 {
  margin-bottom: 20px; text-align: center;
  font-family: var(--font-hud); font-size: 1rem;
  text-transform: uppercase; letter-spacing: 0.1em;
}
.modal .form-group { margin-bottom: 14px; }
.modal label {
  display: block; margin-bottom: 5px;
  color: var(--text-secondary); font-size: 11px; font-weight: 600;
  font-family: var(--font-hud); text-transform: uppercase;
  letter-spacing: 0.06em;
}
.modal input {
  width: 100%; padding: 10px 14px; background: var(--bg-secondary);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  color: var(--text-primary); font-size: 14px; font-family: var(--font);
}
.modal input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 8px rgba(232,255,0,0.1); }
.modal .form-actions {
  display: flex; gap: 10px; margin-top: 20px;
}
.modal .form-actions .btn { flex: 1; }
.modal .error-msg { color: var(--red); font-size: 12px; margin-top: 6px; }
.modal .switch-link {
  text-align: center; margin-top: 14px; font-size: 12px; color: var(--text-secondary);
}

/* ─── FEATURES ─── */
.features {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px;
}
.feature-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px; text-align: center;
  transition: all 0.2s;
}
.feature-card:hover {
  border-color: var(--border-gold);
}
.feature-icon {
  font-size: 2rem; margin-bottom: 14px;
  display: block;
}
.feature-card h3 { margin-bottom: 6px; font-size: 1rem; }
.feature-card p { color: var(--text-secondary); font-size: 13px; }

/* ─── HOW IT WORKS ─── */
.steps {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px;
}
.step {
  text-align: center; padding: 20px;
}
.step-num {
  width: 36px; height: 36px; border-radius: 4px;
  background: rgba(232,255,0,0.1); color: var(--gold);
  border: 1px solid var(--border-gold);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-hud); font-weight: 900; font-size: 16px;
  margin: 0 auto 14px;
}
.step h4 { margin-bottom: 6px; font-size: 0.9rem; }
.step p { color: var(--text-secondary); font-size: 12px; }

/* ─── FOOTER ─── */
.footer {
  border-top: 1px solid var(--border);
  padding: 28px 0; text-align: center;
  color: var(--text-muted); font-size: 11px;
  font-family: var(--font-hud); text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* ─── LOADING ─── */
.loading {
  text-align: center; padding: 60px 0; color: var(--text-secondary);
}
.spinner {
  width: 28px; height: 28px; border: 2px solid var(--border);
  border-top-color: var(--gold); border-radius: 50%;
  animation: spin 0.6s linear infinite;
  margin: 0 auto 10px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── HUD ANIMATIONS ─── */
@keyframes countUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes glowPulse {
  0%, 100% { box-shadow: 0 0 8px rgba(232,255,0,0.15); }
  50% { box-shadow: 0 0 20px rgba(232,255,0,0.3); }
}
@keyframes sweepLine {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}
@keyframes dataFlicker {
  0%, 100% { opacity: 1; }
  92% { opacity: 1; }
  93% { opacity: 0.4; }
  94% { opacity: 1; }
  97% { opacity: 0.6; }
  98% { opacity: 1; }
}

/* Racing lights animation */
.race-lights {
  display: flex; gap: 8px; justify-content: center; margin: 16px 0;
}
.race-light {
  width: 20px; height: 20px; border-radius: 50%;
  background: #333; border: 1px solid #444;
  transition: all 0.3s;
}
.race-light.on {
  background: var(--red);
  box-shadow: 0 0 12px var(--red), 0 0 24px rgba(255,23,68,0.3);
}
.race-light.go {
  background: var(--green);
  box-shadow: 0 0 12px var(--green), 0 0 24px rgba(0,230,118,0.3);
}

/* Telemetry chart feel */
.telemetry-line {
  position: relative; overflow: hidden;
}
.telemetry-line::after {
  content: '';
  position: absolute; top: 0; left: 0;
  width: 40px; height: 100%;
  background: linear-gradient(90deg, rgba(232,255,0,0.15), transparent);
  animation: sweepLine 3s linear infinite;
}

/* Speed gauge feel */
.speed-gauge {
  font-family: var(--font-hud);
  font-weight: 900;
  animation: dataFlicker 5s infinite;
}

/* ─── HUD INFO BOX ─── */
.hud-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 18px;
  position: relative;
}
.hud-box::before {
  content: ''; position: absolute; top: 0; left: 0;
  width: 3px; height: 100%; background: var(--gold);
  border-radius: 2px 0 0 2px;
}
.hud-box .hud-label {
  color: var(--text-muted); font-size: 9px;
  font-family: var(--font-hud); text-transform: uppercase;
  letter-spacing: 0.12em; margin-bottom: 4px;
}
.hud-box .hud-value {
  color: var(--text-primary); font-size: 1.4rem;
  font-family: var(--font-hud); font-weight: 700;
}
.hud-box .hud-value.speed { color: var(--gold); }
.hud-box .hud-value.lap { color: var(--gold); }
.hud-box .hud-value.time { color: var(--blue); }
.hud-box .hud-value.pos { color: var(--red); }

/* ═══════════════════════════════════════════
   V3 EFFECTS — Hero speed lines, 3D cards,
   HUD info bar, telemetry charts, G-force map
   ═══════════════════════════════════════════ */

/* ─── HERO SPEED LINES ─── */
.hero {
  position: relative; overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background:
    repeating-linear-gradient(
      90deg,
      transparent 0px,
      transparent 60px,
      rgba(232,255,0,0.02) 60px,
      rgba(232,255,0,0.02) 61px
    );
  animation: speedLinesH 8s linear infinite;
}
.hero::after {
  content: '';
  position: absolute; bottom: 0; left: 0; right: 0;
  height: 200px;
  background: linear-gradient(0deg,
    var(--bg-primary) 0%,
    transparent 100%
  );
  pointer-events: none;
}
@keyframes speedLinesH {
  0% { transform: translateX(0); }
  100% { transform: translateX(-61px); }
}

/* Speed particles in hero */
.speed-particle {
  position: absolute;
  width: 80px; height: 1px;
  background: linear-gradient(90deg, var(--gold), transparent);
  opacity: 0;
  animation: speedParticle var(--dur, 2s) linear infinite;
  animation-delay: var(--delay, 0s);
  top: var(--y, 50%);
}
@keyframes speedParticle {
  0% { transform: translateX(-100px); opacity: 0; }
  10% { opacity: 0.6; }
  90% { opacity: 0.6; }
  100% { transform: translateX(calc(100vw + 100px)); opacity: 0; }
}

/* ─── HUD INFO BAR ─── */
.hud-info-bar {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid rgba(232,255,0,0.08);
  padding: 12px 0;
  position: relative;
  overflow: hidden;
}
.hud-info-bar::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  opacity: 0.4;
}
.hud-info-bar-inner {
  display: flex; align-items: center; justify-content: center;
  gap: 32px; flex-wrap: wrap;
  max-width: 1200px; margin: 0 auto; padding: 0 24px;
}
.hud-info-item {
  display: flex; align-items: center; gap: 8px;
}
.hud-info-item .hud-info-label {
  font-size: 9px; color: var(--text-muted);
  font-family: var(--font-hud); text-transform: uppercase;
  letter-spacing: 0.1em;
}
.hud-info-item .hud-info-val {
  font-size: 15px; font-family: var(--font-hud);
  font-weight: 700; color: var(--gold);
  animation: dataFlicker 8s infinite;
}
.hud-info-item .hud-info-val.red { color: var(--red); }
.hud-info-item .hud-info-val.blue { color: var(--blue); }
.hud-info-divider {
  width: 1px; height: 20px; background: var(--border);
}

/* ─── 3D CARD FLIP / TILT ─── */
.card-3d {
  perspective: 800px;
}
.card-3d-inner {
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  transform-style: preserve-3d;
}
.card-3d:hover .card-3d-inner {
  transform: rotateY(-5deg) rotateX(3deg) scale(1.02);
  box-shadow:
    10px 10px 30px rgba(0,0,0,0.4),
    0 0 15px rgba(232,255,0,0.05);
}

/* Monaco rarity gold sweep */
.rarity-monaco {
  position: relative; overflow: hidden;
}
.rarity-monaco::after {
  content: '';
  position: absolute; top: -50%; left: -50%;
  width: 200%; height: 200%;
  background: linear-gradient(
    45deg,
    transparent 40%,
    rgba(232,255,0,0.15) 45%,
    rgba(232,255,0,0.25) 50%,
    rgba(232,255,0,0.15) 55%,
    transparent 60%
  );
  animation: goldSweep 3s ease-in-out infinite;
}
@keyframes goldSweep {
  0% { transform: translateX(-100%) translateY(-100%) rotate(0deg); }
  100% { transform: translateX(100%) translateY(100%) rotate(0deg); }
}

/* ─── TELEMETRY CHART ─── */
.telemetry-chart {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  position: relative; overflow: hidden;
}
.telemetry-chart::before {
  content: '';
  position: absolute; inset: 0;
  background: var(--scanline);
  opacity: 0.3;
  pointer-events: none;
}
.telemetry-chart-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 16px;
}
.telemetry-chart-title {
  font-family: var(--font-hud);
  font-size: 10px; text-transform: uppercase;
  letter-spacing: 0.1em; color: var(--text-muted);
}
.telemetry-chart-live {
  display: flex; align-items: center; gap: 6px;
  font-family: var(--font-hud); font-size: 9px;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--green);
}
.telemetry-chart-live::before {
  content: '';
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 6px var(--green);
  animation: pulse 1.5s infinite;
}
.telemetry-canvas {
  width: 100%; height: 120px;
  position: relative;
}
.telemetry-svg {
  width: 100%; height: 100%;
}
.telemetry-svg .grid-line {
  stroke: rgba(255,255,255,0.04); stroke-width: 0.5;
}
.telemetry-svg .data-line {
  fill: none; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
  filter: drop-shadow(0 0 4px currentColor);
}
.telemetry-svg .data-line.throttle { stroke: var(--green); }
.telemetry-svg .data-line.brake { stroke: var(--red); }
.telemetry-svg .data-line.speed { stroke: var(--gold); }
.telemetry-svg .data-area {
  opacity: 0.08;
}
.telemetry-svg .data-area.throttle { fill: var(--green); }
.telemetry-svg .data-area.brake { fill: var(--red); }
.telemetry-svg .data-area.speed { fill: var(--gold); }

/* Sweep scanner on chart */
.telemetry-scanner {
  position: absolute; top: 0; bottom: 0;
  width: 2px; background: var(--gold);
  opacity: 0.6;
  box-shadow: 0 0 8px var(--gold), -20px 0 30px rgba(232,255,0,0.1);
  animation: scanChart 4s linear infinite;
}
@keyframes scanChart {
  0% { left: 0; }
  100% { left: 100%; }
}

/* ─── G-FORCE HEATMAP ─── */
.gforce-map {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px; position: relative;
}
.gforce-map-title {
  font-family: var(--font-hud);
  font-size: 10px; text-transform: uppercase;
  letter-spacing: 0.1em; color: var(--text-muted);
  margin-bottom: 12px;
}
.gforce-svg {
  width: 100%; max-height: 300px;
}
.gforce-svg .track-outline {
  fill: none; stroke: #333; stroke-width: 3;
  stroke-linecap: round; stroke-linejoin: round;
}
.gforce-svg .gforce-segment {
  fill: none; stroke-width: 5;
  stroke-linecap: round;
  transition: all 0.3s;
  cursor: pointer;
}
.gforce-svg .gforce-segment:hover {
  stroke-width: 8;
  filter: brightness(1.3);
}
.gforce-tooltip {
  position: absolute;
  background: rgba(21,21,30,0.95);
  border: 1px solid var(--gold);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-family: var(--font-hud);
  font-size: 11px;
  color: var(--text-primary);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s;
  z-index: 10;
}
.gforce-tooltip.visible { opacity: 1; }
.gforce-tooltip .gf-val {
  color: var(--gold); font-weight: 700;
  font-size: 14px;
}

/* G-Force color scale */
.gforce-low { stroke: var(--green); }
.gforce-mid { stroke: var(--gold); }
.gforce-high { stroke: #ff6600; }
.gforce-extreme { stroke: var(--red); }

/* ─── PIT STOP COMPARISON BAR ─── */
.pit-compare {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}
.pit-compare-title {
  font-family: var(--font-hud);
  font-size: 10px; text-transform: uppercase;
  letter-spacing: 0.1em; color: var(--text-muted);
  margin-bottom: 14px;
}
.pit-compare-row {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 8px;
}
.pit-compare-team {
  width: 100px; font-size: 12px; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pit-compare-bar-bg {
  flex: 1; height: 16px; background: rgba(255,255,255,0.03);
  border-radius: 2px; position: relative; overflow: hidden;
}
.pit-compare-bar-fill {
  height: 100%; border-radius: 2px;
  transition: width 1s cubic-bezier(0.22, 1, 0.36, 1);
  position: relative;
}
.pit-compare-bar-fill::after {
  content: '';
  position: absolute; inset: 0;
  background: var(--scanline);
  opacity: 0.3;
}
.pit-compare-time {
  width: 50px; text-align: right;
  font-family: var(--font-hud); font-size: 12px;
  font-weight: 700; color: var(--text-primary);
}

/* ─── WEATHER DASHBOARD ─── */
.weather-dash {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 8px;
}
.weather-gauge {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px; text-align: center;
  position: relative;
}
.weather-gauge::before {
  content: '';
  position: absolute; top: 0; left: 0;
  width: 3px; height: 100%;
  border-radius: 2px 0 0 2px;
}
.weather-gauge.temp::before { background: #ff6600; }
.weather-gauge.track::before { background: var(--red); }
.weather-gauge.humid::before { background: var(--blue); }
.weather-gauge.rain::before { background: var(--purple); }
.weather-gauge.wind::before { background: var(--green); }
.weather-gauge-label {
  font-family: var(--font-hud); font-size: 8px;
  text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--text-muted); margin-bottom: 6px;
}
.weather-gauge-val {
  font-family: var(--font-hud); font-size: 1.3rem;
  font-weight: 700; color: var(--text-primary);
  animation: dataFlicker 6s infinite;
}
.weather-gauge-unit {
  font-size: 10px; color: var(--text-muted); margin-top: 2px;
}

/* ─── LAP TIME SPARKLINE ─── */
.laptime-sparkline {
  display: inline-block; vertical-align: middle;
  margin-left: 8px;
}
.laptime-sparkline svg {
  width: 60px; height: 20px;
}
.laptime-sparkline .spark-line {
  fill: none; stroke: var(--gold); stroke-width: 1.5;
  stroke-linecap: round;
}
.laptime-sparkline .spark-area {
  fill: rgba(232,255,0,0.08);
}

/* ─── RESPONSIVE ─── */
@media (max-width: 768px) {
  .hero h1 { font-size: 2rem; }
  .features { grid-template-columns: 1fr; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .race-banner { flex-direction: column; text-align: center; }
  .nav-links { display: none; }
  .card-grid { grid-template-columns: 1fr; }
}
