:root {
  --bg: #0b1220;
  --surface: #14203a;
  --surface-2: #1f2f57;
  --line: rgba(148, 163, 184, 0.25);
  --text: #e2e8f0;
  --muted: #94a3b8;
}

* { box-sizing: border-box; }

html,
body {
  margin: 0;
  min-height: 100%;
  background: radial-gradient(circle at top, #1d2d52, #0b1220 62%);
  color: var(--text);
  font-family: "Inter", system-ui, sans-serif;
}

.shell {
  width: min(980px, 100vw);
  margin: 0 auto;
  padding: 12px;
}

.head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.head h1 {
  margin: 0;
  font-size: 1.35rem;
}

.head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

#restartBtn {
  border: 0;
  border-radius: 10px;
  padding: 9px 14px;
  font-size: 0.88rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #06b6d4, #3b82f6);
  cursor: pointer;
}

.hud {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 12px 0;
}

.chip {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 10px;
  background: linear-gradient(180deg, var(--surface), var(--surface-2));
}

.chip span {
  color: var(--muted);
}

#game {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--line);
  border-radius: 12px;
  display: block;
  background: #091328;
  touch-action: none;
}

.tip {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.85rem;
  text-align: center;
}

@media (max-width: 640px) {
  .hud {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
