:root {
  --bg: #0a0a12;
  --panel: rgba(18, 18, 30, 0.92);
  --line: #262640;
  --text: #eaeaf5;
  --muted: #8f8fa8;
  --left: #e8455f;
  --right: #3f7bff;
  --accent: #ffd166;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: "DejaVu Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-user-select: none;
  user-select: none;
}

#scene {
  display: block;
  width: 100%;
  height: 100%;
}

/* ---------- HUD ---------- */

#hud {
  position: fixed;
  inset: 0 0 auto 0;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: start;
  gap: 1rem;
  padding: 1.2rem 1.6rem;
  pointer-events: none;
}

#hud .label {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

#hud .value {
  font-size: 1.9rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}

.hud-right {
  text-align: right;
}

.combo {
  font-size: 2.6rem;
  font-weight: 800;
  color: var(--accent);
  text-align: center;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 24px rgba(255, 209, 102, 0.45);
  transition: transform 90ms ease-out;
}

.combo.pulse {
  transform: scale(1.18);
}

#progress-wrap {
  grid-column: 1 / -1;
  height: 3px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 2px;
  overflow: hidden;
}

#progress {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--left), var(--right));
}

/* ---------- Overlays ---------- */

.overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 50% 40%, rgba(30, 30, 60, 0.75), rgba(8, 8, 16, 0.96));
  backdrop-filter: blur(3px);
  padding: 1.5rem;
}

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 2rem 2.2rem;
  max-width: 34rem;
  width: 100%;
  text-align: center;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
}

.card h1 {
  margin: 0;
  font-size: 2.6rem;
  letter-spacing: -0.02em;
  background: linear-gradient(90deg, var(--left), var(--right));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.card h2 {
  margin: 0 0 1rem;
  font-size: 1.8rem;
}

.subtitle {
  color: var(--muted);
  margin: 0.4rem 0 1.2rem;
}

.map-title {
  color: var(--text);
  font-weight: 600;
  margin: 0 0 1.6rem;
}

.buttons {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-bottom: 1.2rem;
}

button {
  font: inherit;
  font-weight: 600;
  border-radius: 10px;
  border: 1px solid transparent;
  padding: 0.85rem 1.2rem;
  cursor: pointer;
  transition: transform 90ms ease, background 120ms ease;
}

button:active {
  transform: scale(0.98);
}

.primary {
  background: linear-gradient(90deg, var(--left), var(--right));
  color: #fff;
}

.secondary {
  background: transparent;
  color: var(--text);
  border-color: var(--line);
}

.secondary:hover {
  background: rgba(255, 255, 255, 0.05);
}

.hint {
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.5;
  margin: 0;
}

.error {
  color: #ff6b6b;
  font-size: 0.85rem;
  margin-top: 0.8rem;
}

.result {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.5rem 1rem;
  margin: 0 auto 1.6rem;
  max-width: 20rem;
  text-align: left;
}

.result dt {
  color: var(--muted);
}

.result dd {
  margin: 0;
  text-align: right;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.hidden {
  display: none !important;
}

/* Beim Spielen in VR sollen die Flächen verschwinden */
body.in-vr .overlay {
  display: none !important;
}
