:root {
  --bg: #0a0612;
  --purple: #7b2fff;
  --pink: #ff3d9a;
  --cyan: #00f0ff;
  --gold: #ffd700;
  --green: #39ff14;
  --mountain: #1a1030;
  --scanline: rgba(0, 0, 0, 0.35);
}

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

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #000;
  font-family: "Press Start 2P", monospace;
  color: var(--cyan);
}

.crt {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background:
    radial-gradient(ellipse at center, #1a0a2e 0%, #000 70%);
  padding: 1rem;
}

.screen {
  position: relative;
  border: 4px solid #333;
  border-radius: 12px;
  box-shadow:
    0 0 40px rgba(123, 47, 255, 0.4),
    inset 0 0 80px rgba(0, 0, 0, 0.8);
  background: var(--bg);
  max-width: 100%;
}

.screen::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    var(--scanline) 2px,
    var(--scanline) 4px
  );
  pointer-events: none;
  z-index: 10;
  border-radius: 8px;
}

.screen::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 50%, rgba(0,0,0,0.5) 100%);
  pointer-events: none;
  z-index: 11;
  border-radius: 8px;
}

.hud {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.6rem 1rem;
  font-size: 0.55rem;
  letter-spacing: 0.05em;
  background: linear-gradient(180deg, #1a1030, var(--bg));
  border-bottom: 2px solid var(--purple);
  text-shadow: 0 0 8px var(--purple);
}

.hud-bottom {
  border-bottom: none;
  border-top: 2px solid var(--purple);
  justify-content: center;
  gap: 1rem;
}

.hud-center {
  font-size: 0.5rem;
  color: var(--gold);
  text-shadow: 0 0 10px var(--gold);
}

.hud b {
  color: var(--green);
}

.hud-left, .hud-right {
  display: flex;
  gap: 1.2rem;
}

#game {
  display: block;
  width: 100%;
  max-width: 640px;
  height: auto;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.85);
  z-index: 100;
}

.overlay.hidden {
  display: none;
}

.panel {
  text-align: center;
  padding: 2rem;
  border: 3px solid var(--purple);
  background: linear-gradient(180deg, #150820, #0a0612);
  box-shadow: 0 0 60px rgba(123, 47, 255, 0.6);
  animation: pulse-border 2s ease-in-out infinite;
}

@keyframes pulse-border {
  0%, 100% { box-shadow: 0 0 40px rgba(123, 47, 255, 0.4); }
  50% { box-shadow: 0 0 80px rgba(255, 61, 154, 0.6); }
}

.panel h1 {
  font-size: 1.4rem;
  color: var(--purple);
  text-shadow: 0 0 20px var(--purple);
  margin-bottom: 0.5rem;
}

.panel h2 {
  font-size: 0.9rem;
  color: var(--pink);
  text-shadow: 0 0 15px var(--pink);
  margin-bottom: 1.5rem;
}

.tagline {
  font-size: 0.5rem;
  color: var(--cyan);
  margin-bottom: 1rem;
}

.mountain {
  font-size: 0.45rem;
  color: var(--gold);
  margin-bottom: 2rem;
}

.prompt {
  font-size: 0.55rem;
  color: var(--green);
  margin-bottom: 1rem;
}

.hint {
  font-size: 0.4rem;
  color: #666;
}

.blink {
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  50% { opacity: 0; }
}

@media (max-width: 680px) {
  .hud { font-size: 0.4rem; }
  .hud-center { display: none; }
  .panel h1 { font-size: 1rem; }
}
