/* ── Reset & Base ── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  width: 100%;
  height: 100%;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  font-family: 'Courier New', Courier, monospace;
  cursor: auto;
}

/* ── App container ── */
#app {
  position: relative;
  display: inline-block;
  line-height: 0;
}

/* ── Canvas ── */
#gameCanvas {
  display: block;
  background: #000;
  image-rendering: pixelated;
}

/* ── CRT scanline + vignette overlay ── */
#crt-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 10;

  /* scanlines */
  background: repeating-linear-gradient(
    to bottom,
    transparent 0px,
    transparent 2px,
    rgba(0, 0, 0, 0.18) 2px,
    rgba(0, 0, 0, 0.18) 4px
  );

  /* vignette */
  box-shadow: inset 0 0 120px 40px rgba(0,0,0,0.65);

  /* subtle flicker animation */
  animation: flicker 8s infinite;
}

@keyframes flicker {
  0%   { opacity: 1;    }
  92%  { opacity: 1;    }
  93%  { opacity: 0.92; }
  94%  { opacity: 1;    }
  96%  { opacity: 0.96; }
  97%  { opacity: 1;    }
  100% { opacity: 1;    }
}
