* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
}

body {
  background: radial-gradient(1200px 700px at 50% 30%, #101826 0%, #05070d 70%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  font-family: "Courier New", monospace;
}

#cabinet {
  position: relative;
  padding: 14px 14px 18px;
  background: linear-gradient(180deg, #1a2433 0%, #0c1220 100%);
  border: 2px solid #2c3e57;
  border-radius: 16px;
  box-shadow:
    0 0 60px rgba(55, 224, 255, 0.12),
    0 0 120px rgba(255, 90, 160, 0.08),
    inset 0 2px 0 rgba(255, 255, 255, 0.08),
    inset 0 -6px 18px rgba(0, 0, 0, 0.6);
}

#game {
  display: block;
  width: min(94vw, calc((100vh - 90px) * 16 / 9));
  aspect-ratio: 16 / 9;
  height: auto;
  background: #000;
  border-radius: 8px;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  box-shadow: inset 0 0 40px #000;
}

#scanlines {
  position: absolute;
  inset: 14px 14px 18px;
  border-radius: 8px;
  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.22) 3px,
    rgba(0, 0, 0, 0.22) 4px
  );
  mix-blend-mode: multiply;
  animation: flicker 4.2s infinite steps(1);
}

#glass {
  position: absolute;
  inset: 14px 14px 18px;
  border-radius: 8px;
  pointer-events: none;
  background:
    radial-gradient(120% 90% at 50% -20%, rgba(255, 255, 255, 0.14) 0%, rgba(255, 255, 255, 0) 45%),
    radial-gradient(150% 120% at 50% 120%, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0) 55%);
}

@keyframes flicker {
  0%, 100% { opacity: 1; }
  92% { opacity: 1; }
  93% { opacity: 0.75; }
  94% { opacity: 1; }
  97% { opacity: 0.85; }
  98% { opacity: 1; }
}

#hint {
  color: #55708c;
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin: 12px 0 0;
  text-shadow: 0 0 8px rgba(55, 224, 255, 0.25);
  user-select: none;
}
