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

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

#game-container {
  position: relative;
  line-height: 0;
  /* Warm orange glow — mimics old CRT cabinet phosphor bloom */
  box-shadow:
    0 0 0   2px #1a0a00,
    0 0 18px 4px rgba(255, 80, 0, 0.45),
    0 0 60px 8px rgba(255, 40, 0, 0.20),
    0 0 120px    rgba(200, 30, 0, 0.10);
}

#game-canvas {
  display: block;
  width: 672px;   /* 224 × 3 */
  height: 768px;  /* 256 × 3 */
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

/* Scale down on small screens */
@media (max-height: 800px) {
  #game-canvas {
    width:  448px;   /* 224 × 2 */
    height: 512px;   /* 256 × 2 */
  }
}

@media (max-height: 540px) {
  #game-canvas {
    width:  224px;
    height: 256px;
  }
}

/* CRT scanline overlay — line spacing matches 3× canvas scale (every 3 CSS px = 1 canvas px row) */
#game-container::after {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    180deg,
    transparent     0px,
    transparent     5px,
    rgba(0,0,0,0.22) 5px,
    rgba(0,0,0,0.22) 6px
  );
  pointer-events: none;
  z-index: 1;
}

/* Vignette — darker corners like a real arcade monitor */
#game-container::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse at center,
    transparent 55%,
    rgba(0, 0, 0, 0.55) 100%
  );
  pointer-events: none;
  z-index: 2;
}
