/* ============================================
   SECURENCE – Future Safety Visualization Engine
   Design System & Animation Library
   ============================================ */

/* --- Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

/* --- Design Tokens --- */
:root {
  --bg-primary: #0B0F1A;
  --bg-secondary: #0E1225;
  --bg-tertiary: #131830;

  --safe-green: #00FF6A;
  --safe-green-dim: rgba(0, 255, 106, 0.15);
  --safe-green-glow: rgba(0, 255, 106, 0.4);

  --alert-red: #FF3347;
  --alert-red-dim: rgba(255, 51, 71, 0.15);
  --alert-red-glow: rgba(255, 51, 71, 0.5);
  --alert-orange: #FF8C00;

  --accent-cyan: #00D4FF;
  --accent-blue: #3B82F6;
  --accent-cyan-dim: rgba(0, 212, 255, 0.15);

  --text-primary: #F1F5F9;
  --text-secondary: #94A3B8;
  --text-dim: #475569;
  --text-mono: 'JetBrains Mono', monospace;

  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  --zone-radius: 180px;
  --zone-border: 2px;
  --transition-smooth: 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Reset & Base --- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--bg-primary);
  font-family: var(--font-main);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* --- Utility --- */
.hidden { display: none !important; }

/* ============================================
   SCREEN CONTAINERS
   ============================================ */

.screen {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 10;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.8s ease, visibility 0.8s ease;
}

.screen.active {
  opacity: 1;
  visibility: visible;
}

/* ============================================
   START SCREEN
   ============================================ */

#start-screen {
  background: var(--bg-primary);
  z-index: 100;
}

#start-screen::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 600px 400px at 50% 40%, rgba(0, 212, 255, 0.06) 0%, transparent 70%),
    radial-gradient(ellipse 400px 300px at 30% 60%, rgba(0, 255, 106, 0.03) 0%, transparent 70%);
  pointer-events: none;
}

.start-content {
  text-align: center;
  position: relative;
  z-index: 2;
}

.start-logo {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 6px;
  text-transform: uppercase;
  color: var(--accent-cyan);
  margin-bottom: 2rem;
  opacity: 0;
  animation: fadeInUp 1s ease 0.3s forwards;
}

.start-logo .logo-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: var(--accent-cyan);
  border-radius: 50%;
  margin-right: 8px;
  box-shadow: 0 0 10px var(--accent-cyan);
  vertical-align: middle;
}

.start-title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  letter-spacing: -1px;
  line-height: 1.1;
  margin-bottom: 1rem;
  opacity: 0;
  animation: fadeInUp 1s ease 0.6s forwards;
}

.start-title .highlight {
  background: linear-gradient(135deg, var(--accent-cyan), var(--safe-green));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.start-subtitle {
  font-size: clamp(0.875rem, 2vw, 1.1rem);
  font-weight: 300;
  color: var(--text-secondary);
  letter-spacing: 1px;
  margin-bottom: 3rem;
  opacity: 0;
  animation: fadeInUp 1s ease 0.9s forwards;
}

.start-btn {
  position: relative;
  padding: 14px 40px;
  font-family: var(--font-main);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--bg-primary);
  background: linear-gradient(135deg, var(--accent-cyan), var(--safe-green));
  border: none;
  border-radius: 6px;
  cursor: pointer;
  opacity: 0;
  animation: fadeInUp 1s ease 1.2s forwards;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  overflow: hidden;
}

.start-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 30%, rgba(255,255,255,0.2) 50%, transparent 70%);
  transform: translateX(-100%);
  transition: transform 0.6s ease;
}

.start-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0, 212, 255, 0.3);
}

.start-btn:hover::before {
  transform: translateX(100%);
}

.start-version {
  position: absolute;
  bottom: 2rem;
  font-family: var(--text-mono);
  font-size: 0.65rem;
  color: var(--text-dim);
  letter-spacing: 2px;
  opacity: 0;
  animation: fadeIn 1s ease 1.5s forwards;
}

/* ============================================
   SIMULATION SCENE
   ============================================ */

