:root {
  --bg: #0b1220;
  --surface: #15223b;
  --surface-2: #1b3159;
  --line: rgba(148, 163, 184, 0.25);
  --text: #e2e8f0;
  --muted: #94a3b8;
  --accent: #38bdf8;
  --warn: #f59e0b;
}

* { box-sizing: border-box; }

html,
body {
  margin: 0;
  min-height: 100%;
  background: radial-gradient(circle at top, #1d355f, #0b1220 62%);
  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-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
}

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

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

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

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

.controls {
  margin-top: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

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

.controls p {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
}

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