/* =====================================================================
   RALPHS HOLOCRON – Cockpit-Edition
   Millennium-Falke-Cockpit: Sichtfenster in die Galaxis + Dashboard-Konsole
   (keine externen Bilder/Schriften – alles selbst gezeichnet)
   ===================================================================== */

:root {
  --space-0: #04060f;
  --space-1: #070b1c;
  --metal-0: #2a2e38;
  --metal-1: #171a22;
  --metal-2: #0c0e14;
  --panel: #0e1626;
  --screen: #0a1422;
  --sw-yellow: #ffe81f;
  --saber-blue: #49b6ff;
  --saber-green: #54e36b;
  --sith-red: #ff5252;
  --amber: #ffb648;
  --ink: #dcebff;
  --ink-soft: #88a0c8;
  --glow-blue: rgba(73, 182, 255, 0.6);
  --sans: "Trebuchet MS", "Segoe UI", system-ui, sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --mono: "Courier New", ui-monospace, monospace;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html, body { height: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--space-0);
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* ===================== COCKPIT-GERÜST ===================== */
.cockpit {
  flex: 1;
  display: flex;
  flex-direction: column;
  width: min(1100px, 100%);
  margin: 0 auto;
  padding: clamp(0.4rem, 2vw, 1rem);
  gap: 0;
}

/* ===================== SICHTFENSTER ===================== */
.viewport {
  position: relative;
  height: clamp(220px, 42vh, 420px);
  border-radius: 22px 22px 12px 12px;
  overflow: hidden;
  box-shadow: 0 18px 50px -18px rgba(0,0,0,0.9), inset 0 0 60px rgba(0,0,0,0.7);
}

.galaxy {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(120% 90% at 50% 120%, #1a2c5e 0%, transparent 55%),
    radial-gradient(80% 60% at 75% 20%, #2a1244 0%, transparent 60%),
    radial-gradient(70% 70% at 20% 30%, #07203a 0%, transparent 60%),
    linear-gradient(180deg, #03040c 0%, #060b1e 60%, #0a1430 100%);
}

/* Sternenfelder */
.stars { position: absolute; inset: -20%; background-repeat: repeat; will-change: transform; }
.stars-1 {
  background-image:
    radial-gradient(1.5px 1.5px at 20% 30%, #fff, transparent),
    radial-gradient(1.5px 1.5px at 70% 70%, #cfe2ff, transparent),
    radial-gradient(1px 1px at 40% 80%, #fff, transparent),
    radial-gradient(1px 1px at 85% 20%, #e6efff, transparent),
    radial-gradient(1.5px 1.5px at 55% 50%, #fff, transparent);
  background-size: 500px 500px; animation: drift 70s linear infinite; opacity: 0.85;
}
.stars-2 {
  background-image:
    radial-gradient(1px 1px at 15% 60%, #bcd4ff, transparent),
    radial-gradient(1px 1px at 60% 25%, #fff, transparent),
    radial-gradient(2px 2px at 80% 75%, #fff3c4, transparent),
    radial-gradient(1px 1px at 35% 15%, #fff, transparent);
  background-size: 400px 400px; animation: drift 110s linear infinite reverse; opacity: 0.6;
}
.stars-3 {
  background-image:
    radial-gradient(2px 2px at 25% 45%, #fff, transparent),
    radial-gradient(1px 1px at 75% 35%, #9fc4ff, transparent);
  background-size: 650px 650px; animation: drift 160s linear infinite, twinkle 6s ease-in-out infinite; opacity: 0.5;
}
@keyframes drift { from { transform: translateY(0); } to { transform: translateY(500px); } }
@keyframes twinkle { 0%,100% { opacity: 0.5; } 50% { opacity: 0.25; } }

/* Nebel & Planet für Tiefe */
.nebula {
  position: absolute; inset: 0;
  background:
    radial-gradient(30% 22% at 68% 32%, rgba(180,120,255,0.45), transparent 70%),
    radial-gradient(45% 34% at 72% 38%, rgba(110,70,210,0.30), transparent 72%),
    radial-gradient(38% 28% at 24% 58%, rgba(40,170,210,0.28), transparent 72%),
    radial-gradient(60% 40% at 50% 90%, rgba(30,90,180,0.30), transparent 70%);
  mix-blend-mode: screen;
  filter: blur(2px);
  animation: nebulaFloat 24s ease-in-out infinite alternate;
}
.galaxy::after {
  /* einzelne helle Leuchtsterne mit Halo */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(2.5px 2.5px at 30% 28%, #fff, rgba(255,255,255,0.15) 40%, transparent 60%),
    radial-gradient(3px 3px at 62% 22%, #fff, rgba(180,210,255,0.2) 40%, transparent 60%),
    radial-gradient(2.5px 2.5px at 78% 46%, #fff, rgba(255,240,200,0.2) 40%, transparent 60%),
    radial-gradient(2px 2px at 44% 40%, #fff, rgba(255,255,255,0.15) 45%, transparent 60%);
  animation: twinkle 5s ease-in-out infinite;
}

/* Glasreflexion über dem Sichtfenster */
.glass-reflect {
  position: absolute; inset: 0; pointer-events: none; z-index: 2;
  background:
    linear-gradient(115deg, rgba(180,210,255,0) 38%, rgba(180,210,255,0.10) 47%, rgba(255,255,255,0.16) 50%, rgba(180,210,255,0.06) 54%, transparent 62%),
    linear-gradient(200deg, rgba(120,170,255,0.10) 0%, transparent 30%);
  mix-blend-mode: screen;
}
/* Vignette für cinematische Tiefe */
.vignette {
  position: absolute; inset: 0; pointer-events: none; z-index: 4;
  background:
    radial-gradient(130% 100% at 50% 42%, transparent 52%, rgba(0,0,0,0.55) 100%);
  box-shadow: inset 0 0 80px 20px rgba(0,0,0,0.55);
}
@keyframes nebulaFloat { from { transform: translate(0,0); } to { transform: translate(-18px, 10px); } }
.planet {
  position: absolute;
  right: 8%; bottom: -32%;
  width: clamp(150px, 30vw, 280px); aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 30%, #9fb6d6 0%, #4a6a93 32%, #233a5c 60%, #0c1830 100%);
  box-shadow: inset -18px -10px 50px rgba(0,0,0,0.65), 0 0 60px rgba(70,120,190,0.25);
  opacity: 0.9;
}
.planet::after {
  /* Ringschimmer */
  content: ""; position: absolute; inset: -18% -8%;
  border-radius: 50%;
  border: 2px solid rgba(150,190,240,0.18);
  transform: rotate(-18deg) scaleY(0.32);
}

/* Hyperraum-Streifen */
.lightspeed {
  position: absolute; inset: 0;
  background: repeating-conic-gradient(from 0deg at 50% 55%,
    transparent 0deg 1.1deg, rgba(220,240,255,0.85) 1.3deg 1.6deg, transparent 1.8deg 3deg);
  opacity: 0; transform: scale(0.2); transform-origin: 50% 55%;
  pointer-events: none;
}
.lightspeed.active { animation: warp 1.2s ease-in forwards; }
@keyframes warp {
  0%   { opacity: 0; transform: scale(0.2); }
  35%  { opacity: 0.9; }
  100% { opacity: 0; transform: scale(3.2); }
}
.warp-flash {
  position: absolute; inset: 0; background: #eaf4ff; opacity: 0; pointer-events: none;
}
.warp-flash.active { animation: flash 1.2s ease-in forwards; }
@keyframes flash { 0%,70% { opacity: 0; } 86% { opacity: 0.85; } 100% { opacity: 0; } }

/* Cockpit-Streben */
.struts { position: absolute; inset: 0; z-index: 3; width: 100%; height: 100%; filter: drop-shadow(0 6px 8px rgba(0,0,0,0.75)); }

/* HUD */
.hud {
  position: absolute; left: 0; right: 0; top: 0; z-index: 5;
  display: flex; justify-content: space-between;
  padding: 0.5rem 0.9rem;
  font-family: var(--mono);
  font-size: clamp(0.58rem, 1.6vw, 0.74rem);
  letter-spacing: 0.12em;
  color: rgba(120,200,255,0.7);
  text-shadow: 0 0 8px rgba(73,182,255,0.5);
  pointer-events: none;
}
.hud-tag { background: rgba(4,10,24,0.4); padding: 0.1rem 0.4rem; border-radius: 4px; }

/* ===================== DASHBOARD ===================== */
.dashboard {
  position: relative;
  margin-top: -10px;
  padding: clamp(0.8rem, 2.5vw, 1.6rem) clamp(0.6rem, 2vw, 1.4rem) clamp(1rem, 2.5vw, 1.6rem);
  border-radius: 14px 14px 20px 20px;
  background:
    radial-gradient(120% 80% at 50% -10%, rgba(120,150,200,0.10), transparent 60%),
    linear-gradient(180deg, #20252f 0%, #161a22 26%, #0d0f16 70%, #090b11 100%);
  border-top: 2px solid #353c49;
  box-shadow:
    0 -8px 30px -10px rgba(0,0,0,0.85),
    inset 0 2px 0 rgba(150,180,225,0.18),
    inset 0 -2px 16px rgba(0,0,0,0.6);
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: clamp(0.5rem, 1.6vw, 1rem);
  align-items: stretch;
  overflow: hidden;
}
.dashboard::before {
  /* gebürstete Metalltextur */
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,0.018) 0 2px, rgba(0,0,0,0.025) 2px 4px),
    repeating-linear-gradient(180deg, rgba(255,255,255,0.02) 0 1px, transparent 1px 3px);
  opacity: 0.8;
  mix-blend-mode: overlay;
}
.dashboard > * { position: relative; z-index: 1; }
.dash-edge {
  position: absolute; left: 0; right: 0; top: -10px; height: 20px;
  background: linear-gradient(180deg, transparent, rgba(0,0,0,0.5));
  pointer-events: none;
}

/* Lichter & Schalter (Deko) */
.dash-lights, .dash-switches {
  display: flex; flex-direction: column; gap: 0.5rem;
  justify-content: center; padding: 0.55rem 0.5rem;
  border-radius: 10px;
  background: linear-gradient(180deg, #0c0e15, #14171f);
  box-shadow: inset 0 2px 6px rgba(0,0,0,0.7), inset 0 -1px 0 rgba(150,180,225,0.12), 0 1px 0 rgba(150,180,225,0.08);
}
.lamp {
  width: 14px; height: 14px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff, var(--amber) 45%, #6b3d00 100%);
  box-shadow: 0 0 10px rgba(255,182,72,0.7);
  animation: blink 2.4s ease-in-out infinite;
}
.lamp:nth-child(2){ animation-delay:.3s; background:radial-gradient(circle at 35% 30%,#fff,var(--saber-green) 45%,#0a3d18 100%); box-shadow:0 0 10px rgba(84,227,107,.7);}
.lamp:nth-child(3){ animation-delay:.7s; background:radial-gradient(circle at 35% 30%,#fff,var(--saber-blue) 45%,#0a2d4d 100%); box-shadow:0 0 10px rgba(73,182,255,.7);}
.lamp:nth-child(4){ animation-delay:1.1s; background:radial-gradient(circle at 35% 30%,#fff,var(--sith-red) 45%,#4d0a0a 100%); box-shadow:0 0 10px rgba(255,82,82,.7);}
.lamp:nth-child(5){ animation-delay:1.5s;}
.lamp:nth-child(6){ animation-delay:1.9s; background:radial-gradient(circle at 35% 30%,#fff,var(--saber-blue) 45%,#0a2d4d 100%); box-shadow:0 0 10px rgba(73,182,255,.7);}
@keyframes blink { 0%,100% { opacity: 1; } 50% { opacity: 0.3; } }

.toggle {
  width: 20px; height: 30px; border-radius: 5px;
  background: linear-gradient(180deg, #2a2f3b, #141821);
  border: 1px solid #333a48;
  position: relative;
}
.toggle::after {
  content: ""; position: absolute; left: 50%; transform: translateX(-50%);
  top: 16px; width: 12px; height: 10px; border-radius: 3px;
  background: linear-gradient(180deg, #4a5160, #20242e);
  transition: top 0.2s;
}
.toggle.on::after { top: 4px; background: linear-gradient(180deg, #bfe6ff, #2f9fe0); box-shadow: 0 0 8px var(--glow-blue); }

/* ===================== KONSOLENBILDSCHIRM ===================== */
.console {
  position: relative;
  border-radius: 16px;
  padding: clamp(1rem, 3vw, 1.7rem);
  background:
    radial-gradient(120% 80% at 50% 0%, rgba(73,182,255,0.12), transparent 60%),
    linear-gradient(180deg, #0c1828, #0a1320 70%, #070e18);
  /* dicker Metall-Bezel um den Bildschirm */
  border: 3px solid #2b3340;
  box-shadow:
    inset 0 0 60px rgba(20,70,140,0.28),
    inset 0 0 0 1px rgba(73,182,255,0.1),
    inset 0 2px 0 rgba(150,180,225,0.18),
    0 0 30px rgba(20,80,160,0.3),
    0 6px 18px -4px rgba(0,0,0,0.7),
    0 0 0 6px rgba(0,0,0,0.35);
  overflow: hidden;
  animation: bootUp 700ms ease both;
}
.console::after {
  /* gewölbte Glasreflexion auf dem Bildschirm */
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 2;
  background:
    linear-gradient(125deg, rgba(255,255,255,0.10) 0%, rgba(255,255,255,0.03) 16%, transparent 34%),
    radial-gradient(140% 70% at 50% -20%, rgba(120,180,255,0.12), transparent 60%);
  mix-blend-mode: screen;
}
@keyframes bootUp {
  from { opacity: 0; filter: brightness(2) saturate(0); transform: translateY(8px); }
  to   { opacity: 1; filter: none; transform: none; }
}
/* CRT-Scanlinien */
.console-scan {
  position: absolute; inset: 0; pointer-events: none; z-index: 3;
  background: repeating-linear-gradient(180deg, rgba(0,0,0,0) 0 2px, rgba(0,0,0,0.16) 3px 4px);
  mix-blend-mode: multiply; opacity: 0.5;
}
.console > * { position: relative; z-index: 1; }

.console-swap { animation: swap 420ms ease both; }
@keyframes swap { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.console-top {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding-bottom: 0.7rem; margin-bottom: 0.9rem;
  border-bottom: 1px solid rgba(73,182,255,0.2);
}
.brand { display: flex; align-items: center; gap: 0.45rem; }
.brand-mark { color: var(--sw-yellow); filter: drop-shadow(0 0 6px rgba(255,232,31,0.6)); }
.brand-title {
  font-family: var(--serif); font-weight: 700; letter-spacing: 0.03em;
  font-size: clamp(1rem, 3.4vw, 1.35rem); color: var(--sw-yellow);
  text-shadow: 0 0 14px rgba(255,232,31,0.3);
}
.score { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.05; }
.score-label { font-size: 0.58rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-soft); }
.score-value { font-family: var(--serif); font-size: 1.35rem; font-weight: 700; color: var(--saber-blue); text-shadow: 0 0 12px var(--glow-blue); }

/* Abzeichen */
.meta { display: flex; gap: 0.45rem; flex-wrap: wrap; margin-bottom: 0.9rem; }
.badge {
  font-size: 0.64rem; letter-spacing: 0.12em; text-transform: uppercase;
  padding: 0.3rem 0.66rem; border-radius: 999px; font-weight: 700;
}
.badge.cat  { color: var(--saber-blue); border: 1px solid rgba(73,182,255,0.5); background: rgba(73,182,255,0.08); }
.badge.rank { color: var(--sw-yellow); border: 1px solid rgba(255,232,31,0.45); background: rgba(255,232,31,0.06); }
.badge.type { color: var(--amber); border: 1px solid rgba(255,182,72,0.45); background: rgba(255,182,72,0.07); }

/* Display-Block (Rebus / Decode) */
.display {
  margin: 0 0 1rem;
  padding: 0.9rem 1rem;
  text-align: center;
  font-family: var(--mono);
  font-size: clamp(1.4rem, 6vw, 2.4rem);
  letter-spacing: 0.14em;
  color: #eaf6ff;
  background: rgba(4,12,24,0.6);
  border: 1px dashed rgba(73,182,255,0.4);
  border-radius: 10px;
  text-shadow: 0 0 12px rgba(73,182,255,0.4);
}

/* ---- Hologramm-Projektion (type: "hologram") ---- */
.display.display--holo {
  padding: 0.7rem 1rem 0.5rem;
  border-style: solid;
  border-color: rgba(73,182,255,0.45);
  background: radial-gradient(120% 100% at 50% 100%, rgba(73,182,255,0.12), transparent 72%), rgba(4,12,24,0.6);
  display: flex; flex-direction: column; align-items: center; gap: 0.25rem;
}
.holo-proj {
  position: relative; width: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-end;
  min-height: clamp(116px, 22vw, 158px);
}
.holo-proj::after {              /* Projektionskegel */
  content: ""; position: absolute; left: 50%; bottom: 9px; transform: translateX(-50%);
  width: clamp(120px, 34vw, 210px); height: 80%;
  background: linear-gradient(to top, rgba(73,182,255,0.30), rgba(73,182,255,0.05) 78%, transparent);
  clip-path: polygon(50% 100%, 50% 100%, 100% 0, 0 0);
  filter: blur(1px); z-index: 1; pointer-events: none;
  animation: holoFlicker 2.4s steps(10, end) infinite;
}
.holo-proj::before {             /* Scanlines */
  content: ""; position: absolute; inset: 0; z-index: 3; pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(180,230,255,0.10) 0 2px, transparent 2px 4px);
  mix-blend-mode: screen; animation: holoScan 5s linear infinite;
}
.holo-figure {
  position: relative; z-index: 2;
  font-size: clamp(2.6rem, 9vw, 3.9rem); line-height: 1;
  color: #b3e6ff; opacity: 0.92;
  text-shadow: 1px 0 rgba(255,90,200,0.45), -1px 0 rgba(80,255,255,0.45),
               0 0 18px rgba(73,182,255,0.9), 0 0 40px rgba(73,182,255,0.5);
  animation: holoFloat 4s ease-in-out infinite, holoFlicker 3.2s steps(14, end) infinite;
}
.holo-base {
  position: relative; z-index: 2; margin-top: 4px;
  width: clamp(90px, 26vw, 150px); height: 8px; border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(150,230,255,0.85), rgba(73,182,255,0.18) 60%, transparent 72%);
  box-shadow: 0 0 18px rgba(73,182,255,0.7);
  animation: holoPulse 2.2s ease-in-out infinite;
}
.holo-caption {
  font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.16em;
  text-transform: uppercase; color: rgba(120,200,255,0.85);
  text-shadow: 0 0 8px rgba(73,182,255,0.5);
}
@keyframes holoFloat  { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes holoPulse  { 0%,100% { opacity: 0.7; transform: scaleX(1); } 50% { opacity: 1; transform: scaleX(1.09); } }
@keyframes holoScan   { from { background-position: 0 0; } to { background-position: 0 24px; } }
@keyframes holoFlicker{ 0%,100% { opacity: 0.92; } 8% { opacity: 0.6; } 9% { opacity: 0.95; }
                        40% { opacity: 0.82; } 41% { opacity: 0.55; } 42% { opacity: 0.9; } 70% { opacity: 0.8; } }
@media (prefers-reduced-motion: reduce) {
  .holo-figure, .holo-base, .holo-proj::before, .holo-proj::after { animation: none; }
}

/* Frage */
.question {
  font-family: var(--serif);
  font-size: clamp(1.1rem, 3.2vw, 1.45rem);
  line-height: 1.55; color: #eef4ff; margin: 0 0 1.2rem;
  text-shadow: 0 1px 10px rgba(0,0,0,0.5);
}

/* Antwortbereich */
.answer-area { margin-bottom: 0.2rem; }
.answer-row { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.answer-row input {
  flex: 1 1 240px;
  font-family: var(--sans); font-size: 1.05rem; padding: 0.8rem 1rem;
  border-radius: 10px; color: var(--ink);
  background: rgba(4,9,20,0.75); border: 1px solid rgba(90,150,230,0.4); outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.answer-row input::placeholder { color: #5f73a0; }
.answer-row input:focus { border-color: var(--saber-blue); box-shadow: 0 0 0 3px rgba(73,182,255,0.22), 0 0 18px rgba(73,182,255,0.25); }

/* Auswahl-Buttons (Choice / Odd-one / Wahr-Falsch) */
.options { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.6rem; }
.options.two { grid-template-columns: repeat(2, 1fr); }
.option {
  font-family: var(--sans); font-size: 1rem; text-align: left;
  padding: 0.85rem 1rem; border-radius: 10px; cursor: pointer;
  color: var(--ink); background: rgba(73,182,255,0.06);
  border: 1px solid rgba(90,150,230,0.4);
  transition: transform 0.12s ease, border-color 0.2s, background 0.2s, box-shadow 0.2s;
}
.option:hover:not(:disabled) { border-color: var(--saber-blue); background: rgba(73,182,255,0.12); transform: translateY(-2px); }
.option:disabled { cursor: default; opacity: 0.85; }
.option.correct { border-color: var(--saber-green); background: rgba(84,227,107,0.16); color: #d7ffe0; box-shadow: 0 0 16px rgba(84,227,107,0.3); }
.option.wrong   { border-color: var(--sith-red); background: rgba(255,82,82,0.14); color: #ffd9d9; }

/* Buttons */
.btn {
  font-family: var(--sans); font-size: 1rem; font-weight: 600; letter-spacing: 0.02em;
  padding: 0.8rem 1.25rem; border-radius: 10px; cursor: pointer; border: 1px solid transparent;
  transition: transform 0.15s ease, box-shadow 0.25s ease, filter 0.2s ease;
}
.btn:active { transform: translateY(1px); }
.btn-saber {
  color: #02101f; background: linear-gradient(160deg, #bfe6ff, var(--saber-blue) 60%, #1f8fe0);
  border-color: #1f8fe0; box-shadow: 0 0 18px rgba(73,182,255,0.5), inset 0 1px 0 rgba(255,255,255,0.5);
}
.btn-saber:hover { filter: brightness(1.08); box-shadow: 0 0 26px rgba(73,182,255,0.75); }
.btn-next {
  color: #14110a; background: linear-gradient(160deg, #fff6b0, var(--sw-yellow) 60%, #d9c40d);
  border-color: #cdb70b; box-shadow: 0 0 16px rgba(255,232,31,0.4), inset 0 1px 0 rgba(255,255,255,0.5);
}
.btn-next:hover { filter: brightness(1.06); box-shadow: 0 0 26px rgba(255,232,31,0.65); }
.btn-ghost {
  color: var(--ink); background: rgba(73,182,255,0.06); border: 1px solid rgba(90,150,230,0.4);
  font-weight: 500; font-size: 0.9rem; padding: 0.7rem 0.95rem;
}
.btn-ghost:hover { border-color: var(--saber-blue); color: #fff; }
.btn-ghost:disabled { opacity: 0.4; cursor: default; }

/* Feedback */
.feedback { min-height: 1.4rem; margin: 0.9rem 0 0; font-size: 0.98rem; line-height: 1.5; }
.feedback.ok  { color: var(--saber-green); font-weight: 600; text-shadow: 0 0 10px rgba(84,227,107,0.4); }
.feedback.bad { color: var(--sith-red); }
.answer-row.solved input { border-color: var(--saber-green); box-shadow: 0 0 0 3px rgba(84,227,107,0.22); }
.shake { animation: shake 0.45s; }
@keyframes shake {
  10%,90% { transform: translateX(-2px); } 20%,80% { transform: translateX(4px); }
  30%,50%,70% { transform: translateX(-7px); } 40%,60% { transform: translateX(7px); }
}

/* Auflösung */
.reveal-box {
  margin-top: 1rem; padding: 0.9rem 1.1rem; border-radius: 12px;
  border: 1px solid rgba(255,232,31,0.35); background: rgba(255,232,31,0.06);
  animation: swap 380ms ease both;
}
.reveal-label { display: block; font-size: 0.62rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--sw-yellow); margin-bottom: 0.3rem; }
.reveal-text { margin: 0; font-family: var(--serif); font-size: 1.08rem; line-height: 1.55; color: #fff7d6; }

/* Aktionen */
.actions { display: flex; flex-wrap: wrap; gap: 0.55rem; margin-top: 1.2rem; align-items: center; }
.actions .btn-next { margin-left: auto; }

/* ===================== ZWISCHENSCREEN ===================== */
.transition {
  position: fixed; inset: 0; z-index: 200;
  display: grid; place-items: center;
  background: radial-gradient(circle at 50% 50%, rgba(8,14,30,0.86), rgba(2,4,10,0.96));
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  animation: tFade 0.25s ease both;
}
@keyframes tFade { from { opacity: 0; } to { opacity: 1; } }
.transition-inner { text-align: center; padding: 1.5rem; }
.transition-icon {
  font-size: clamp(3rem, 12vw, 5rem); line-height: 1;
  filter: drop-shadow(0 0 18px rgba(73,182,255,0.6));
  animation: tPop 0.6s cubic-bezier(0.16,1,0.3,1) both, tFloat 1.4s ease-in-out infinite 0.6s;
}
@keyframes tPop { from { transform: scale(0.4) rotate(-12deg); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes tFloat { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
.transition-text {
  margin-top: 1rem; font-family: var(--mono); letter-spacing: 0.1em;
  font-size: clamp(0.95rem, 3.4vw, 1.25rem); color: #cfe6ff; text-shadow: 0 0 12px rgba(73,182,255,0.5);
}
.transition-bar {
  margin: 1.1rem auto 0; width: min(280px, 70vw); height: 6px; border-radius: 6px;
  background: rgba(73,182,255,0.15); overflow: hidden;
}
.transition-bar span {
  display: block; height: 100%; width: 0;
  background: linear-gradient(90deg, var(--saber-blue), var(--sw-yellow));
  box-shadow: 0 0 12px var(--glow-blue);
  animation: fill 1.25s ease forwards;
}
@keyframes fill { from { width: 0; } to { width: 100%; } }

/* Funken */
.spark-layer { position: fixed; inset: 0; pointer-events: none; z-index: 150; overflow: hidden; }
.spark { position: absolute; font-size: 14px; line-height: 1; will-change: transform, opacity; animation: sparkFly var(--dur,1000ms) ease-out forwards; text-shadow: 0 0 8px currentColor; }
@keyframes sparkFly { 0% { transform: translate(0,0) scale(0.2); opacity: 0; } 20% { opacity: 1; } 100% { transform: translate(var(--dx), var(--dy)) scale(1); opacity: 0; } }

/* Footer */
.page-footer {
  text-align: center; padding: 1rem; color: var(--ink-soft); font-size: 0.8rem; line-height: 1.5;
}
.page-footer .legal { margin-top: 0.4rem; font-size: 0.66rem; color: #56678c; max-width: 540px; margin-left: auto; margin-right: auto; }

/* ===================== RESPONSIV ===================== */
@media (max-width: 640px) {
  .dashboard { grid-template-columns: 1fr; }
  .dash-lights, .dash-switches { flex-direction: row; justify-content: center; flex-wrap: wrap; }
  .options { grid-template-columns: 1fr; }
  .answer-row { flex-direction: column; }
  .answer-row input, .answer-row .btn-saber { width: 100%; }
  .actions { flex-direction: column; align-items: stretch; }
  .actions .btn-next { margin-left: 0; }
}

/* ===================== BEWEGUNG REDUZIEREN ===================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important; animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

/* =====================================================================
   FOTOREALES COCKPIT (echtes Bild als Hintergrund)
   Das gerenderte Cockpit-Bild übernimmt Sichtfenster + Dashboard;
   die Frage-Konsole schwebt als Holo-Panel über dem Bildschirm.
   Alle Maße als Variablen -> per Live-Tuner (#tune) einstellbar.
   ===================================================================== */
:root {
  --bg-zoom: 108%;      /* Hineinzoomen ins Cockpit-Bild */
  --bg-posy: 79%;       /* vertikaler Bildausschnitt */
  --panel-top: 60%;     /* Panel-Mitte im Bildschirm (vertikal) */
  --panel-x: 50.5%;     /* Panel-Mitte horizontal (links/rechts) */
  --panel-w: 42.5vw;    /* Panel-Breite */
  --panel-h: 54vh;      /* Panel-Höhe */
  --panel-rotx: 17.5deg;/* Trapez-/Perspektivneigung (vertikal) */
  --panel-roty: 0deg;   /* horizontale Neigung (links/rechts-Perspektive) */
  --panel-skewx: 0deg;  /* Schräglage (Parallelogramm-Korrektur) */
  --panel-persp: 1000px;/* Perspektiv-Tiefe */
}
.cockpit {
  position: relative;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  gap: 0;
  display: block;
  min-height: 100vh;
  min-height: 100svh;
  background: #04060c url("images/cockpit.webp") no-repeat center var(--bg-posy);
  background-size: var(--bg-zoom);
  overflow: hidden;
}

/* die per CSS gezeichnete Cockpit-Deko entfällt – das Foto liefert sie */
.galaxy, .struts, .glass-reflect, .vignette,
.dash-edge, .dash-lights, .dash-switches { display: none !important; }
.dashboard::before { display: none !important; }

/* Sichtfenster nur noch als Anker für das HUD (keine eigene Optik) */
.viewport {
  position: static;
  height: auto;
  min-height: 0;
  border-radius: 0;
  box-shadow: none;
  overflow: visible;
  background: none;
}

/* Dashboard wird transparenter Positionierungs-Kontext */
.dashboard {
  position: static;
  margin: 0;
  padding: 0;
  background: none;
  border: none;
  box-shadow: none;
  display: block;
}

/* HUD-Zeile leicht abgesetzt, damit sie auf dem Foto lesbar bleibt */
.hud { padding: 0.7rem 1rem; padding-left: 132px; }  /* links Platz für den Beenden-Button */
.hud-tag { background: rgba(2,6,16,0.55); }

/* Wrapper übernimmt die Zentrierung über dem Bildschirm-Bereich.
   So bleiben boot-/swap-Animationen der Konsole (transform) unberührt. */
.holo-stage {
  position: absolute;
  left: var(--panel-x);
  top: var(--panel-top);
  /* Zentrierung + Trapez-/Perspektivkorrektur (Bildschirm kippt leicht nach hinten) */
  transform: translate(-50%, -50%) perspective(var(--panel-persp))
             rotateX(var(--panel-rotx)) rotateY(var(--panel-roty)) skewX(var(--panel-skewx));
  transform-origin: center 42%;
  width: min(900px, var(--panel-w));
  height: min(var(--panel-h), 560px);
  z-index: 6;
}

/* Konsole füllt die gesamte Bildschirmfläche; Inhalt oben/unten verteilt */
.holo-stage .console {
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(90,200,255,0.35) transparent;
}
.holo-stage .console::-webkit-scrollbar { width: 8px; }
.holo-stage .console::-webkit-scrollbar-thumb { background: rgba(90,200,255,0.35); border-radius: 4px; }
.holo-stage .console::-webkit-scrollbar-track { background: transparent; }
.holo-stage .console .actions { margin-top: auto; }

/* Konsole als halbtransparentes Holo-Glas-Panel über dem Foto */
.console {
  border: 1px solid rgba(90,200,255,0.40);
  background:
    radial-gradient(120% 80% at 50% 0%, rgba(73,182,255,0.16), transparent 60%),
    linear-gradient(180deg, rgba(8,18,32,0.90), rgba(5,11,22,0.93));
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
  box-shadow:
    0 0 48px rgba(25,120,220,0.42),
    inset 0 0 60px rgba(12,60,120,0.30),
    0 0 0 1px rgba(90,200,255,0.15),
    0 18px 50px -10px rgba(0,0,0,0.85);
}

@media (max-width: 640px) {
  /* Hochformat: Cockpit als Kulisse, Konsole als gut lesbare Karte mittig.
     (Auf dem Handy keine starke Perspektive – das bleibt sauber lesbar.) */
  .cockpit { background-size: cover; background-position: center 34%; }
  .holo-stage {
    left: 50%; top: 50%;
    width: min(460px, 92vw); height: auto; max-height: 88vh;
    transform: translate(-50%, -50%);
  }
  .holo-stage .console { height: auto; }
}

/* ---- Macht-Punkte: Anordnung + Reset-Knopf ---- */
.console-top .score { flex-direction: row; align-items: center; gap: 0.5rem; }
.score-nums { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.05; }
.score-reset {
  cursor: pointer; width: 26px; height: 26px; flex: 0 0 auto;
  display: grid; place-items: center;
  font-size: 14px; line-height: 1; color: var(--ink-soft);
  background: rgba(73,182,255,0.06); border: 1px solid rgba(90,150,230,0.4);
  border-radius: 50%; transition: color .15s, border-color .15s, transform .15s;
}
.score-reset:hover { color: #fff; border-color: var(--saber-blue); transform: rotate(-90deg); }
.score-reset:active { transform: rotate(-180deg) scale(0.92); }

/* =====================================================================
   iPad / Tablets im QUERFORMAT – greift nur auf Touch-Geräten.
   Zwei Bänder, weil iPads unterschiedliche Seitenverhältnisse haben:
   4:3 (Standard-iPad, Pro 13″/11″)  und  ~3:2 (iPad mini).
   Desktop/Maus-Geräte sind durch (pointer: coarse) ausgeschlossen.
   ===================================================================== */
/* Band A – 4:3 (≈1,25–1,45): Standard-iPad, iPad Pro 13″/11″ */
@media (pointer: coarse) and (orientation: landscape)
   and (min-aspect-ratio: 5/4) and (max-aspect-ratio: 29/20) {
  :root {
    --bg-zoom: 108%;
    --bg-posy: 79%;
    --panel-top: 67%;
    --panel-x: 50.5%;
    --panel-w: 44.5vw;
    --panel-h: 41vh;
    --panel-rotx: 22.5deg;
    --panel-roty: 0deg;
    --panel-skewx: -0.5deg;
    --panel-persp: 800px;
  }
}
/* Band B – ~3:2 (≈1,45–1,6): iPad mini */
@media (pointer: coarse) and (orientation: landscape)
   and (min-aspect-ratio: 29/20) and (max-aspect-ratio: 8/5) {
  :root {
    --bg-zoom: 108%;
    --bg-posy: 79%;
    --panel-top: 66%;
    --panel-x: 50.5%;
    --panel-w: 44.5vw;
    --panel-h: 48vh;
    --panel-rotx: 24deg;
    --panel-roty: 0deg;
    --panel-skewx: 0deg;
    --panel-persp: 750px;
  }
}

/* Tablets im HOCHFORMAT: sichere, gut lesbare Karte (keine starke Perspektive) */
@media (pointer: coarse) and (orientation: portrait) and (min-width: 641px) {
  .cockpit { background-size: cover; background-position: center 32%; }
  .holo-stage {
    left: 50%; top: 50%;
    width: min(560px, 82vw); height: auto; max-height: 86vh;
    transform: translate(-50%, -50%);
  }
  .holo-stage .console { height: auto; }
}

/* ===================== LICHTSCHWERT-LOGIK (Matchstick) ===================== */
.match { display: flex; flex-direction: column; align-items: center; gap: 0.7rem; margin: 0.2rem 0 0.4rem; }
.match-eq {
  display: flex; align-items: center; justify-content: center; gap: 0.35rem; flex-wrap: wrap;
  padding: 0.7rem 0.6rem; border-radius: 12px;
  background: rgba(4,12,24,0.5); border: 1px dashed rgba(73,182,255,0.3);
}
.match-digit { width: clamp(44px, 12vw, 64px); height: auto; aspect-ratio: 60 / 100; overflow: visible; }
.match-op { font-family: var(--serif); font-size: clamp(1.6rem, 6vw, 2.4rem); color: #cfe0ff; padding: 0 0.15rem; }
.seg { stroke-width: 8; stroke-linecap: round; pointer-events: none; }
.seg.on {
  stroke: #9fdcff;
  filter: drop-shadow(0 0 3px rgba(73,182,255,0.95)) drop-shadow(0 0 7px rgba(73,182,255,0.55));
  animation: saberHum 3s ease-in-out infinite;
}
.seg.off { stroke: rgba(120,150,200,0.16); stroke-width: 6; stroke-dasharray: 2 7; }
.seg-hit { stroke: transparent; stroke-width: 18; stroke-linecap: round; cursor: pointer; }
.match-eq.holding .seg.off { stroke: rgba(120,200,255,0.5); stroke-dasharray: 2 5; }
.match-eq.holding .seg-hit { cursor: cell; }
.match-status { font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.06em; color: var(--ink-soft); min-height: 1.1em; }
.match-controls { display: flex; gap: 0.5rem; }
.match-reset { font-size: 0.82rem; padding: 0.45rem 0.8rem; }
@keyframes saberHum { 0%,100% { opacity: 1; } 50% { opacity: 0.88; } }
@media (prefers-reduced-motion: reduce) { .seg.on { animation: none; } }

/* ===================== ARCADE (Mini-Games) ===================== */
.arcade { display: flex; flex-direction: column; gap: 0.5rem; margin: 0.1rem 0 0.3rem; }
.arcade-hud { display: flex; align-items: center; gap: 0.6rem; font-family: var(--mono); font-size: 0.64rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-soft); }
.arcade-bar { flex: 1; height: 8px; border-radius: 5px; background: rgba(4,12,24,0.7); border: 1px solid rgba(73,182,255,0.3); overflow: hidden; }
.arcade-bar > span { display: block; height: 100%; width: 0%; background: linear-gradient(90deg, #49b6ff, #62ff9b); box-shadow: 0 0 8px rgba(73,182,255,0.6); transition: width 0.08s linear; }
.arcade-stage { position: relative; width: 100%; border-radius: 10px; overflow: hidden; border: 1px solid rgba(73,182,255,0.3); box-shadow: inset 0 0 40px rgba(0,0,0,0.6); }
.arcade-canvas { display: block; width: 100%; touch-action: manipulation; cursor: pointer; }
.arcade-overlay { position: absolute; inset: 0; display: none; flex-direction: column; align-items: center; justify-content: center; gap: 0.55rem; text-align: center; padding: 1rem; background: rgba(4,9,20,0.72); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); }
.arcade-overlay.show { display: flex; }
.arcade-title { font-family: var(--serif); font-size: clamp(1.2rem, 4vw, 1.7rem); color: var(--sw-yellow); text-shadow: 0 0 14px rgba(255,232,31,0.35); }
.arcade-title.win { color: var(--saber-green); text-shadow: 0 0 14px rgba(84,227,107,0.45); }
.arcade-sub { font-size: 0.9rem; color: var(--ink); max-width: 34ch; line-height: 1.4; }
.arcade-keys { font-family: var(--mono); font-size: 0.68rem; color: var(--ink-soft); letter-spacing: 0.08em; }
.arcade-jump { align-self: center; font-size: 0.92rem; padding: 0.55rem 1.4rem; }
.arcade-controls-row { display: flex; gap: 0.6rem; justify-content: center; }
.arcade-controls-row .arcade-jump { padding: 0.5rem 1.2rem; }
@media (hover: hover) and (pointer: fine) { .arcade-jump { display: none; } }

/* =====================================================================
   INTRO-SEQUENZ (#6) – Crawl, Action-Szenen, Antrieb-Mission
   ===================================================================== */
.intro {
  position: fixed; inset: 0; z-index: 300; overflow: hidden;
  background: radial-gradient(circle at 50% 38%, #06122a 0%, #03060f 60%, #01030a 100%);
  display: grid; place-items: center;
  animation: introIn 0.4s ease both;
}
@keyframes introIn { from { opacity: 0; } to { opacity: 1; } }

.intro-stage {
  position: relative; width: min(960px, 94vw); height: min(82vh, 720px);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}

.intro-controls {
  position: absolute; top: max(14px, env(safe-area-inset-top)); right: 16px; z-index: 6;
  display: flex; gap: 0.5rem;
}
.intro-skip, .intro-sound {
  font-family: var(--mono); font-size: 0.8rem; letter-spacing: 0.08em; white-space: nowrap;
  color: var(--ink-soft); background: rgba(8,16,32,0.6);
  border: 1px solid rgba(90,150,230,0.4); border-radius: 8px;
  padding: 0.5rem 0.9rem; cursor: pointer; transition: color 0.2s, border-color 0.2s;
}
.intro-skip:hover, .intro-sound:hover { color: #fff; border-color: var(--saber-blue); }
.intro-sound[aria-pressed="false"] { color: #6f81a6; }

.intro-nav { position: absolute; bottom: 4px; display: flex; gap: 0.6rem; z-index: 6; }

/* Sternenhintergrund (Crawl) */
.intro-sky {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(1.5px 1.5px at 20% 30%, #fff, transparent),
    radial-gradient(1.5px 1.5px at 70% 60%, #cfe3ff, transparent),
    radial-gradient(1px 1px at 40% 80%, #fff, transparent),
    radial-gradient(1px 1px at 85% 20%, #bfe6ff, transparent),
    radial-gradient(1.5px 1.5px at 55% 15%, #fff, transparent),
    radial-gradient(1px 1px at 10% 65%, #fff, transparent);
  opacity: 0.8;
}

/* ---------- Opening-Crawl ---------- */
.crawl-wrap {
  position: absolute; inset: 0; overflow: hidden;
  -webkit-mask-image: linear-gradient(to top, transparent 4%, #000 30%, #000 62%, transparent 94%);
          mask-image: linear-gradient(to top, transparent 4%, #000 30%, #000 62%, transparent 94%);
  perspective: 640px; perspective-origin: 50% 0%;
}
.crawl {
  /* schmaler + sanftere Perspektive, damit auch die nahe (unterste) Zeile –
     die am stärksten vergrößert wird – nicht seitlich über den Rand läuft */
  position: absolute; left: 50%; top: 100%; width: min(500px, 56%);
  transform-origin: 50% 0%; transform: translateX(-50%) rotateX(18deg);
  color: var(--sw-yellow); font-family: var(--serif); text-align: justify;
  text-shadow: 0 0 14px rgba(255,232,31,0.35);
  animation: crawlScroll 48s linear forwards;
}
@keyframes crawlScroll {
  from { top: 105%; }
  to   { top: -190%; }
}
.crawl-episode { text-align: center; letter-spacing: 0.3em; text-transform: uppercase; font-size: 1.1rem; margin: 0 0 0.2rem; }
.crawl-title { text-align: center; font-size: clamp(1.8rem, 6vw, 3rem); font-weight: 800; letter-spacing: 0.04em; margin: 0 0 0.2rem; }
.crawl-sub { text-align: center; font-size: clamp(1rem, 3vw, 1.4rem); margin: 0 0 1.6rem; opacity: 0.92; }
.crawl-para { font-size: clamp(1rem, 2.9vw, 1.36rem); line-height: 1.5; margin: 0 0 1.2rem; font-weight: 600; }

/* Reduced-Motion / statisch: lesbarer Block ohne Perspektive */
.crawl-wrap.static { perspective: none; -webkit-mask-image: none; mask-image: none; overflow: auto; }
.crawl-wrap.static .crawl {
  position: relative; left: auto; top: auto; transform: none; width: min(640px, 88%);
  margin: 2rem auto 5rem; animation: none; text-align: left;
}

/* ---------- Action-Szenen ---------- */
.scene { position: absolute; inset: 0; overflow: hidden; border-radius: 14px; }
.scene-sky {
  position: absolute; inset: 0;
  background:
    radial-gradient(1.5px 1.5px at 15% 25%, #fff, transparent),
    radial-gradient(1px 1px at 60% 40%, #cfe3ff, transparent),
    radial-gradient(1.5px 1.5px at 80% 18%, #fff, transparent),
    radial-gradient(1px 1px at 35% 60%, #fff, transparent),
    linear-gradient(to bottom, #04122e 0%, #061a3a 55%, #02060f 100%);
}
.scene-hangar .scene-sky { background:
    radial-gradient(1.5px 1.5px at 25% 30%, #fff, transparent),
    radial-gradient(1px 1px at 70% 20%, #bfe6ff, transparent),
    linear-gradient(to bottom, #0a0e1f 0%, #161024 55%, #050308 100%); }
.scene-falcon .scene-sky { background:
    radial-gradient(1.5px 1.5px at 30% 25%, #fff, transparent),
    radial-gradient(1px 1px at 75% 45%, #bfe6ff, transparent),
    radial-gradient(180px 120px at 50% 30%, rgba(73,182,255,0.18), transparent),
    linear-gradient(to bottom, #04122e 0%, #07203f 55%, #02060f 100%); }
.scene-ground {
  position: absolute; left: 0; right: 0; bottom: 0; height: 26%;
  background: linear-gradient(to top, #0b0f1c, rgba(11,15,28,0));
  border-top: 1px solid rgba(90,150,230,0.25);
}
.scene-actor {
  position: absolute; bottom: 24%; font-size: clamp(2.4rem, 9vw, 4.2rem);
  filter: drop-shadow(0 0 14px rgba(73,182,255,0.45));
  left: -12%; animation: actorRun 4.2s ease-in-out forwards;
}
/* 🏃 schaut standardmäßig nach links, läuft hier aber nach rechts → spiegeln */
.scene-hangar .scene-actor { transform: scaleX(-1); }
.scene-falcon .scene-actor { animation: falconRise 4.2s cubic-bezier(0.16,1,0.3,1) forwards; bottom: 30%; }
.scene-chaser {
  position: absolute; bottom: 30%; font-size: clamp(1.8rem, 6vw, 3rem); opacity: 0.85;
  left: -34%; animation: actorRun 4.2s ease-in-out forwards; filter: drop-shadow(0 0 10px rgba(255,82,82,0.5));
}
@keyframes actorRun { from { left: -14%; } to { left: 78%; } }
@keyframes falconRise { 0% { left: 60%; bottom: 26%; transform: scale(0.7) rotate(-6deg); opacity: 0.4; }
                        100% { left: 38%; bottom: 40%; transform: scale(1.25) rotate(-12deg); opacity: 1; } }
.scene-title {
  position: absolute; top: 16%; left: 0; right: 0; text-align: center;
  font-family: var(--mono); letter-spacing: 0.24em; font-size: clamp(0.9rem, 3vw, 1.3rem);
  color: var(--saber-blue); text-shadow: 0 0 14px var(--glow-blue);
  animation: sceneFade 0.6s ease both;
}
.scene-cap {
  position: absolute; bottom: 14%; left: 0; right: 0; text-align: center;
  font-family: var(--serif); font-size: clamp(1rem, 3.2vw, 1.4rem); color: #eaf3ff;
  padding: 0 1.2rem; text-shadow: 0 2px 12px rgba(0,0,0,0.8);
  animation: sceneFade 0.8s ease 0.25s both;
}
@keyframes sceneFade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- Mission: Antrieb hochfahren ---------- */
.mission {
  position: relative; width: min(620px, 92vw);
  background: linear-gradient(160deg, rgba(14,28,52,0.94), rgba(6,12,26,0.96));
  border: 1px solid rgba(90,150,230,0.4); border-radius: 16px;
  box-shadow: 0 0 40px rgba(73,182,255,0.18), inset 0 1px 0 rgba(255,255,255,0.06);
  padding: 1.4rem 1.4rem 1.6rem; animation: sceneFade 0.4s ease both;
}
.mission-head {
  margin: 0 0 0.9rem; text-align: center; font-family: var(--mono);
  letter-spacing: 0.22em; font-size: clamp(0.95rem, 3.2vw, 1.25rem);
  color: var(--sw-yellow); text-shadow: 0 0 14px rgba(255,232,31,0.4);
}
.mission-progress { display: flex; gap: 0.6rem; justify-content: center; margin-bottom: 0.5rem; flex-wrap: wrap; }
.mission-dot {
  display: flex; align-items: center; gap: 0.4rem;
  font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--ink-soft); padding: 0.3rem 0.6rem; border-radius: 999px;
  border: 1px solid rgba(90,150,230,0.3); background: rgba(73,182,255,0.05);
  transition: color 0.3s, border-color 0.3s, box-shadow 0.3s, background 0.3s;
}
.mission-dot::before {
  content: ""; width: 9px; height: 9px; border-radius: 50%;
  background: #2b3650; box-shadow: inset 0 0 0 1px rgba(255,255,255,0.1); transition: background 0.3s, box-shadow 0.3s;
}
.mission-dot.on {
  color: #d7ffe0; border-color: var(--saber-green); background: rgba(84,227,107,0.1);
  box-shadow: 0 0 14px rgba(84,227,107,0.3);
}
.mission-dot.on::before { background: var(--saber-green); box-shadow: 0 0 10px rgba(84,227,107,0.8); }
.mission-counter { text-align: center; font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.12em; color: var(--ink-soft); margin-bottom: 1rem; }
.mission-step { font-family: var(--mono); font-size: 0.64rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--saber-blue); margin-bottom: 0.4rem; }
.mission-q { margin: 0 0 0.9rem; }
.mission-feedback { text-align: center; }

.ignite { text-align: center; padding: 0.6rem 0; animation: sceneFade 0.4s ease both; }
.ignite-icon { font-size: clamp(2.6rem, 10vw, 4rem); filter: drop-shadow(0 0 18px rgba(255,232,31,0.6)); animation: tFloat 1.6s ease-in-out infinite; }
.ignite-text { margin: 0.6rem 0 1.1rem; font-family: var(--serif); font-size: 1.1rem; color: #fff7d6; }
.ignite-btn { font-size: 1.05rem; }

/* Hyperraum-Blitz beim Verlassen der Intro */
.intro.flash::after {
  content: ""; position: absolute; inset: 0; z-index: 10; pointer-events: none;
  background: radial-gradient(circle at 50% 50%, #fff, #bfe6ff 30%, rgba(73,182,255,0) 72%);
  animation: introFlash 0.95s ease forwards;
}
@keyframes introFlash {
  0% { opacity: 0; transform: scale(0.2); }
  30% { opacity: 1; }
  100% { opacity: 0; transform: scale(2.6); }
}

/* Footer-Replay-Knopf */
.intro-replay {
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.08em;
  color: var(--ink-soft); background: transparent; border: 1px solid rgba(90,150,230,0.3);
  border-radius: 8px; padding: 0.4rem 0.8rem; margin-top: 0.2rem; cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
}
.intro-replay:hover { color: #fff; border-color: var(--saber-blue); }

@media (prefers-reduced-motion: reduce) {
  .intro, .crawl, .scene-actor, .scene-chaser, .scene-title, .scene-cap, .mission, .ignite, .ignite-icon { animation: none !important; }
  .intro.flash::after { display: none; }
}

/* ---------- Beenden-Button (zurück zur Landingpage) ---------- */
.quit-btn {
  position: fixed; top: max(12px, env(safe-area-inset-top)); left: 14px; z-index: 120;
  display: inline-flex; align-items: center; gap: 0.4em;
  font-family: var(--mono); font-size: 0.8rem; letter-spacing: 0.08em; text-decoration: none;
  color: #cfe0ff; background: rgba(8,12,22,0.72); border: 1px solid rgba(73,182,255,0.4);
  border-radius: 10px; padding: 0.5em 0.9em; backdrop-filter: blur(4px);
  box-shadow: 0 2px 12px rgba(0,0,0,0.5);
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.quit-btn:hover { color: #fff; border-color: var(--saber-blue); background: rgba(12,20,38,0.85); }
body.intro-on .quit-btn { display: none; }
@media (max-width: 560px) {
  .hud { padding-left: 0.9rem; }            /* mobil: linke Deko-Zeile entfällt, kein Platz nötig */
  .hud .hud-tag:first-child { display: none; }
  .quit-btn { font-size: 0.72rem; padding: 0.42em 0.7em; left: 10px; }
}
