/* ── Blast Zone — Optik der DOM-Teile über der three.js-Bühne (Neubau Nachtlauf 31.10.2026; Grundlage games/croak-hop/css/spiel.css) ──
   WAS: HUD oben rechts (Punkte, Level, Leben, Zeit, Vorrat Bomben/Flamme/Tempo), Startbildschirm-Norm sb-* als Glaskarte, Pause, Ende,
        Meldung, Ladehinweis, Handy-Steuerung (Pfeilkreuz links unten, runder Bombenknopf rechts unten).
   FARBEN (Tempel bei Nacht): Runen-Türkis, Messing/Gold, Fackelorange — nur in :root ändern. Oben links ~64×56 px bleiben frei für die
        GameZone-Pille. Schriften nur von fonts.hirsing.eu (Orbitron 900 = Titel/Ziffern, Exo 2 = Bedienung). */
@font-face { font-family: 'Orbitron'; font-weight: 900; font-display: swap; src: url('https://fonts.hirsing.eu/orbitron-v35-latin/orbitron-v35-latin-900.woff2') format('woff2'); }
@font-face { font-family: 'Exo 2'; font-weight: 400; font-display: swap; src: url('https://fonts.hirsing.eu/exo-2-v26/exo-2-v26-latin-regular.woff2') format('woff2'); }
@font-face { font-family: 'Exo 2'; font-weight: 700; font-display: swap; src: url('https://fonts.hirsing.eu/exo-2-v26/exo-2-v26-latin-700.woff2') format('woff2'); }

:root {
  --cyan: #4ff0d8; --magenta: #ff8a2a; --violett: #1f8f7a; --gold: #ffcf6a;
  --nacht: #050c0a; --text: #eef8f0; --leise: #a9c4b4;
  --glas: rgba(8, 22, 18, 0.5); --glas-dicht: rgba(6, 18, 14, 0.78); --glas-rand: rgba(79, 240, 216, 0.28);
  --leucht-c: 0 0 8px rgba(79, 240, 216, 0.85), 0 0 22px rgba(79, 240, 216, 0.4);
  --leucht-m: 0 0 8px rgba(255, 138, 42, 0.9), 0 0 22px rgba(255, 110, 30, 0.5);
  --titel: 'Orbitron', 'Exo 2', system-ui, sans-serif; --sans: 'Exo 2', system-ui, sans-serif;
  --oben: max(10px, env(safe-area-inset-top)); --unten: max(10px, env(safe-area-inset-bottom));
  --links: max(10px, env(safe-area-inset-left)); --rechts: max(10px, env(safe-area-inset-right));
  --pille: 58px;   /* Höhe des freien Streifens oben für die GameZone-Pille */
}
html { box-sizing: border-box; -webkit-text-size-adjust: 100%; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--nacht); color: var(--text); font-family: var(--sans);
  -webkit-tap-highlight-color: transparent; overscroll-behavior: none; }
body { user-select: none; -webkit-user-select: none; }
.hud *, .ebene *, .meldung, .laden, .fehler { box-sizing: border-box; }
.versteckt { display: none !important; }