#simulation-scene {
  background: var(--bg-primary);
  z-index: 50;
}

/* --- Vignette --- */
.vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 40%, rgba(0,0,0,0.6) 100%);
  pointer-events: none;
  z-index: 5;
}

/* --- Ground Grid --- */
.ground-grid {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 50%;
  background:
    linear-gradient(to top, rgba(0, 212, 255, 0.03) 0%, transparent 60%),
    repeating-linear-gradient(90deg, rgba(0, 212, 255, 0.02) 0px, rgba(0, 212, 255, 0.02) 1px, transparent 1px, transparent 80px),
    repeating-linear-gradient(0deg, rgba(0, 212, 255, 0.02) 0px, rgba(0, 212, 255, 0.02) 1px, transparent 1px, transparent 80px);
  transform: perspective(500px) rotateX(45deg);
  transform-origin: bottom center;
  pointer-events: none;
  z-index: 1;
  opacity: 0;
  transition: opacity 1.5s ease;
}

.ground-grid.visible {
  opacity: 1;
}

/* --- Background Ambient --- */
.bg-ambient {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

.bg-ambient::before {
  content: '';
  position: absolute;
  top: 20%;
  left: 50%;
  width: 600px;
  height: 600px;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(0, 212, 255, 0.04) 0%, transparent 70%);
  animation: ambientPulse 6s ease-in-out infinite;
}

/* --- Particle Container --- */
.particles-container {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  overflow: hidden;
}

.particle {
  position: absolute;
  width: 2px;
  height: 2px;
  background: var(--accent-cyan);
  border-radius: 50%;
  opacity: 0;
  animation: particleFloat linear infinite;
}

/* ============================================
   SAFE ZONE
   ============================================ */

.safe-zone-container {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 10;
}

.safe-zone {
  position: relative;
  width: calc(var(--zone-radius) * 2);
  height: calc(var(--zone-radius) * 2);
  border-radius: 50%;
  border: var(--zone-border) solid var(--safe-green);
  opacity: 0;
  transform: scale(0.8);
  transition: 
    opacity 1s ease,
    transform 1s cubic-bezier(0.4, 0, 0.2, 1),
    border-color 0.8s ease,
    box-shadow 0.8s ease;
}

.safe-zone.visible {
  opacity: 1;
  transform: scale(1);
}

.safe-zone.safe {
  border-color: var(--safe-green);
  box-shadow:
    0 0 20px var(--safe-green-dim),
    0 0 60px rgba(0, 255, 106, 0.08),
    inset 0 0 30px var(--safe-green-dim);
  animation: pulseGreen 3s ease-in-out infinite;
}

.safe-zone.breached {
  border-color: var(--alert-red);
  box-shadow:
    0 0 30px var(--alert-red-dim),
    0 0 80px rgba(255, 51, 71, 0.15),
    inset 0 0 40px var(--alert-red-dim);
  animation: pulseRed 1s ease-in-out infinite;
}

/* --- Concentric Rings --- */
.safe-zone .ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  transition: border-color 0.8s ease;
}

.safe-zone.safe .ring { border-color: rgba(0, 255, 106, 0.08); }
.safe-zone.breached .ring { border-color: rgba(255, 51, 71, 0.1); }

.ring-1 { width: 75%; height: 75%; }
.ring-2 { width: 50%; height: 50%; }
.ring-3 { width: 25%; height: 25%; }

