@import url('https://fonts.googleapis.com/css2?family=DM+Mono:wght@400;500&family=Manrope:wght@400;600;700;800&display=swap');

:root {
  color-scheme: dark;
  --ink: #f4efdf;
  --muted: #9b9b91;
  --acid: #e6eb14;
  --line: #2b2d29;
  --paper: #070807;
}

* { box-sizing: border-box; }

html, body { min-height: 100%; }

body {
  margin: 0;
  background:
    radial-gradient(circle at 25% 0%, rgba(230, 235, 20, .07), transparent 31rem),
    var(--paper);
  color: var(--ink);
  font-family: Manrope, system-ui, sans-serif;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .16;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.3'/%3E%3C/svg%3E");
}

button { font: inherit; }

.shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 22px;
}

.masthead, footer {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.eyebrow, .kicker, .hint, footer, .icon-button, .hud {
  font-family: "DM Mono", monospace;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.eyebrow { margin: 0 0 6px; color: var(--acid); font-size: 11px; }
h1 { margin: 0; font-size: clamp(24px, 4vw, 44px); letter-spacing: -.05em; line-height: .95; }

.icon-button {
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--line);
  padding: 10px 13px;
  font-size: 10px;
  cursor: pointer;
}
.icon-button:hover { border-color: var(--acid); color: var(--acid); }

.game-frame {
  position: relative;
  margin: 24px 0 18px;
  border: 1px solid var(--line);
  background: #000;
  box-shadow: 0 30px 90px rgba(0,0,0,.6);
  overflow: hidden;
}

.game-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(0,0,0,.10) 0 1px, transparent 1px 3px);
  mix-blend-mode: multiply;
}

canvas {
  display: block;
  width: 100%;
  aspect-ratio: 5 / 3;
  image-rendering: pixelated;
  outline: none;
}

.overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-content: center;
  justify-items: center;
  padding: 28px;
  text-align: center;
  background: #e6eb14;
  color: #090b07;
  backdrop-filter: none;
  transition: opacity .35s ease, visibility .35s ease;
}

.overlay.hidden { opacity: 0; visibility: hidden; }
.crest { color: #090b07; font-size: 40px; margin-bottom: 12px; }
.kicker { color: #090b07; font-size: 10px; margin: 0 0 14px; }
.overlay h2 { font-size: clamp(30px, 5vw, 64px); line-height: .98; letter-spacing: -.055em; margin: 0; }
.lede { color: #303105; max-width: 500px; margin: 18px 0 26px; }
.hint { color: #4b4d06; font-size: 9px; margin: 16px 0 0; }

.primary-button {
  border: 0;
  background: #090b07;
  color: #e6eb14;
  font-weight: 800;
  padding: 15px 22px;
  cursor: pointer;
  box-shadow: 5px 5px 0 #777b0b;
}
.primary-button:hover { transform: translate(2px, 2px); box-shadow: 3px 3px 0 #777b0b; }

.hud {
  position: absolute;
  z-index: 2;
  inset: 14px 16px auto;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: rgba(255,255,255,.75);
  font-size: 9px;
  pointer-events: none;
}

.message {
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: 26px;
  transform: translate(-50%, 10px);
  padding: 9px 13px;
  color: #090b07;
  background: var(--acid);
  font: 700 12px "DM Mono", monospace;
  opacity: 0;
  pointer-events: none;
  transition: .2s ease;
  white-space: nowrap;
}
.message.show { opacity: 1; transform: translate(-50%, 0); }

footer { align-items: center; justify-content: flex-start; color: var(--muted); font-size: 9px; flex-wrap: wrap; }
footer p { margin: 0; }
.key { color: var(--ink); border: 1px solid #3d3e39; padding: 4px 6px; margin-right: 5px; }

@media (max-width: 650px) {
  .shell { width: calc(100% - 16px); padding-top: 16px; }
  .game-frame { margin-top: 16px; }
  .overlay h2 { font-size: 28px; }
  .lede { display: none; }
  .hint { max-width: 280px; line-height: 1.7; }
  footer { line-height: 2.6; }
}
