/* ========== CSS Variables & Reset ========== */
:root {
  --bg-dark: #0a0a12;
  --bg-panel: #12121f;
  --bg-card: #1a1a2e;
  --bg-card-hover: #252545;
  --accent-cyan: #00d4ff;
  --accent-cyan-glow: rgba(0, 212, 255, 0.4);
  --accent-orange: #ff6b35;
  --accent-green: #4CAF50;
  --accent-green-glow: rgba(76, 175, 80, 0.4);
  --accent-red: #ff4444;
  --accent-red-glow: rgba(255, 68, 68, 0.4);
  --accent-gold: #ffd700;
  --accent-gold-glow: rgba(255, 215, 0, 0.4);
  --accent-purple: #a855f7;
  --accent-purple-glow: rgba(168, 85, 247, 0.4);
  --accent-yellow: #ffff00;
  --accent-yellow-glow: rgba(255, 255, 0, 0.4);
  --accent-pink: #ec4899;

  /* Gauge tier colors */
  --tier-bronze: #cd7f32;
  --tier-bronze-glow: rgba(205, 127, 50, 0.4);
  --tier-silver: #c0c0c0;
  --tier-silver-glow: rgba(192, 192, 192, 0.5);
  --tier-gold: #ffd700;
  --tier-gold-glow: rgba(255, 215, 0, 0.5);
  --tier-platinum: #a855f7;
  --tier-platinum-glow: rgba(168, 85, 247, 0.5);
  --tier-diamond: #00ffff;
  --tier-diamond-glow: rgba(0, 255, 255, 0.6);
  --tier-cosmic: #ffffff;
  --tier-cosmic-glow: rgba(255, 255, 255, 0.7);

  --text-primary: #ffffff;
  --text-secondary: #a0a0c0;  /* Improved contrast: 5.2:1 ratio (WCAG AA compliant) */
  --text-dim: #7878a0;        /* Improved contrast: 3.5:1 ratio (better for large text) */
  --gauge-bg: #1e1e3a;
  --border-subtle: #2a2a4a;
  --transition-smooth: cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

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

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--bg-dark);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ========== Canvas Effect Layers ========== */
.effect-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.bg-canvas {
  z-index: -1;
  opacity: 0.8;
}

.particle-canvas {
  z-index: 1000;
  mix-blend-mode: screen;
}

.fx-canvas {
  z-index: 1001;
  mix-blend-mode: screen;
}

/* Screen shake effect */
.screen-shake {
  animation: screenShake 0.3s ease-out;
}

.screen-shake-strong {
  animation: screenShakeStrong 0.5s ease-out;
}

@keyframes screenShake {
  0%, 100% { transform: translate(0, 0); }
  10% { transform: translate(-2px, -1px); }
  20% { transform: translate(2px, 2px); }
  30% { transform: translate(-1px, 2px); }
  40% { transform: translate(1px, -1px); }
  50% { transform: translate(-2px, 1px); }
  60% { transform: translate(2px, -2px); }
  70% { transform: translate(-1px, -1px); }
  80% { transform: translate(1px, 2px); }
  90% { transform: translate(-2px, -2px); }
}

@keyframes screenShakeStrong {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  10% { transform: translate(-5px, -3px) rotate(-0.5deg); }
  20% { transform: translate(5px, 5px) rotate(0.5deg); }
  30% { transform: translate(-3px, 5px) rotate(-0.3deg); }
  40% { transform: translate(3px, -3px) rotate(0.3deg); }
  50% { transform: translate(-5px, 3px) rotate(-0.5deg); }
  60% { transform: translate(5px, -5px) rotate(0.5deg); }
  70% { transform: translate(-3px, -3px) rotate(-0.3deg); }
  80% { transform: translate(3px, 5px) rotate(0.3deg); }
  90% { transform: translate(-5px, -5px) rotate(-0.5deg); }
}

/* Vignette overlay for depth */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(ellipse at center, transparent 0%, transparent 50%, rgba(0, 0, 0, 0.4) 100%);
  pointer-events: none;
  z-index: 999;
}

/* Ambient glow pulse */
.ambient-glow {
  position: fixed;
  top: 50%;
  left: 50%;
  width: 600px;
  height: 600px;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, var(--accent-cyan-glow) 0%, transparent 70%);
  opacity: 0.3;
  pointer-events: none;
  z-index: -1;
  animation: ambientPulse 4s ease-in-out infinite;
}

@keyframes ambientPulse {
  0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.2; }
  50% { transform: translate(-50%, -50%) scale(1.2); opacity: 0.4; }
}

/* Nitro mode ambient */
.ambient-glow.nitro-mode {
  background: radial-gradient(circle, rgba(0, 212, 255, 0.5) 0%, rgba(0, 100, 255, 0.3) 30%, transparent 70%);
  animation: nitroPulse 0.5s ease-in-out infinite;
}

@keyframes nitroPulse {
  0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.4; }
  50% { transform: translate(-50%, -50%) scale(1.3); opacity: 0.6; }
}

/* Scrollbar styling */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg-dark); }
::-webkit-scrollbar-thumb { background: var(--bg-card); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--border-subtle); }

/* ========== Layout ========== */
.game-container {
  display: grid;
  grid-template-columns: 1fr 320px;
  grid-template-rows: auto 1fr;
  min-height: 100vh;
  gap: 0;
}

@media (max-width: 900px) {
  .game-container {
    grid-template-columns: 1fr;
  }
  .sidebar { display: none; }
}

/* ========== Header ========== */
.header {
  grid-column: 1 / -1;
  background: linear-gradient(180deg, var(--bg-panel) 0%, var(--bg-dark) 100%);
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-subtle);
  flex-wrap: wrap;
  gap: 10px;
}

.title-section {
  display: flex;
  align-items: center;
  gap: 15px;
}

.title {
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: 3px;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.location-badge {
  background: var(--bg-card);
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  color: var(--accent-gold);
  border: 1px solid var(--accent-gold);
}

.stats-row {
  display: flex;
  gap: 25px;
  align-items: center;
}

.stat-box {
  text-align: center;
}

.stat-box .value {
  font-size: 1.4rem;
  font-weight: bold;
  color: var(--accent-cyan);
  font-family: 'Courier New', monospace;
}

.stat-box .label {
  font-size: 0.7rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.header-buttons {
  display: flex;
  gap: 8px;
}

.header-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.2s;
}

.header-btn:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
  border-color: var(--accent-cyan);
}

/* ========== Main Area ========== */
.main-area {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* ========== Dashboard ========== */
.dashboard {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  padding: 25px;
  background:
    linear-gradient(180deg, rgba(10, 10, 18, 0.98) 0%, rgba(18, 18, 31, 0.95) 50%, rgba(10, 10, 18, 0.98) 100%);
  flex-wrap: wrap;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid rgba(0, 212, 255, 0.2);
}

/* Circuit board pattern layer */
.dashboard-circuit {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image:
    /* Horizontal lines */
    linear-gradient(0deg, transparent 49.5%, rgba(0, 212, 255, 0.03) 49.5%, rgba(0, 212, 255, 0.03) 50.5%, transparent 50.5%),
    /* Vertical lines */
    linear-gradient(90deg, transparent 49.5%, rgba(0, 212, 255, 0.03) 49.5%, rgba(0, 212, 255, 0.03) 50.5%, transparent 50.5%),
    /* Circuit nodes */
    radial-gradient(circle at 10% 20%, rgba(0, 212, 255, 0.1) 0%, transparent 3%),
    radial-gradient(circle at 30% 70%, rgba(0, 212, 255, 0.08) 0%, transparent 2%),
    radial-gradient(circle at 60% 30%, rgba(168, 85, 247, 0.1) 0%, transparent 3%),
    radial-gradient(circle at 80% 80%, rgba(0, 212, 255, 0.08) 0%, transparent 2%),
    radial-gradient(circle at 90% 10%, rgba(255, 215, 0, 0.08) 0%, transparent 2%);
  background-size: 60px 60px, 60px 60px, 100% 100%, 100% 100%, 100% 100%, 100% 100%, 100% 100%;
  pointer-events: none;
  opacity: 0.8;
}

/* Animated scan line */
.dashboard::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(0, 212, 255, 0.3) 20%,
    rgba(0, 212, 255, 0.8) 50%,
    rgba(0, 212, 255, 0.3) 80%,
    transparent 100%
  );
  animation: scanLine 4s ease-in-out infinite;
  pointer-events: none;
  z-index: 100;
}

@keyframes scanLine {
  0%, 100% { top: 0; opacity: 0.5; }
  50% { top: 100%; opacity: 0.8; }
}

/* Starfield + ambient glow effect */
.dashboard::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image:
    /* Ambient glow in center */
    radial-gradient(ellipse at 50% 50%, rgba(0, 212, 255, 0.08) 0%, transparent 50%),
    /* Stars */
    radial-gradient(1px 1px at 20px 30px, white, transparent),
    radial-gradient(1px 1px at 40px 70px, rgba(255,255,255,0.8), transparent),
    radial-gradient(1px 1px at 50px 160px, rgba(255,255,255,0.6), transparent),
    radial-gradient(1px 1px at 90px 40px, white, transparent),
    radial-gradient(1px 1px at 130px 80px, rgba(255,255,255,0.7), transparent),
    radial-gradient(1px 1px at 160px 120px, white, transparent),
    radial-gradient(2px 2px at 200px 50px, var(--accent-cyan), transparent),
    radial-gradient(1px 1px at 240px 90px, rgba(255,255,255,0.5), transparent);
  background-repeat: no-repeat, repeat, repeat, repeat, repeat, repeat, repeat, repeat, repeat;
  background-size: 100% 100%, 250px 200px, 250px 200px, 250px 200px, 250px 200px, 250px 200px, 250px 200px, 250px 200px, 250px 200px;
  animation: starfield 20s linear infinite, ambientPulse 6s ease-in-out infinite;
  opacity: 0.6;
  pointer-events: none;
}

/* Dashboard ambient glow that responds to nitro */
.dashboard.nitro-mode::after {
  background-image:
    radial-gradient(ellipse at 50% 50%, rgba(0, 212, 255, 0.25) 0%, rgba(0, 100, 200, 0.1) 30%, transparent 60%),
    radial-gradient(1px 1px at 20px 30px, var(--accent-cyan), transparent),
    radial-gradient(1px 1px at 40px 70px, rgba(0,212,255,0.8), transparent),
    radial-gradient(1px 1px at 50px 160px, rgba(0,212,255,0.6), transparent),
    radial-gradient(1px 1px at 90px 40px, white, transparent),
    radial-gradient(1px 1px at 130px 80px, rgba(0,212,255,0.7), transparent),
    radial-gradient(1px 1px at 160px 120px, white, transparent),
    radial-gradient(2px 2px at 200px 50px, var(--accent-cyan), transparent),
    radial-gradient(1px 1px at 240px 90px, rgba(0,212,255,0.5), transparent);
  animation: starfield 10s linear infinite, nitroPulse 0.5s ease-in-out infinite;
  opacity: 0.9;
}

@keyframes ambientPulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 0.7; }
}

@keyframes nitroPulse {
  0%, 100% { opacity: 0.8; }
  50% { opacity: 1; }
}

@keyframes starfield {
  0% { transform: translateX(0); }
  100% { transform: translateX(-250px); }
}

/* Gauge styles */
.gauge {
  width: 140px;
  height: 80px;
  position: relative;
  background: linear-gradient(180deg, var(--gauge-bg) 0%, #151528 100%);
  border-radius: 140px 140px 0 0;
  overflow: hidden;
  box-shadow:
    inset 0 0 25px rgba(0,0,0,0.6),
    0 4px 15px rgba(0,0,0,0.4),
    0 0 30px rgba(0, 212, 255, 0.1);
  border: 3px solid var(--border-subtle);
  transition: all 0.3s;
  z-index: 1;
}

.gauge:hover {
  box-shadow:
    inset 0 0 25px rgba(0,0,0,0.6),
    0 4px 15px rgba(0,0,0,0.4),
    0 0 40px rgba(0, 212, 255, 0.2);
  border-color: var(--accent-cyan);
}

.gauge-fill {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: conic-gradient(from 180deg, var(--accent-cyan) 0deg, var(--accent-green) 90deg, var(--accent-orange) 135deg, var(--accent-red) 180deg, transparent 180deg);
  opacity: 0.3;
  border-radius: 140px 140px 0 0;
  filter: blur(2px);
}

/* Gauge tick marks */
.gauge::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 100%;
  height: 100%;
  transform: translateX(-50%);
  background-image:
    repeating-conic-gradient(
      from 180deg,
      transparent 0deg,
      transparent 8deg,
      rgba(255,255,255,0.1) 9deg,
      transparent 10deg
    );
  border-radius: 140px 140px 0 0;
}

.gauge-needle {
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 4px;
  height: 65px;
  background: linear-gradient(to top, var(--accent-red), var(--accent-orange), var(--accent-gold));
  transform-origin: bottom center;
  transform: translateX(-50%) rotate(-90deg);
  transition: transform 0.2s var(--transition-smooth);
  border-radius: 3px;
  box-shadow: 0 0 10px var(--accent-orange);
}

.gauge-needle::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 14px;
  height: 14px;
  background: radial-gradient(circle, var(--accent-orange) 0%, var(--bg-card) 70%);
  border-radius: 50%;
  border: 2px solid var(--accent-orange);
  box-shadow: 0 0 10px var(--accent-orange);
}

.gauge-label {
  position: absolute;
  bottom: 3px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.6rem;
  color: var(--text-dim);
  text-transform: uppercase;
}

.gauge-value {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.8rem;
  font-weight: bold;
  color: var(--accent-cyan);
}

.speedometer {
  width: 170px;
  height: 95px;
}
.speedometer .gauge-needle { height: 75px; }
.speedometer .gauge-value { font-size: 1rem; }

/* ========== GAUGE TIER SYSTEM ========== */

/* Gauge tick marks */
.gauge-ticks {
  position: absolute;
  width: 100%;
  height: 100%;
  bottom: 0;
  left: 0;
}

.gauge-ticks .tick {
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 2px;
  height: 12px;
  background: rgba(255, 255, 255, 0.3);
  transform-origin: bottom center;
  transform: translateX(-50%) rotate(var(--angle));
  border-radius: 1px;
}

.gauge-ticks .tick:nth-child(odd) {
  height: 8px;
  width: 1px;
  background: rgba(255, 255, 255, 0.2);
}

.gauge-ticks .tick:nth-child(5) {
  height: 15px;
  width: 3px;
  background: rgba(255, 255, 255, 0.5);
}

/* Gauge center hub */
.gauge-center {
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 20px;
  background: radial-gradient(circle at 30% 30%, #4a4a6a, #1a1a2e);
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.1);
  box-shadow:
    inset 0 2px 4px rgba(255, 255, 255, 0.1),
    0 2px 8px rgba(0, 0, 0, 0.5);
  z-index: 10;
}

/* Tier badge */
.gauge-tier-badge {
  position: absolute;
  bottom: -18px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.5rem;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 2px 8px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid currentColor;
  white-space: nowrap;
  z-index: 5;
}

/* Progress to next tier indicator */
.gauge-progress {
  position: absolute;
  bottom: -34px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.55rem;
  font-weight: 500;
  white-space: nowrap;
  opacity: 0.8;
  transition: color 0.3s, opacity 0.3s;
  text-shadow: 0 0 5px currentColor;
}