/* --- Crosshair --- */
.safe-zone .crosshair {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.crosshair-h, .crosshair-v {
  position: absolute;
  transition: background 0.8s ease;
}

.crosshair-h {
  width: calc(var(--zone-radius) * 2 - 20px);
  height: 1px;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
}

.crosshair-v {
  width: 1px;
  height: calc(var(--zone-radius) * 2 - 20px);
  left: 0;
  top: 50%;
  transform: translateY(-50%);
}

.safe-zone.safe .crosshair-h,
.safe-zone.safe .crosshair-v {
  background: rgba(0, 255, 106, 0.06);
}

.safe-zone.breached .crosshair-h,
.safe-zone.breached .crosshair-v {
  background: rgba(255, 51, 71, 0.08);
}

/* --- Radar Sweep --- */
.radar-sweep {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 50%;
  height: 2px;
  transform-origin: left center;
  pointer-events: none;
  animation: radarSweep 4s linear infinite;
  transition: background 0.8s ease;
}

.safe-zone.safe .radar-sweep {
  background: linear-gradient(to right, rgba(0, 255, 106, 0.6), transparent);
}

.safe-zone.breached .radar-sweep {
  background: linear-gradient(to right, rgba(255, 51, 71, 0.7), transparent);
}

/* --- Zone Label --- */
.zone-label {
  position: absolute;
  top: -30px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--text-mono);
  font-size: 0.6rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  white-space: nowrap;
  transition: color 0.8s ease;
}

.safe-zone.safe .zone-label { color: var(--safe-green); }
.safe-zone.breached .zone-label { color: var(--alert-red); }

/* ============================================
   CHARACTER
   ============================================ */

.character {
  position: absolute;
  z-index: 15;
  opacity: 0;
  transition: opacity 1s ease;
  filter: drop-shadow(0 0 12px rgba(0, 212, 255, 0.3));
}

.character.visible {
  opacity: 1;
}

.character svg {
  width: 36px;
  height: auto;
  display: block;
}

.character-marker {
  position: absolute;
  bottom: -18px;
  left: 50%;
  transform: translateX(-50%);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1.5px solid var(--accent-cyan);
  animation: markerPulse 2s ease-in-out infinite;
}

.character-marker::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 5px;
  height: 5px;
  background: var(--accent-cyan);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--accent-cyan);
}

.character-label {
  position: absolute;
  top: -22px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--text-mono);
  font-size: 0.55rem;
  color: var(--accent-cyan);
  letter-spacing: 2px;
  white-space: nowrap;
  opacity: 0.7;
}

/* ============================================
   HUD OVERLAY
   ============================================ */

.hud {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 20;
  opacity: 0;
  transition: opacity 0.8s ease;
}

.hud.visible { opacity: 1; }

/* --- Top Bar --- */
.hud-top {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 28px;
}

.hud-logo {
  font-family: var(--font-main);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 5px;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.hud-logo .logo-icon {
  display: inline-block;
  width: 8px;
  height: 8px;
  border: 1.5px solid var(--accent-cyan);
  border-radius: 50%;
  margin-right: 8px;
  vertical-align: middle;
  position: relative;
}

.hud-logo .logo-icon::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 3px;
  height: 3px;
  background: var(--accent-cyan);
  border-radius: 50%;
}

.hud-status {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: 20px;
  font-family: var(--text-mono);
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  transition: all 0.5s ease;
}

.hud-status.safe {
  color: var(--safe-green);
  background: var(--safe-green-dim);
  border: 1px solid rgba(0, 255, 106, 0.2);
}

.hud-status.breached {
  color: var(--alert-red);
  background: var(--alert-red-dim);
  border: 1px solid rgba(255, 51, 71, 0.3);
  animation: statusBlink 1s ease-in-out infinite;
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  transition: background 0.5s ease, box-shadow 0.5s ease;
}

.hud-status.safe .status-dot {
  background: var(--safe-green);
  box-shadow: 0 0 8px var(--safe-green);
}

.hud-status.breached .status-dot {
  background: var(--alert-red);
  box-shadow: 0 0 8px var(--alert-red);
  animation: dotBlink 0.6s ease-in-out infinite;
}

/* --- Bottom Bar --- */
.hud-bottom {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 20px 28px;
}

.hud-coordinates {
  font-family: var(--text-mono);
  font-size: 0.6rem;
  color: var(--text-dim);
  line-height: 1.8;
  letter-spacing: 1px;
}

.hud-coordinates span {
  color: var(--text-secondary);
}

.hud-timestamp {
  font-family: var(--text-mono);
  font-size: 0.6rem;
  color: var(--text-dim);
  text-align: right;
  letter-spacing: 1px;
}

