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

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

html, body {
  height: 100%;
  overflow: hidden;
}

body {
  background: radial-gradient(1200px 700px at 50% 20%, #141b36 0%, #05070f 60%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Press Start 2P', 'Courier New', monospace;
  color: #9fe8ff;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 8px;
  overscroll-behavior: none;
  -webkit-tap-highlight-color: transparent;
}

.cabinet {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}

.screen {
  position: relative;
  line-height: 0;
  border-radius: 14px;
  padding: 8px;
  background: linear-gradient(160deg, #2a3350, #161c33 55%, #0d1122);
  box-shadow:
    0 0 0 2px #0a0d18,
    0 0 34px rgba(80, 140, 255, 0.25),
    0 18px 50px rgba(0, 0, 0, 0.6);
}

.screen, canvas {
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

canvas {
  display: block;
  width: min(480px, 94vw, 64vh);
  width: min(480px, 94vw, 64dvh);
  height: auto;
  aspect-ratio: 480 / 640;
  image-rendering: pixelated;
  border-radius: 6px;
  background: #070a16;
}

.scanlines {
  position: absolute;
  inset: 8px;
  border-radius: 6px;
  pointer-events: none;
  background:
    repeating-linear-gradient(
      to bottom,
      rgba(0, 0, 0, 0) 0px,
      rgba(0, 0, 0, 0) 2px,
      rgba(0, 0, 0, 0.16) 3px
    );
  mix-blend-mode: multiply;
}

.hint {
  font-size: 8px;
  color: #5f7396;
  text-align: center;
  line-height: 1.8;
}

@media (max-width: 560px) {
  body { padding: 4px; }
  .screen { padding: 5px; border-radius: 10px; }
  .scanlines { inset: 5px; }
  .hint { font-size: 6px; }
}

@media (max-height: 480px) {
  .hint { display: none; }
}