/* Bronze tier (default) */
.gauge.tier-bronze {
  border-color: var(--tier-bronze);
}
.gauge.tier-bronze .gauge-needle {
  background: linear-gradient(to top, var(--tier-bronze), #e8a65d);
  box-shadow: 0 0 8px var(--tier-bronze-glow);
}
.gauge.tier-bronze .gauge-tier-badge {
  color: var(--tier-bronze);
}
.gauge.tier-bronze .gauge-center {
  border-color: var(--tier-bronze);
}

/* Silver tier */
.gauge.tier-silver {
  border-color: var(--tier-silver);
  box-shadow:
    inset 0 0 25px rgba(0,0,0,0.6),
    0 4px 15px rgba(0,0,0,0.4),
    0 0 20px var(--tier-silver-glow);
}
.gauge.tier-silver .gauge-needle {
  background: linear-gradient(to top, #888, var(--tier-silver), #fff);
  box-shadow: 0 0 12px var(--tier-silver-glow);
}
.gauge.tier-silver .gauge-tier-badge {
  color: var(--tier-silver);
}
.gauge.tier-silver .gauge-center {
  border-color: var(--tier-silver);
  background: radial-gradient(circle at 30% 30%, var(--tier-silver), #4a4a6a);
}
.gauge.tier-silver .gauge-ticks .tick {
  background: rgba(192, 192, 192, 0.5);
}

/* Gold tier */
.gauge.tier-gold {
  border-color: var(--tier-gold);
  box-shadow:
    inset 0 0 25px rgba(0,0,0,0.6),
    0 4px 15px rgba(0,0,0,0.4),
    0 0 25px var(--tier-gold-glow);
}
.gauge.tier-gold .gauge-needle {
  background: linear-gradient(to top, #b8860b, var(--tier-gold), #fff5cc);
  box-shadow: 0 0 15px var(--tier-gold-glow);
}
.gauge.tier-gold .gauge-tier-badge {
  color: var(--tier-gold);
  text-shadow: 0 0 5px var(--tier-gold-glow);
}
.gauge.tier-gold .gauge-center {
  border-color: var(--tier-gold);
  background: radial-gradient(circle at 30% 30%, var(--tier-gold), #8b6914);
}
.gauge.tier-gold .gauge-ticks .tick {
  background: rgba(255, 215, 0, 0.5);
}

/* Platinum tier */
.gauge.tier-platinum {
  border-color: var(--tier-platinum);
  box-shadow:
    inset 0 0 25px rgba(0,0,0,0.6),
    0 4px 15px rgba(0,0,0,0.4),
    0 0 30px var(--tier-platinum-glow);
  animation: tier-pulse-platinum 2s ease-in-out infinite;
}
.gauge.tier-platinum .gauge-needle {
  background: linear-gradient(to top, #6b21a8, var(--tier-platinum), #e9d5ff);
  box-shadow: 0 0 20px var(--tier-platinum-glow);
}
.gauge.tier-platinum .gauge-tier-badge {
  color: var(--tier-platinum);
  text-shadow: 0 0 8px var(--tier-platinum-glow);
}
.gauge.tier-platinum .gauge-center {
  border-color: var(--tier-platinum);
  background: radial-gradient(circle at 30% 30%, var(--tier-platinum), #4c1d95);
}
.gauge.tier-platinum .gauge-ticks .tick {
  background: rgba(168, 85, 247, 0.6);
}

@keyframes tier-pulse-platinum {
  0%, 100% { box-shadow: inset 0 0 25px rgba(0,0,0,0.6), 0 4px 15px rgba(0,0,0,0.4), 0 0 30px var(--tier-platinum-glow); }
  50% { box-shadow: inset 0 0 25px rgba(0,0,0,0.6), 0 4px 15px rgba(0,0,0,0.4), 0 0 45px var(--tier-platinum-glow); }
}

/* Diamond tier */
.gauge.tier-diamond {
  border-color: var(--tier-diamond);
  box-shadow:
    inset 0 0 25px rgba(0,0,0,0.6),
    0 4px 15px rgba(0,0,0,0.4),
    0 0 35px var(--tier-diamond-glow);
  animation: tier-rainbow 3s linear infinite;
}
.gauge.tier-diamond .gauge-needle {
  background: linear-gradient(to top, #0891b2, var(--tier-diamond), #fff);
  box-shadow: 0 0 25px var(--tier-diamond-glow);
  animation: needle-shimmer 1.5s ease-in-out infinite;
}
.gauge.tier-diamond .gauge-tier-badge {
  color: var(--tier-diamond);
  text-shadow: 0 0 10px var(--tier-diamond-glow);
  animation: badge-shimmer 2s ease-in-out infinite;
}
.gauge.tier-diamond .gauge-center {
  border-color: var(--tier-diamond);
  background: radial-gradient(circle at 30% 30%, var(--tier-diamond), #155e75);
}
.gauge.tier-diamond .gauge-ticks .tick {
  background: rgba(0, 255, 255, 0.7);
}

@keyframes tier-rainbow {
  0% { border-color: #ff0000; box-shadow: inset 0 0 25px rgba(0,0,0,0.6), 0 0 35px rgba(255, 0, 0, 0.5); }
  16% { border-color: #ff8800; box-shadow: inset 0 0 25px rgba(0,0,0,0.6), 0 0 35px rgba(255, 136, 0, 0.5); }
  33% { border-color: #ffff00; box-shadow: inset 0 0 25px rgba(0,0,0,0.6), 0 0 35px rgba(255, 255, 0, 0.5); }
  50% { border-color: #00ff00; box-shadow: inset 0 0 25px rgba(0,0,0,0.6), 0 0 35px rgba(0, 255, 0, 0.5); }
  66% { border-color: #00ffff; box-shadow: inset 0 0 25px rgba(0,0,0,0.6), 0 0 35px rgba(0, 255, 255, 0.5); }
  83% { border-color: #8800ff; box-shadow: inset 0 0 25px rgba(0,0,0,0.6), 0 0 35px rgba(136, 0, 255, 0.5); }
  100% { border-color: #ff0000; box-shadow: inset 0 0 25px rgba(0,0,0,0.6), 0 0 35px rgba(255, 0, 0, 0.5); }
}

@keyframes needle-shimmer {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.3); }
}

@keyframes badge-shimmer {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

/* Cosmic tier (ultimate) */
.gauge.tier-cosmic {
  border-color: var(--tier-cosmic);
  box-shadow:
    inset 0 0 25px rgba(0,0,0,0.6),
    0 4px 15px rgba(0,0,0,0.4),
    0 0 40px var(--tier-cosmic-glow),
    0 0 60px rgba(255, 255, 255, 0.3);
  animation: tier-cosmic-pulse 1.5s ease-in-out infinite;
}
.gauge.tier-cosmic .gauge-fill {
  background: conic-gradient(from 180deg, #ff0000 0deg, #ff8800 30deg, #ffff00 60deg, #00ff00 90deg, #00ffff 120deg, #0088ff 150deg, transparent 180deg);
  opacity: 0.5;
}
.gauge.tier-cosmic .gauge-needle {
  background: linear-gradient(to top, #666, #fff, #fff);
  box-shadow: 0 0 30px var(--tier-cosmic-glow), 0 0 50px rgba(255, 255, 255, 0.5);
}
.gauge.tier-cosmic .gauge-tier-badge {
  color: var(--tier-cosmic);
  text-shadow: 0 0 15px var(--tier-cosmic-glow);
  background: linear-gradient(135deg, rgba(255,0,0,0.3), rgba(0,255,255,0.3));
  animation: badge-cosmic 2s linear infinite;
}
.gauge.tier-cosmic .gauge-center {
  border-color: var(--tier-cosmic);
  background: radial-gradient(circle at 30% 30%, #fff, #888);
  box-shadow: 0 0 15px var(--tier-cosmic-glow);
}
.gauge.tier-cosmic .gauge-ticks .tick {
  background: rgba(255, 255, 255, 0.8);
}

@keyframes tier-cosmic-pulse {
  0%, 100% {
    box-shadow: inset 0 0 25px rgba(0,0,0,0.6), 0 4px 15px rgba(0,0,0,0.4), 0 0 40px var(--tier-cosmic-glow), 0 0 60px rgba(255, 255, 255, 0.3);
  }
  50% {
    box-shadow: inset 0 0 25px rgba(0,0,0,0.6), 0 4px 15px rgba(0,0,0,0.4), 0 0 60px var(--tier-cosmic-glow), 0 0 100px rgba(255, 255, 255, 0.5);
  }
}

@keyframes badge-cosmic {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

/* ========== END GAUGE TIER SYSTEM ========== */

/* Fuel gauge */
.fuel-gauge {
  width: 45px;
  height: 120px;
  background: var(--gauge-bg);
  border-radius: 8px;
  position: relative;
  overflow: hidden;
  border: 2px solid var(--border-subtle);
}

.fuel-fill {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 0%;
  background: linear-gradient(to top, var(--accent-cyan), var(--accent-green));
  transition: height 0.3s;
}

.fuel-gauge.nitro-ready .fuel-fill {
  background: linear-gradient(to top, var(--accent-orange), var(--accent-red));
  animation: pulse-fuel 0.5s infinite;
}

@keyframes pulse-fuel {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

.fuel-gauge .gauge-label { bottom: auto; top: 5px; }
.fuel-gauge .gauge-value { bottom: auto; top: 20px; font-size: 0.7rem; }

/* Special event indicators */
.event-indicator {
  position: absolute;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s;
}

.event-indicator.active {
  opacity: 1;
  pointer-events: auto;
}

.check-engine {
  top: 10px;
  right: 10px;
  background: var(--bg-card);
  border: 2px solid var(--accent-orange);
}

.check-engine.active {
  animation: pulse-event 1s infinite;
  box-shadow: 0 0 20px var(--accent-orange);
}

.golden-gas {
  top: 10px;
  left: 10px;
  background: linear-gradient(135deg, #ffd700, #ffaa00);
  border: 2px solid #fff;
}

.golden-gas.active {
  animation: golden-bounce 0.6s infinite;
  box-shadow: 0 0 30px var(--accent-gold);
}

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

@keyframes golden-bounce {
  0%, 100% { transform: scale(1) rotate(0deg); }
  25% { transform: scale(1.1) rotate(-5deg); }
  75% { transform: scale(1.1) rotate(5deg); }
}

/* ========== Car Display ========== */
.car-section {
  text-align: center;
  padding: 20px;
  background: linear-gradient(180deg, var(--bg-panel) 0%, var(--bg-dark) 100%);
  position: relative;
  overflow: hidden;
}

.car-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

/* Road surface effect */
.car-section::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 40px;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(100, 100, 100, 0.1) 20%,
    rgba(100, 100, 100, 0.2) 50%,
    rgba(100, 100, 100, 0.1) 80%,
    transparent 100%
  );
  border-top: 2px dashed rgba(255, 215, 0, 0.3);
}

.car-display {
  font-size: 4.5rem;
  transition: all 0.3s var(--transition-smooth);
  position: relative;
  display: inline-block;
  filter: drop-shadow(0 8px 15px rgba(0,0,0,0.5));
  z-index: 1;
}

.car-display:hover {
  transform: scale(1.1);
  filter: drop-shadow(0 12px 25px rgba(0,0,0,0.6));
}

.car-display.boost-active {
  animation: car-shake 0.08s infinite, car-glow 0.3s infinite;
}

/* Exhaust particles effect - done via JS but base styling */
.car-display::after {
  content: '💨';
  position: absolute;
  right: -30px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.5rem;
  opacity: 0;
  transition: opacity 0.2s;
}

.car-display.boost-active::after {
  opacity: 1;
  animation: exhaust 0.3s infinite;
}

@keyframes car-shake {
  0%, 100% { transform: translateX(0) rotate(0deg); }
  25% { transform: translateX(-2px) rotate(-0.5deg); }
  75% { transform: translateX(2px) rotate(0.5deg); }
}

@keyframes car-glow {
  0%, 100% { filter: drop-shadow(0 8px 15px rgba(0,0,0,0.5)) drop-shadow(0 0 20px var(--accent-cyan-glow)); }
  50% { filter: drop-shadow(0 8px 15px rgba(0,0,0,0.5)) drop-shadow(0 0 35px var(--accent-cyan-glow)); }
}

@keyframes exhaust {
  0% { opacity: 1; transform: translateY(-50%) translateX(0); }
  100% { opacity: 0; transform: translateY(-50%) translateX(20px); }
}

.car-info {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
  margin-top: 12px;
  font-size: 0.9rem;
  position: relative;
  z-index: 1;
}

.car-info span {
  color: var(--text-secondary);
}

.car-info .car-name {
  color: var(--accent-cyan);
  font-weight: bold;
  text-shadow: 0 0 10px var(--accent-cyan-glow);
  padding: 4px 12px;
  background: rgba(0, 212, 255, 0.1);
  border-radius: 15px;
  border: 1px solid rgba(0, 212, 255, 0.2);
}

/* ========== Gas Pedal ========== */
.pedal-section {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
  position: relative;
}

/* ========== GAS PEDAL REDESIGN ========== */
.pedal-wrapper {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

/* Power ring indicator around pedal */
.pedal-power-ring {
  position: absolute;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 5;
}

.pedal-power-ring svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.pedal-power-ring .ring-bg {
  fill: none;
  stroke: rgba(255, 255, 255, 0.1);
  stroke-width: 4;
}

.pedal-power-ring .ring-fill {
  fill: none;
  stroke: var(--tier-bronze);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-dasharray: 440;
  stroke-dashoffset: 440;
  transition: stroke-dashoffset 0.3s ease, stroke 0.3s ease;
  filter: drop-shadow(0 0 4px currentColor);
}

.gas-pedal {
  width: 130px;
  height: 130px;
  background:
    radial-gradient(ellipse at 30% 20%, rgba(255,255,255,0.15) 0%, transparent 50%),
    linear-gradient(160deg, #3a3a5c 0%, #1e1e38 40%, #14142a 100%);
  border: 3px solid rgba(100, 100, 140, 0.6);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: all 0.15s var(--transition-smooth);
  box-shadow:
    0 8px 25px rgba(0,0,0,0.6),
    0 4px 12px rgba(0,0,0,0.4),
    inset 0 -8px 20px rgba(0,0,0,0.5),
    inset 0 2px 8px rgba(255,255,255,0.08),
    inset 0 0 30px rgba(0,0,0,0.3);
  position: relative;
  overflow: hidden;
  z-index: 10;
}

/* Metallic grip texture pattern */
.gas-pedal .pedal-texture {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90%;
  height: 90%;
  border-radius: 50%;
  background:
    repeating-radial-gradient(
      circle at center,
      transparent 0px,
      transparent 3px,
      rgba(255,255,255,0.03) 3px,
      rgba(255,255,255,0.03) 4px
    );
  pointer-events: none;
}

/* Chrome bezel ring */
.gas-pedal::before {
  content: '';
  position: absolute;
  top: -6px;
  left: -6px;
  right: -6px;
  bottom: -6px;
  border-radius: 50%;
  background: conic-gradient(
    from 45deg,
    rgba(180, 180, 200, 0.3),
    rgba(60, 60, 80, 0.2),
    rgba(180, 180, 200, 0.3),
    rgba(60, 60, 80, 0.2),
    rgba(180, 180, 200, 0.3)
  );
  opacity: 0.8;
  z-index: -1;
  transition: all 0.3s;
}

/* Inner glow ring */
.gas-pedal::after {
  content: '';
  position: absolute;
  top: 6px;
  left: 6px;
  right: 6px;
  bottom: 6px;
  border-radius: 50%;
  border: 2px solid rgba(0, 212, 255, 0.3);
  opacity: 0.5;
  transition: all 0.3s;
  box-shadow: inset 0 0 20px rgba(0, 212, 255, 0.1);
}

.gas-pedal:hover {
  border-color: rgba(0, 212, 255, 0.6);
  transform: translateY(-4px) scale(1.02);
  box-shadow:
    0 12px 35px rgba(0,212,255,0.3),
    0 6px 18px rgba(0,0,0,0.5),
    inset 0 -8px 20px rgba(0,0,0,0.4),
    inset 0 2px 8px rgba(255,255,255,0.1);
}

.gas-pedal:hover::before {
  background: conic-gradient(
    from 45deg,
    rgba(0, 212, 255, 0.4),
    rgba(168, 85, 247, 0.3),
    rgba(0, 212, 255, 0.4),
    rgba(168, 85, 247, 0.3),
    rgba(0, 212, 255, 0.4)
  );
  opacity: 1;
  filter: blur(3px);
}

.gas-pedal:hover::after {
  opacity: 0.8;
  border-color: rgba(0, 212, 255, 0.6);
  box-shadow: inset 0 0 25px rgba(0, 212, 255, 0.2);
}

.gas-pedal:active {
  transform: translateY(3px) scale(0.96);
  box-shadow:
    0 4px 12px rgba(0,0,0,0.6),
    inset 0 6px 20px rgba(0,0,0,0.6),
    inset 0 0 30px rgba(0,0,0,0.4);
  transition: all 0.05s;
}

.gas-pedal:active::after {
  opacity: 1;
  border-color: var(--accent-green);
  box-shadow: inset 0 0 30px rgba(76, 175, 80, 0.3);
}

.gas-pedal.nitro-active {
  border-color: var(--accent-cyan);
  animation: nitro-glow 0.3s infinite, pedal-pulse 0.5s infinite;
}

.gas-pedal.nitro-active::before {
  background: conic-gradient(from 0deg, var(--accent-cyan), var(--accent-purple), var(--accent-cyan));
  opacity: 1;
  animation: rotate-glow 1s linear infinite;
  filter: blur(6px);
}

.gas-pedal.nitro-active::after {
  border-color: var(--accent-cyan);
  box-shadow: inset 0 0 40px rgba(0, 212, 255, 0.4);
  animation: ring-pulse 0.5s ease-in-out infinite;
}

@keyframes nitro-glow {
  0%, 100% { box-shadow: 0 0 30px var(--accent-cyan), 0 0 60px var(--accent-cyan), inset 0 0 25px rgba(0, 212, 255, 0.4); }
  50% { box-shadow: 0 0 50px var(--accent-cyan), 0 0 100px var(--accent-cyan), inset 0 0 35px rgba(0, 212, 255, 0.6); }
}

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

@keyframes rotate-glow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes ring-pulse {
  0%, 100% { opacity: 0.8; }
  50% { opacity: 1; }
}

.pedal-icon {
  font-size: 2.6rem;
  filter: drop-shadow(0 3px 6px rgba(0,0,0,0.6));
  transition: transform 0.2s var(--transition-bounce);
  z-index: 2;
}

.gas-pedal:active .pedal-icon {
  transform: scale(0.85);
}

.pedal-value {
  font-size: 1rem;
  font-weight: bold;
  color: var(--accent-cyan);
  text-shadow: 0 0 12px var(--accent-cyan-glow);
  transition: all 0.2s;
  z-index: 2;
  letter-spacing: 0.5px;
}

.gas-pedal:hover .pedal-value {
  color: var(--accent-gold);
  text-shadow: 0 0 15px var(--accent-gold-glow);
}

/* Pedal tier indicator below */
.pedal-tier {
  font-size: 0.65rem;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 3px 12px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid var(--tier-bronze);
  color: var(--tier-bronze);
  transition: all 0.3s;
}

/* ========== END GAS PEDAL REDESIGN ========== */

.float-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: visible;
}

.float-text {
  position: absolute;
  font-weight: 800;
  color: var(--accent-green);
  font-size: 1.2rem;
  pointer-events: none;
  animation: floatUp 1.2s ease-out forwards;
  text-shadow: 0 0 15px currentColor, 0 2px 4px rgba(0,0,0,0.5);
  font-family: 'Courier New', monospace;
  letter-spacing: 1px;
}

.float-text.nitro {
  color: var(--accent-cyan);
  font-size: 1.6rem;
  animation: floatUpNitro 1s ease-out forwards;
}

.float-text.golden {
  color: var(--accent-gold);
  font-size: 1.8rem;
  animation: floatUpGolden 1.2s ease-out forwards;
}

.float-text.crit {
  color: var(--accent-pink);
  font-size: 1.6rem;
  animation: floatUpCrit 1s ease-out forwards;
}

.float-text.combo {
  color: var(--accent-orange);
  font-size: 1.4rem;
}

@keyframes floatUp {
  0% { opacity: 1; transform: translateY(0) scale(0.8); }
  20% { transform: translateY(-20px) scale(1.1); }
  100% { opacity: 0; transform: translateY(-120px) scale(0.9); }
}

@keyframes floatUpNitro {
  0% { opacity: 1; transform: translateY(0) scale(0.5) rotate(-5deg); }
  30% { transform: translateY(-30px) scale(1.3) rotate(5deg); }
  100% { opacity: 0; transform: translateY(-150px) scale(1) rotate(0deg); }
}

@keyframes floatUpGolden {
  0% { opacity: 1; transform: translateY(0) scale(0.5); filter: brightness(2); }
  30% { transform: translateY(-40px) scale(1.4); filter: brightness(1.5); }
  100% { opacity: 0; transform: translateY(-180px) scale(1); filter: brightness(1); }
}

@keyframes floatUpCrit {
  0% { opacity: 1; transform: translateY(0) scale(0.5); }
  20% { transform: translateY(-15px) scale(1.5); }
  40% { transform: translateY(-40px) scale(1.2); }
  100% { opacity: 0; transform: translateY(-130px) scale(0.8); }
}

/* ========== Particle System ========== */
.click-particle {
  z-index: 100;
  will-change: transform, opacity;
}

.spark-particle {
  z-index: 100;
  will-change: transform, opacity;
}

@keyframes particleBurst {
  0% {
    transform: translate(0, 0) scale(1);
    opacity: 1;
  }
  50% {
    opacity: 0.8;
  }
  100% {
    transform: translate(var(--end-x), var(--end-y)) scale(0.3);
    opacity: 0;
  }
}

@keyframes sparkRise {
  0% {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
  30% {
    opacity: 1;
    transform: translateY(-30px) scale(1.2);
  }
  100% {
    transform: translateY(-100px) scale(0.5);
    opacity: 0;
  }
}

/* Enhanced particle trail for nitro */
@keyframes particleTrail {
  0% {
    transform: translate(0, 0) scale(1);
    opacity: 1;
  }
  100% {
    transform: translate(var(--trail-x), var(--trail-y)) scale(0);
    opacity: 0;
  }
}

/* Explosion effect for special events */
@keyframes particleExplode {
  0% {
    transform: translate(0, 0) scale(0);
    opacity: 1;
  }
  20% {
    transform: translate(calc(var(--end-x) * 0.3), calc(var(--end-y) * 0.3)) scale(1.5);
    opacity: 1;
  }
  100% {
    transform: translate(var(--end-x), var(--end-y)) scale(0);
    opacity: 0;
  }
}

/* Shimmer particle effect */
@keyframes particleShimmer {
  0%, 100% {
    filter: brightness(1);
  }
  50% {
    filter: brightness(2);
  }
}

/* Ring expand effect for special events */
@keyframes ringExpand {
  0% {
    width: 20px;
    height: 20px;
    opacity: 1;
    border-width: 4px;
  }
  100% {
    width: 300px;
    height: 300px;
    opacity: 0;
    border-width: 1px;
  }
}

/* Continuous spark emission during nitro */
.nitro-sparks {
  position: absolute;
  pointer-events: none;
}

/* ========== Tab Navigation ========== */
.tabs {
  display: flex;
  background: var(--bg-panel);
  border-bottom: 1px solid var(--border-subtle);
  overflow-x: auto;
}

.tab-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  padding: 12px 20px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  position: relative;
  overflow: hidden;
}

/* Neon glow underline effect */
.tab-btn::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--accent-cyan);
  box-shadow: 0 0 10px var(--accent-cyan), 0 0 20px var(--accent-cyan);
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

.tab-btn:hover::before {
  width: 80%;
}

.tab-btn:hover {
  color: var(--text-primary);
  background: linear-gradient(180deg, transparent 0%, rgba(0, 212, 255, 0.05) 100%);
  text-shadow: 0 0 10px rgba(0, 212, 255, 0.3);
}

.tab-btn.active {
  color: var(--accent-cyan);
  border-bottom-color: transparent;
  text-shadow: 0 0 15px var(--accent-cyan);
}

.tab-btn.active::before {
  width: 100%;
  height: 3px;
}

.tab-btn .tab-badge {
  background: var(--accent-red);
  color: white;
  font-size: 0.65rem;
  padding: 2px 5px;
  border-radius: 10px;
  margin-left: 5px;
}

/* ========== Panel Content ========== */
.panel-content {
  flex: 1;
  overflow-y: auto;
  padding: 15px;
}

.panel { display: none; }
.panel.active { display: block; }

/* Shop Grid */
.shop-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.shop-title {
  font-size: 1rem;
  color: var(--text-secondary);
}

.buy-mode-toggle {
  display: flex;
  gap: 5px;
}

.buy-mode-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 5px 10px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 0.75rem;
}

.buy-mode-btn.active {
  background: var(--accent-cyan);
  color: var(--bg-dark);
  border-color: var(--accent-cyan);
}

.shop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 10px;
}

.upgrade-card {
  background: linear-gradient(145deg, var(--bg-card) 0%, rgba(26, 26, 46, 0.8) 100%);
  border: 2px solid var(--border-subtle);
  border-radius: 12px;
  padding: 14px;
  cursor: pointer;
  transition: all 0.25s var(--transition-smooth);
  position: relative;
  overflow: hidden;
}

/* Holographic shimmer effect */
.upgrade-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -150%;
  width: 50%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.03),
    rgba(0, 212, 255, 0.08),
    rgba(168, 85, 247, 0.08),
    rgba(255, 255, 255, 0.03),
    transparent
  );
  transform: skewX(-20deg);
  transition: left 0.8s ease;
}

/* Holographic rainbow edge effect */
.upgrade-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 12px;
  padding: 2px;
  background: linear-gradient(
    135deg,
    transparent 40%,
    rgba(0, 212, 255, 0.3) 45%,
    rgba(168, 85, 247, 0.3) 50%,
    rgba(255, 107, 53, 0.3) 55%,
    transparent 60%
  );
  background-size: 200% 200%;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.3s, background-position 0.5s;
  pointer-events: none;
}

.upgrade-card:hover::before {
  left: 150%;
}

.upgrade-card:hover::after {
  opacity: 1;
  animation: holographicShift 2s ease infinite;
}

@keyframes holographicShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.upgrade-card:hover:not(.disabled) {
  border-color: var(--accent-cyan);
  background: linear-gradient(145deg, var(--bg-card-hover) 0%, rgba(37, 37, 69, 0.9) 100%);
  transform: translateY(-4px) scale(1.01);
  box-shadow:
    0 12px 30px rgba(0, 212, 255, 0.2),
    0 6px 15px rgba(0,0,0,0.4),
    0 0 20px rgba(0, 212, 255, 0.1),
    inset 0 1px 0 rgba(255,255,255,0.08);
}

.upgrade-card.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  filter: grayscale(30%);
}

.upgrade-card.locked {
  opacity: 0.3;
  pointer-events: none;
  filter: grayscale(50%);
}

/* Affordable indicator */
.upgrade-card.affordable {
  border-color: rgba(76, 175, 80, 0.3);
}

.upgrade-card.affordable:hover {
  border-color: var(--accent-green);
  box-shadow:
    0 8px 25px rgba(76, 175, 80, 0.2),
    0 4px 10px rgba(0,0,0,0.3);
}

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

.upgrade-name {
  font-weight: bold;
  font-size: 0.95rem;
  transition: color 0.2s;
}

.upgrade-card:hover .upgrade-name {
  color: var(--accent-cyan);
}

.upgrade-owned {
  background: linear-gradient(135deg, var(--bg-panel) 0%, rgba(0,0,0,0.3) 100%);
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 0.75rem;
  color: var(--accent-cyan);
  border: 1px solid rgba(0, 212, 255, 0.2);
  font-weight: bold;
}

.upgrade-desc {
  color: var(--text-secondary);
  font-size: 0.8rem;
  margin-bottom: 10px;
  line-height: 1.3;
}

.upgrade-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.upgrade-price {
  color: var(--accent-green);
  font-weight: bold;
  font-size: 0.95rem;
  text-shadow: 0 0 10px var(--accent-green-glow);
  transition: all 0.2s;
}

.upgrade-card:hover .upgrade-price {
  transform: scale(1.05);
}

.upgrade-price.expensive {
  color: var(--accent-red);
  text-shadow: 0 0 10px var(--accent-red-glow);
}

.upgrade-bonus {
  font-size: 0.7rem;
  color: var(--accent-purple);
  background: rgba(168, 85, 247, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
}

/* ========== Sidebar ========== */
.sidebar {
  background: var(--bg-panel);
  border-left: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.sidebar-tabs {
  display: flex;
  border-bottom: 1px solid var(--border-subtle);
}

.sidebar-tab {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  padding: 10px;
  font-size: 0.8rem;
  cursor: pointer;
  border-bottom: 2px solid transparent;
}

.sidebar-tab.active {
  color: var(--accent-cyan);
  border-bottom-color: var(--accent-cyan);
}

.sidebar-content {
  flex: 1;
  overflow-y: auto;
  padding: 15px;
}

.sidebar-panel { display: none; }
.sidebar-panel.active { display: block; }

/* Daily Challenges */
.challenge-card {
  background: var(--bg-card);
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 10px;
  border: 1px solid var(--border-subtle);
}

.challenge-card.completed {
  border-color: var(--accent-green);
  opacity: 0.7;
}

.challenge-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
}

.challenge-name {
  font-weight: bold;
  font-size: 0.85rem;
}

.challenge-reward {
  color: var(--accent-gold);
  font-size: 0.8rem;
}

.challenge-progress {
  height: 6px;
  background: var(--bg-dark);
  border-radius: 3px;
  overflow: hidden;
}

.challenge-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-purple));
  transition: width 0.3s;
}

.challenge-progress-text {
  font-size: 0.7rem;
  color: var(--text-secondary);
  margin-top: 4px;
}

/* Road Trip Progress */
.roadtrip-section {
  margin-bottom: 20px;
}

.roadtrip-current {
  background: linear-gradient(135deg, var(--bg-card), var(--bg-card-hover));
  border-radius: 10px;
  padding: 15px;
  border: 1px solid var(--accent-gold);
  margin-bottom: 15px;
}

.roadtrip-name {
  font-size: 1.1rem;
  font-weight: bold;
  color: var(--accent-gold);
  margin-bottom: 5px;
}

.roadtrip-bonus {
  font-size: 0.8rem;
  color: var(--accent-green);
  margin-bottom: 10px;
}

.roadtrip-progress {
  height: 8px;
  background: var(--bg-dark);
  border-radius: 4px;
  overflow: hidden;
}

.roadtrip-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-gold), var(--accent-orange));
}

.roadtrip-milestone {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-top: 5px;
}

.roadtrip-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.roadtrip-item {
  background: var(--bg-card);
  padding: 10px;
  border-radius: 6px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
}

.roadtrip-item.unlocked { border-left: 3px solid var(--accent-green); }
.roadtrip-item.locked { opacity: 0.5; }
.roadtrip-item.current { border-left: 3px solid var(--accent-gold); }

/* Skill Tree */
.skill-points-display {
  background: var(--bg-card);
  padding: 10px;
  border-radius: 8px;
  text-align: center;
  margin-bottom: 15px;
}

.skill-points-value {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--accent-purple);
}

.skill-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

/* .skill-node is defined in Skill Tree Branch section below for full styling */

.skill-icon { font-size: 1.5rem; margin-bottom: 5px; }
.skill-name { font-size: 0.8rem; font-weight: bold; margin-bottom: 3px; }
.skill-desc { font-size: 0.7rem; color: var(--text-secondary); }
.skill-level { font-size: 0.7rem; color: var(--accent-purple); margin-top: 5px; }

/* Achievements Panel */
.achievements-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
}

.achievement {
  background: linear-gradient(145deg, var(--bg-card) 0%, rgba(20, 20, 35, 0.9) 100%);
  border-radius: 10px;
  padding: 14px;
  opacity: 0.35;
  border: 1px solid var(--border-subtle);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.achievement::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 215, 0, 0.03), transparent);
  transition: left 0.6s ease;
}

.achievement:hover::before {
  left: 100%;
}

.achievement.unlocked {
  opacity: 1;
  border-color: var(--accent-gold);
  box-shadow:
    0 0 15px rgba(255, 215, 0, 0.15),
    inset 0 1px 0 rgba(255, 215, 0, 0.1);
}

.achievement.unlocked::after {
  content: '';
  position: absolute;
  top: 5px;
  right: 5px;
  width: 8px;
  height: 8px;
  background: var(--accent-gold);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--accent-gold);
  animation: achievementGlow 2s ease-in-out infinite;
}

@keyframes achievementGlow {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(0.8); }
}

.achievement.unlocked:hover {
  transform: translateY(-2px);
  box-shadow:
    0 5px 20px rgba(255, 215, 0, 0.2),
    inset 0 1px 0 rgba(255, 215, 0, 0.15);
}

.achievement-icon { font-size: 1.6rem; margin-bottom: 8px; filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3)); }
.achievement.unlocked .achievement-icon { filter: drop-shadow(0 0 8px rgba(255, 215, 0, 0.5)); }
.achievement-name { font-weight: bold; font-size: 0.85rem; margin-bottom: 4px; transition: color 0.3s; }
.achievement.unlocked .achievement-name { color: var(--accent-gold); }
.achievement-desc { font-size: 0.75rem; color: var(--text-secondary); line-height: 1.3; }
.achievement-reward { font-size: 0.7rem; color: var(--accent-purple); margin-top: 6px; font-weight: 500; }