/* ============================================
   SYSTEM MESSAGES
   ============================================ */

.system-messages {
  position: absolute;
  left: 28px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 25;
  max-width: 340px;
}

.system-message {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 16px;
  border-radius: 6px;
  font-family: var(--text-mono);
  font-size: 0.7rem;
  line-height: 1.5;
  letter-spacing: 0.5px;
  opacity: 0;
  transform: translateX(-20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.system-message.visible {
  opacity: 1;
  transform: translateX(0);
}

.system-message.info {
  color: var(--accent-cyan);
  background: rgba(0, 212, 255, 0.06);
  border-left: 2px solid rgba(0, 212, 255, 0.3);
}

.system-message.success {
  color: var(--safe-green);
  background: rgba(0, 255, 106, 0.06);
  border-left: 2px solid rgba(0, 255, 106, 0.3);
}

.system-message.warning {
  color: var(--alert-orange);
  background: rgba(255, 140, 0, 0.06);
  border-left: 2px solid rgba(255, 140, 0, 0.3);
}

.system-message.danger {
  color: var(--alert-red);
  background: rgba(255, 51, 71, 0.06);
  border-left: 2px solid rgba(255, 51, 71, 0.4);
}

.msg-icon {
  flex-shrink: 0;
  margin-top: 1px;
}

/* ============================================
   OVERLAYS
   ============================================ */

.flash-overlay {
  position: absolute;
  inset: 0;
  z-index: 90;
  opacity: 0;
  pointer-events: none;
  background: radial-gradient(circle at center, rgba(255, 51, 71, 0.3), rgba(255, 255, 255, 0.1));
}

.flash-overlay.active {
  animation: flashEffect 0.4s ease-out forwards;
}

.alert-overlay {
  position: absolute;
  inset: 0;
  z-index: 8;
  opacity: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse at center, transparent 30%, rgba(255, 51, 71, 0.08) 100%);
  transition: opacity 1s ease;
}

.alert-overlay.active {
  opacity: 1;
}

/* --- Alert Indicator (top corner) --- */
.alert-indicator {
  position: absolute;
  top: 70px;
  right: 28px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 6px;
  background: rgba(255, 51, 71, 0.1);
  border: 1px solid rgba(255, 51, 71, 0.3);
  font-family: var(--text-mono);
  font-size: 0.6rem;
  color: var(--alert-red);
  letter-spacing: 2px;
  text-transform: uppercase;
  z-index: 25;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.alert-indicator.visible {
  opacity: 1;
  animation: statusBlink 1.2s ease-in-out infinite;
}

.alert-beacon {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--alert-red);
  animation: dotBlink 0.5s ease-in-out infinite;
}

/* ============================================
   END SCREEN
   ============================================ */

#end-screen {
  background: rgba(11, 15, 26, 0.95);
  z-index: 100;
  text-align: center;
  padding: 2rem;
}

.end-content {
  max-width: 560px;
}

.end-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 2rem;
  border-radius: 50%;
  border: 2px solid var(--safe-green);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 30px rgba(0, 255, 106, 0.15);
  opacity: 0;
  transform: scale(0.8);
  animation: fadeInScale 0.8s ease 0.3s forwards;
}

.end-icon svg {
  width: 24px;
  height: 24px;
}

.end-message {
  font-size: clamp(1.1rem, 3vw, 1.5rem);
  font-weight: 300;
  line-height: 1.6;
  color: var(--text-primary);
  letter-spacing: 0.5px;
  margin-bottom: 0.75rem;
  opacity: 0;
  animation: fadeInUp 1s ease 0.5s forwards;
}

.end-message strong {
  font-weight: 600;
  color: var(--safe-green);
}

.end-tagline {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 2.5rem;
  opacity: 0;
  animation: fadeInUp 1s ease 0.7s forwards;
}

