/* DSP Space Arcade — shared retro UI */
@font-face {
  font-family: "Press Start 2P";
  src: url("../assets/fonts/PressStart2P-Regular.ttf") format("truetype");
  font-display: swap;
}

:root {
  --neon-green: #39ff14;
  --neon-pink: #ff2d95;
  --neon-cyan: #00e5ff;
  --neon-yellow: #ffd700;
  --neon-red: #ff0044;
  --bg-deep: #05010f;
  --bg-mid: #0d0221;
}

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

html, body {
  height: 100%;
}

body {
  background: var(--bg-deep);
  color: #e8f6ff;
  font-family: "Press Start 2P", monospace;
  /* Safari needs the -webkit- prefix for crisp pixel rendering */
  image-rendering: pixelated;
  image-rendering: -webkit-optimize-contrast;
  overflow: hidden;
}

/* CRT overlay for the whole page */
.crt::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  background: repeating-linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0) 0px,
    rgba(0, 0, 0, 0) 2px,
    rgba(0, 0, 0, 0.22) 3px
  );
  /* Safari renders mix-blend-mode differently; use plain alpha as fallback */
  mix-blend-mode: multiply;
  opacity: 0.85;
}

.crt::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9998;
  background: radial-gradient(
    ellipse at center,
    rgba(0, 0, 0, 0) 55%,
    rgba(0, 0, 0, 0.45) 100%
  );
}

/* Neon text glow helpers */
.glow-green { color: var(--neon-green); text-shadow: 0 0 6px var(--neon-green), 0 0 18px rgba(57, 255, 20, 0.6); }
.glow-pink { color: var(--neon-pink); text-shadow: 0 0 6px var(--neon-pink), 0 0 18px rgba(255, 45, 149, 0.6); }
.glow-cyan { color: var(--neon-cyan); text-shadow: 0 0 6px var(--neon-cyan), 0 0 18px rgba(0, 229, 255, 0.6); }
.glow-yellow { color: var(--neon-yellow); text-shadow: 0 0 6px var(--neon-yellow), 0 0 18px rgba(255, 215, 0, 0.6); }

/* Blinking text */
.blink { animation: blink 1s steps(2, start) infinite; }
@keyframes blink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

/* Buttons */
.btn {
  font-family: "Press Start 2P", monospace;
  font-size: 12px;
  padding: 14px 22px;
  color: #05010f;
  background: var(--neon-green);
  border: 3px solid #05010f;
  box-shadow: 0 0 0 3px var(--neon-green), 0 0 18px rgba(57, 255, 20, 0.5);
  cursor: pointer;
  text-transform: uppercase;
  transition: transform 0.05s;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(1px); }
.btn.pink { background: var(--neon-pink); box-shadow: 0 0 0 3px var(--neon-pink), 0 0 18px rgba(255, 45, 149, 0.5); }
.btn.cyan { background: var(--neon-cyan); box-shadow: 0 0 0 3px var(--neon-cyan), 0 0 18px rgba(0, 229, 255, 0.5); }