/* Stats Panel */
.stats-grid {
  display: grid;
  gap: 10px;
  margin-bottom: 20px;
}

.stat-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 12px;
  background: var(--bg-card);
  border-radius: 6px;
}

.stat-name { color: var(--text-secondary); font-size: 0.85rem; }
.stat-value { font-weight: bold; font-size: 0.85rem; }

/* Stats Sections */
.stats-section {
  margin-bottom: 20px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 10px;
  padding: 12px;
}

.stats-section-title {
  font-size: 1rem;
  font-weight: bold;
  color: var(--accent);
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(0, 212, 255, 0.3);
}

.stats-section .stat-row {
  margin-bottom: 6px;
}

.stats-section .stat-row:last-child {
  margin-bottom: 0;
}

/* Charts */
.chart-container {
  background: var(--bg-card);
  border-radius: 10px;
  padding: 15px;
  margin-bottom: 15px;
}

.chart-title {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 10px;
}

.chart-canvas {
  width: 100%;
  height: 150px;
  position: relative;
}

.chart-bars {
  display: flex;
  align-items: flex-end;
  height: 120px;
  gap: 4px;
  padding: 0 10px;
}

.chart-bar {
  flex: 1;
  background: linear-gradient(to top, var(--accent-cyan), var(--accent-purple));
  border-radius: 3px 3px 0 0;
  min-height: 2px;
  transition: height 0.3s;
}

/* Racing */
.race-card {
  background: var(--bg-card);
  border-radius: 10px;
  padding: 15px;
  margin-bottom: 15px;
  border: 1px solid var(--border-subtle);
}

.race-name {
  font-size: 1rem;
  font-weight: bold;
  margin-bottom: 5px;
}

.race-info {
  display: flex;
  gap: 15px;
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 10px;
}

.race-rewards {
  font-size: 0.85rem;
  color: var(--accent-gold);
  margin-bottom: 10px;
}

.race-btn {
  width: 100%;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
  border: none;
  color: white;
  padding: 10px;
  border-radius: 8px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.2s;
}

.race-btn:hover { transform: scale(1.02); }
.race-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.race-active {
  background: var(--bg-card);
  border: 2px solid var(--accent-cyan);
  border-radius: 10px;
  padding: 20px;
  text-align: center;
}

.race-progress-bar {
  height: 20px;
  background: var(--bg-dark);
  border-radius: 10px;
  overflow: hidden;
  margin: 15px 0;
  position: relative;
}

.race-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-green));
  transition: width 0.1s;
}

.race-position {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

/* Car Customization */
.customize-section {
  margin-bottom: 20px;
}

.customize-title {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 10px;
}

.customize-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.customize-item {
  aspect-ratio: 1;
  background: var(--bg-card);
  border: 2px solid var(--border-subtle);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 1.5rem;
}

.customize-item:hover:not(.locked) {
  border-color: var(--accent-cyan);
}

.customize-item.selected {
  border-color: var(--accent-green);
  background: rgba(76, 175, 80, 0.2);
}

.customize-item.locked {
  opacity: 0.3;
  cursor: not-allowed;
}

.color-swatch {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 2px solid white;
}

/* ========== Modals ========== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.9);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  backdrop-filter: blur(5px);
  animation: modalOverlayFadeIn 0.3s ease;
}

.modal-overlay.active { display: flex; }

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

.modal {
  background: linear-gradient(145deg, var(--bg-panel) 0%, rgba(18, 18, 31, 0.98) 100%);
  border-radius: 20px;
  padding: 30px;
  max-width: 450px;
  width: 90%;
  border: 2px solid var(--accent-cyan);
  box-shadow:
    0 0 60px rgba(0,212,255,0.3),
    0 25px 50px rgba(0,0,0,0.5),
    inset 0 1px 0 rgba(255,255,255,0.05);
  animation: modalSlideIn 0.4s var(--transition-bounce);
  position: relative;
  overflow: hidden;
}

/* Decorative corner accents */
.modal::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 60px;
  height: 60px;
  border-top: 3px solid var(--accent-cyan);
  border-left: 3px solid var(--accent-cyan);
  border-radius: 20px 0 0 0;
  opacity: 0.5;
}

.modal::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 60px;
  height: 60px;
  border-bottom: 3px solid var(--accent-cyan);
  border-right: 3px solid var(--accent-cyan);
  border-radius: 0 0 20px 0;
  opacity: 0.5;
}

@keyframes modalSlideIn {
  0% { transform: translateY(-30px) scale(0.95); opacity: 0; }
  60% { transform: translateY(5px) scale(1.02); }
  100% { transform: translateY(0) scale(1); opacity: 1; }
}

.modal h2 {
  color: var(--accent-cyan);
  margin-bottom: 20px;
  text-align: center;
  font-size: 1.5rem;
  text-shadow: 0 0 20px var(--accent-cyan-glow);
  letter-spacing: 1px;
}

.modal p {
  color: var(--text-secondary);
  margin-bottom: 12px;
  text-align: center;
  line-height: 1.5;
}

.modal-buttons {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 25px;
}

.modal-btn {
  padding: 12px 28px;
  border: none;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.2s var(--transition-smooth);
  position: relative;
  overflow: hidden;
}

.modal-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.4s;
}

.modal-btn:hover::before {
  left: 100%;
}

.modal-btn.primary {
  background: linear-gradient(135deg, var(--accent-cyan), #0099cc);
  color: var(--bg-dark);
  box-shadow: 0 4px 15px rgba(0, 212, 255, 0.3);
}

.modal-btn.primary:hover {
  background: linear-gradient(135deg, #00e5ff, var(--accent-cyan));
  box-shadow: 0 6px 20px rgba(0, 212, 255, 0.5);
}

.modal-btn.secondary {
  background: linear-gradient(135deg, var(--bg-card), var(--bg-card-hover));
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
}

.modal-btn.secondary:hover {
  border-color: var(--accent-cyan);
  background: var(--bg-card-hover);
}

.modal-btn.danger {
  background: linear-gradient(135deg, var(--accent-red), #cc0000);
  color: white;
  box-shadow: 0 4px 15px rgba(255, 68, 68, 0.3);
}

.modal-btn.danger:hover {
  background: linear-gradient(135deg, #ff6666, var(--accent-red));
  box-shadow: 0 6px 20px rgba(255, 68, 68, 0.5);
}

.modal-btn:hover {
  transform: translateY(-2px);
}

.modal-btn:active {
  transform: translateY(0) scale(0.98);
}

.modal-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

/* Import/Export */
.save-code {
  width: 100%;
  height: 80px;
  background: var(--bg-dark);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  color: var(--text-primary);
  padding: 10px;
  font-family: monospace;
  font-size: 0.8rem;
  resize: none;
  margin: 10px 0;
}

/* Settings Modal */
.settings-section {
  margin-bottom: 20px;
}

.settings-title {
  font-size: 0.9rem;
  color: var(--accent-cyan);
  margin-bottom: 10px;
  padding-bottom: 5px;
  border-bottom: 1px solid var(--border-subtle);
}

.settings-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
}

.settings-label {
  color: var(--text-secondary);
  font-size: 0.85rem;
}

.settings-toggle {
  width: 50px;
  height: 26px;
  background: var(--bg-card);
  border-radius: 13px;
  position: relative;
  cursor: pointer;
  transition: background 0.3s;
  border: 1px solid var(--border-subtle);
}

.settings-toggle.active {
  background: var(--accent-cyan);
  border-color: var(--accent-cyan);
}

.settings-toggle::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  background: white;
  border-radius: 50%;
  transition: transform 0.3s;
}

.settings-toggle.active::after {
  transform: translateX(24px);
}

.settings-select {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  padding: 5px 10px;
  border-radius: 5px;
  font-size: 0.85rem;
}

/* ========== Keybinds ========== */
.keybinds-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 12px;
}

.keybind-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  transition: all 0.2s ease;
}

.keybind-row:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent-cyan);
  transform: translateX(2px);
}

.keybind-label {
  font-size: 0.9rem;
  color: var(--text-secondary);
  flex: 1;
}

.keybind-key {
  min-width: 100px;
  padding: 8px 16px;
  background: linear-gradient(135deg, var(--bg-panel) 0%, var(--bg-card) 100%);
  border: 2px solid var(--border-subtle);
  border-radius: 6px;
  color: var(--accent-cyan);
  font-family: 'Courier New', monospace;
  font-size: 0.9rem;
  font-weight: bold;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.keybind-key::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(0, 212, 255, 0.2), transparent);
  transition: left 0.5s ease;
}

.keybind-key:hover {
  border-color: var(--accent-cyan);
  box-shadow:
    0 0 15px var(--accent-cyan-glow),
    inset 0 0 10px rgba(0, 212, 255, 0.1);
  transform: translateY(-2px);
}

.keybind-key:hover::before {
  left: 100%;
}

.keybind-key:active {
  transform: translateY(0) scale(0.98);
}

.keybind-key.listening {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.3) 0%, rgba(168, 85, 247, 0.1) 100%);
  border-color: var(--accent-purple);
  color: var(--accent-purple);
  animation: keybindPulse 1.5s ease-in-out infinite;
  box-shadow:
    0 0 20px var(--accent-purple-glow),
    inset 0 0 15px rgba(168, 85, 247, 0.2);
}

@keyframes keybindPulse {
  0%, 100% {
    box-shadow:
      0 0 20px var(--accent-purple-glow),
      inset 0 0 15px rgba(168, 85, 247, 0.2);
  }
  50% {
    box-shadow:
      0 0 30px var(--accent-purple-glow),
      inset 0 0 25px rgba(168, 85, 247, 0.3);
  }
}

/* ========== Toast ========== */
.toast-container {
  position: fixed;
  top: 80px;
  right: 20px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 320px;
}

.toast {
  background: linear-gradient(135deg, var(--bg-card) 0%, rgba(26, 26, 46, 0.95) 100%);
  border-left: 4px solid var(--accent-green);
  padding: 14px 18px;
  border-radius: 12px;
  animation: toastSlideIn 0.4s var(--transition-bounce), toastFadeOut 0.4s ease 2.6s forwards;
  box-shadow:
    0 10px 40px rgba(0,0,0,0.5),
    0 0 20px rgba(76, 175, 80, 0.2),
    inset 0 1px 0 rgba(255,255,255,0.05);
  backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
}

/* Animated glow line */
.toast::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent-green), transparent);
  animation: toastGlowLine 2s linear infinite;
}

.toast::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 3px;
  height: 100%;
  background: linear-gradient(180deg, var(--accent-green), transparent);
  opacity: 0.5;
}

.toast.achievement {
  border-left-color: var(--accent-gold);
  box-shadow:
    0 10px 40px rgba(0,0,0,0.5),
    0 0 30px rgba(255, 215, 0, 0.3);
}

.toast.achievement::before {
  background: linear-gradient(90deg, transparent, var(--accent-gold), transparent);
}

.toast.achievement::after {
  background: linear-gradient(180deg, var(--accent-gold), transparent);
}

.toast.challenge {
  border-left-color: var(--accent-purple);
  box-shadow:
    0 10px 40px rgba(0,0,0,0.5),
    0 0 25px rgba(168, 85, 247, 0.3);
}

.toast.challenge::before {
  background: linear-gradient(90deg, transparent, var(--accent-purple), transparent);
}

.toast.race {
  border-left-color: var(--accent-pink);
  box-shadow:
    0 10px 40px rgba(0,0,0,0.5),
    0 0 25px rgba(236, 72, 153, 0.3);
}

.toast.legendary {
  border-left-color: var(--accent-gold);
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.1) 0%, var(--bg-card) 50%, rgba(168, 85, 247, 0.1) 100%);
  box-shadow:
    0 10px 40px rgba(0,0,0,0.5),
    0 0 40px rgba(255, 215, 0, 0.4);
  animation: toastSlideIn 0.4s var(--transition-bounce), legendaryPulse 1s ease-in-out infinite, toastFadeOut 0.4s ease 2.6s forwards;
}