/* ── Bühne (three.js) ──────────────────────────────────────────────────── */
#buehne { position: fixed; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; outline: none;
  background: radial-gradient(ellipse at 50% 40%, #12302a, var(--nacht) 70%); }   /* Hintergrund nur bis die Szene steht */

/* ── HUD oben rechts ───────────────────────────────────────────────────── */
.hud { position: fixed; top: var(--oben); right: var(--rechts); z-index: 10; display: flex; align-items: flex-start; gap: 10px; pointer-events: none; }
.hud-tafel, .knoepfe { pointer-events: auto; }
.hud-tafel { display: flex; gap: 14px; align-items: center; padding: 6px 16px 7px; border-radius: 16px; background: var(--glas);
  border: 1px solid var(--glas-rand); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 0 18px rgba(79, 240, 216, 0.12), inset 0 0 14px rgba(255, 160, 60, 0.1); }
.hud-wert { text-align: center; }
.hud-wert span { display: block; font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--leise); }
.hud-wert b { font: 700 clamp(22px, 2.4vw, 30px)/1.05 var(--sans); color: #fff; text-shadow: var(--leucht-c); }
#hud-level { color: var(--gold); text-shadow: 0 0 8px rgba(255, 200, 80, 0.8); }
.hud-leben { display: flex; gap: 4px; justify-content: center; margin-top: 4px; }
/* Leben als kleine Messing-Roboterköpfe mit Türkis-Augen (wie der Held) */
.hud-leben i { width: 16px; height: 14px; border-radius: 45% 45% 35% 35%;
  background: radial-gradient(circle at 30% 48%, #c8fff6 0 1.6px, #3ff0d6 2px 2.8px, transparent 3.2px),
              radial-gradient(circle at 70% 48%, #c8fff6 0 1.6px, #3ff0d6 2px 2.8px, transparent 3.2px),
              radial-gradient(ellipse at 40% 30%, #ffe6a0, #d49a3a 60%, #8a5a1e);
  box-shadow: 0 0 7px rgba(255, 190, 90, 0.6); }
.hud-leben i.weg { background: rgba(255, 255, 255, 0.12); box-shadow: none; }

.knoepfe { display: flex; gap: 8px; }
.rund { width: 44px; height: 44px; display: grid; place-items: center; padding: 0; border-radius: 50%; cursor: pointer; font: inherit;
  border: 1px solid var(--glas-rand); background: var(--glas); color: var(--cyan);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); box-shadow: 0 0 12px rgba(0, 245, 255, 0.18); transition: box-shadow .2s, color .2s; }
.rund svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.rund .strich-aus { display: none; }
.rund.aus .strich-aus, .rund[aria-pressed="true"] .strich-aus { display: inline; }
.rund.aus .welle, .rund[aria-pressed="true"] .welle { display: none; }
.rund.aus, .rund[aria-pressed="true"] { color: var(--leise); }
body.im-menue .hud-tafel, body.im-menue #pause-knopf { visibility: hidden; }
/* Abschuss-Hinweis unten mittig, solange der Ball aufliegt */
.hinweis { position: fixed; left: 50%; bottom: calc(var(--unten) + 18px); z-index: 12; transform: translate(-50%, 8px); padding: 8px 18px; border-radius: 999px; pointer-events: none;
  background: var(--glas-dicht); border: 1px solid var(--glas-rand); color: var(--text); font-size: 14px; opacity: 0; transition: opacity .3s, transform .3s; }
.hinweis.an { opacity: 1; transform: translate(-50%, 0); }

/* ── Meldung („Match-Ball“, „Punkt für …“) ─────────────────────────────── */
.meldung { position: fixed; left: 50%; top: 22%; z-index: 30; max-width: calc(100% - 32px); padding: 8px 24px; pointer-events: none; text-align: center;
  font-family: var(--titel); font-weight: 900; font-size: clamp(20px, 3.4vw, 40px); letter-spacing: 0.08em; text-transform: uppercase;
  color: #fff; text-shadow: var(--leucht-c); opacity: 0; transform: translate(-50%, -12px) scale(0.96); transition: opacity .25s, transform .25s; }
.meldung.an { opacity: 1; transform: translate(-50%, 0) scale(1); }
.meldung.gross { font-size: clamp(30px, 6vw, 72px); text-shadow: var(--leucht-m); }
.meldung.gross.an { animation: pulsieren 0.9s ease-in-out infinite alternate; }
/* Pause offen → Start-/Levelmeldung ausblenden: sie liegt sonst (z-index 30) über dem Pausetitel und dem Kasten „Steuerung &
   Anleitung“ (_spiel/anleitung.js). Rein CSS über die Reihenfolge im HTML (#pause steht vor #meldung) — main.js bleibt unberührt. */
#pause:not(.versteckt) ~ .meldung { visibility: hidden; }
@keyframes pulsieren { from { filter: brightness(1); } to { filter: brightness(1.5); } }

/* ── Ebenen: Startbildschirm, Pause, Ende ──────────────────────────────── */
.ebene { position: fixed; inset: 0; z-index: 20; display: flex; align-items: center; justify-content: center;
  padding: calc(var(--oben) + var(--pille)) var(--rechts) var(--unten) var(--links); }

/* Startbildschirm (Norm sb-*): links Glaskarte, rechts bleibt die Demo frei sichtbar */
.sb { justify-content: flex-start; padding-left: max(var(--links), clamp(16px, 6vw, 96px));
  background: linear-gradient(90deg, rgba(3, 10, 8, 0.6) 0%, rgba(3, 10, 8, 0.25) 40%, transparent 68%); }
.sb-karte { width: min(460px, 100%); max-height: 100%; overflow-y: auto; scrollbar-width: none; padding: 22px 24px 18px; border-radius: 24px;
  background: var(--glas); border: 1px solid var(--glas-rand); backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%);
  box-shadow: 0 0 0 1px rgba(255, 160, 60, 0.14), 0 0 40px rgba(79, 240, 216, 0.12), 0 24px 60px rgba(0, 0, 0, 0.5); }
.sb-vortitel { font-size: 12px; letter-spacing: 0.3em; text-transform: uppercase; color: var(--gold); margin-bottom: 6px; }
.sb-titel { margin: 0; font-family: var(--titel); font-weight: 900; font-size: clamp(38px, 4.6vw, 66px);   /* „Wall Breaker“ ist länger als „Slider“ — sonst abgeschnitten (RTX 30.10.) */ line-height: 0.95; letter-spacing: 0.04em;
  text-transform: uppercase; background: linear-gradient(100deg, var(--gold) 0%, #fff6d8 35%, var(--magenta) 70%, #ff5a1a 100%); -webkit-background-clip: text;
  background-clip: text; color: transparent; filter: drop-shadow(0 0 18px rgba(255, 140, 40, 0.4)); }
.sb-unterzeile { margin: 8px 0 20px; color: var(--leise); font-size: clamp(15px, 1.4vw, 17px); line-height: 1.45; }
.sb-gruppe { margin: 0 0 13px; }
.sb-label { display: block; margin-bottom: 6px; font-size: 11.5px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--cyan); opacity: 0.85; }
.sb-wahl { display: flex; gap: 4px; padding: 4px; border-radius: 999px; background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(79, 240, 216, 0.22); }
.sb-wahl button { flex: 1; min-height: 40px; padding: 6px 10px; border: 0; border-radius: 999px; background: transparent; color: var(--leise);
  font: 700 15px var(--sans); cursor: pointer; transition: background .15s, color .15s, box-shadow .15s; }
.sb-wahl button:hover { color: var(--text); }
.sb-wahl button.an { color: #04140f; background: linear-gradient(180deg, #a6fff0, var(--cyan)); box-shadow: 0 0 16px rgba(79, 240, 216, 0.5); }
.sb-namen { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.sb-namen input { min-width: 0; padding: 10px 14px; border-radius: 999px; border: 1px solid rgba(0, 245, 255, 0.25); background: rgba(255, 255, 255, 0.06);
  color: var(--text); font: 700 15px var(--sans); }
.sb-namen input:nth-child(2) { border-color: rgba(255, 61, 139, 0.35); }
.sb-namen input:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 10px rgba(0, 245, 255, 0.35); }
.sb-namen input::placeholder { color: var(--leise); font-weight: 400; }
.sb-start { width: 100%; margin: 10px 0 14px; padding: 14px; border: 0; border-radius: 999px; cursor: pointer; font: 900 24px var(--titel);
  letter-spacing: 0.12em; text-transform: uppercase; color: #fff; background: linear-gradient(100deg, #e0a030, #ff7a1e 55%, #e2401a);
  box-shadow: 0 0 24px rgba(255, 120, 30, 0.5), 0 0 40px rgba(255, 200, 80, 0.2); transition: filter .15s, transform .15s; }
.sb-start:hover { filter: brightness(1.12); } .sb-start:active { transform: scale(0.98); }
.sb-hilfe { padding: 10px 14px; border-radius: 14px; border: 1px solid rgba(0, 245, 255, 0.18); background: rgba(255, 255, 255, 0.03); font-size: 14px; color: var(--leise); }
.sb-hilfe summary { color: var(--text); font-weight: 700; cursor: pointer; }
.sb-hilfe p { margin: 8px 0 0; line-height: 1.5; }
.sb-sprache { margin-top: 12px; padding: 6px 14px; border-radius: 999px; border: 1px solid rgba(0, 245, 255, 0.3); background: none; color: var(--leise); font: 13px var(--sans); cursor: pointer; }

/* Pause / Ende: Glaskarte mittig */
#pause, #ende { background: rgba(4, 2, 12, 0.5); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
.karte { width: min(420px, 100%); max-height: 100%; overflow-y: auto; padding: 24px 26px; text-align: center; border-radius: 22px;
  background: var(--glas-dicht); border: 1px solid var(--glas-rand); box-shadow: 0 0 40px rgba(79, 240, 216, 0.14), 0 24px 60px rgba(0, 0, 0, 0.55); }
.karte h2 { margin: 0 0 10px; font: 900 clamp(26px, 4vw, 38px)/1.1 var(--titel); letter-spacing: 0.06em; text-transform: uppercase; color: #fff; text-shadow: var(--leucht-c); }
.karte h2.p2 { text-shadow: var(--leucht-m); }
.ende-stand { margin: 6px 0 4px; font: 700 clamp(40px, 7vw, 64px)/1 var(--sans); }
.ende-stand .p1 { color: var(--cyan); text-shadow: var(--leucht-c); } .ende-stand .p2 { color: var(--magenta); text-shadow: var(--leucht-m); }
.ende-stand .trenner { color: var(--leise); margin: 0 10px; }
.karte .gross { margin: 4px 0; font: 700 clamp(44px, 7vw, 68px)/1 var(--sans); color: #fff; text-shadow: var(--leucht-m), 0 0 30px rgba(255, 200, 90, 0.5); }
.karte p { margin: 6px 0 0; color: var(--leise); }
.karte p a { color: var(--cyan); }
.karte .rekord { color: var(--gold); font-weight: 700; }
.ende-zeile { margin: 6px 0 0; color: var(--leise); font-size: 14.5px; line-height: 1.45; }
.ende-zeile a { color: var(--cyan); }
.knopf-gross { display: block; width: 100%; margin-top: 18px; padding: 13px; border: 0; border-radius: 999px; cursor: pointer; font: 900 20px var(--titel);
  letter-spacing: 0.1em; text-transform: uppercase; color: #fff; background: linear-gradient(100deg, #e0a030, #ff7a1e 55%, #e2401a);
  box-shadow: 0 0 20px rgba(255, 120, 30, 0.45); }
.knopf-leise { display: block; width: 100%; margin-top: 8px; padding: 10px; border-radius: 999px; border: 1px solid rgba(0, 245, 255, 0.3); background: none;
  color: var(--leise); font: 700 15px var(--sans); cursor: pointer; }
.knopf-gross:hover, .knopf-leise:hover { filter: brightness(1.15); }

/* Laden / WebGL fehlt */
.laden, .fehler { position: fixed; left: 50%; bottom: calc(var(--unten) + 18px); transform: translateX(-50%); z-index: 25; padding: 8px 18px; border-radius: 999px;
  background: var(--glas-dicht); border: 1px solid var(--glas-rand); color: var(--leise); font-size: 14px; }
.laden.weg { opacity: 0; transition: opacity .5s; pointer-events: none; }
.fehler { top: 50%; bottom: auto; transform: translate(-50%, -50%); color: #fff; border-color: var(--magenta); max-width: calc(100% - 32px); text-align: center; }

/* ── Handy / schmal ────────────────────────────────────────────────────── */
@media (max-width: 760px) {
  .hud { gap: 6px; flex-direction: column-reverse; align-items: flex-end; }   /* Tafel unter die Knöpfe — neben der Pille ist kein Platz */
  .hud-tafel { gap: 10px; padding: 4px 10px 5px; border-radius: 14px; }
  .hud-wert span { font-size: 9.5px; } .hud-wert b { font-size: 20px; }
  .rund { width: 40px; height: 40px; } .rund svg { width: 20px; height: 20px; }
  .sb { justify-content: center; padding-left: var(--links); align-items: flex-end; background: linear-gradient(0deg, rgba(3, 10, 8, 0.78) 0%, rgba(3, 10, 8, 0.35) 55%, transparent 80%); }
  .sb-karte { padding: 16px 16px 12px; border-radius: 20px; }
  .sb-titel { font-size: 38px; }
  .sb-unterzeile { margin: 4px 0 12px; font-size: 14.5px; }
  .sb-gruppe { margin-bottom: 10px; }
  .sb-wahl button { min-height: 40px; font-size: 14px; }
  .sb-start { font-size: 21px; padding: 12px; margin: 6px 0 10px; }
}
/* Handy quer: Karte zweispaltig, damit sie in die geringe Höhe passt */
@media (max-height: 520px) and (orientation: landscape) {
  .ebene { padding-top: var(--oben); padding-left: max(var(--links), 72px); }
  .sb { align-items: center; justify-content: flex-start; }
  .sb-karte { width: min(720px, 100%); display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; align-content: start; padding: 12px 16px; }
  .sb-titel, .sb-unterzeile { grid-column: 1 / -1; } .sb-titel { font-size: 38px; } .sb-unterzeile { margin: 2px 0 8px; font-size: 13.5px; }
  .sb-start { grid-column: 2; margin: 4px 0 6px; font-size: 19px; padding: 10px; }
  .sb-hilfe, .sb-sprache { grid-column: 1 / -1; }
  .karte { padding: 14px 18px; } .ende-stand { font-size: 40px; } .knopf-gross { margin-top: 10px; padding: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .meldung, .meldung.gross.an, .hinweis { animation: none; transition: none; }
}
/* Handy-Steuerung (nur Fingerbedienung, nur im Spiel): links unten Pfeilkreuz (halten = weiterlaufen), rechts unten runder Bombenknopf
   (≥ 72 px, Daumenbereich). Kein Wischen — kollidiert mit gleichzeitigem Bombenlegen. Unterer Rand für die Knöpfe hält raender() frei. */
.steuer { display: none; position: fixed; left: calc(var(--links) + 6px); bottom: calc(var(--unten) + 6px); z-index: 12; grid-template-columns: 58px 58px 58px;
  grid-template-rows: 54px 54px; gap: 5px; pointer-events: none; }
.steuer button { pointer-events: auto; height: 54px; border-radius: 16px; border: 1px solid var(--glas-rand); background: var(--glas); color: var(--cyan);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); touch-action: none; padding: 0; }
.steuer button.an { background: rgba(79, 240, 216, 0.28); }
.steuer svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.steuer .k-hoch { grid-column: 2; grid-row: 1; } .steuer .k-links { grid-column: 1; grid-row: 2; } .steuer .k-runter { grid-column: 2; grid-row: 2; } .steuer .k-rechts { grid-column: 3; grid-row: 2; }
.bombenknopf { display: none; position: fixed; right: calc(var(--rechts) + 10px); bottom: calc(var(--unten) + 14px); z-index: 12; width: 86px; height: 86px;
  border-radius: 50%; border: 2px solid rgba(255, 170, 70, 0.7); background: radial-gradient(circle at 40% 35%, rgba(255, 170, 70, 0.45), rgba(60, 20, 6, 0.6));
  color: #ffd9a0; touch-action: none; padding: 0; box-shadow: 0 0 18px rgba(255, 120, 30, 0.45); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.bombenknopf svg { width: 44px; height: 44px; }
.bombenknopf.an { transform: scale(0.94); box-shadow: 0 0 28px rgba(255, 140, 40, 0.8); }
@media (pointer: coarse) { body:not(.im-menue) .steuer { display: grid; } body:not(.im-menue) .bombenknopf { display: block; } }

/* HUD: Zeit wird unter 20 s rot; Vorrat (Bomben · Reichweite · Tempo) als kleine Zeile unter der Tafel */
#hud-zeit.knapp { color: #ff5a3a; text-shadow: 0 0 8px rgba(255, 70, 40, 0.85); }
.hud-vorrat { display: flex; gap: 10px; justify-content: center; margin-top: 2px; font: 700 13px var(--sans); color: var(--gold); }
.hud-vorrat span { display: inline-flex; align-items: center; gap: 3px; letter-spacing: 0; text-transform: none; font-size: 13px; color: var(--gold); }
.hud-vorrat svg { width: 14px; height: 14px; }
.hud-vorrat span.neu { animation: aufleuchten 0.8s ease-out; }
@keyframes aufleuchten { from { color: #fff; text-shadow: 0 0 12px #ffcf6a; transform: scale(1.3); } to { transform: none; } }
.hud-tafel { flex-wrap: wrap; justify-content: center; }
.hud-tafel .hud-vorrat { flex-basis: 100%; }
@media (max-width: 760px) { .hud-vorrat { gap: 8px; } }
