:root {
  color-scheme: dark;
  --bg: #111;
  --panel: #181818;
  --border: #2a2a2a;
  --text: #ddd;
  --muted: #bdbdbd;
  --focus: 0 0 0 3px rgba(100, 150, 255, 0.35);
  --radius: 12px;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.4 system-ui, Segoe UI, Roboto, Arial, sans-serif;
}

.visually-hidden {
  position: absolute !important;
  height: 1px; width: 1px;
  overflow: hidden; clip: rect(1px, 1px, 1px, 1px);
  white-space: nowrap; border: 0; padding: 0; margin: -1px;
}

.wrap {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 160px 16px 16px;
  gap: 16px;
}

.stage {
  position: relative;
  width: min(900px, 95vw);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 25px;
  padding: 20px;
  border-radius: 20px;
  background: radial-gradient(circle at center, #111 0%, #000 80%);
  box-shadow:
    inset 0 0 40px rgba(0, 0, 0, 0.9),
    inset 0 0 80px rgba(0, 0, 0, 0.95);
  z-index: 0;
}

.stage::before {
  content: "";
  position: absolute;
  inset: -5px;
  border-radius: 25px;
  border: 2px solid #a0f;
  box-shadow:
    0 0 4px #a0f,
    0 0 10px #a0f,
    0 0 20px #80f,
    0 0 40px #40f;
  z-index: 9998;
  pointer-events: none;
}

.stage::after {
  content: "";
  position: absolute;
  inset: -25px;
  border-radius: 45px;
  border: 4px solid #0f0;
  box-shadow:
    0 0 4px #0f0,
    0 0 10px #0f0,
    0 0 20px #0a0,
    0 0 40px #0a0;
  z-index: 9997;
  pointer-events: none;
}

.canvas-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 1;
  background: var(--panel);
  border-radius: var(--radius);
  overflow: hidden;
}

.canvas-wrap > canvas {
  width: 100%;
  height: 100%;
  display: block;
  image-rendering: pixelated;
}

.hud {
  display: grid;
  justify-items: center;
  gap: 10px;
  text-align: center;
}

.help { color: var(--muted); margin: 0; }
kbd {
  background: #202020;
  border: 1px solid #333;
  border-bottom-color: #111;
  border-radius: 6px;
  padding: 2px 6px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.95em;
  color: var(--text);
}
.sr-status { margin: 0; min-height: 1em; }

.noscript {
  margin: 16px;
  padding: 12px 16px;
  border-radius: 8px;
  background: #2a1a1a;
  border: 1px solid #553;
}

.site-footer {
  position: fixed;
  bottom: 0; left: 0; width: 100%;
  text-align: center;
  padding: 8px 0;
  background: rgba(17, 17, 17, 0.85);
  font-size: 0.85rem;
  color: #ccc;
  z-index: 1000;
}
.site-footer strong { color: #fff; }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition: none !important; }
}

.game-logo {
  position: fixed;
  top: 50px;
  left: 100px;
  font-size: 2.5rem;
  font-weight: bold;
  color: #0f0;
  text-shadow:
    0 0 4px #0f0,
    0 0 10px #0f0,
    0 0 20px #0a0,
    0 0 40px #0a0;
  z-index: 2000;
  user-select: none;
  pointer-events: none;
  font-family: "Press Start 2P", monospace, system-ui;
}
