:root {
  --bg: #070b17;
  --surface: #121a31;
  --surface-2: #1a284d;
  --line: rgba(148, 163, 184, 0.24);
  --text: #e2e8f0;
  --muted: #94a3b8;
}

* { box-sizing: border-box; }

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

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

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

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

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

#restartBtn {
  border: 0;
  border-radius: 10px;
  background: linear-gradient(135deg, #0ea5e9, #2563eb);
  color: #fff;
  padding: 9px 14px;
  font-weight: 700;
  cursor: pointer;
}

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

.stat {
  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));
}

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

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

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