* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { width: 100%; height: 100%; overflow: hidden; background: #050014; font-family: 'Press Start 2P', monospace; }
body { display: flex; align-items: center; justify-content: center; }

canvas { display: block; image-rendering: pixelated; background: #050014; }

#ui { position: fixed; inset: 0; pointer-events: none; }
.hud {
  position: absolute; top: 8px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 18px; pointer-events: none;
  text-shadow: 0 0 6px #ff00ff, 0 0 12px #ff00ff;
}
.hud-block { display: flex; flex-direction: column; align-items: center; }
.label { font-size: 8px; color: #00ffff; letter-spacing: 1px; }
.val { font-size: 12px; color: #ff00ff; margin-top: 4px; }

.overlay {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 16px;
  background: radial-gradient(ellipse at center, rgba(10,0,30,0.85) 0%, rgba(5,0,20,0.95) 100%);
  pointer-events: auto;
}
.overlay.hidden { display: none; }
.title { font-size: clamp(20px,5vw,40px); color: #ff00ff; text-shadow: 0 0 8px #ff00ff, 0 0 20px #ff00ff, 0 0 40px #8000ff; letter-spacing: 2px; }
.sub { font-size: 10px; color: #00ffff; text-shadow: 0 0 6px #00ffff; }
.menu { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }
.menu button, .how button { font-family: 'Press Start 2P', monospace; font-size: 10px; padding: 10px 16px; background: transparent; color: #00ffff; border: 2px solid #00ffff; cursor: pointer; text-shadow: 0 0 4px #00ffff; box-shadow: 0 0 8px #00ffff inset; transition: all .1s; }
.menu button:hover, .how button:hover { background: #00ffff; color: #050014; box-shadow: 0 0 16px #00ffff; }
.menu .start-btn { font-size: 14px; padding: 14px 28px; border-width: 3px; box-shadow: 0 0 16px #ff00ff inset, 0 0 24px #ff00ff; color: #ff00ff; border-color: #ff00ff; text-shadow: 0 0 6px #ff00ff; }
.menu .start-btn:hover { background: #ff00ff; color: #050014; }
.menu .how-btn { font-size: 8px; padding: 6px 10px; border: 1px dashed #00ffff; box-shadow: none; opacity: 0.7; }
.how { text-align: center; font-size: 9px; color: #ff00ff; line-height: 1.8; text-shadow: 0 0 4px #ff00ff; }
.how p { margin: 4px 0; }
.msg { font-size: 12px; color: #ffff00; text-shadow: 0 0 8px #ffff00; min-height: 16px; }
.toggles { position: absolute; top: 8px; right: 8px; display: flex; gap: 8px; pointer-events: auto; z-index: 10; }
.tog { font-family: 'Press Start 2P', monospace; font-size: 16px; padding: 4px 8px; background: rgba(5,0,20,0.6); color: #00ffff; border: none; cursor: pointer; text-shadow: 0 0 8px #00ffff; border-radius: 4px; }
.tog.off { color: #ff4444; text-shadow: 0 0 4px #ff4444; opacity: 0.6; }
.tog:hover { color: #ffff00; text-shadow: 0 0 8px #ffff00; }