:root {
  --stage-width: min(96vw, calc((100vh - 120px) * 4 / 3));
  --green: #3cff6b;
  --green-dim: #1f8f3a;
  --green-bright: #c8ffd4;
  --text: #3cff6b;
  --bg: #05050b;
  --glow: 0 0 6px rgba(60, 255, 107, 0.5);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: "Courier New", ui-monospace, monospace;
  font-weight: bold;
  letter-spacing: 0.12em;
  text-shadow: var(--glow);
}

body {
  display: flex;
  align-items: center;
  justify-content: center;
}

#app {
  width: var(--stage-width);
  font-size: calc(var(--stage-width) * 0.022);
}

.hud {
  display: flex;
  justify-content: space-between;
  padding: 0.4em 0.2em;
}

.hud-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15em;
}

.hud-label {
  color: var(--green);
}

.hud-value {
  color: var(--green-bright);
}

.stage {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
}

#game {
  display: block;
  width: 100%;
  height: 100%;
  background: #000;
  image-rendering: pixelated;
  border: 2px solid var(--green-dim);
  box-shadow: 0 0 12px rgba(60, 255, 107, 0.15);
}

.screen {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.6em;
  text-align: center;
  background: rgba(0, 0, 0, 0.78);
  cursor: pointer;
}

.screen h1,
.screen h2 {
  margin: 0 0 0.4em;
  line-height: 1.1;
  color: var(--green);
  text-shadow: 0 0 12px rgba(60, 255, 107, 0.6);
}

.screen h1 {
  font-size: 3.2em;
}

.screen h2 {
  font-size: 2.6em;
}

.screen p {
  margin: 0;
}

.points {
  border-collapse: collapse;
  margin-bottom: 0.8em;
}

.points td {
  padding: 0.25em 0.5em;
  text-align: left;
}

.points td:first-child {
  text-align: center;
}

.points canvas {
  display: block;
  margin: 0 auto;
  height: 1.4em;
  width: auto;
  image-rendering: pixelated;
}

.controls,
.footer {
  color: var(--green-dim);
  text-shadow: none;
  font-size: 0.75em;
}

.footer {
  text-align: center;
  padding: 0.6em 0;
}

.new-high {
  color: var(--green-bright);
}

.blink {
  animation: blink 1s steps(2, start) infinite;
}

@keyframes blink {
  to {
    visibility: hidden;
  }
}

.hidden {
  display: none !important;
}