.replay-btn {
  padding: 12px 36px;
  font-family: var(--font-main);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-primary);
  background: transparent;
  border: 1px solid rgba(0, 255, 106, 0.3);
  border-radius: 6px;
  cursor: pointer;
  opacity: 0;
  animation: fadeInUp 1s ease 0.9s forwards;
  transition: all 0.3s ease;
}

.replay-btn:hover {
  background: rgba(0, 255, 106, 0.08);
  border-color: var(--safe-green);
  box-shadow: 0 0 20px rgba(0, 255, 106, 0.15);
  transform: translateY(-2px);
}

/* ============================================
   SCREEN SHAKE
   ============================================ */

.shake {
  animation: screenShake 0.5s ease-out;
}

/* ============================================
   KEYFRAME ANIMATIONS
   ============================================ */

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

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

@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes pulseGreen {
  0%, 100% {
    box-shadow:
      0 0 20px var(--safe-green-dim),
      0 0 60px rgba(0, 255, 106, 0.06),
      inset 0 0 30px var(--safe-green-dim);
  }
  50% {
    box-shadow:
      0 0 40px rgba(0, 255, 106, 0.25),
      0 0 80px rgba(0, 255, 106, 0.1),
      inset 0 0 50px rgba(0, 255, 106, 0.1);
  }
}

@keyframes pulseRed {
  0%, 100% {
    box-shadow:
      0 0 25px var(--alert-red-dim),
      0 0 70px rgba(255, 51, 71, 0.1),
      inset 0 0 35px var(--alert-red-dim);
  }
  50% {
    box-shadow:
      0 0 50px rgba(255, 51, 71, 0.35),
      0 0 100px rgba(255, 51, 71, 0.18),
      inset 0 0 60px rgba(255, 51, 71, 0.15);
  }
}

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

@keyframes markerPulse {
  0%, 100% {
    transform: translateX(-50%) scale(1);
    opacity: 0.6;
  }
  50% {
    transform: translateX(-50%) scale(1.3);
    opacity: 0.3;
  }
}

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

@keyframes flashEffect {
  0% { opacity: 0.7; }
  100% { opacity: 0; }
}

@keyframes statusBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

@keyframes dotBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.2; }
}

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

@keyframes particleFloat {
  0% {
    transform: translateY(0) translateX(0);
    opacity: 0;
  }
  10% { opacity: 0.6; }
  90% { opacity: 0.6; }
  100% {
    transform: translateY(-100vh) translateX(30px);
    opacity: 0;
  }
}

@keyframes scanlineMove {
  from { transform: translateY(-100%); }
  to { transform: translateY(100vh); }
}

/* --- Scanline --- */
.scanline {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 6;
  overflow: hidden;
  opacity: 0.03;
}

.scanline::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--accent-cyan);
  animation: scanlineMove 8s linear infinite;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 768px) {
  :root {
    --zone-radius: 120px;
  }

  .hud-top {
    padding: 14px 16px;
  }

  .hud-bottom {
    padding: 14px 16px;
  }

  .hud-logo {
    font-size: 0.6rem;
    letter-spacing: 3px;
  }

  .system-messages {
    left: 12px;
    right: 12px;
    top: auto;
    bottom: 80px;
    transform: none;
    max-width: 100%;
  }

  .system-message {
    font-size: 0.6rem;
    padding: 8px 12px;
  }

  .character svg {
    width: 28px;
  }

  .alert-indicator {
    top: auto;
    bottom: 60px;
    right: 12px;
    font-size: 0.5rem;
  }

  .start-btn {
    padding: 12px 32px;
    font-size: 0.75rem;
  }

  .hud-coordinates {
    font-size: 0.5rem;
  }

  .hud-timestamp {
    font-size: 0.5rem;
  }
}

@media (max-width: 480px) {
  :root {
    --zone-radius: 90px;
  }

  .zone-label {
    font-size: 0.5rem;
    letter-spacing: 2px;
  }

  .system-messages {
    bottom: 70px;
  }

  .end-message {
    font-size: 1rem;
  }
}

/* ============================================
   PREFERS REDUCED MOTION
   ============================================ */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
