:root {
  --bg: #11151c;
  --panel: #1b2230;
  --ink: #e8eef7;
  --accent: #4fd1a5;
  --food: #ff7a7a;
  --grid: #232c3d;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: var(--bg);
  color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

.stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  padding: 1.5rem;
  background: var(--panel);
  border-radius: 16px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

.gate,
.game {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.gate h1 {
  margin: 0;
  font-size: 1.4rem;
}

.gate-lede {
  margin: 0;
  opacity: 0.75;
}

.gate-form {
  display: flex;
  gap: 0.5rem;
}

.gate-form input {
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--grid);
  background: #0c0f15;
  color: var(--ink);
  font-size: 1rem;
  letter-spacing: 0.08em;
}

.gate-form button {
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 8px;
  background: var(--accent);
  color: #06231a;
  font-weight: 700;
  cursor: pointer;
}

.gate-error {
  min-height: 1.2em;
  color: var(--food);
  font-size: 0.85rem;
}

.account {
  margin: 0;
  font-size: 0.8rem;
  color: var(--accent);
  opacity: 0.9;
}

[hidden] {
  display: none !important;
}

.hud {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  width: 100%;
}

.hud h1 {
  margin: 0;
  font-size: 1.4rem;
  letter-spacing: 0.04em;
}

.score {
  margin: 0;
  font-variant-numeric: tabular-nums;
  color: var(--accent);
}

canvas {
  background: #0c0f15;
  border: 1px solid var(--grid);
  border-radius: 10px;
  image-rendering: pixelated;
  touch-action: none;
}

.status {
  margin: 0;
  min-height: 1.2em;
  font-weight: 600;
  color: var(--accent);
}

.hint {
  margin: 0;
  font-size: 0.8rem;
  opacity: 0.65;
}
