/* arcade.css — full-screen retro CRT shell for DOit Arcade. */

:root {
  --bg: #0B0E14;
  --navy: #1B2A4A;
  --yellow: #FFD200;
  --text: #F4F4F0;
}

* {
  box-sizing: border-box;
  -webkit-user-select: none;
  -moz-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  touch-action: none;
}

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #000;
  color: var(--text);
  font-family: "Press Start 2P", "Courier New", monospace;
  overscroll-behavior: none;
}

/* Full-viewport stage; flexbox-centers the canvas as a fallback before
   loop.js takes over with absolute positioning. */
#stage {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  overflow: hidden;
}

/* Crisp pixels. loop.js manages width/height/left/top of the canvas. */
#screen {
  display: block;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  background: var(--bg);
  touch-action: none;
}

/* CRT scanlines + subtle vignette. Never intercepts input. */
#crt {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 20;
  background:
    repeating-linear-gradient(
      to bottom,
      rgba(0, 0, 0, 0) 0px,
      rgba(0, 0, 0, 0) 2px,
      rgba(0, 0, 0, 0.18) 3px,
      rgba(0, 0, 0, 0.18) 3px
    ),
    radial-gradient(
      ellipse at center,
      rgba(0, 0, 0, 0) 55%,
      rgba(0, 0, 0, 0.55) 100%
    );
  mix-blend-mode: multiply;
}

/* HUD buttons (top-right). */
#hud {
  position: fixed;
  top: max(8px, env(safe-area-inset-top));
  right: max(8px, env(safe-area-inset-right));
  z-index: 30;
  display: flex;
  gap: 8px;
}

.hud-btn {
  font-family: inherit;
  font-size: 12px;
  line-height: 1;
  color: var(--yellow);
  background: rgba(27, 42, 74, 0.85);
  border: 2px solid var(--yellow);
  border-radius: 4px;
  padding: 8px 10px;
  min-width: 34px;
  min-height: 34px;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-appearance: none;
  appearance: none;
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.5);
}

.hud-btn:active {
  transform: translateY(1px);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.5);
}

.hud-btn.is-off {
  color: #6b7280;
  border-color: #6b7280;
}