.toast.error {
  border-left-color: var(--accent-red);
  box-shadow:
    0 10px 40px rgba(0,0,0,0.5),
    0 0 25px rgba(255, 68, 68, 0.3);
}

.toast-title {
  font-weight: bold;
  font-size: 0.95rem;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.toast-message {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.3;
}

@keyframes toastSlideIn {
  0% { transform: translateX(120%); opacity: 0; }
  60% { transform: translateX(-10px); }
  100% { transform: translateX(0); opacity: 1; }
}

@keyframes toastFadeOut {
  0% { opacity: 1; transform: translateX(0); }
  100% { opacity: 0; transform: translateX(80px) scale(0.9); }
}

@keyframes toastGlowLine {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

@keyframes legendaryPulse {
  0%, 100% { box-shadow: 0 10px 40px rgba(0,0,0,0.5), 0 0 40px rgba(255, 215, 0, 0.4); }
  50% { box-shadow: 0 10px 40px rgba(0,0,0,0.5), 0 0 60px rgba(255, 215, 0, 0.6); }
}

/* ========== Nitro Overlay ========== */
.nitro-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s;
  z-index: 500;
  background: radial-gradient(ellipse at center, transparent 40%, rgba(0,212,255,0.15) 100%);
}

.nitro-overlay.active {
  opacity: 1;
  animation: nitro-pulse 0.5s infinite;
}

@keyframes nitro-pulse {
  0%, 100% { background: radial-gradient(ellipse at center, transparent 40%, rgba(0,212,255,0.15) 100%); }
  50% { background: radial-gradient(ellipse at center, transparent 40%, rgba(0,212,255,0.25) 100%); }
}

/* Prestige button */
.prestige-section {
  background: linear-gradient(135deg, rgba(255,107,53,0.2), rgba(168,85,247,0.2));
  border: 1px solid var(--accent-orange);
  border-radius: 10px;
  padding: 15px;
  text-align: center;
  margin-top: 20px;
}

.prestige-btn {
  background: linear-gradient(135deg, var(--accent-orange), var(--accent-purple));
  border: none;
  color: white;
  padding: 12px 30px;
  font-size: 1rem;
  font-weight: bold;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.prestige-btn:hover { transform: scale(1.05); }
.prestige-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

/* ========== Weather Indicator ========== */
.weather-indicator {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-card);
  padding: 6px 15px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  border: 1px solid var(--border-subtle);
  z-index: 10;
}

.weather-icon { font-size: 1.2rem; }
.weather-name { color: var(--text-secondary); }
.weather-mult { color: var(--accent-cyan); font-weight: bold; }

.weather-indicator.good .weather-mult { color: var(--accent-green); }
.weather-indicator.bad .weather-mult { color: var(--accent-red); }
.weather-indicator.rare {
  border-color: var(--accent-gold);
  box-shadow: 0 0 15px rgba(255, 215, 0, 0.3);
}

/* ========== Combo Display ========== */
.combo-display {
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  background: linear-gradient(145deg, var(--bg-card), rgba(26, 26, 46, 0.9));
  padding: 12px 18px;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  border: 2px solid var(--border-subtle);
  transition: all 0.3s var(--transition-smooth);
  box-shadow: 0 4px 15px rgba(0,0,0,0.3);
  backdrop-filter: blur(5px);
}

.combo-label {
  font-size: 0.7rem;
  color: var(--text-dim);
  letter-spacing: 3px;
  text-transform: uppercase;
  font-weight: bold;
}

.combo-value {
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--text-secondary);
  transition: all 0.2s;
  font-family: 'Courier New', monospace;
  text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.combo-mult {
  font-size: 0.8rem;
  color: var(--accent-cyan);
  font-weight: bold;
  padding: 2px 8px;
  background: rgba(0, 212, 255, 0.1);
  border-radius: 10px;
}

.combo-display.active {
  border-color: var(--accent-cyan);
  box-shadow: 0 4px 15px rgba(0,0,0,0.3), 0 0 15px var(--accent-cyan-glow);
}
.combo-display.active .combo-value {
  color: var(--accent-cyan);
  text-shadow: 0 0 15px var(--accent-cyan-glow);
}

.combo-display.hot {
  border-color: var(--accent-orange);
  box-shadow: 0 4px 15px rgba(0,0,0,0.3), 0 0 20px rgba(255, 107, 53, 0.4);
  animation: combo-shake 0.5s infinite;
}
.combo-display.hot .combo-value {
  color: var(--accent-orange);
  text-shadow: 0 0 15px rgba(255, 107, 53, 0.5);
}

.combo-display.fire {
  border-color: var(--accent-red);
  animation: combo-pulse-fire 0.3s infinite, combo-shake 0.3s infinite;
  box-shadow: 0 4px 15px rgba(0,0,0,0.3), 0 0 30px var(--accent-red-glow);
}
.combo-display.fire .combo-value {
  color: var(--accent-red);
  text-shadow: 0 0 20px var(--accent-red-glow);
}
.combo-display.fire .combo-label {
  color: var(--accent-orange);
}

.combo-display.legendary {
  border-color: var(--accent-purple);
  animation: combo-pulse-legendary 0.2s infinite, combo-shake 0.2s infinite;
  box-shadow: 0 4px 15px rgba(0,0,0,0.3), 0 0 40px var(--accent-purple-glow);
  background: linear-gradient(145deg, rgba(168, 85, 247, 0.2), var(--bg-card));
}
.combo-display.legendary .combo-value {
  color: var(--accent-purple);
  text-shadow: 0 0 25px var(--accent-purple-glow);
  animation: legendary-text 0.5s infinite;
}
.combo-display.legendary .combo-mult {
  color: var(--accent-gold);
  background: rgba(255, 215, 0, 0.2);
}

@keyframes combo-shake {
  0%, 100% { transform: translateY(-50%) translateX(0); }
  25% { transform: translateY(-50%) translateX(-2px); }
  75% { transform: translateY(-50%) translateX(2px); }
}

@keyframes combo-pulse-fire {
  0%, 100% { box-shadow: 0 4px 15px rgba(0,0,0,0.3), 0 0 30px var(--accent-red-glow); }
  50% { box-shadow: 0 4px 15px rgba(0,0,0,0.3), 0 0 50px var(--accent-red-glow); }
}

@keyframes combo-pulse-legendary {
  0%, 100% { box-shadow: 0 4px 15px rgba(0,0,0,0.3), 0 0 40px var(--accent-purple-glow); }
  50% { box-shadow: 0 4px 15px rgba(0,0,0,0.3), 0 0 60px var(--accent-purple-glow), 0 0 80px var(--accent-gold-glow); }
}

@keyframes legendary-text {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

/* ========== Tournament Timer ========== */
.tournament-timer {
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  background: linear-gradient(135deg, var(--bg-card), var(--bg-card-hover));
  padding: 10px 15px;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  border: 2px solid var(--accent-gold);
}

.tournament-timer .tournament-name {
  font-size: 0.7rem;
  color: var(--accent-gold);
}

.tournament-timer .tournament-time {
  font-size: 1.3rem;
  font-weight: bold;
  color: var(--text-primary);
  font-family: 'Courier New', monospace;
}

/* ========== Parts Panel ========== */
.parts-tabs {
  display: flex;
  gap: 5px;
  margin-bottom: 15px;
  background: var(--bg-card);
  padding: 5px;
  border-radius: 8px;
}

.parts-tab {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  padding: 8px 12px;
  font-size: 0.85rem;
  cursor: pointer;
  border-radius: 6px;
  transition: all 0.2s;
}

.parts-tab:hover {
  background: var(--bg-panel);
  color: var(--text-primary);
}

.parts-tab.active {
  background: var(--accent-cyan);
  color: var(--bg-dark);
}

.parts-panel { display: none; }
.parts-panel.active { display: block; }

/* ========== Car Collection ========== */
.car-collection-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 15px;
}

.car-card {
  background: var(--bg-card);
  border: 2px solid var(--border-subtle);
  border-radius: 10px;
  padding: 10px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
}

.car-card:hover:not(.locked) {
  border-color: var(--accent-cyan);
  transform: translateY(-2px);
}

.car-card.selected {
  border-color: var(--accent-green);
  background: rgba(76, 175, 80, 0.1);
}

.car-card.locked {
  opacity: 0.4;
  cursor: not-allowed;
}

.car-card-emoji {
  font-size: 2rem;
  margin-bottom: 5px;
}

.car-card-name {
  font-size: 0.75rem;
  font-weight: bold;
  margin-bottom: 3px;
}

.car-card-bonus {
  font-size: 0.65rem;
  color: var(--accent-green);
}

.car-card-cost {
  font-size: 0.65rem;
  color: var(--accent-gold);
  margin-top: 3px;
}

/* ========== Tournament Panel ========== */
.tournament-header {
  text-align: center;
  margin-bottom: 20px;
}

.tournament-header h3 {
  color: var(--accent-gold);
  margin-bottom: 5px;
}

.tournament-reset {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.tournament-active {
  background: var(--bg-card);
  border: 2px solid var(--accent-cyan);
  border-radius: 10px;
  padding: 15px;
  margin-bottom: 15px;
}

.tournament-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.tournament-name-display {
  font-weight: bold;
  color: var(--accent-cyan);
}

.tournament-time-left {
  font-family: 'Courier New', monospace;
  font-size: 1.2rem;
  font-weight: bold;
}

.tournament-progress {
  height: 8px;
  background: var(--bg-dark);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 10px;
}

.tournament-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-purple));
  transition: width 0.3s;
}

.tournament-score {
  text-align: center;
  font-size: 1.1rem;
  margin-bottom: 10px;
}

.tournament-leaderboard {
  font-size: 0.85rem;
}

.tournament-list {
  display: grid;
  gap: 10px;
}

.tournament-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 15px;
}

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

.tournament-card-name {
  font-weight: bold;
}

.tournament-card-duration {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.tournament-card-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 10px;
}

.tournament-card-btn {
  width: 100%;
  background: linear-gradient(135deg, var(--accent-gold), var(--accent-orange));
  border: none;
  color: var(--bg-dark);
  padding: 8px;
  border-radius: 6px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.2s;
}

.tournament-card-btn:hover { transform: scale(1.02); }
.tournament-card-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.tournament-bests {
  margin-top: 20px;
}

.tournament-bests h4 {
  color: var(--text-secondary);
  margin-bottom: 10px;
}

.tournament-bests-grid {
  display: grid;
  gap: 8px;
}

.tournament-best-item {
  display: flex;
  justify-content: space-between;
  padding: 8px 12px;
  background: var(--bg-card);
  border-radius: 6px;
  font-size: 0.85rem;
}

/* ========== Artifacts Panel ========== */
.artifacts-header {
  text-align: center;
  margin-bottom: 15px;
}

.gems-display {
  font-size: 1.2rem;
  color: var(--accent-purple);
  font-weight: bold;
}

.artifacts-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.artifact-card {
  background: var(--bg-card);
  border: 2px solid var(--border-subtle);
  border-radius: 10px;
  padding: 10px;
  text-align: center;
}

.artifact-card.common { border-color: #888; }
.artifact-card.rare { border-color: var(--accent-cyan); }
.artifact-card.epic { border-color: var(--accent-purple); }
.artifact-card.legendary { border-color: var(--accent-gold); box-shadow: 0 0 10px rgba(255, 215, 0, 0.3); }
.artifact-card.mythic {
  border-color: #ff6b9d;
  box-shadow: 0 0 15px rgba(255, 107, 157, 0.4);
  animation: mythicPulse 2s ease-in-out infinite;
}
.artifact-card.divine {
  border-color: #ffffff;
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.5), 0 0 40px rgba(255, 215, 0, 0.3);
  animation: divinePulse 1.5s ease-in-out infinite;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 215, 0, 0.1));
}

@keyframes mythicPulse {
  0%, 100% { box-shadow: 0 0 15px rgba(255, 107, 157, 0.4); }
  50% { box-shadow: 0 0 25px rgba(255, 107, 157, 0.6), 0 0 35px rgba(255, 107, 157, 0.2); }
}

@keyframes divinePulse {
  0%, 100% { box-shadow: 0 0 20px rgba(255, 255, 255, 0.5), 0 0 40px rgba(255, 215, 0, 0.3); }
  50% { box-shadow: 0 0 30px rgba(255, 255, 255, 0.7), 0 0 60px rgba(255, 215, 0, 0.5); }
}

.artifact-icon {
  font-size: 1.5rem;
  margin-bottom: 5px;
}

.artifact-name {
  font-size: 0.8rem;
  font-weight: bold;
  margin-bottom: 3px;
}

.artifact-desc {
  font-size: 0.7rem;
  color: var(--text-secondary);
}

.artifacts-empty {
  text-align: center;
  color: var(--text-dim);
  padding: 20px;
  font-size: 0.9rem;
}

/* ========== Ascension Panel ========== */
.ascension-section {
  background: var(--bg-card);
  border-radius: 10px;
  padding: 15px;
  margin-bottom: 15px;
}

.ascension-section h4 {
  margin-bottom: 10px;
  color: var(--text-primary);
}

.ascension-level,
.ascension-points,
.ascension-bonus {
  font-size: 0.85rem;
  margin-bottom: 5px;
  color: var(--text-secondary);
}

.ascension-level span,
.ascension-points span,
.ascension-bonus span {
  color: var(--accent-cyan);
  font-weight: bold;
}

.ascension-req {
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-bottom: 10px;
}

.ascension-btn {
  width: 100%;
  padding: 10px;
  border: none;
  border-radius: 6px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.2s;
}

.ascension-btn:hover:not(:disabled) { transform: scale(1.02); }
.ascension-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.ascension-btn.prestige {
  background: linear-gradient(135deg, var(--accent-orange), var(--accent-red));
  color: white;
}

.ascension-btn.transcend {
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-pink));
  color: white;
}

.ascension-btn.ascend {
  background: linear-gradient(135deg, var(--accent-gold), var(--accent-orange));
  color: var(--bg-dark);
}

.eternal-upgrades {
  background: var(--bg-card);
  border-radius: 10px;
  padding: 15px;
}

.eternal-upgrades h4 {
  margin-bottom: 10px;
  color: var(--accent-gold);
}

.eternal-grid {
  display: grid;
  gap: 8px;
}

.eternal-item {
  background: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 10px;
  cursor: pointer;
  transition: all 0.2s;
}

.eternal-item:hover:not(.maxed) {
  border-color: var(--accent-gold);
}

.eternal-item.maxed {
  opacity: 0.6;
  cursor: default;
}

.eternal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 5px;
}

.eternal-name {
  font-size: 0.85rem;
  font-weight: bold;
}

.eternal-level {
  font-size: 0.75rem;
  color: var(--accent-cyan);
}

.eternal-desc {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.eternal-cost {
  font-size: 0.7rem;
  color: var(--accent-gold);
  margin-top: 3px;
}

/* ========== Challenge Runs Panel ========== */
.challenge-runs-header {
  text-align: center;
  margin-bottom: 20px;
}

.challenge-runs-header h3 {
  color: var(--accent-purple);
  margin-bottom: 5px;
}

.challenge-runs-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.active-challenge {
  background: linear-gradient(135deg, var(--bg-card), rgba(168, 85, 247, 0.1));
  border: 2px solid var(--accent-purple);
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 20px;
}

.active-challenge-header {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 15px;
}

.active-challenge-icon {
  font-size: 2.5rem;
}

.active-challenge-name {
  font-size: 1.1rem;
  font-weight: bold;
  color: var(--accent-purple);
}

.active-challenge-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.active-challenge-progress {
  margin-bottom: 15px;
}

.active-challenge-bar {
  height: 10px;
  background: var(--bg-dark);
  border-radius: 5px;
  overflow: hidden;
  margin-bottom: 5px;
}

.active-challenge-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-purple), var(--accent-pink));
  transition: width 0.3s;
}

.active-challenge-text {
  font-size: 0.85rem;
  color: var(--text-secondary);
  text-align: center;
}

.challenge-abandon-btn {
  width: 100%;
  padding: 10px;
  background: var(--bg-panel);
  border: 1px solid var(--accent-red);
  color: var(--accent-red);
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.85rem;
  transition: all 0.2s;
}

.challenge-abandon-btn:hover {
  background: var(--accent-red);
  color: white;
}

.challenge-runs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}

.challenge-run-card {
  background: var(--bg-card);
  border: 2px solid var(--border-subtle);
  border-radius: 10px;
  padding: 15px;
  transition: all 0.2s;
}

.challenge-run-card:hover:not(.completed):not(.active) {
  border-color: var(--accent-purple);
}

.challenge-run-card.completed {
  border-color: var(--accent-green);
  opacity: 0.7;
}

.challenge-run-card.active {
  border-color: var(--accent-purple);
  background: rgba(168, 85, 247, 0.1);
}

.challenge-run-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.challenge-run-icon {
  font-size: 1.8rem;
}

.challenge-run-info {
  flex: 1;
}

.challenge-run-name {
  font-weight: bold;
  font-size: 0.95rem;
}

.challenge-run-reward {
  font-size: 0.75rem;
  color: var(--accent-gold);
}

.challenge-run-desc {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 10px;
}

.challenge-run-btn {
  width: 100%;
  padding: 8px;
  border: none;
  border-radius: 6px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 0.85rem;
}

.challenge-run-btn.start {
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-pink));
  color: white;
}

.challenge-run-btn.start:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.challenge-run-btn.completed {
  background: var(--accent-green);
  color: white;
  cursor: default;
}

/* ========== Automation Panel ========== */
.automation-header {
  text-align: center;
  margin-bottom: 20px;
}

.automation-header h3 {
  color: var(--accent-cyan);
  margin-bottom: 5px;
}

.automation-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.auto-buyers-grid {
  display: grid;
  gap: 12px;
}

.auto-buyer-card {
  background: var(--bg-card);
  border: 2px solid var(--border-subtle);
  border-radius: 10px;
  padding: 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.2s;
}

.auto-buyer-card.owned {
  border-color: var(--accent-cyan);
}

.auto-buyer-card.owned.enabled {
  border-color: var(--accent-green);
  background: rgba(76, 175, 80, 0.1);
}

.auto-buyer-info {
  flex: 1;
}

.auto-buyer-name {
  font-weight: bold;
  font-size: 0.95rem;
  margin-bottom: 3px;
}

.auto-buyer-desc {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.auto-buyer-status {
  font-size: 0.75rem;
  color: var(--accent-green);
  margin-top: 3px;
}

.auto-buyer-controls {
  display: flex;
  gap: 8px;
  align-items: center;
}

.auto-buyer-btn {
  padding: 8px 16px;
  border: none;
  border-radius: 6px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 0.85rem;
}

.auto-buyer-btn.buy {
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
  color: white;
}

.auto-buyer-btn.buy:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.auto-buyer-btn.toggle {
  background: var(--bg-panel);
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
}

.auto-buyer-btn.toggle.enabled {
  background: var(--accent-green);
  color: white;
  border-color: var(--accent-green);
}

.auto-buyer-price {
  font-size: 0.8rem;
  color: var(--accent-gold);
  margin-top: 5px;
}

.auto-prestige-settings {
  background: var(--bg-card);
  border-radius: 10px;
  padding: 15px;
  margin-top: 20px;
}

.auto-prestige-settings h4 {
  color: var(--accent-purple);
  margin-bottom: 10px;
}

.auto-prestige-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.auto-prestige-row span {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.auto-prestige-row input {
  width: 80px;
  padding: 8px;
  background: var(--bg-dark);
  border: 1px solid var(--border-subtle);
  border-radius: 5px;
  color: var(--text-primary);
  font-size: 0.9rem;
  text-align: center;
}

/* ========== Mastery Panel ========== */
/* .mastery-header is defined in Mastery Panel Enhancement section below */

.mastery-total {
  font-size: 1.1rem;
  color: var(--accent-cyan);
  font-weight: bold;
}

.mastery-grid {
  display: grid;
  gap: 10px;
}

.mastery-card {
  background: var(--bg-card);
  border: 2px solid var(--border-subtle);
  border-radius: 10px;
  padding: 12px;
  transition: all 0.2s;
}

.mastery-card.active {
  border-color: var(--accent-cyan);
}

.mastery-card.maxed {
  border-color: var(--accent-gold);
  box-shadow: 0 0 10px rgba(255, 215, 0, 0.2);
}

.mastery-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.mastery-icon {
  font-size: 1.5rem;
}

.mastery-info {
  flex: 1;
}

.mastery-name {
  font-weight: bold;
  font-size: 0.9rem;
}

.mastery-level {
  font-size: 0.75rem;
  color: var(--accent-cyan);
}

.mastery-bar {
  height: 8px;
  background: var(--bg-dark);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 5px;
}

.mastery-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-purple));
  transition: width 0.3s;
}

