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

body {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 16px;
  background: radial-gradient(circle at top, #132038 0%, #090d16 70%);
  color: #edf2f7;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  user-select: none;
}

.shell {
  width: min(440px, 100%);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.hud {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

h1 {
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  color: #4ade80;
}

.hint {
  font-size: 0.78rem;
  color: #94a3b8;
  margin-top: 2px;
}

.scores {
  display: flex;
  gap: 8px;
}

.pill {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 6px 12px;
  text-align: center;
  min-width: 68px;
}

.pill span {
  display: block;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #94a3b8;
}

.pill strong {
  font-size: 1.1rem;
  color: #f8fafc;
}

.stage {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(74, 222, 128, 0.28);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.55);
  background: #0b111e;
}

canvas {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
}

.overlay {
  position: absolute;
  inset: 0;
  background: rgba(9, 13, 22, 0.82);
  backdrop-filter: blur(5px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 24px;
  text-align: center;
}

.overlay.hidden {
  display: none;
}

.overlay h2 {
  font-size: 1.5rem;
}

.overlay p {
  font-size: 0.92rem;
  color: #cbd5e1;
  max-width: 280px;
}

#start-btn {
  margin-top: 4px;
  padding: 10px 22px;
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, #4ade80, #22c55e);
  color: #052e16;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
  box-shadow: 0 6px 20px rgba(34, 197, 94, 0.35);
}

#start-btn:hover {
  transform: translateY(-1px);
}

.dpad {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.dpad-row {
  display: flex;
  gap: 6px;
}

.dpad button {
  width: 54px;
  height: 44px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: #e2e8f0;
  font-size: 1.05rem;
  cursor: pointer;
}

.dpad button:active {
  background: rgba(74, 222, 128, 0.25);
}
