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

body {
  font-family: 'Rajdhani', sans-serif;
  background: linear-gradient(135deg, #1a0a2e 0%, #0d0015 50%, #1a0525 100%);
  min-height: 100vh;
  color: #fff;
  overflow-x: hidden;
}

.app-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
  min-height: 100vh;
}

.plaid-mode {
  animation: plaidBg 2s linear infinite;
}

@keyframes plaidBg {
  0% { filter: hue-rotate(0deg); }
  100% { filter: hue-rotate(360deg); }
}

/* Header */
.header {
  text-align: center;
  padding: 20px 0 30px;
}

.title {
  font-family: 'Orbitron', sans-serif;
  font-size: clamp(1.8rem, 6vw, 3rem);
  font-weight: 900;
  background: linear-gradient(90deg, #00ffff, #ff0080, #39ff14);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 0 30px rgba(0, 255, 255, 0.5);
  animation: titleGlow 2s ease-in-out infinite alternate;
}

@keyframes titleGlow {
  from { filter: drop-shadow(0 0 10px #00ffff); }
  to { filter: drop-shadow(0 0 20px #ff0080); }
}

.tagline {
  font-size: 1.1rem;
  color: #aaa;
  margin-top: 10px;
}

/* Dashboard */
.dashboard {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

/* Speedometer */
.speedometer-section {
  position: relative;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.speedometer-canvas {
  width: 100%;
  max-width: 350px;
  height: auto;
  aspect-ratio: 1;
}

.speed-label {
  font-family: 'Orbitron', sans-serif;
  font-size: clamp(1.2rem, 4vw, 1.8rem);
  font-weight: 700;
  margin-top: -40px;
  text-shadow: 0 0 10px currentColor;
  transition: color 0.3s;
}

.speed-value {
  font-family: 'Orbitron', sans-serif;
  font-size: clamp(2rem, 8vw, 3.5rem);
  font-weight: 900;
  color: #fff;
  text-shadow: 0 0 20px #00ffff;
}

/* Pulse Rings */
.pulse-rings {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.pulse-ring {
  position: absolute;
  width: 300px;
  height: 300px;
  border: 3px solid #00ffff;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  animation: pulseOut 1s ease-out infinite;
  opacity: 0;
}

@keyframes pulseOut {
  0% { transform: translate(-50%, -50%) scale(0.5); opacity: 0.8; }
  100% { transform: translate(-50%, -50%) scale(1.5); opacity: 0; }
}

/* Stats Panel */
.stats-panel {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
  width: 100%;
  max-width: 400px;
}

.stat {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(0, 255, 255, 0.3);
  border-radius: 12px;
  padding: 15px;
  text-align: center;
  transition: all 0.3s;
}

.stat:hover {
  border-color: #00ffff;
  box-shadow: 0 0 20px rgba(0, 255, 255, 0.3);
}

.stat-label {
  display: block;
  font-size: 0.85rem;
  color: #888;
  margin-bottom: 5px;
}

.stat-value {
  display: block;
  font-family: 'Orbitron', sans-serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: #00ffff;
}

.stat-value.vibes {
  font-size: 1.1rem;
  color: #ff0080;
}

/* Buttons */
.test-button {
  font-family: 'Orbitron', sans-serif;
  font-size: 1.3rem;
  font-weight: 700;
  padding: 18px 50px;
  border: none;
  border-radius: 50px;
  background: linear-gradient(135deg, #ff0080, #ff4444);
  color: #fff;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 0 30px rgba(255, 0, 128, 0.5);
  position: relative;
  overflow: hidden;
}

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

.test-button:hover::before {
  left: 100%;
}

.test-button:hover:not(:disabled) {
  transform: scale(1.05);
  box-shadow: 0 0 50px rgba(255, 0, 128, 0.7);
}

.test-button:disabled {
  opacity: 0.8;
  cursor: not-allowed;
}

.test-button.testing {
  animation: vroomShake 0.1s infinite;
}

@keyframes vroomShake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-2px); }
  75% { transform: translateX(2px); }
}

.share-button {
  font-family: 'Rajdhani', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  padding: 12px 30px;
  border: 2px solid #39ff14;
  border-radius: 25px;
  background: transparent;
  color: #39ff14;
  cursor: pointer;
  transition: all 0.3s;
}

.share-button:hover {
  background: rgba(57, 255, 20, 0.1);
  box-shadow: 0 0 20px rgba(57, 255, 20, 0.3);
}

/* Race Track */
.race-section {
  width: 100%;
  margin-top: 30px;
}

.section-title {
  font-family: 'Orbitron', sans-serif;
  font-size: 1.2rem;
  text-align: center;
  margin-bottom: 15px;
  color: #ff0080;
}

.race-track {
  position: relative;
  height: 180px;
  background: linear-gradient(180deg, #1a1a2e 0%, #16213e 100%);
  border-radius: 15px;
  border: 2px solid #333;
  overflow: hidden;
  padding: 10px;
}

.track-lines {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: repeating-linear-gradient(
    90deg,
    transparent,
    transparent 48%,
    rgba(255, 255, 255, 0.1) 48%,
    rgba(255, 255, 255, 0.1) 52%,
    transparent 52%
  );
}

.racing-car {
  position: absolute;
  transition: left 0.1s linear;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.racing-car:nth-child(2) { top: 10px; }
.racing-car:nth-child(3) { top: 50px; }
.racing-car:nth-child(4) { top: 90px; }
.racing-car:nth-child(5) { top: 130px; }

.car-body {
  font-size: 1.8rem;
  transition: transform 0.1s;
}

.opus-car .car-emoji {
  filter: drop-shadow(0 0 10px #00ffff);
  animation: carBounce 0.3s ease-in-out infinite;
}

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

.other-car {
  opacity: 0.7;
}

.car-name {
  font-size: 0.65rem;
  color: #aaa;
  white-space: nowrap;
  margin-top: 2px;
}

/* Ticker */
.ticker {
  width: 100%;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.5);
  padding: 10px 0;
  margin-top: 20px;
  border-radius: 8px;
}

.ticker-content {
  display: inline-block;
  white-space: nowrap;
  animation: tickerScroll 15s linear infinite;
  color: #39ff14;
  font-size: 0.9rem;
}

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

/* Confetti */
.confetti-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1000;
}

.confetti-particle {
  position: absolute;
  width: 10px;
  height: 10px;
  top: -20px;
  animation: confettiFall 3s ease-out forwards;
}

@keyframes confettiFall {
  0% { transform: translateY(0) rotate(0deg); opacity: 1; }
  100% { transform: translateY(100vh) rotate(720deg); opacity: 0; }
}

/* Disclaimer & Footer */
.disclaimer {
  text-align: center;
  font-size: 0.8rem;
  color: #666;
  margin-top: 20px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 8px;
}

.footer {
  text-align: center;
  padding: 30px 0 20px;
  color: #666;
}

.footer a {
  color: #ff0080;
  text-decoration: none;
  transition: color 0.3s;
}

.footer a:hover {
  color: #00ffff;
}

.footer-note {
  font-size: 0.75rem;
  margin-top: 5px;
}

.easter-hint {
  font-size: 0.7rem;
  margin-top: 10px;
  color: #444;
  font-style: italic;
}

/* Mobile Responsive */
@media (max-width: 600px) {
  .app-container {
    padding: 15px;
  }
  
  .stats-panel {
    gap: 10px;
  }
  
  .stat {
    padding: 10px;
  }
  
  .stat-value {
    font-size: 1.1rem;
  }
  
  .test-button {
    padding: 15px 40px;
    font-size: 1.1rem;
  }
  
  .race-track {
    height: 160px;
  }
  
  .car-body {
    font-size: 1.5rem;
  }
  
  .racing-car:nth-child(2) { top: 5px; }
  .racing-car:nth-child(3) { top: 40px; }
  .racing-car:nth-child(4) { top: 75px; }
  .racing-car:nth-child(5) { top: 110px; }
}