.mastery-bar-fill.maxed {
  background: linear-gradient(90deg, var(--accent-gold), var(--accent-orange));
}

.mastery-desc {
  font-size: 0.7rem;
  color: var(--text-secondary);
}

.mastery-bonus {
  font-size: 0.7rem;
  color: var(--accent-green);
  margin-top: 3px;
}

.mastery-progress {
  font-size: 0.65rem;
  color: var(--text-dim);
  text-align: right;
}

/* ========== Boss Overlay ========== */
.boss-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1500;
}

.boss-overlay.active {
  display: flex;
}

.boss-container {
  background: var(--bg-panel);
  border: 3px solid var(--accent-red);
  border-radius: 15px;
  padding: 30px;
  text-align: center;
  max-width: 400px;
  width: 90%;
  animation: boss-appear 0.5s ease-out;
}

@keyframes boss-appear {
  from { transform: scale(0.5); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.boss-icon {
  font-size: 4rem;
  margin-bottom: 10px;
  animation: boss-bounce 1s infinite;
}

@keyframes boss-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.boss-name {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--accent-red);
  margin-bottom: 10px;
}

.boss-hp-bar {
  height: 20px;
  background: var(--bg-dark);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 10px;
  border: 2px solid var(--accent-red);
}

.boss-hp-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-red), var(--accent-orange));
  transition: width 0.1s;
}

.boss-hp-text {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 15px;
}

.boss-timer {
  font-size: 1.2rem;
  font-weight: bold;
  color: var(--accent-orange);
  margin-bottom: 15px;
}

.boss-reward {
  font-size: 0.85rem;
  color: var(--accent-gold);
}

.boss-attack-btn {
  background: linear-gradient(135deg, var(--accent-red), var(--accent-orange));
  border: none;
  color: white;
  padding: 15px 40px;
  font-size: 1.2rem;
  font-weight: bold;
  border-radius: 10px;
  cursor: pointer;
  margin-top: 15px;
  transition: transform 0.1s;
}

.boss-attack-btn:active {
  transform: scale(0.95);
}

/* Boss Phase Styles */
.boss-phase {
  font-size: 1rem;
  font-weight: bold;
  color: var(--text-primary);
  margin-bottom: 10px;
  padding: 5px 15px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 15px;
  display: inline-block;
}

/* Phase 2: Enraged Effect */
.boss-phase-enraged .boss-container {
  animation: boss-enraged-pulse 1s infinite;
}

.boss-phase-enraged .boss-icon {
  filter: drop-shadow(0 0 10px rgba(255, 0, 0, 0.8));
  animation: boss-bounce 0.5s infinite, boss-red-glow 1s infinite;
}

.boss-phase-enraged .boss-hp-fill {
  background: linear-gradient(90deg, #ff0000, #ff4444, #ff0000);
  animation: boss-hp-pulse 0.5s infinite;
}

@keyframes boss-enraged-pulse {
  0%, 100% {
    box-shadow: 0 0 20px rgba(255, 0, 0, 0.5);
  }
  50% {
    box-shadow: 0 0 40px rgba(255, 0, 0, 0.8);
  }
}

@keyframes boss-red-glow {
  0%, 100% {
    filter: drop-shadow(0 0 10px rgba(255, 0, 0, 0.8));
  }
  50% {
    filter: drop-shadow(0 0 20px rgba(255, 0, 0, 1));
  }
}

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

/* Phase 3: Vulnerable Effect */
.boss-phase-vulnerable .boss-container {
  animation: boss-vulnerable-flicker 0.3s infinite;
}

.boss-phase-vulnerable .boss-icon {
  filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.8));
  animation: boss-bounce 1s infinite, boss-vulnerable-fade 0.5s infinite;
}

.boss-phase-vulnerable .boss-hp-fill {
  background: linear-gradient(90deg, #ffaa00, #ffdd00, #ffaa00);
  animation: boss-vulnerable-shimmer 1s infinite;
}

@keyframes boss-vulnerable-flicker {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.85;
  }
}

@keyframes boss-vulnerable-fade {
  0%, 100% {
    opacity: 1;
    filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.8));
  }
  50% {
    opacity: 0.7;
    filter: drop-shadow(0 0 5px rgba(255, 215, 0, 0.5));
  }
}

@keyframes boss-vulnerable-shimmer {
  0%, 100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

/* Screen Shake Effect */
.boss-screen-shake {
  animation: boss-screen-shake-anim 0.5s;
}

@keyframes boss-screen-shake-anim {
  0%, 100% { transform: translateX(0); }
  10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
  20%, 40%, 60%, 80% { transform: translateX(5px); }
}

/* Phase Flash Effect */
.boss-phase-flash .boss-container {
  animation: boss-phase-flash-anim 0.3s;
}

@keyframes boss-phase-flash-anim {
  0%, 100% {
    background: rgba(0, 0, 0, 0.95);
  }
  50% {
    background: rgba(255, 255, 255, 0.3);
  }
}

/* ========== Dynamic Boss AI System ========== */
.boss-ai-indicator {
  font-size: 0.85rem;
  color: var(--accent-purple);
  margin-bottom: 10px;
  padding: 5px 10px;
  background: rgba(168, 85, 247, 0.2);
  border-radius: 8px;
  border: 1px solid var(--accent-purple);
}

.boss-ai-indicator span:first-child {
  font-weight: bold;
}

.boss-ai-indicator span:last-child {
  margin-left: 10px;
  color: var(--accent-cyan);
}

/* Boss Telegraph Warning */
.boss-telegraph {
  position: absolute;
  top: -80px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-dark);
  border: 3px solid;
  border-radius: 12px;
  padding: 15px 25px;
  text-align: center;
  min-width: 250px;
  animation: boss-telegraph-pulse 1s infinite;
  z-index: 10;
  display: none;
}

.boss-telegraph-shield {
  border-color: #4a90e2;
  box-shadow: 0 0 20px rgba(74, 144, 226, 0.5);
}

.boss-telegraph-heal {
  border-color: #4caf50;
  box-shadow: 0 0 20px rgba(76, 175, 80, 0.5);
}

.boss-telegraph-rage {
  border-color: #ff4444;
  box-shadow: 0 0 20px rgba(255, 68, 68, 0.5);
}

.boss-telegraph-weakness {
  border-color: #4ade80;
  box-shadow: 0 0 20px rgba(74, 222, 128, 0.5);
}

.boss-telegraph-icon {
  font-size: 2rem;
  margin-bottom: 5px;
}

.boss-telegraph-text {
  font-weight: bold;
  font-size: 1.1rem;
  color: var(--text-primary);
  margin-bottom: 5px;
}

.boss-telegraph-timer {
  font-size: 0.9rem;
  color: var(--accent-orange);
  font-weight: bold;
}

@keyframes boss-telegraph-pulse {
  0%, 100% {
    transform: translateX(-50%) scale(1);
    opacity: 1;
  }
  50% {
    transform: translateX(-50%) scale(1.05);
    opacity: 0.9;
  }
}

/* Boss AI Phase Effects */
.boss-ai-shield .boss-container {
  border-color: #4a90e2;
  box-shadow: 0 0 30px rgba(74, 144, 226, 0.6);
  animation: boss-shield-glow 1.5s infinite;
}

.boss-ai-shield .boss-icon {
  filter: drop-shadow(0 0 15px rgba(74, 144, 226, 0.8));
}

@keyframes boss-shield-glow {
  0%, 100% {
    box-shadow: 0 0 30px rgba(74, 144, 226, 0.6);
  }
  50% {
    box-shadow: 0 0 50px rgba(74, 144, 226, 0.9);
  }
}

.boss-ai-heal .boss-container {
  border-color: #4caf50;
  animation: boss-heal-pulse 1s infinite;
}

.boss-ai-heal .boss-icon {
  filter: drop-shadow(0 0 15px rgba(76, 175, 80, 0.8));
  animation: boss-bounce 0.5s infinite;
}

@keyframes boss-heal-pulse {
  0%, 100% {
    box-shadow: 0 0 20px rgba(76, 175, 80, 0.5);
  }
  50% {
    box-shadow: 0 0 40px rgba(76, 175, 80, 0.8);
  }
}

.boss-ai-rage .boss-container {
  border-color: #ff4444;
  animation: boss-rage-shake 0.3s infinite;
  box-shadow: 0 0 40px rgba(255, 68, 68, 0.7);
}

.boss-ai-rage .boss-icon {
  filter: drop-shadow(0 0 20px rgba(255, 68, 68, 1));
  animation: boss-rage-intense 0.2s infinite;
}

@keyframes boss-rage-shake {
  0%, 100% { transform: translate(0, 0); }
  25% { transform: translate(-3px, 2px); }
  50% { transform: translate(3px, -2px); }
  75% { transform: translate(-2px, -3px); }
}

@keyframes boss-rage-intense {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
}

.boss-ai-weakness .boss-container {
  border-color: #4ade80;
  animation: boss-weakness-flicker 0.5s infinite;
  box-shadow: 0 0 50px rgba(74, 222, 128, 0.8);
}

.boss-ai-weakness .boss-icon {
  filter: drop-shadow(0 0 20px rgba(74, 222, 128, 1));
  animation: boss-weakness-glow 0.3s infinite;
}

.boss-ai-weakness .boss-hp-fill {
  background: linear-gradient(90deg, #4ade80, #22c55e, #4ade80);
  animation: boss-weakness-shimmer 1s infinite;
}

@keyframes boss-weakness-flicker {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

@keyframes boss-weakness-glow {
  0%, 100% {
    filter: drop-shadow(0 0 20px rgba(74, 222, 128, 1));
  }
  50% {
    filter: drop-shadow(0 0 30px rgba(74, 222, 128, 1.5));
  }
}

@keyframes boss-weakness-shimmer {
  0%, 100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

/* ========== Speed Trap Indicator ========== */
.speed-trap-indicator {
  position: fixed;
  top: 100px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-pink));
  padding: 10px 25px;
  border-radius: 30px;
  display: none;
  align-items: center;
  gap: 10px;
  z-index: 600;
  animation: speed-trap-pulse 0.5s infinite;
  border: 2px solid white;
}

.speed-trap-indicator.active {
  display: flex;
}

@keyframes speed-trap-pulse {
  0%, 100% { box-shadow: 0 0 20px var(--accent-purple); }
  50% { box-shadow: 0 0 40px var(--accent-purple); }
}

.speed-trap-icon {
  font-size: 1.3rem;
}

.speed-trap-name {
  font-weight: bold;
  font-size: 0.9rem;
}

.speed-trap-timer {
  font-family: 'Courier New', monospace;
  font-size: 1rem;
  font-weight: bold;
}

/* ========== Bonus Round Overlay ========== */
.bonus-round-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s;
  z-index: 550;
  background: radial-gradient(ellipse at center, transparent 30%, rgba(168, 85, 247, 0.2) 100%);
}

.bonus-round-overlay.active {
  opacity: 1;
  animation: bonus-round-pulse 0.3s infinite;
}

@keyframes bonus-round-pulse {
  0%, 100% { background: radial-gradient(ellipse at center, transparent 30%, rgba(168, 85, 247, 0.2) 100%); }
  50% { background: radial-gradient(ellipse at center, transparent 30%, rgba(168, 85, 247, 0.35) 100%); }
}

.bonus-round-banner {
  position: fixed;
  top: 60px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, var(--accent-gold), var(--accent-orange));
  color: var(--bg-dark);
  padding: 12px 30px;
  border-radius: 30px;
  font-weight: bold;
  font-size: 1.1rem;
  display: none;
  align-items: center;
  gap: 10px;
  z-index: 650;
  animation: banner-bounce 0.5s infinite;
}

.bonus-round-banner.active {
  display: flex;
}

@keyframes banner-bounce {
  0%, 100% { transform: translateX(-50%) scale(1); }
  50% { transform: translateX(-50%) scale(1.05); }
}

/* ========== Responsive Adjustments ========== */

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

  .sidebar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: auto;
    max-height: 40vh;
    z-index: 100;
    border-top: 2px solid var(--border-subtle);
    border-radius: 15px 15px 0 0;
  }

  .customize-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .shop-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  }

  .dashboard {
    flex-wrap: wrap;
    gap: 10px;
    padding: 15px;
  }

  .gauge {
    width: 80px;
    height: 80px;
  }
}

/* Mobile (600px) */
@media (max-width: 600px) {
  .combo-display, .tournament-timer {
    position: static;
    transform: none;
    margin: 10px auto;
  }

  .pedal-section {
    flex-wrap: wrap;
  }

  .car-collection-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .customize-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .tab-btn {
    padding: 10px 12px;
    font-size: 0.75rem;
    white-space: nowrap;
  }

  .sidebar-tabs {
    flex-wrap: wrap;
  }

  .sidebar-tab {
    padding: 8px 5px;
    font-size: 0.7rem;
  }

  .gas-pedal {
    width: 100px;
    height: 100px;
  }

  .gauge {
    width: 60px;
    height: 60px;
  }

  .gauge-value {
    font-size: 0.8rem;
  }

  .header .stats-row {
    gap: 10px;
  }

  .stat-box .value {
    font-size: 1.2rem;
  }

  .shop-grid {
    grid-template-columns: 1fr;
  }

  .modal {
    width: 95%;
    max-width: none;
    padding: 15px;
  }

  .modal-wide {
    width: 95%;
  }
}

/* Mobile landscape */
@media (max-width: 900px) and (orientation: landscape) {
  .dashboard {
    flex-direction: row;
    padding: 10px;
  }

  .gas-pedal {
    width: 80px;
    height: 80px;
  }

  .sidebar {
    max-height: 50vh;
  }
}

/* Small mobile (480px) */
@media (max-width: 480px) {
  .title {
    font-size: 1.5rem;
  }

  .stat-box .value {
    font-size: 1rem;
  }

  .stat-box .label {
    font-size: 0.65rem;
  }

  .gas-pedal {
    width: 90px;
    height: 90px;
  }

  .header-buttons {
    gap: 5px;
  }

  .header-btn {
    padding: 5px 8px;
    font-size: 0.9rem;
  }
}

/* ========== Events Panel ========== */
.events-header {
  text-align: center;
  margin-bottom: 15px;
}

.events-header h3 {
  color: var(--accent-purple);
  margin: 0;
}

.events-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}

.event-item {
  background: var(--bg-card);
  border-radius: 8px;
  padding: 12px;
  border: 2px solid var(--border-subtle);
  transition: all 0.3s;
}

.event-item.active {
  border-color: var(--accent-yellow);
  background: rgba(255, 215, 0, 0.1);
  animation: event-pulse 1.5s infinite;
}

@keyframes event-pulse {
  0%, 100% { box-shadow: 0 0 5px rgba(255, 215, 0, 0.3); }
  50% { box-shadow: 0 0 15px rgba(255, 215, 0, 0.6); }
}

.event-status {
  display: flex;
  align-items: center;
  gap: 10px;
}

.event-icon {
  font-size: 1.5rem;
}

.event-name {
  flex: 1;
  font-weight: bold;
  font-size: 0.9rem;
}

.event-timer {
  font-family: monospace;
  font-size: 0.9rem;
  color: var(--text-secondary);
  background: var(--bg-panel);
  padding: 4px 8px;
  border-radius: 4px;
}

.event-item.active .event-timer {
  color: var(--accent-yellow);
  font-weight: bold;
}

.events-stats {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
  padding: 12px;
}

.events-stats h4 {
  margin: 0 0 10px 0;
  color: var(--accent);
  font-size: 0.9rem;
}

.event-stat {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 0.85rem;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-subtle);
}

.event-stat:last-child {
  border-bottom: none;
}

.event-stat span {
  color: var(--text-primary);
  font-weight: bold;
}

/* ========== Phase 3: Daily Login Rewards ========== */
.modal-wide {
  max-width: 600px;
  width: 95%;
}

.login-streak {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 20px;
  font-size: 1.2rem;
  color: var(--accent-orange);
}

.streak-icon {
  font-size: 1.5rem;
  animation: flicker 0.5s infinite;
}

@keyframes flicker {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

.daily-rewards-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
  margin-bottom: 20px;
}

.daily-reward-item {
  background: var(--bg-card);
  border: 2px solid var(--border-subtle);
  border-radius: 8px;
  padding: 10px 5px;
  text-align: center;
  transition: all 0.2s;
}

.daily-reward-item.claimed {
  background: rgba(76, 175, 80, 0.2);
  border-color: var(--accent-green);
}

.daily-reward-item.available {
  border-color: var(--accent-gold);
  animation: pulse-glow 1.5s infinite;
}

.daily-reward-item.locked {
  opacity: 0.5;
}

.daily-reward-day {
  font-size: 0.7rem;
  color: var(--text-secondary);
  margin-bottom: 5px;
}

.daily-reward-icon {
  font-size: 1.5rem;
  margin-bottom: 5px;
}

.daily-reward-amount {
  font-size: 0.7rem;
  color: var(--text-primary);
}

.weekly-chest {
  text-align: center;
  padding: 15px;
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.1), rgba(168, 85, 247, 0.1));
  border-radius: 10px;
  margin-top: 15px;
}

.weekly-chest-icon {
  font-size: 3rem;
  margin-bottom: 10px;
}

.weekly-chest-text {
  color: var(--text-secondary);
  margin-bottom: 10px;
}

/* ========== Phase 3: Mini-Games ========== */
.mini-games-header h3 {
  margin: 0 0 5px 0;
  color: var(--accent-purple);
}

.mini-games-desc {
  color: var(--text-secondary);
  font-size: 0.85rem;
  margin-bottom: 15px;
}

.mini-games-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 20px;
}

.mini-game-card {
  background: var(--bg-card);
  border: 2px solid var(--border-subtle);
  border-radius: 12px;
  padding: 15px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
}

.mini-game-card:hover:not(.locked):not(.cooldown) {
  transform: translateY(-2px);
  border-color: var(--accent-purple);
  box-shadow: 0 5px 20px rgba(168, 85, 247, 0.3);
}

.mini-game-card.locked {
  opacity: 0.5;
  cursor: not-allowed;
}

.mini-game-card.cooldown {
  opacity: 0.7;
}

.mini-game-icon {
  font-size: 2.5rem;
  margin-bottom: 10px;
}

.mini-game-name {
  font-weight: bold;
  color: var(--text-primary);
  margin-bottom: 5px;
}

.mini-game-desc {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.mini-game-cooldown {
  font-size: 0.75rem;
  color: var(--accent-orange);
  margin-top: 5px;
}

.mini-games-highscores {
  background: var(--bg-panel);
  border-radius: 10px;
  padding: 15px;
}

.mini-games-highscores h4 {
  margin: 0 0 10px 0;
  color: var(--accent-gold);
}

.highscores-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.highscore-item {
  display: flex;
  justify-content: space-between;
  padding: 8px 12px;
  background: var(--bg-card);
  border-radius: 6px;
}

.highscore-name {
  color: var(--text-secondary);
}

.highscore-value {
  color: var(--accent-gold);
  font-weight: bold;
}

/* Drag Race Mini-Game */
.drag-race-game {
  padding: 20px;
}

.drag-race-track {
  background: #333;
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
}

.drag-car-lane {
  height: 60px;
  background: linear-gradient(90deg, #444 0%, #666 100%);
  margin-bottom: 10px;
  border-radius: 5px;
  position: relative;
  display: flex;
  align-items: center;
}

.drag-car-lane:last-child {
  margin-bottom: 0;
}

.drag-car {
  font-size: 2rem;
  position: absolute;
  left: 10%;
  transition: left 0.1s linear;
}

.drag-gear-display {
  text-align: center;
  margin-bottom: 15px;
  font-size: 1.5rem;
}

.drag-gear-label {
  color: var(--text-secondary);
}

.drag-gear-value {
  color: var(--accent-cyan);
  font-weight: bold;
  font-size: 2rem;
}

.drag-rpm-bar {
  height: 40px;
  background: var(--bg-card);
  border-radius: 20px;
  position: relative;
  overflow: hidden;
  margin-bottom: 15px;
}

.drag-rpm-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-green) 0%, var(--accent-gold) 50%, var(--accent-red) 100%);
  width: 0%;
  transition: width 0.05s linear;
}

