/* ── Croak Hop (Grundlage games/alien-attack/css/spiel.css; Zeitanzeige, Steuerkreuz statt Bombenknopf) ── Alien Attack ── Space Rocks — Asteroidenfeld (Grundlage games/wall-breaker/css/spiel.css) ───────────────────────────────────────────────────────────────────────────────
   WAS: Optik aller DOM-Teile über der three.js-Bühne: HUD oben rechts (Punkte, Level, Leben), Startbildschirm-Norm sb-* als
        Glaskarte, Abschuss-Hinweis, Pause, Ende, Meldung, Ladehinweis. Grundlage: games/slider/css/spiel.css (gleiche Neon-Glas-
        Sprache), Farben an die Kristalle angepasst (Cyan, Magenta, Gold, Violett).
   ÄNDERN: Farben nur in :root. 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: #00f5ff; --magenta: #ff3d8b; --violett: #7b5cff; --gold: #ffd36b;
  --nacht: #04020c; --text: #e8f4ff; --leise: #9fb2d8;
  --glas: rgba(12, 10, 38, 0.44); --glas-dicht: rgba(10, 8, 30, 0.72); --glas-rand: rgba(0, 245, 255, 0.26);
  --leucht-c: 0 0 8px rgba(0, 245, 255, 0.85), 0 0 22px rgba(0, 245, 255, 0.45);
  --leucht-m: 0 0 8px rgba(255, 61, 139, 0.85), 0 0 22px rgba(255, 61, 139, 0.45);
  --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%, #1a0a36, 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(0, 245, 255, 0.12), inset 0 0 14px rgba(123, 92, 255, 0.12); }
.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 Froschköpfe (Grafik-Neubau 30.10., vorher lila Kugeln ohne Bezug zum Spiel) */
.hud-leben i { width: 17px; height: 13px; border-radius: 50% 50% 42% 42%;
  background: radial-gradient(circle at 28% 30%, #fff 0 2.2px, #16161c 2.6px 3.4px, transparent 3.8px),
              radial-gradient(circle at 72% 30%, #fff 0 2.2px, #16161c 2.6px 3.4px, transparent 3.8px),
              radial-gradient(ellipse at 50% 35%, #c4f27a, #6cc832 60%, #3f9a22);
  box-shadow: 0 0 7px rgba(140, 230, 80, 0.75); }
.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; }
@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(4, 2, 12, 0.55) 0%, rgba(4, 2, 12, 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, 61, 139, 0.12), 0 0 40px rgba(0, 245, 255, 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(--cyan) 0%, #fff 35%, var(--gold) 60%, var(--magenta) 100%); -webkit-background-clip: text;
  background-clip: text; color: transparent; filter: drop-shadow(0 0 18px rgba(0, 245, 255, 0.35)); }
.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(0, 245, 255, 0.2); }
.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: #021018; background: linear-gradient(180deg, #7ffbff, var(--cyan)); box-shadow: 0 0 16px rgba(0, 245, 255, 0.55); }
.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, #00c8e0, var(--violett) 55%, var(--magenta));
  box-shadow: 0 0 24px rgba(255, 61, 139, 0.45), 0 0 40px rgba(0, 245, 255, 0.25); 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(0, 245, 255, 0.15), 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-c), 0 0 30px rgba(196, 155, 255, 0.6); }
.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, #00c8e0, var(--violett) 55%, var(--magenta));
  box-shadow: 0 0 20px rgba(255, 61, 139, 0.4); }
.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(4, 2, 12, 0.75) 0%, rgba(4, 2, 12, 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: links zwei Drehknöpfe, rechts Schub und Feuer — nur bei Fingerbedienung und im Spiel */
.steuer { display: none; position: fixed; left: 0; right: 0; bottom: calc(var(--unten) + 8px); z-index: 12; padding: 0 14px; grid-template-columns: 64px 64px 1fr 64px 76px; gap: 10px; align-items: end; pointer-events: none; }
.steuer button { pointer-events: auto; height: 64px; border-radius: 50%; border: 1px solid var(--glas-rand); background: var(--glas); color: var(--cyan); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); touch-action: none; }
.steuer button.feuer { height: 76px; color: #ffb060; border-color: rgba(255, 160, 80, 0.5); }
.steuer svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
@media (pointer: coarse) { body:not(.im-menue) .steuer { display: grid; } }

/* Bomben: Anzeige im HUD und Knopf am Handy nur, wenn eine Bombe bereitliegt */
.hud-bombe { display: none; } body.hat-bombe .hud-bombe { display: block; }
.hud-bombe b { color: #ff6a8a; text-shadow: 0 0 8px rgba(255, 60, 110, 0.8); }
.steuer button.bombe { opacity: 0.35; color: #ff6a8a; border-color: rgba(255, 90, 130, 0.45); } body.hat-bombe .steuer button.bombe { opacity: 1; }

/* Croak Hop: Zeit wird unter 10 s rot; am Handy ein Steuerkreuz unten mittig statt der Leiste */
#hud-zeit.knapp { color: #ff5a6a; text-shadow: 0 0 8px rgba(255, 60, 80, 0.85); }
.steuer { left: 50%; right: auto; transform: translateX(-50%); grid-template-columns: 64px 64px 64px; grid-template-rows: 56px 56px; gap: 6px; padding: 0; }
.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; }
.steuer button { height: 56px; border-radius: 16px; }
