* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: #07080c;
  color: #9fb4d0;
  font-family: "Press Start 2P", "Courier New", monospace;
  min-height: 100%;
}

#wrap {
  width: 100%;
  max-width: 820px;
  margin: 0 auto;
  padding: 10px;
  text-align: center;
  user-select: none;
  -webkit-user-select: none;
}

h1 {
  margin: 4px 0 10px;
  font-size: 22px;
  letter-spacing: 4px;
  color: #ffcc33;
  text-shadow: 3px 3px 0 #b3361b, 6px 6px 0 #1b1020;
}

#screen {
  position: relative;
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  border: 4px solid #2c3550;
  box-shadow: 0 0 0 4px #10131d, 0 0 40px rgba(80, 160, 255, 0.25);
  background: #000;
  line-height: 0;
}

canvas#game {
  width: 100%;
  height: auto;
  display: block;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  cursor: crosshair;
}

/* CRT scanlines + vignette */
#crt {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    repeating-linear-gradient(to bottom, rgba(0,0,0,0.0) 0px, rgba(0,0,0,0.0) 2px, rgba(0,0,0,0.16) 3px),
    radial-gradient(ellipse at center, rgba(0,0,0,0) 60%, rgba(0,0,0,0.45) 100%);
}

#shop {
  display: grid;
  grid-template-columns: repeat(9, 1fr);
  gap: 6px;
  max-width: 800px;
  margin: 12px auto 0;
}

#shop button {
  font-family: inherit;
  font-size: 8px;
  line-height: 1.5;
  padding: 8px 2px 7px;
  color: #dfe9ff;
  background: #1a2133;
  border: 3px solid #3b4a72;
  border-bottom-color: #121827;
  border-right-color: #121827;
  cursor: pointer;
  transition: transform 0.05s;
}

#shop button .k { color: #ffcc33; display: block; font-size: 9px; }
#shop button .c { color: #6dff9a; display: block; margin-top: 3px; }
#shop button:hover { background: #26304a; }
#shop button:active { transform: translateY(2px); }
#shop button.off { opacity: 0.38; filter: grayscale(0.8); }
#shop button.on { border-color: #ffcc33; background: #3a3320; }

#help {
  margin: 14px auto 0;
  max-width: 800px;
  font-size: 8px;
  line-height: 2;
  color: #6c7d9c;
}
#help b { color: #cfe0ff; font-weight: normal; }

@media (max-width: 640px) {
  #shop { grid-template-columns: repeat(3, 1fr); }
}