.drag-rpm-perfect {
  position: absolute;
  top: 0;
  width: 15%;
  height: 100%;
  background: rgba(76, 175, 80, 0.5);
  border-left: 2px solid var(--accent-green);
  border-right: 2px solid var(--accent-green);
  left: 60%;
}

.drag-instruction {
  text-align: center;
  color: var(--text-secondary);
  margin-bottom: 15px;
}

.drag-shift-btn {
  width: 100%;
  padding: 15px;
  font-size: 1.5rem;
  font-weight: bold;
  background: linear-gradient(180deg, var(--accent-orange), #cc4400);
  border: none;
  border-radius: 10px;
  color: white;
  cursor: pointer;
  transition: transform 0.1s;
}

.drag-shift-btn:active {
  transform: scale(0.95);
}

/* Drift Challenge Mini-Game */
.drift-game {
  padding: 20px;
}

.drift-track {
  height: 200px;
  background: linear-gradient(180deg, #333 0%, #555 100%);
  border-radius: 10px;
  position: relative;
  overflow: hidden;
  margin-bottom: 15px;
}

.drift-car {
  font-size: 2rem;
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  transition: left 0.1s;
}

.drift-zone {
  position: absolute;
  width: 60px;
  height: 100%;
  background: rgba(76, 175, 80, 0.3);
  border-left: 2px dashed var(--accent-green);
  border-right: 2px dashed var(--accent-green);
  transition: left 0.5s ease-out;
}

.drift-score-display {
  text-align: center;
  font-size: 1.5rem;
  margin-bottom: 10px;
}

.drift-score-label {
  color: var(--text-secondary);
}

.drift-score-value {
  color: var(--accent-gold);
  font-weight: bold;
}

.drift-timer {
  text-align: center;
  font-size: 1.2rem;
  color: var(--accent-cyan);
  margin-bottom: 15px;
}

.drift-controls {
  display: flex;
  gap: 20px;
}

.drift-btn {
  flex: 1;
  padding: 15px;
  font-size: 1.2rem;
  font-weight: bold;
  background: var(--bg-card);
  border: 2px solid var(--accent-cyan);
  border-radius: 10px;
  color: var(--accent-cyan);
  cursor: pointer;
  transition: all 0.1s;
}

.drift-btn:active {
  background: var(--accent-cyan);
  color: var(--bg-dark);
}

/* Time Trial Mini-Game */
.time-trial-game {
  padding: 20px;
}

.time-trial-display {
  display: flex;
  justify-content: space-around;
  margin-bottom: 20px;
}

.time-trial-target,
.time-trial-current,
.time-trial-timer {
  text-align: center;
}

.time-trial-label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 5px;
}

.time-trial-value {
  font-size: 2rem;
  font-weight: bold;
  color: var(--accent-cyan);
}

.time-trial-progress {
  height: 20px;
  background: var(--bg-card);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 20px;
}

.time-trial-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-green));
  width: 0%;
  transition: width 0.1s;
}

.time-trial-click-btn {
  width: 100%;
  padding: 30px;
  font-size: 2rem;
  font-weight: bold;
  background: linear-gradient(180deg, var(--accent-green), #2e7d32);
  border: none;
  border-radius: 15px;
  color: white;
  cursor: pointer;
  transition: transform 0.05s;
}

.time-trial-click-btn:active {
  transform: scale(0.98);
}

/* Nitro Rush Mini-Game */
.nitro-rush-game {
  padding: 20px;
}

.nitro-rush-field {
  height: 300px;
  background: linear-gradient(180deg, #1a1a2e 0%, #0a0a12 100%);
  border-radius: 10px;
  position: relative;
  overflow: hidden;
  margin-bottom: 15px;
}

.nitro-target {
  position: absolute;
  width: 50px;
  height: 50px;
  font-size: 2rem;
  cursor: pointer;
  animation: pop-in 0.2s ease-out;
  text-align: center;
  line-height: 50px;
}

@keyframes pop-in {
  0% { transform: scale(0); }
  50% { transform: scale(1.2); }
  100% { transform: scale(1); }
}

.nitro-rush-stats {
  display: flex;
  justify-content: space-around;
  background: var(--bg-card);
  padding: 15px;
  border-radius: 10px;
}

.nitro-rush-stat {
  text-align: center;
}

.nitro-rush-stat span:first-child {
  color: var(--text-secondary);
  display: block;
  font-size: 0.85rem;
}

.nitro-rush-stat span:last-child {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--accent-cyan);
}

/* ========== Phase 3: Skill Tree ========== */
.skill-tree-header h3 {
  margin: 0 0 5px 0;
  color: var(--accent-purple);
}

.skill-tree-points {
  color: var(--accent-cyan);
  font-size: 0.9rem;
  margin-bottom: 15px;
}

.skill-tree-branches {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.skill-branch {
  background: var(--bg-card);
  border-radius: 10px;
  padding: 12px;
  border-left: 4px solid;
}

.skill-branch.speed { border-color: var(--accent-cyan); }
.skill-branch.wealth { border-color: var(--accent-gold); }
.skill-branch.luck { border-color: var(--accent-green); }

.skill-branch-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.skill-branch-icon {
  font-size: 1.3rem;
}

.skill-branch-name {
  font-weight: bold;
  color: var(--text-primary);
}

.skill-branch-nodes {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.skill-node {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  background: var(--bg-panel);
  border-radius: 6px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.2s;
}

.skill-node:hover:not(.locked):not(.unlocked) {
  border-color: var(--accent-purple);
}

.skill-node.unlocked {
  background: rgba(76, 175, 80, 0.2);
  border-color: var(--accent-green);
}

.skill-node.locked {
  opacity: 0.5;
  cursor: not-allowed;
}

.skill-node.can-unlock {
  border-color: var(--accent-gold);
  animation: pulse-glow 1.5s infinite;
}

.skill-node-icon {
  font-size: 1.2rem;
}

.skill-node-info {
  flex: 1;
}

.skill-node-name {
  font-size: 0.85rem;
  font-weight: bold;
  color: var(--text-primary);
}

.skill-node-desc {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.skill-node-cost {
  font-size: 0.75rem;
  color: var(--accent-gold);
}

/* ========== Phase 3: Prestige Upgrades ========== */
.prestige-upgrades-header h3 {
  margin: 0 0 5px 0;
  color: var(--accent-gold);
}

.prestige-points-display {
  color: var(--accent-gold);
  font-size: 0.9rem;
  margin-bottom: 15px;
}

.prestige-upgrades-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.prestige-upgrade-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  background: var(--bg-card);
  border-radius: 8px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.2s;
}

.prestige-upgrade-item:hover:not(.maxed) {
  border-color: var(--accent-gold);
}

.prestige-upgrade-item.maxed {
  opacity: 0.7;
  border-color: var(--accent-green);
}

.prestige-upgrade-icon {
  font-size: 1.3rem;
}

.prestige-upgrade-info {
  flex: 1;
}

.prestige-upgrade-name {
  font-size: 0.85rem;
  font-weight: bold;
  color: var(--text-primary);
}

.prestige-upgrade-desc {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.prestige-upgrade-level {
  font-size: 0.85rem;
  font-weight: bold;
  color: var(--accent-gold);
}

.prestige-upgrade-cost {
  font-size: 0.75rem;
  color: var(--accent-cyan);
}

/* ========== Phase 3: Rebirth ========== */
.ascension-btn.rebirth {
  background: linear-gradient(180deg, #9c27b0, #6a0dad);
}

.ascension-btn.rebirth:hover {
  background: linear-gradient(180deg, #ab47bc, #7b1fa2);
}

.rebirth-upgrades {
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px solid var(--border-subtle);
}

.rebirth-upgrades h4 {
  margin: 0 0 10px 0;
  color: var(--accent-purple);
  font-size: 0.9rem;
}

.rebirth-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.rebirth-upgrade-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  background: var(--bg-card);
  border-radius: 6px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.2s;
}

.rebirth-upgrade-item:hover:not(.maxed) {
  border-color: var(--accent-purple);
}

.rebirth-upgrade-item.maxed {
  opacity: 0.7;
  border-color: var(--accent-green);
}

/* ========== Phase 3: Story Panel ========== */
.story-header h3 {
  margin: 0 0 5px 0;
  color: var(--accent-gold);
}

.story-progress {
  color: var(--text-secondary);
  font-size: 0.85rem;
  margin-bottom: 15px;
}

.story-log-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.story-entry {
  background: var(--bg-card);
  border-radius: 8px;
  padding: 12px;
  border-left: 3px solid var(--accent-gold);
}

.story-entry-title {
  font-weight: bold;
  color: var(--accent-gold);
  margin-bottom: 4px;
}

.story-entry-miles {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.story-entry-text {
  font-size: 0.85rem;
  color: var(--text-primary);
  line-height: 1.4;
}

.story-content {
  background: var(--bg-card);
  padding: 20px;
  border-radius: 10px;
  margin: 15px 0;
  line-height: 1.6;
  font-size: 1rem;
  border-left: 4px solid var(--accent-gold);
}

/* ========== Animation Helpers ========== */
@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 5px rgba(255, 215, 0, 0.3); }
  50% { box-shadow: 0 0 20px rgba(255, 215, 0, 0.6); }
}

/* ========== Expedition System ========== */
.expedition-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.expedition-header h4 {
  margin: 0;
  color: var(--accent-cyan);
}

.expedition-drivers {
  font-size: 0.85rem;
  color: var(--text-secondary);
  background: var(--bg-card);
  padding: 5px 10px;
  border-radius: 5px;
}

.active-expeditions,
.available-expeditions {
  margin-bottom: 20px;
}

.active-expeditions h5,
.available-expeditions h5 {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 10px;
  padding-bottom: 5px;
  border-bottom: 1px solid var(--border-subtle);
}

.expedition-active-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--bg-card);
  border-radius: 8px;
  border: 2px solid var(--accent-cyan);
  margin-bottom: 8px;
}

.expedition-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--bg-card);
  border-radius: 8px;
  border: 2px solid var(--border-subtle);
  margin-bottom: 8px;
  transition: all 0.2s;
}

.expedition-card:hover:not(.disabled) {
  border-color: var(--accent-cyan);
}

.expedition-card.disabled {
  opacity: 0.5;
}

.expedition-icon {
  font-size: 1.8rem;
}

.expedition-info {
  flex: 1;
}

.expedition-name {
  font-weight: bold;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.expedition-req,
.expedition-duration,
.expedition-rewards,
.expedition-time {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.expedition-rewards {
  color: var(--accent-gold);
}

.expedition-progress-bar {
  height: 6px;
  background: var(--bg-panel);
  border-radius: 3px;
  margin: 8px 0;
  overflow: hidden;
}

.expedition-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-green));
  transition: width 0.5s;
}

.expedition-start-btn,
.expedition-claim-btn {
  padding: 8px 16px;
  border: none;
  border-radius: 6px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.2s;
}

.expedition-start-btn {
  background: var(--accent-cyan);
  color: var(--bg-dark);
}

.expedition-start-btn:hover:not(:disabled) {
  background: var(--accent-green);
}

.expedition-start-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.expedition-claim-btn {
  background: var(--accent-gold);
  color: var(--bg-dark);
  animation: pulse-glow 1s infinite;
}

.expedition-claim-btn:hover {
  background: #ffd700;
}

.expedition-empty {
  text-align: center;
  color: var(--text-dim);
  padding: 15px;
  font-style: italic;
}

/* ========== Milestone Celebration ========== */
.milestone-celebration {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  animation: fadeIn 0.3s;
}

.milestone-celebration-content {
  background: linear-gradient(135deg, var(--bg-panel), var(--bg-card));
  border: 3px solid var(--accent-gold);
  border-radius: 20px;
  padding: 40px 60px;
  text-align: center;
  animation: celebrationPop 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 0 50px rgba(255, 215, 0, 0.5);
}

@keyframes celebrationPop {
  0% { transform: scale(0); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.milestone-celebration .milestone-icon {
  font-size: 4rem;
  margin-bottom: 15px;
  animation: iconBounce 0.5s ease-out;
}

@keyframes iconBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-20px); }
}

.milestone-celebration .milestone-title {
  font-size: 1.5rem;
  color: var(--accent-gold);
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 3px;
  margin-bottom: 10px;
}

.milestone-celebration .milestone-name {
  font-size: 2rem;
  color: var(--text-primary);
  font-weight: bold;
  margin-bottom: 15px;
}

.milestone-celebration .milestone-reward {
  font-size: 1.2rem;
  color: var(--accent-cyan);
  margin-bottom: 25px;
}

.milestone-close-btn {
  padding: 12px 40px;
  font-size: 1.1rem;
  font-weight: bold;
  background: linear-gradient(135deg, var(--accent-gold), #ffa500);
  border: none;
  border-radius: 25px;
  color: var(--bg-dark);
  cursor: pointer;
  transition: all 0.2s;
}

.milestone-close-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
}

/* ========== Mastery Panel Enhancement ========== */
.mastery-header {
  text-align: center;
  margin-bottom: 15px;
}

.mastery-header h4 {
  color: var(--accent-purple);
  margin: 0 0 5px 0;
}

.mastery-header p {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin: 0;
}

.mastery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.mastery-card {
  background: var(--bg-card);
  border: 2px solid var(--border-subtle);
  border-radius: 10px;
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all 0.2s;
}

.mastery-card:hover {
  transform: translateY(-2px);
}

.mastery-icon {
  font-size: 1.8rem;
}

.mastery-info {
  flex: 1;
}

.mastery-name {
  font-size: 0.85rem;
  font-weight: bold;
  color: var(--text-primary);
}

.mastery-level {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.mastery-progress-bar {
  height: 5px;
  background: var(--bg-panel);
  border-radius: 3px;
  margin-bottom: 4px;
  overflow: hidden;
}

.mastery-progress-fill {
  height: 100%;
  transition: width 0.3s;
}

.mastery-bonus {
  font-size: 0.75rem;
  color: var(--accent-green);
}

/* ========== Enhanced Visual Effects ========== */

/* Animated Icon Bounce */
@keyframes iconBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

@keyframes iconPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.1); opacity: 0.8; }
}

@keyframes iconSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes iconShake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-3px) rotate(-5deg); }
  75% { transform: translateX(3px) rotate(5deg); }
}

@keyframes iconFloat {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  25% { transform: translateY(-3px) rotate(2deg); }
  75% { transform: translateY(3px) rotate(-2deg); }
}

@keyframes glowPulse {
  0%, 100% { filter: drop-shadow(0 0 5px currentColor); }
  50% { filter: drop-shadow(0 0 15px currentColor) drop-shadow(0 0 25px currentColor); }
}

