@font-face {
  font-family: 'Press Start 2P';
  src: url('assets/fonts/PressStart2P-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: block;
}

html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #000;
  color: #fff;
  /* Touch devices: no panning, no pull-to-refresh, no double-tap zoom, no long-press
     selection or blue tap flash. Every touch belongs to the game. */
  touch-action: none;
  overscroll-behavior: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
}

/* Letterbox: the canvas is centred on black at whatever size display.js picks. */
#stage {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
}

#screen {
  display: block;
  image-rendering: crisp-edges;
  image-rendering: pixelated;
  outline: none;
  touch-action: none;
}

/* Name overlay: a real <input> so a phone's keyboard opens. io/nameField.js parks it on
   the drawn field and shows it only while a name is being typed; the value it reports is
   what the canvas draws, so the input itself stays invisible. */
#name-field {
  display: none;
  position: fixed;
  z-index: 2;
  margin: 0;
  padding: 0;
  border: 0;
  outline: none;
  background: transparent;
  color: transparent;
  caret-color: transparent;
  font-family: 'Press Start 2P', monospace;
  text-transform: uppercase;
  user-select: text;
  -webkit-user-select: text;
}

/* CRT overlay; display.js sets its box and --scan (CSS size of one logical pixel). */
.crt {
  --scan: 3px;
  position: absolute;
  left: 0;
  top: 0;
  width: 0;
  height: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse at center, rgba(0, 0, 0, 0) 58%, rgba(0, 0, 0, 0.5) 100%),
    repeating-linear-gradient(
      to bottom,
      rgba(0, 0, 0, 0) 0,
      rgba(0, 0, 0, 0) calc(var(--scan) * 0.6),
      rgba(0, 0, 0, 0.3) calc(var(--scan) * 0.6),
      rgba(0, 0, 0, 0.3) var(--scan)
    );
}

/* Scanlines turn to mush below 2 device pixels per logical pixel; keep only the vignette. */
.crt[data-scan='off'] {
  background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0) 58%, rgba(0, 0, 0, 0.5) 100%);
}

.notice {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding: 16px;
  box-sizing: border-box;
  font-family: 'Press Start 2P', monospace;
  font-size: 16px;
  line-height: 1.6;
  text-align: center;
  color: #fff;
  background: #000;
}

.notice p {
  margin: 0;
}

.notice p:first-child {
  color: #ffb000;
}

.notice .cmd {
  color: #33f0ff;
}
