/* Custom Rally Cockpit Styles */
@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@500;700;900&display=swap');

:root {
  --color-rally-yellow: #FFB800;
  --color-rally-green: #00E676;
  --color-rally-red: #FF1744;
}

html, body {
  height: 100dvh;
  height: -webkit-fill-available;
  margin: 0;
  padding: 0;
  background-color: #F3F4F6;
  color: #0F172A;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  font-feature-settings: "tnum" 1, "zero" 1;
  overflow: hidden;
  position: fixed;
  width: 100%;
}

#root {
  height: 100%;
  width: 100%;
}

/* Digital LED Clock Font Styling */
.font-digital {
  font-family: 'Orbitron', 'JetBrains Mono', monospace;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.03em;
}

.font-mono-num {
  font-family: 'JetBrains Mono', monospace;
  font-variant-numeric: tabular-nums;
}

/* Glow Effects */
.glow-yellow {
  text-shadow: 0 0 16px rgba(255, 184, 0, 0.65), 0 0 32px rgba(255, 184, 0, 0.3);
}

.glow-green {
  text-shadow: 0 0 16px rgba(0, 230, 118, 0.7), 0 0 32px rgba(0, 230, 118, 0.35);
}

.glow-red {
  text-shadow: 0 0 16px rgba(255, 23, 68, 0.7), 0 0 32px rgba(255, 23, 68, 0.35);
}

.glow-box-yellow {
  box-shadow: 0 0 24px rgba(255, 184, 0, 0.35), inset 0 0 12px rgba(255, 184, 0, 0.2);
}

.glow-box-green {
  box-shadow: 0 0 24px rgba(0, 230, 118, 0.4), inset 0 0 12px rgba(0, 230, 118, 0.2);
}

.glow-box-red {
  box-shadow: 0 0 24px rgba(255, 23, 68, 0.4), inset 0 0 12px rgba(255, 23, 68, 0.2);
}

/* Big Giant iPhone Button Styling */
.touch-button-active {
  transform: scale(0.97);
  box-shadow: inset 0 4px 20px rgba(0, 0, 0, 0.6) !important;
}

.touch-button-giant {
  transition: transform 0.08s ease-out, box-shadow 0.1s ease-out, background-color 0.15s ease-out;
  border-radius: 2rem;
}

.touch-button-giant:active {
  transform: scale(0.96);
}

/* Custom Scrollbars for white & grey light theme */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: #E2E8F0;
}

::-webkit-scrollbar-thumb {
  background: #94A3B8;
  border-radius: 9999px;
}

::-webkit-scrollbar-thumb:hover {
  background: #64748B;
}

/* Pulse animation for active timing state */
@keyframes pulse-ring {
  0% {
    transform: scale(0.95);
    opacity: 0.8;
  }
  50% {
    transform: scale(1.03);
    opacity: 1;
  }
  100% {
    transform: scale(0.95);
    opacity: 0.8;
  }
}

.animate-pulse-ring {
  animation: pulse-ring 2s infinite ease-in-out;
}

/* Red Pulsation Effect when countdown reaches 0 / interval finishes */
@keyframes red-pulsation {
  0% {
    box-shadow: 0 0 15px 2px rgba(255, 23, 68, 0.7), inset 0 0 20px rgba(255, 23, 68, 0.4);
    border-color: rgba(255, 23, 68, 0.9);
    background-color: rgba(255, 23, 68, 0.2);
  }
  50% {
    box-shadow: 0 0 40px 15px rgba(255, 23, 68, 0.95), inset 0 0 40px rgba(255, 23, 68, 0.7);
    border-color: #ffffff;
    background-color: rgba(255, 23, 68, 0.45);
  }
  100% {
    box-shadow: 0 0 15px 2px rgba(255, 23, 68, 0.7), inset 0 0 20px rgba(255, 23, 68, 0.4);
    border-color: rgba(255, 23, 68, 0.9);
    background-color: rgba(255, 23, 68, 0.2);
  }
}

.animate-red-pulse {
  animation: red-pulsation 0.5s infinite ease-in-out !important;
}

/* Blinking LED Blocks for GPS Distance Windows */
@keyframes blink-fast {
  0%, 100% { opacity: 1; filter: drop-shadow(0 0 10px currentColor); }
  50% { opacity: 0.15; filter: none; }
}

.animate-blink-red {
  animation: blink-fast 0.5s infinite ease-in-out;
  background-color: #FF1744 !important;
  box-shadow: 0 0 14px rgba(255, 23, 68, 0.9), inset 0 0 6px rgba(255, 255, 255, 0.8) !important;
}

.animate-blink-yellow {
  animation: blink-fast 0.5s infinite ease-in-out;
  background-color: #FFB800 !important;
  box-shadow: 0 0 14px rgba(255, 184, 0, 0.9), inset 0 0 6px rgba(255, 255, 255, 0.8) !important;
}

.solid-block-green {
  background-color: #00E676 !important;
  box-shadow: 0 0 14px rgba(0, 230, 118, 0.9), inset 0 0 6px rgba(255, 255, 255, 0.8) !important;
  opacity: 1 !important;
}

.solid-block-red {
  background-color: #FF1744 !important;
  box-shadow: 0 0 10px rgba(255, 23, 68, 0.7), inset 0 0 4px rgba(255, 255, 255, 0.6) !important;
  opacity: 1 !important;
}

.solid-block-yellow {
  background-color: #FFB800 !important;
  box-shadow: 0 0 10px rgba(255, 184, 0, 0.7), inset 0 0 4px rgba(255, 255, 255, 0.6) !important;
  opacity: 1 !important;
}

/* Audio Wave Visualizer Bar */
@keyframes wave-bounce {
  0%, 100% { transform: scaleY(0.3); }
  50% { transform: scaleY(1); }
}

.bar-bounce {
  animation: wave-bounce 0.6s infinite ease-in-out;
}

/* iPhone safe area padding for modern bezels */
.safe-pb {
  padding-bottom: max(1rem, env(safe-area-inset-bottom));
}

.safe-pt {
  padding-top: max(0.5rem, env(safe-area-inset-top));
}