@keyframes rainbowGlow {
  0% { filter: drop-shadow(0 0 10px #ff0000); }
  17% { filter: drop-shadow(0 0 10px #ff8800); }
  33% { filter: drop-shadow(0 0 10px #ffff00); }
  50% { filter: drop-shadow(0 0 10px #00ff00); }
  67% { filter: drop-shadow(0 0 10px #0088ff); }
  83% { filter: drop-shadow(0 0 10px #8800ff); }
  100% { filter: drop-shadow(0 0 10px #ff0000); }
}

/* Animated Icons Classes */
.icon-bounce { animation: iconBounce 1s ease-in-out infinite; }
.icon-pulse { animation: iconPulse 1.5s ease-in-out infinite; }
.icon-spin { animation: iconSpin 3s linear infinite; }
.icon-shake { animation: iconShake 0.5s ease-in-out infinite; }
.icon-float { animation: iconFloat 2s ease-in-out infinite; }
.icon-glow { animation: glowPulse 2s ease-in-out infinite; }
.icon-rainbow { animation: rainbowGlow 3s linear infinite; }

/* Dashboard Decorative Elements */
.dashboard-decor {
  position: absolute;
  pointer-events: none;
  opacity: 0.6;
}

.decor-bolt {
  font-size: 1.5rem;
  color: var(--accent-cyan);
  animation: iconFloat 2s ease-in-out infinite;
}

.decor-gear {
  font-size: 2rem;
  color: var(--accent-orange);
  animation: iconSpin 8s linear infinite;
}

.decor-star {
  font-size: 1rem;
  color: var(--accent-gold);
  animation: iconPulse 1.5s ease-in-out infinite;
}

/* Floating Decorations Container */
.floating-decor {
  position: fixed;
  pointer-events: none;
  z-index: 1;
}

.floating-icon {
  position: absolute;
  opacity: 0.15;
  font-size: 2rem;
  animation: floatAround 20s ease-in-out infinite;
}

@keyframes floatAround {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  25% { transform: translate(10px, -15px) rotate(10deg); }
  50% { transform: translate(-5px, 5px) rotate(-5deg); }
  75% { transform: translate(-10px, -10px) rotate(5deg); }
}

/* Enhanced Card Styles */
.card-glow {
  position: relative;
  overflow: hidden;
}

.card-glow::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: conic-gradient(transparent, rgba(0, 212, 255, 0.1), transparent 30%);
  animation: cardRotate 4s linear infinite;
  opacity: 0;
  transition: opacity 0.3s;
}

.card-glow:hover::before {
  opacity: 1;
}

@keyframes cardRotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Shimmer Effect */
.shimmer {
  position: relative;
  overflow: hidden;
}

.shimmer::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  animation: shimmerSlide 3s infinite;
}

@keyframes shimmerSlide {
  0% { left: -100%; }
  100% { left: 100%; }
}

/* Enhanced Button Effects */
.btn-fancy {
  position: relative;
  overflow: hidden;
  transition: all 0.3s var(--transition-bounce);
}

.btn-fancy::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.btn-fancy:hover::before {
  width: 300%;
  height: 300%;
}

.btn-fancy:active {
  transform: scale(0.95);
}

/* Neon Text Effects - Enhanced */
.neon-text {
  text-shadow:
    0 0 5px currentColor,
    0 0 10px currentColor,
    0 0 20px currentColor,
    0 0 40px currentColor;
  animation: neonPulse 2s ease-in-out infinite;
}

@keyframes neonPulse {
  0%, 100% {
    text-shadow:
      0 0 5px currentColor,
      0 0 10px currentColor,
      0 0 20px currentColor,
      0 0 40px currentColor;
  }
  50% {
    text-shadow:
      0 0 8px currentColor,
      0 0 15px currentColor,
      0 0 30px currentColor,
      0 0 60px currentColor;
  }
}

.neon-cyan { color: var(--accent-cyan); }
.neon-gold { color: var(--accent-gold); }
.neon-green { color: var(--accent-green); }
.neon-purple { color: var(--accent-purple); }
.neon-orange { color: var(--accent-orange); }

/* Neon flicker effect on hover */
.neon-flicker:hover {
  animation: neonFlicker 0.15s ease-in-out infinite;
}

@keyframes neonFlicker {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.85; }
  75% { opacity: 0.95; }
}

/* Number value transitions */
.value-display {
  display: inline-block;
  transition: transform 0.2s ease-out, color 0.3s;
}

.value-display.value-increasing {
  animation: valueIncrease 0.3s ease-out;
  color: var(--accent-green);
}

.value-display.value-decreasing {
  animation: valueDecrease 0.3s ease-out;
  color: var(--accent-red);
}

@keyframes valueIncrease {
  0% { transform: scale(1); }
  50% { transform: scale(1.15); }
  100% { transform: scale(1); }
}

@keyframes valueDecrease {
  0% { transform: scale(1); }
  50% { transform: scale(0.9); }
  100% { transform: scale(1); }
}

/* Major milestone celebration text */
.value-milestone {
  animation: milestonePop 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  color: var(--accent-gold) !important;
  text-shadow:
    0 0 10px var(--accent-gold),
    0 0 20px var(--accent-gold),
    0 0 40px var(--accent-gold),
    0 0 80px rgba(255, 215, 0, 0.5);
}

@keyframes milestonePop {
  0% { transform: scale(1); }
  30% { transform: scale(1.3); }
  60% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

/* Tier-colored values */
.value-tier-bronze { color: var(--tier-bronze); }
.value-tier-silver { color: var(--tier-silver); }
.value-tier-gold { color: var(--tier-gold); text-shadow: 0 0 10px rgba(255, 215, 0, 0.5); }
.value-tier-platinum { color: var(--tier-platinum); text-shadow: 0 0 15px rgba(168, 85, 247, 0.5); }
.value-tier-diamond {
  background: linear-gradient(90deg, #ff0080, #00ffff, #ff0080);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: diamondShift 2s linear infinite;
}
.value-tier-cosmic {
  color: #fff;
  text-shadow:
    0 0 10px #fff,
    0 0 20px #fff,
    0 0 40px #00ffff,
    0 0 80px #ff00ff;
  animation: cosmicGlow 1.5s ease-in-out infinite;
}

@keyframes diamondShift {
  to { background-position: 200% center; }
}

@keyframes cosmicGlow {
  0%, 100% {
    text-shadow:
      0 0 10px #fff,
      0 0 20px #fff,
      0 0 40px #00ffff,
      0 0 80px #ff00ff;
  }
  50% {
    text-shadow:
      0 0 15px #fff,
      0 0 30px #fff,
      0 0 60px #ff00ff,
      0 0 100px #00ffff;
  }
}

/* Animated Border */
.border-animated {
  position: relative;
  border: 2px solid transparent;
  background-clip: padding-box;
}

.border-animated::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(45deg, var(--accent-cyan), var(--accent-purple), var(--accent-gold), var(--accent-cyan));
  background-size: 400% 400%;
  border-radius: inherit;
  z-index: -1;
  animation: borderGradient 3s ease infinite;
}

@keyframes borderGradient {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* Speedometer Enhancement */
.speedometer-glow {
  position: relative;
}

.speedometer-glow::after {
  content: '';
  position: absolute;
  inset: -10px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-cyan-glow) 0%, transparent 70%);
  animation: speedGlow 2s ease-in-out infinite;
  pointer-events: none;
}

@keyframes speedGlow {
  0%, 100% { opacity: 0.3; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(1.05); }
}

/* Nitro Active Effects */
.nitro-active-effect {
  animation: nitroFlash 0.3s ease-in-out infinite alternate;
}

@keyframes nitroFlash {
  from {
    filter: brightness(1) saturate(1);
    box-shadow: 0 0 10px var(--accent-cyan);
  }
  to {
    filter: brightness(1.2) saturate(1.3);
    box-shadow: 0 0 30px var(--accent-cyan), 0 0 60px var(--accent-purple);
  }
}

/* Road Lines Animation */
.road-lines {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 100px;
  overflow: hidden;
  opacity: 0.3;
}

.road-line {
  position: absolute;
  width: 4px;
  height: 30px;
  background: var(--accent-gold);
  border-radius: 2px;
  animation: roadLineMove 1s linear infinite;
}

@keyframes roadLineMove {
  from { transform: translateY(-100%); }
  to { transform: translateY(200px); }
}

/* Star Trail Effect */
.star-trail {
  position: relative;
}

.star-trail::before,
.star-trail::after {
  content: '✨';
  position: absolute;
  font-size: 0.8rem;
  opacity: 0;
  animation: starTrail 2s ease-out infinite;
}

.star-trail::before {
  left: -15px;
  animation-delay: 0s;
}

.star-trail::after {
  right: -15px;
  animation-delay: 1s;
}

@keyframes starTrail {
  0% { opacity: 0; transform: translateY(0) scale(0); }
  50% { opacity: 1; transform: translateY(-10px) scale(1); }
  100% { opacity: 0; transform: translateY(-20px) scale(0.5); }
}

/* Enhanced Tab Styling */
.tab-btn {
  position: relative;
  overflow: hidden;
}

.tab-btn::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 3px;
  background: var(--accent-cyan);
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

.tab-btn:hover::after,
.tab-btn.active::after {
  width: 80%;
}

.tab-btn.active {
  background: linear-gradient(180deg, var(--accent-cyan) -100%, transparent 100%);
}

/* Upgrade Card Enhancements */
.upgrade-item {
  transition: all 0.3s var(--transition-smooth);
}

.upgrade-item:hover {
  transform: translateX(5px);
  box-shadow: -5px 0 20px var(--accent-cyan-glow);
}

.upgrade-item .upgrade-icon {
  transition: transform 0.3s var(--transition-bounce);
}

.upgrade-item:hover .upgrade-icon {
  transform: scale(1.2) rotate(10deg);
}

/* Achievement Unlock Animation */
.achievement-unlock {
  animation: achievementPop 0.6s var(--transition-bounce);
}

@keyframes achievementPop {
  0% { transform: scale(0) rotate(-180deg); opacity: 0; }
  50% { transform: scale(1.2) rotate(10deg); }
  100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

/* Currency Display Enhancement */
.miles-display {
  position: relative;
  display: inline-block;
}

.miles-display::before {
  content: '🛣️';
  margin-right: 8px;
  animation: iconFloat 2s ease-in-out infinite;
}

.mps-display::before {
  content: '⚡';
  margin-right: 8px;
  animation: iconPulse 1s ease-in-out infinite;
}

/* Combo Fire Effect */
.combo-fire {
  position: relative;
}

.combo-fire::before,
.combo-fire::after {
  content: '🔥';
  position: absolute;
  font-size: 1.2rem;
  animation: fireFlicker 0.5s ease-in-out infinite alternate;
}

.combo-fire::before {
  left: -25px;
  animation-delay: 0s;
}

.combo-fire::after {
  right: -25px;
  animation-delay: 0.25s;
}

@keyframes fireFlicker {
  from { transform: translateY(0) scale(1); opacity: 0.8; }
  to { transform: translateY(-5px) scale(1.1); opacity: 1; }
}

/* Loading Spinner */
.loading-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid var(--border-subtle);
  border-top-color: var(--accent-cyan);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Tooltip Enhancement */
.tooltip-fancy {
  position: relative;
}

.tooltip-fancy::before {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(-5px);
  padding: 8px 12px;
  background: var(--bg-card);
  border: 1px solid var(--accent-cyan);
  border-radius: 8px;
  font-size: 0.8rem;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 1000;
}

.tooltip-fancy:hover::before {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

/* Prestige Button Glow */
.prestige-ready {
  animation: prestigeGlow 1.5s ease-in-out infinite;
}

@keyframes prestigeGlow {
  0%, 100% {
    box-shadow: 0 0 10px var(--accent-gold), 0 0 20px var(--accent-gold-glow);
  }
  50% {
    box-shadow: 0 0 20px var(--accent-gold), 0 0 40px var(--accent-gold), 0 0 60px var(--accent-gold-glow);
  }
}

/* Section Headers */
.section-header {
  position: relative;
  padding-bottom: 10px;
  margin-bottom: 15px;
}

.section-header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 50px;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-cyan), transparent);
}

/* Number Pop Animation */
.number-pop {
  animation: numberPop 0.3s var(--transition-bounce);
}

@keyframes numberPop {
  0% { transform: scale(1); }
  50% { transform: scale(1.3); }
  100% { transform: scale(1); }
}

/* Rarity Indicators */
.rarity-common { border-left: 4px solid #888; }
.rarity-rare { border-left: 4px solid var(--accent-cyan); }
.rarity-epic { border-left: 4px solid var(--accent-purple); }
.rarity-legendary { border-left: 4px solid var(--accent-gold); }
.rarity-mythic { border-left: 4px solid #ff6b9d; }
.rarity-divine { border-left: 4px solid #fff; animation: divineShine 2s linear infinite; }

@keyframes divineShine {
  0%, 100% { border-left-color: #fff; }
  33% { border-left-color: var(--accent-gold); }
  66% { border-left-color: var(--accent-cyan); }
}

/* Particle Burst on Click */
.click-burst {
  position: absolute;
  pointer-events: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  animation: burstOut 0.5s ease-out forwards;
}

@keyframes burstOut {
  0% { transform: scale(0); opacity: 1; }
  100% { transform: scale(3); opacity: 0; }
}

/* Dashboard Warning Lights */
.warning-light {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent-red);
  animation: warningBlink 1s ease-in-out infinite;
}

.warning-light.active {
  background: var(--accent-green);
  animation: none;
}

@keyframes warningBlink {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; box-shadow: 0 0 10px var(--accent-red); }
}

/* Engine Rev Visual */
.engine-rev {
  position: relative;
}

.engine-rev::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, var(--accent-orange-glow) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.1s;
}

.engine-rev.active::after {
  opacity: 1;
  animation: enginePulse 0.2s ease-out;
}

@keyframes enginePulse {
  0% { transform: scale(0.8); opacity: 1; }
  100% { transform: scale(1.5); opacity: 0; }
}

/* ========== Additional Visual Enhancements ========== */

/* Slow spinning icon */
.icon-spin-slow { animation: iconSpin 8s linear infinite; }

/* Neon red color */
.neon-red { color: var(--accent-red); }

/* Tab icon wrapper */
.tab-icon {
  display: inline-block;
  margin-right: 4px;
  transition: transform 0.3s ease;
}

/* Enhanced tabs hover effect */
.enhanced-tab:hover .tab-icon {
  transform: scale(1.2);
}

.enhanced-tab.active .tab-icon {
  animation: iconBounce 0.5s ease;
}

/* Enhanced button for gas pedal */
.enhanced-btn {
  position: relative;
  overflow: hidden;
}

.enhanced-btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: radial-gradient(circle, rgba(255,255,255,0.3) 0%, transparent 70%);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.3s, height 0.3s;
}

.enhanced-btn:active::before {
  width: 200%;
  height: 200%;
}

/* Floating decorations container */
.floating-decorations {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.floating-decoration {
  position: absolute;
  font-size: 1.5rem;
  opacity: 0.15;
  animation: floatingDeco 15s ease-in-out infinite;
}

@keyframes floatingDeco {
  0%, 100% {
    transform: translateY(0) translateX(0) rotate(0deg);
    opacity: 0.1;
  }
  25% {
    transform: translateY(-20px) translateX(10px) rotate(10deg);
    opacity: 0.2;
  }
  50% {
    transform: translateY(10px) translateX(-15px) rotate(-5deg);
    opacity: 0.15;
  }
  75% {
    transform: translateY(-15px) translateX(5px) rotate(5deg);
    opacity: 0.2;
  }
}

/* Dashboard decorated - relative container */
.dashboard-decorated {
  position: relative;
  overflow: hidden;
}

/* Dashboard decorations */
.dashboard-decoration {
  position: absolute;
  font-size: 1.2rem;
  opacity: 0.2;
  pointer-events: none;
  z-index: 0;
}

.dash-deco-1 {
  top: 10px;
  left: 10px;
  animation: dashDeco1 4s ease-in-out infinite;
}

.dash-deco-2 {
  top: 15px;
  right: 10px;
  animation: dashDeco2 5s ease-in-out infinite;
}

.dash-deco-3 {
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  animation: dashDeco3 3s ease-in-out infinite;
}

@keyframes dashDeco1 {
  0%, 100% { transform: rotate(0deg) scale(1); opacity: 0.2; }
  50% { transform: rotate(15deg) scale(1.1); opacity: 0.4; }
}

@keyframes dashDeco2 {
  0%, 100% { transform: rotate(0deg); opacity: 0.2; }
  50% { transform: rotate(-10deg); opacity: 0.35; }
}

@keyframes dashDeco3 {
  0%, 100% { transform: translateX(-50%) translateY(0); opacity: 0.2; }
  50% { transform: translateX(-50%) translateY(-5px); opacity: 0.3; }
}

/* Gauge glow effect */
.gauge-glow {
  position: relative;
}

.gauge-glow::after {
  content: '';
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-cyan-glow) 0%, transparent 60%);
  opacity: 0.3;
  pointer-events: none;
  animation: gaugeGlowPulse 3s ease-in-out infinite;
}

@keyframes gaugeGlowPulse {
  0%, 100% { opacity: 0.2; transform: scale(0.95); }
  50% { opacity: 0.4; transform: scale(1.02); }
}

/* Animated border for containers */
.animated-border {
  position: relative;
  border: 1px solid transparent;
  background-clip: padding-box;
}

.animated-border::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(
    90deg,
    var(--accent-cyan) 0%,
    var(--accent-purple) 25%,
    var(--accent-gold) 50%,
    var(--accent-purple) 75%,
    var(--accent-cyan) 100%
  );
  background-size: 200% 100%;
  animation: borderSlide 4s linear infinite;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  opacity: 0.5;
}

@keyframes borderSlide {
  0% { background-position: 0% 0%; }
  100% { background-position: 200% 0%; }
}

/* Section header styles */
.section-header {
  position: relative;
  padding-left: 5px;
}

.section-header::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 60%;
  background: linear-gradient(to bottom, var(--accent-cyan), var(--accent-purple));
  border-radius: 2px;
}

/* Currency display enhancement */
.currency-display {
  position: relative;
  transition: transform 0.2s ease;
}

.currency-display:hover {
  transform: scale(1.05);
}

/* Road lines animation with actual lines */
.road-lines::before,
.road-lines::after {
  content: '';
  position: absolute;
  width: 3px;
  height: 20px;
  background: var(--accent-gold);
  border-radius: 2px;
  opacity: 0.3;
  animation: roadDash 0.5s linear infinite;
}

.road-lines::before {
  left: 30%;
}

.road-lines::after {
  right: 30%;
  animation-delay: 0.25s;
}

@keyframes roadDash {
  from { transform: translateY(-20px); opacity: 0; }
  50% { opacity: 0.5; }
  to { transform: translateY(100px); opacity: 0; }
}

/* ========== Accessibility Improvements ========== */

/* Focus states for keyboard navigation */
*:focus {
  outline: none;
}

*:focus-visible {
  outline: 2px solid var(--accent-cyan);
  outline-offset: 2px;
}

button:focus-visible,
.tab-btn:focus-visible,
.sidebar-tab:focus-visible {
  outline: 2px solid var(--accent-cyan);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(0, 212, 255, 0.2);
}

.gas-pedal:focus-visible {
  outline: 3px solid var(--accent-gold);
  outline-offset: 3px;
  box-shadow: 0 0 20px var(--accent-gold-glow);
}

input:focus-visible,
textarea:focus-visible {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.2);
}

/* Additional focus states for interactive elements */
.customize-item:focus-visible,
.race-btn:focus-visible,
.mastery-card:focus-visible,
.expedition-card:focus-visible,
.omega-upgrade-card:focus-visible,
.upgrade-card:focus-visible,
.achievement:focus-visible {
  outline: 2px solid var(--accent-cyan);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(0, 212, 255, 0.2);
}

.settings-toggle:focus-visible {
  outline: 2px solid var(--accent-cyan);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(0, 212, 255, 0.3);
}

.modal-btn:focus-visible {
  outline: 2px solid var(--accent-cyan);
  outline-offset: 2px;
  transform: translateY(-2px);
}

/* Improved color contrast for text-dim */
.text-high-contrast {
  color: #8a8aaa; /* Improved from #555577 */
}

/* Skip link for screen readers */
.skip-link {
  position: absolute;
  top: -100%;
  left: 0;
  background: var(--accent-cyan);
  color: var(--bg-dark);
  padding: 10px 20px;
  z-index: 10000;
  font-weight: bold;
}

.skip-link:focus {
  top: 0;
}

/* ========== Active Abilities Bar ========== */
.abilities-bar {
  display: flex;
  justify-content: center;
  align-items: stretch;
  gap: 12px;
  padding: 15px;
  background: linear-gradient(135deg, rgba(26, 26, 46, 0.98), rgba(18, 18, 31, 0.98));
  border-radius: 15px;
  margin: 10px auto;
  max-width: 700px;
  border: 2px solid var(--border-subtle);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.ability-btn {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 90px;
  height: 90px;
  border: 3px solid;
  border-color: var(--ability-color, var(--accent-cyan));
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.8), rgba(30, 30, 58, 0.8));
  cursor: pointer;
  overflow: hidden;
  transition: all 0.3s var(--transition-bounce);
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.ability-btn:hover:not(.on-cooldown) {
  transform: translateY(-5px) scale(1.05);
  box-shadow: 0 0 25px var(--ability-color, var(--accent-cyan)), 0 5px 15px rgba(0, 0, 0, 0.5);
  border-color: var(--ability-color, var(--accent-cyan));
  filter: brightness(1.2);
}

.ability-btn:active:not(.on-cooldown) {
  transform: translateY(-2px) scale(1.02);
}

.ability-btn.active {
  animation: ability-pulse 0.8s infinite;
  box-shadow: 0 0 30px var(--ability-color, var(--accent-cyan)), 0 0 50px var(--ability-color, var(--accent-cyan));
  border-width: 4px;
}

.ability-btn.on-cooldown {
  opacity: 0.5;
  cursor: not-allowed;
  filter: grayscale(0.7);
}

.ability-btn.on-cooldown:hover {
  transform: none;
}

.ability-icon {
  font-size: 2rem;
  position: relative;
  z-index: 3;
  margin-bottom: 4px;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
}

.ability-name {
  font-size: 0.65rem;
  font-weight: bold;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  position: relative;
  z-index: 3;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
  white-space: nowrap;
}

.ability-keybind {
  position: absolute;
  top: 3px;
  right: 3px;
  font-size: 0.6rem;
  font-weight: bold;
  color: var(--text-secondary);
  background: rgba(0, 0, 0, 0.7);
  padding: 2px 5px;
  border-radius: 4px;
  z-index: 3;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.ability-level {
  position: absolute;
  top: 3px;
  left: 3px;
  font-size: 0.6rem;
  font-weight: bold;
  color: var(--accent-gold);
  background: rgba(255, 215, 0, 0.2);
  padding: 2px 5px;
  border-radius: 4px;
  z-index: 3;
  border: 1px solid var(--accent-gold);
}

.ability-cooldown-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 100%;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.6));
  z-index: 2;
  animation: cooldown-drain linear;
  transform-origin: bottom;
}

.ability-cooldown-text {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.9rem;
  font-weight: bold;
  color: var(--accent-red);
  z-index: 4;
  text-shadow: 0 0 5px rgba(0, 0, 0, 0.9), 0 2px 4px rgba(0, 0, 0, 0.8);
  background: rgba(0, 0, 0, 0.5);
  padding: 2px 6px;
  border-radius: 4px;
}

.ability-active-timer {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.85rem;
  font-weight: bold;
  color: var(--accent-green);
  z-index: 4;
  text-shadow: 0 0 8px var(--accent-green), 0 2px 4px rgba(0, 0, 0, 0.8);
  background: rgba(76, 175, 80, 0.2);
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid var(--accent-green);
  animation: timer-pulse 1s infinite;
}

@keyframes ability-pulse {
  0%, 100% {
    box-shadow: 0 0 20px var(--ability-color), 0 0 40px var(--ability-color);
    border-color: var(--ability-color);
  }
  50% {
    box-shadow: 0 0 35px var(--ability-color), 0 0 60px var(--ability-color), 0 0 80px var(--ability-color);
    border-color: white;
  }
}

@keyframes cooldown-drain {
  from { transform: scaleY(1); }
  to { transform: scaleY(0); }
}

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

@keyframes abilityFlash {
  0% { opacity: 0.4; }
  50% { opacity: 0.2; }
  100% { opacity: 0; }
}

@keyframes abilityParticle {
  0% {
    transform: translate(0, 0) scale(1) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translate(calc(var(--end-x) - var(--start-x, 0px)), calc(var(--end-y) - var(--start-y, 0px))) scale(0) rotate(360deg);
    opacity: 0;
  }
}

/* Ability Upgrades Panel */
.ability-upgrade-card {
  background: var(--bg-card);
  border: 2px solid var(--border-subtle);
  border-radius: 10px;
  padding: 15px;
  margin-bottom: 15px;
  transition: all 0.3s;
}

.ability-upgrade-card:hover {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 15px rgba(0, 212, 255, 0.2);
}

.ability-upgrade-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-subtle);
}

.ability-upgrade-icon {
  font-size: 1.8rem;
}

.ability-upgrade-name {
  flex: 1;
  font-size: 1rem;
  font-weight: bold;
  color: var(--text-primary);
}

.ability-upgrade-progress {
  font-size: 0.85rem;
  color: var(--accent-gold);
  font-weight: bold;
}

.ability-upgrade-tiers {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}

.ability-upgrade-tier {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 6px;
  border: 1px solid transparent;
  transition: all 0.2s;
}

.ability-upgrade-tier.unlocked {
  background: rgba(76, 175, 80, 0.1);
  border-color: var(--accent-green);
}

.ability-upgrade-tier.current {
  background: rgba(0, 212, 255, 0.1);
  border-color: var(--accent-cyan);
  box-shadow: 0 0 10px rgba(0, 212, 255, 0.3);
}

.upgrade-level {
  font-size: 0.7rem;
  font-weight: bold;
  color: var(--accent-gold);
  background: rgba(255, 215, 0, 0.2);
  padding: 3px 8px;
  border-radius: 4px;
  min-width: 45px;
  text-align: center;
}

.upgrade-effect {
  flex: 1;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.ability-upgrade-tier.unlocked .upgrade-effect {
  color: var(--text-primary);
}

.upgrade-cost {
  font-size: 0.75rem;
  color: var(--accent-purple);
  font-weight: bold;
}

.ability-upgrade-btn {
  width: 100%;
  padding: 10px;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
  border: none;
  border-radius: 8px;
  color: white;
  font-weight: bold;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 4px 10px rgba(0, 212, 255, 0.3);
}

.ability-upgrade-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(0, 212, 255, 0.5);
  filter: brightness(1.2);
}

.ability-upgrade-btn:active {
  transform: translateY(0);
}

.ability-max-level {
  text-align: center;
  padding: 10px;
  background: rgba(255, 215, 0, 0.1);
  border: 2px solid var(--accent-gold);
  border-radius: 8px;
  color: var(--accent-gold);
  font-weight: bold;
  font-size: 0.9rem;
}

/* ========== Expedition Cards ========== */
.expeditions-grid {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 0.5rem;
}

.expeditions-active-section,
.expeditions-available-section {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.expeditions-active-section h4,
.expeditions-available-section h4 {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 0.25rem;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 0.25rem;
}

.expedition-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  background: var(--bg-card);
  border-radius: 8px;
  border: 1px solid var(--border-subtle);
  cursor: pointer;
  transition: all 0.3s var(--transition-smooth);
}

.expedition-card:hover:not(.locked):not(.in-progress) {
  background: var(--bg-card-hover);
  border-color: var(--accent-cyan);
  transform: translateX(3px);
}

.expedition-card.active {
  border-color: var(--accent-green);
  background: rgba(76, 175, 80, 0.1);
}

.expedition-card.locked {
  opacity: 0.5;
  cursor: not-allowed;
}

.expedition-card.can-unlock {
  opacity: 1;
  border-color: var(--accent-gold);
  cursor: pointer;
}

.expedition-card.in-progress {
  opacity: 0.7;
  cursor: default;
}

.expedition-icon {
  font-size: 1.5rem;
  min-width: 2.5rem;
  text-align: center;
}

.expedition-info {
  flex: 1;
  min-width: 0;
}

.expedition-name {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.9rem;
}

.expedition-duration,
.expedition-rewards,
.expedition-unlock,
.expedition-time {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.expedition-unlock {
  color: var(--accent-gold);
}

.expedition-progress-bar {
  height: 6px;
  background: var(--gauge-bg);
  border-radius: 3px;
  overflow: hidden;
  margin: 0.25rem 0;
}

.expedition-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-green));
  border-radius: 3px;
  transition: width 0.5s var(--transition-smooth);
}

/* ========== Resonance Indicator ========== */
.resonance-indicator {
  position: absolute;
  top: 10px;
  right: 10px;
  display: flex;
  gap: 0.5rem;
  z-index: 100;
}

.resonance-badge {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.3), rgba(236, 72, 153, 0.3));
  border: 2px solid var(--accent-purple);
  border-radius: 50%;
  animation: resonance-glow 2s infinite;
  cursor: help;
}

@keyframes resonance-glow {
  0%, 100% { box-shadow: 0 0 5px var(--accent-purple); }
  50% { box-shadow: 0 0 20px var(--accent-purple), 0 0 30px var(--accent-pink); }
}

/* ========== Omega Dimension Panel ========== */
#omegaPanel .omega-header {
  text-align: center;
  margin-bottom: 1rem;
}

.omega-ascension {
  text-align: center;
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.1), rgba(139, 92, 246, 0.1));
  border-radius: 12px;
  border: 1px solid var(--accent-purple);
}

.omega-ascend-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  width: 100%;
  padding: 1rem;
  font-size: 1.1rem;
  font-weight: bold;
  background: linear-gradient(135deg, #1a1a2e, #16213e);
  border: 2px solid var(--accent-purple);
  border-radius: 10px;
  color: white;
  cursor: not-allowed;
  opacity: 0.5;
  transition: all 0.3s var(--transition-smooth);
}

.omega-ascend-btn.ready {
  cursor: pointer;
  opacity: 1;
  animation: omega-pulse 2s infinite;
}

.omega-ascend-btn.ready:hover {
  transform: scale(1.02);
  box-shadow: 0 0 20px var(--accent-purple);
}

.omega-ascend-btn .icon {
  font-size: 2rem;
}

.omega-ascend-btn .reward {
  font-size: 0.85rem;
  color: var(--accent-cyan);
}

.omega-req {
  margin-top: 0.5rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

@keyframes omega-pulse {
  0%, 100% { box-shadow: 0 0 5px var(--accent-purple); }
  50% { box-shadow: 0 0 25px var(--accent-purple), 0 0 40px rgba(168, 85, 247, 0.5); }
}

.omega-upgrades h4,
.omega-blueprints h4 {
  margin: 1rem 0 0.5rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 0.25rem;
}

.omega-upgrades-grid {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.omega-upgrade-card {
  display: flex;
  gap: 0.75rem;
  padding: 0.75rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s var(--transition-smooth);
}

.omega-upgrade-card:hover:not(.maxed) {
  background: var(--bg-card-hover);
}

.omega-upgrade-card.affordable {
  border-color: var(--accent-purple);
}

.omega-upgrade-card.maxed {
  opacity: 0.6;
  cursor: default;
}

.omega-upgrade-icon {
  font-size: 1.5rem;
  min-width: 2rem;
  text-align: center;
}

.omega-upgrade-info {
  flex: 1;
  min-width: 0;
}

.omega-upgrade-name {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.85rem;
}

.omega-upgrade-level {
  font-size: 0.7rem;
  color: var(--accent-purple);
}

.omega-upgrade-desc {
  font-size: 0.7rem;
  color: var(--text-secondary);
}

.omega-upgrade-cost {
  font-size: 0.7rem;
  color: var(--accent-cyan);
}

.omega-blueprints-grid {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.omega-blueprint-card {
  display: flex;
  gap: 0.75rem;
  padding: 0.75rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  cursor: pointer;
  opacity: 0.5;
  transition: all 0.3s var(--transition-smooth);
}

.omega-blueprint-card.unlocked {
  opacity: 1;
  border-color: var(--accent-cyan);
}

.omega-blueprint-card.active {
  background: rgba(0, 212, 255, 0.1);
  border-color: var(--accent-cyan);
  box-shadow: 0 0 10px var(--accent-cyan-glow);
}

.omega-blueprint-card.affordable {
  opacity: 0.9;
  border-color: var(--accent-gold);
}

.omega-blueprint-card:hover {
  background: var(--bg-card-hover);
}

.blueprint-icon {
  font-size: 1.5rem;
  min-width: 2rem;
  text-align: center;
}

.blueprint-info {
  flex: 1;
  min-width: 0;
}

.blueprint-name {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.85rem;
}

.blueprint-desc {
  font-size: 0.7rem;
  color: var(--text-secondary);
}

.blueprint-status {
  font-size: 0.7rem;
  color: var(--accent-green);
  font-weight: bold;
}

.blueprint-cost {
  font-size: 0.7rem;
  color: var(--accent-gold);
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Pause animations when tab is not visible (performance optimization) */
.dashboard.tab-hidden,
.dashboard.tab-hidden *,
.dashboard.tab-hidden *::before,
.dashboard.tab-hidden *::after {
  animation-play-state: paused !important;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  :root {
    --text-dim: #aaaacc;
    --border-subtle: #4a4a6a;
  }

  .neon-text {
    text-shadow: none;
  }
}

/* Visually hidden class for screen readers */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Skip to main content link for keyboard users */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--accent-cyan);
  color: var(--bg-dark);
  padding: 8px 16px;
  z-index: 10000;
  text-decoration: none;
  font-weight: bold;
  border-radius: 0 0 4px 0;
  transition: top 0.2s;
}

.skip-link:focus {
  top: 0;
}

/* ========== Equipment/Gear System ========== */
.equipment-container {
  padding: 15px;
}

.equipment-section {
  margin-bottom: 25px;
}

.equipment-section h3 {
  color: var(--accent-cyan);
  font-size: 1.3rem;
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.equipment-slots-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 15px;
  margin-bottom: 20px;
}

.equipment-slot {
  background: var(--bg-card);
  border: 2px solid var(--border-subtle);
  border-radius: 8px;
  padding: 15px;
  transition: all 0.3s ease;
}

.equipment-slot.filled {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 15px rgba(0, 212, 255, 0.2);
}

.equipment-slot.empty {
  border-style: dashed;
  opacity: 0.7;
}

.slot-name {
  font-weight: bold;
  color: var(--accent-gold);
  margin-bottom: 10px;
  text-transform: uppercase;
  font-size: 0.9rem;
  letter-spacing: 1px;
}

.slot-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.slot-empty-text {
  text-align: center;
  color: var(--text-dim);
  padding: 20px 0;
  font-style: italic;
}

.item-icon {
  font-size: 2rem;
  text-align: center;
  margin-bottom: 5px;
}

.item-name {
  font-weight: bold;
  font-size: 1.1rem;
  text-align: center;
}

.item-rarity {
  text-align: center;
  text-transform: uppercase;
  font-size: 0.8rem;
  font-weight: bold;
  letter-spacing: 1px;
  margin: 5px 0;
}

.item-stats {
  font-size: 0.85rem;
  color: var(--accent-green);
  text-align: center;
  margin: 8px 0;
  line-height: 1.4;
}

/* Rarity Colors */
.rarity-common {
  border-color: #888;
}

.rarity-common .item-name {
  color: #aaa;
}

.rarity-common .item-rarity {
  color: #888;
}

.rarity-uncommon {
  border-color: #4CAF50;
}

.rarity-uncommon .item-name {
  color: #4CAF50;
}

.rarity-uncommon .item-rarity {
  color: #4CAF50;
}

.rarity-rare {
  border-color: #2196F3;
}

.rarity-rare .item-name {
  color: #2196F3;
}

.rarity-rare .item-rarity {
  color: #2196F3;
}

.rarity-epic {
  border-color: #9C27B0;
}

.rarity-epic .item-name {
  color: #9C27B0;
}

.rarity-epic .item-rarity {
  color: #9C27B0;
}

.rarity-legendary {
  border-color: #FF9800;
  box-shadow: 0 0 20px rgba(255, 152, 0, 0.4);
}

.rarity-legendary .item-name {
  color: #FF9800;
}

.rarity-legendary .item-rarity {
  color: #FF9800;
}

/* Equipment Inventory */
.equipment-inventory-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}

.inventory-item {
  background: var(--bg-card);
  border: 2px solid var(--border-subtle);
  border-radius: 8px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: all 0.3s ease;
  cursor: pointer;
}

.inventory-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.inventory-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 40px 20px;
  color: var(--text-dim);
  font-style: italic;
  background: var(--bg-card);
  border: 2px dashed var(--border-subtle);
  border-radius: 8px;
}

.item-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.equip-btn, .unequip-btn, .scrap-btn {
  flex: 1;
  padding: 8px 12px;
  border: none;
  border-radius: 4px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.85rem;
}

.equip-btn {
  background: var(--accent-green);
  color: white;
}

.equip-btn:hover {
  background: #45a049;
  transform: scale(1.05);
}

.unequip-btn {
  background: var(--accent-cyan);
  color: var(--bg-dark);
}

.unequip-btn:hover {
  background: #00b8d4;
  transform: scale(1.05);
}

.scrap-btn {
  background: var(--accent-red);
  color: white;
}

.scrap-btn:hover {
  background: #d32f2f;
  transform: scale(1.05);
}

/* Responsive */
@media (max-width: 768px) {
  .equipment-slots-grid {
    grid-template-columns: 1fr;
  }

  .equipment-inventory-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  }
}

/* ==================== PRESTIGE PATH SPECIALIZATION SYSTEM ==================== */

/* Path Selection Modal */
.path-modal {
  max-width: 1000px !important;
  max-height: 90vh;
  overflow-y: auto;
}

.path-modal-desc {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.path-modal-note {
  font-size: 0.9rem;
  color: var(--accent-cyan);
  margin-bottom: 20px;
  font-style: italic;
}

.path-options-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.path-option {
  background: linear-gradient(135deg, rgba(20, 20, 30, 0.9), rgba(30, 30, 45, 0.9));
  border: 3px solid;
  border-radius: 15px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.path-option::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.path-option:hover::before {
  opacity: 1;
}

.path-option:hover {
  transform: translateY(-5px) scale(1.02);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.path-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.path-icon {
  font-size: 2.5rem;
  filter: drop-shadow(0 0 10px currentColor);
}

.path-name {
  font-size: 1.4rem;
  font-weight: bold;
  text-shadow: 0 0 10px currentColor;
}

.path-desc {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.path-bonuses {
  background: rgba(0, 0, 0, 0.3);
  border-radius: 8px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.path-bonus-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.95rem;
}

.path-bonus-label {
  color: var(--text-secondary);
}

.path-bonus-value {
  color: var(--accent-green);
  font-weight: bold;
  text-shadow: 0 0 8px var(--accent-green);
}

.path-flavor {
  font-size: 0.9rem;
  font-style: italic;
  color: var(--accent-cyan);
  text-align: center;
  padding: 8px;
  background: rgba(100, 200, 255, 0.1);
  border-radius: 6px;
}

.path-stats {
  font-size: 0.85rem;
  color: var(--text-secondary);
  text-align: center;
}

.path-select-btn {
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  font-size: 1.1rem;
  font-weight: bold;
  color: white;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 1px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.path-select-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
  filter: brightness(1.2);
}

.path-select-btn:active {
  transform: translateY(0);
}

/* Path Indicator */
.path-indicator {
  background: linear-gradient(135deg, rgba(20, 20, 30, 0.95), rgba(30, 30, 45, 0.95));
  border: 2px solid;
  border-radius: 12px;
  padding: 15px;
  margin-top: 15px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  animation: pathPulse 3s infinite;
}

@keyframes pathPulse {
  0%, 100% {
    box-shadow: 0 0 10px currentColor;
  }
  50% {
    box-shadow: 0 0 20px currentColor;
  }
}

.path-indicator-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.path-indicator-icon {
  font-size: 2rem;
  filter: drop-shadow(0 0 8px currentColor);
}

.path-indicator-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.path-indicator-name {
  font-size: 1.2rem;
  font-weight: bold;
  text-shadow: 0 0 10px currentColor;
}

.path-indicator-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.path-respec-btn {
  padding: 8px 16px;
  background: linear-gradient(135deg, rgba(200, 50, 50, 0.7), rgba(150, 30, 30, 0.9));
  border: 2px solid var(--accent-red);
  border-radius: 6px;
  color: white;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.95rem;
}

.path-respec-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, rgba(255, 70, 70, 0.8), rgba(200, 50, 50, 0.95));
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(255, 0, 0, 0.3);
}

.path-respec-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Path Cosmetic Effects on Body */
body[data-path="clicker"] {
  --path-glow: #00ff88;
}

body[data-path="investor"] {
  --path-glow: #4488ff;
}

body[data-path="combo"] {
  --path-glow: #ff4444;
}

body[data-path] .gas-pedal {
  box-shadow: 0 0 30px var(--path-glow, transparent);
}

body[data-path] .gauge {
  border-color: var(--path-glow, #00ffff) !important;
}

/* Responsive Design for Path System */
@media (max-width: 768px) {
  .path-options-container {
    grid-template-columns: 1fr;
  }

  .path-modal {
    max-width: 95vw;
    padding: 15px;
  }

  .path-indicator {
    padding: 12px;
  }

  .path-indicator-icon {
    font-size: 1.5rem;
  }

  .path-indicator-name {
    font-size: 1rem;
  }
}

/* ==================== WEEKLY CHALLENGES ==================== */
.weekly-challenges-container {
  margin-top: 20px;
  padding-top: 15px;
  border-top: 1px solid var(--border-subtle);
}

.weekly-challenges-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.weekly-challenges-header h4 {
  margin: 0;
  color: var(--accent-gold);
  font-size: 1.1rem;
}

.weekly-timer {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.weekly-timer-icon {
  font-size: 1rem;
}

.weekly-challenges-grid {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.weekly-challenge-card {
  background: linear-gradient(135deg, var(--bg-card) 0%, rgba(255, 215, 0, 0.05) 100%);
  border-radius: 12px;
  padding: 15px;
  border: 2px solid var(--accent-gold);
  box-shadow: 0 4px 12px rgba(255, 215, 0, 0.1);
  display: flex;
  gap: 15px;
  transition: all 0.3s ease;
}

.weekly-challenge-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(255, 215, 0, 0.2);
}

.weekly-challenge-card.completed {
  border-color: var(--accent-green);
  background: linear-gradient(135deg, var(--bg-card) 0%, rgba(0, 255, 127, 0.05) 100%);
  opacity: 0.85;
}

.weekly-challenge-icon {
  font-size: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 60px;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.weekly-challenge-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.weekly-challenge-name {
  font-size: 1.1rem;
  font-weight: bold;
  color: var(--accent-gold);
}

.weekly-challenge-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.weekly-challenge-progress-bar {
  height: 8px;
  background: var(--bg-dark);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}

.weekly-challenge-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-gold), var(--accent-orange));
  transition: width 0.5s ease;
  box-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.weekly-challenge-progress-text {
  font-size: 0.85rem;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 5px;
}

.weekly-complete-check {
  color: var(--accent-green);
  font-size: 1.1rem;
  font-weight: bold;
  margin-left: 5px;
}

.weekly-challenge-rewards {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.weekly-reward-badge {
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: bold;
  color: var(--text-primary);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Weekly Celebration Overlay */
.weekly-celebration-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  animation: weeklyFadeIn 0.5s ease;
  transition: opacity 0.5s ease;
}

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

.weekly-celebration-content {
  text-align: center;
  animation: weeklyBounceIn 0.6s ease;
}

@keyframes weeklyBounceIn {
  0% {
    transform: scale(0.3);
    opacity: 0;
  }
  50% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.weekly-celebration-icon {
  font-size: 6rem;
  margin-bottom: 20px;
  animation: weeklyRotate 1s ease infinite;
}

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

.weekly-celebration-title {
  font-size: 2.5rem;
  font-weight: bold;
  color: var(--accent-gold);
  text-shadow: 0 0 20px rgba(255, 215, 0, 0.8);
  margin-bottom: 15px;
}

.weekly-celebration-name {
  font-size: 1.8rem;
  color: var(--text-primary);
  margin-bottom: 30px;
}

.weekly-celebration-rewards {
  display: flex;
  flex-direction: column;
  gap: 15px;
  align-items: center;
}

.weekly-reward-item {
  font-size: 1.3rem;
  color: var(--accent-cyan);
  background: rgba(0, 255, 255, 0.1);
  padding: 10px 30px;
  border-radius: 20px;
  border: 2px solid var(--accent-cyan);
  box-shadow: 0 0 15px rgba(0, 255, 255, 0.3);
}

.weekly-celebration-particle {
  position: absolute;
  width: 10px;
  height: 10px;
  background: var(--accent-gold);
  border-radius: 50%;
  animation: weeklyParticleBurst 1.5s ease-out forwards;
}

@keyframes weeklyParticleBurst {
  0% {
    transform: translate(0, 0) scale(1);
    opacity: 1;
  }
  100% {
    transform: translate(
      calc(cos(var(--angle)) * var(--distance)),
      calc(sin(var(--angle)) * var(--distance))
    ) scale(0);
    opacity: 0;
  }
}
