@font-face {
  font-family: "Space Grotesk";
  src: url("vendor/fonts/space-grotesk.woff2") format("woff2");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #f3f6ff;
  --ink-soft: rgba(234, 241, 255, 0.66);
  --ink-faint: rgba(226, 236, 255, 0.4);
  --cyan: #8df2ff;
  --cyan-strong: #35d8f5;
  --gold: #ffce8a;
  --rose: #ffab8a;
  --panel: rgba(11, 17, 41, 0.46);
  --panel-line: rgba(198, 224, 255, 0.16);
  --radius: 18px;
  --shadow: 0 22px 60px -24px rgba(3, 7, 22, 0.8);
  --font: "Space Grotesk", "SF Pro Display", "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  overflow: hidden;
  background: #070b1e;
  color: var(--ink);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body { user-select: none; }

button { font-family: inherit; color: inherit; }

#app {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  isolation: isolate;
}

#scene {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  outline: none;
}

/* ------------------------------------------------------------------ */
/* Atmosphaere                                                         */
/* ------------------------------------------------------------------ */

.post-fx {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  background:
    radial-gradient(ellipse 120% 90% at 50% 48%, transparent 42%, rgba(4, 7, 20, 0.42) 100%),
    linear-gradient(180deg, rgba(9, 12, 32, 0.22) 0%, transparent 16%, transparent 82%, rgba(5, 8, 22, 0.38) 100%);
  mix-blend-mode: multiply;
}

.post-fx::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}

/* ------------------------------------------------------------------ */
/* Basiselemente                                                       */
/* ------------------------------------------------------------------ */

.eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.panel {
  background: linear-gradient(155deg, rgba(22, 31, 66, 0.62), rgba(8, 13, 33, 0.52));
  border: 1px solid var(--panel-line);
  border-radius: var(--radius);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(18px) saturate(1.25);
  -webkit-backdrop-filter: blur(18px) saturate(1.25);
}

.is-hidden {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  height: 26px;
  padding: 0 7px;
  border-radius: 7px;
  border: 1px solid rgba(214, 233, 255, 0.2);
  border-bottom-color: rgba(214, 233, 255, 0.1);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.13), rgba(255, 255, 255, 0.04));
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.15);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: rgba(239, 246, 255, 0.85);
}

/* ------------------------------------------------------------------ */
/* Intro                                                               */
/* ------------------------------------------------------------------ */

.overlay {
  position: absolute;
  inset: 0;
  z-index: 10;
  transition: opacity 0.65s cubic-bezier(0.2, 0.8, 0.2, 1), visibility 0.65s;
}

.overlay--center {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
  background: rgba(4, 7, 20, 0.34);
  backdrop-filter: blur(9px) saturate(1.1);
  -webkit-backdrop-filter: blur(9px) saturate(1.1);
}

.intro {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(28px, 5vw, 64px) clamp(28px, 6vw, 96px) 28px;
  background: linear-gradient(180deg, rgba(4, 7, 20, 0.32), transparent 35%, transparent 65%, rgba(4, 7, 20, 0.5));
}

.intro__scrim {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 68% 92% at 20% 50%, rgba(4, 7, 20, 0.82), transparent 62%),
    linear-gradient(90deg, rgba(4, 7, 20, 0.88) 0%, rgba(4, 7, 20, 0.5) 40%, rgba(4, 7, 20, 0.08) 72%, transparent 88%),
    linear-gradient(0deg, rgba(4, 7, 20, 0.55), transparent 30%);
  pointer-events: none;
}

.intro__content {
  position: relative;
  z-index: 2;
  max-width: 760px;
  animation: rise-in 1.1s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(170, 225, 255, 0.22);
  background: rgba(15, 25, 54, 0.4);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: rgba(213, 241, 255, 0.82);
}

.badge__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 12px 2px rgba(113, 238, 255, 0.75);
  animation: pulse 2.8s ease-in-out infinite;
}

.title {
  margin: clamp(18px, 2.6vw, 34px) 0 0;
  font-size: clamp(74px, 12.2vw, 178px);
  font-weight: 700;
  line-height: 0.8;
  letter-spacing: -0.055em;
  text-transform: uppercase;
  display: flex;
  flex-direction: column;
}

.title__top {
  color: #fbfdff;
  text-shadow: 0 2px 44px rgba(150, 230, 255, 0.22);
}

.title__bottom {
  background: linear-gradient(96deg, #c6f8ff 4%, #7ce9ff 42%, #ffd4a1 96%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 10px 44px rgba(93, 220, 255, 0.18));
}

.lede {
  max-width: 460px;
  margin: clamp(22px, 3vw, 40px) 0 0;
  font-size: clamp(14px, 1.18vw, 16.5px);
  font-weight: 400;
  line-height: 1.65;
  color: var(--ink-soft);
  text-shadow: 0 2px 22px rgba(4, 7, 20, 0.55);
}

.start-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: clamp(24px, 3.4vw, 42px);
}

.file-warning {
  display: none;
  max-width: 560px;
  margin: 14px 0 0;
  padding: 12px 15px;
  border: 1px solid rgba(255, 201, 120, 0.35);
  border-radius: 12px;
  background: rgba(73, 45, 25, 0.3);
  color: rgba(255, 226, 191, 0.88);
  font-size: 12px;
  line-height: 1.5;
}

.file-mode .file-warning { display: block; }
.file-mode #startBtn { opacity: 0.55; cursor: not-allowed; }

.start-hint {
  font-size: 12px;
  color: var(--ink-faint);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 52px;
  padding: 0 26px;
  border-radius: 14px;
  border: 1px solid transparent;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.25s, background 0.25s, border-color 0.25s;
}

.btn svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.25s;
}

.btn--primary {
  color: #041827;
  background: linear-gradient(120deg, #b9f7ff 0%, #73e8ff 46%, #ffd8a5 120%);
  box-shadow: 0 12px 34px -10px rgba(103, 232, 255, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

.btn--primary::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 20%, rgba(255, 255, 255, 0.6) 44%, transparent 60%);
  transform: translateX(-130%);
  transition: transform 0.75s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 44px -12px rgba(103, 232, 255, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.btn--primary:hover::after { transform: translateX(130%); }
.btn--primary:hover svg { transform: translateX(3px); }
.btn--primary:active { transform: translateY(0) scale(0.985); }

.btn--ghost {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(213, 233, 255, 0.18);
  color: rgba(239, 246, 255, 0.82);
}

.btn--ghost:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(213, 233, 255, 0.34);
  transform: translateY(-1px);
}

.btn:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
}

.intro__meta {
  display: flex;
  align-items: stretch;
  gap: clamp(20px, 3vw, 44px);
  margin-top: clamp(26px, 4vw, 48px);
  padding-top: 22px;
  border-top: 1px solid rgba(207, 231, 255, 0.12);
  max-width: 560px;
}

.meta {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.meta strong {
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: rgba(243, 248, 255, 0.9);
  font-variant-numeric: tabular-nums;
}

.intro__meta .meta + .meta {
  padding-left: clamp(20px, 3vw, 44px);
  border-left: 1px solid rgba(207, 231, 255, 0.1);
}

.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 26px;
  margin-top: clamp(22px, 3vw, 34px);
}

.control {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11.5px;
  color: var(--ink-faint);
}

.keys { display: inline-flex; gap: 4px; }

.intro__footer {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(220, 235, 255, 0.34);
  animation: fade-in 1.6s 0.35s both;
}

.intro__footer-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.icon-btn--ghost {
  width: 34px;
  height: 34px;
  border-color: rgba(213, 233, 255, 0.12);
  background: rgba(255, 255, 255, 0.03);
}

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

.hud {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  opacity: 1;
  transition: opacity 0.5s ease, visibility 0.5s;
  font-variant-numeric: tabular-nums;
}

.hud::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(6, 10, 26, 0.32) 0%, transparent 18%, transparent 76%, rgba(6, 10, 26, 0.38) 100%);
  pointer-events: none;
}

.hud__corner {
  position: absolute;
  z-index: 2;
}

.hud__top-left { top: 26px; left: 28px; }
.hud__top-right { top: 26px; right: 28px; }
.hud__bottom-left { bottom: 28px; left: 28px; }
.hud__bottom-center { bottom: 22px; left: 50%; transform: translateX(-50%); }
.hud__bottom-right { bottom: 26px; right: 28px; }

.hud .panel { pointer-events: none; }

.eyebrow + .mission__title { margin-top: 10px; }

.pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 10px 1px rgba(109, 238, 255, 0.85);
  animation: pulse 2.4s ease-in-out infinite;
}

.mission {
  width: min(302px, 34vw);
  padding: 16px 18px 15px;
}

.mission__title {
  margin: 0;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: rgba(245, 249, 255, 0.95);
  min-height: 20px;
  transition: opacity 0.3s;
}

.progress {
  margin-top: 14px;
  height: 4px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.progress__bar {
  height: 100%;
  width: 0%;
  border-radius: 99px;
  background: linear-gradient(90deg, rgba(115, 236, 255, 0.85), #e9fdff);
  box-shadow: 0 0 14px rgba(105, 234, 255, 0.8);
  transition: width 0.55s cubic-bezier(0.2, 0.8, 0.2, 1), background 0.4s;
}

.progress__bar.is-complete {
  background: linear-gradient(90deg, #ffd08c, #fff3dc);
  box-shadow: 0 0 16px rgba(255, 205, 137, 0.9);
}

.progress__meta {
  display: flex;
  justify-content: space-between;
  margin-top: 9px;
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 0.17em;
  text-transform: uppercase;
  color: rgba(219, 233, 255, 0.42);
}

.progress__meta span:first-child {
  color: rgba(236, 247, 255, 0.78);
  letter-spacing: 0.1em;
}

.top-actions {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.timer {
  min-width: 196px;
  padding: 13px 18px 14px;
  text-align: right;
}

.timer .eyebrow { justify-content: flex-end; }

.timer__value {
  display: block;
  margin-top: 4px;
  font-size: 33px;
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: #f7fbff;
  text-shadow: 0 0 26px rgba(144, 232, 255, 0.28);
}

.timer__best {
  display: block;
  margin-top: 7px;
  font-size: 9.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(217, 233, 255, 0.4);
}

.timer__best b {
  font-weight: 500;
  color: rgba(255, 215, 160, 0.75);
  letter-spacing: 0.06em;
}

.icon-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: auto;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border-radius: 13px;
  border: 1px solid var(--panel-line);
  background: rgba(11, 19, 44, 0.45);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  cursor: pointer;
  color: rgba(227, 241, 255, 0.72);
  transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.2s;
  pointer-events: auto;
}

.icon-btn:hover {
  background: rgba(30, 47, 88, 0.6);
  border-color: rgba(181, 226, 255, 0.32);
  color: #fff;
  transform: translateY(-1px);
}

.icon-btn:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }

.icon-btn svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-btn svg .wave { fill: none; }

.icon-btn.is-muted .wave { opacity: 0; }

/* Speed + Boost */

.speed {
  width: 232px;
  padding: 15px 18px 16px;
}

.speed__row {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.speed__value {
  font-size: 40px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.045em;
  color: #f6fbff;
}

.speed__unit {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(216, 234, 255, 0.42);
}

.boost { margin-top: 12px; }

.boost__meta {
  display: flex;
  justify-content: space-between;
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(216, 234, 255, 0.42);
}

.boost__meta span:last-child { color: rgba(142, 241, 255, 0.8); }

.boost__track {
  height: 5px;
  margin-top: 7px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.boost__fill {
  height: 100%;
  width: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, #62e9ff, #c7fbff);
  box-shadow: 0 0 12px rgba(98, 233, 255, 0.75);
  transition: background 0.3s;
}

.boost__fill.is-boosting {
  background: linear-gradient(90deg, #ffc978, #fff0d0);
  box-shadow: 0 0 16px rgba(255, 202, 120, 0.9);
}

/* Schild */

.boost--health { margin-top: 14px; }

.boost--health .boost__meta span:last-child { color: rgba(157, 255, 197, 0.85); }

.boost__fill--health {
  width: 100%;
  background: linear-gradient(90deg, #63f5c4, #c8fff0);
  box-shadow: 0 0 12px rgba(99, 245, 196, 0.7);
  transition: width 0.18s linear, background 0.3s;
}

.boost__fill--health.is-critical {
  background: linear-gradient(90deg, #ff6a58, #ffc0a8);
  box-shadow: 0 0 16px rgba(255, 96, 80, 0.9);
  animation: shield-pulse 0.9s ease-in-out infinite;
}

/* Raketen */

.missiles {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(201, 229, 255, 0.1);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(216, 234, 255, 0.42);
}

.missiles__pips {
  display: flex;
  gap: 4px;
  flex: 1;
}

.missile-pip {
  width: 100%;
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.12);
  transition: background 0.25s, box-shadow 0.25s;
}

.missile-pip.is-live {
  background: linear-gradient(90deg, #ffcf8c, #fff0d0);
  box-shadow: 0 0 8px rgba(255, 205, 137, 0.75);
}

.missiles b {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: rgba(255, 219, 168, 0.9);
}

/* Compass */

.compass {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.compass__bezel {
  position: relative;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 42%, rgba(31, 48, 92, 0.45), rgba(7, 12, 30, 0.62));
  border: 1px solid rgba(196, 225, 255, 0.18);
  box-shadow: var(--shadow), inset 0 0 24px rgba(120, 220, 255, 0.08);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.compass__ticks {
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  background:
    repeating-conic-gradient(from -2deg, rgba(220, 240, 255, 0.42) 0deg 1.2deg, transparent 1.2deg 30deg);
  -webkit-mask: radial-gradient(circle, transparent 0 68%, #000 69% 100%);
  mask: radial-gradient(circle, transparent 0 68%, #000 69% 100%);
  opacity: 0.55;
}

.compass__bezel::after {
  content: "";
  position: absolute;
  inset: 18px;
  border-radius: 50%;
  border: 1px dashed rgba(202, 231, 255, 0.13);
}

.compass__arrow {
  position: absolute;
  inset: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.12s linear;
  filter: drop-shadow(0 0 8px rgba(112, 238, 255, 0.45));
}

.compass__arrow svg {
  width: 100%;
  height: 100%;
  fill: rgba(157, 244, 255, 0.92);
  stroke: rgba(8, 18, 36, 0.4);
  stroke-width: 0.4;
}

.compass__target {
  display: flex;
  align-items: baseline;
  gap: 7px;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(215, 232, 255, 0.4);
}

.compass__target b {
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: rgba(158, 244, 255, 0.88);
}

/* Radar */

.radar {
  position: relative;
  width: 164px;
  height: 164px;
  border-radius: 50%;
  border: 1px solid rgba(196, 225, 255, 0.18);
  background: radial-gradient(circle at 50% 50%, rgba(15, 30, 62, 0.48), rgba(6, 11, 28, 0.66));
  box-shadow: var(--shadow), inset 0 0 34px rgba(110, 225, 255, 0.08);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  overflow: hidden;
}

.radar canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.radar__label {
  position: absolute;
  bottom: 13px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: rgba(214, 232, 255, 0.32);
  pointer-events: none;
}

.radar__north {
  position: absolute;
  top: 9px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: rgba(255, 210, 154, 0.55);
}

/* Toasts */

.toasts {
  position: absolute;
  top: 108px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
  z-index: 6;
}

.toast {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 9px 18px;
  border-radius: 999px;
  border: 1px solid rgba(183, 231, 255, 0.22);
  background: rgba(9, 16, 38, 0.62);
  box-shadow: 0 14px 34px -18px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: rgba(232, 245, 255, 0.86);
  white-space: nowrap;
  animation: toast-in 0.45s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.toast::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 9px 1px rgba(113, 240, 255, 0.8);
}

.toast--gold {
  border-color: rgba(255, 214, 154, 0.3);
}

.toast--gold::before {
  background: var(--gold);
  box-shadow: 0 0 10px 2px rgba(255, 207, 141, 0.8);
}

.toast.is-out { animation: toast-out 0.4s ease forwards; }

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

.crosshair {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 64px;
  height: 64px;
  transform: translate(-50%, -50%);
  z-index: 3;
  pointer-events: none;
  opacity: 0.78;
  transition: opacity 0.25s;
}

.crosshair__dot {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 4px;
  height: 4px;
  margin: -2px 0 0 -2px;
  border-radius: 50%;
  background: #eafdff;
  box-shadow: 0 0 10px rgba(157, 246, 255, 0.95);
}

.crosshair__ring {
  position: absolute;
  inset: 18px;
  border-radius: 50%;
  border: 1px solid rgba(191, 245, 255, 0.55);
  box-shadow: 0 0 12px rgba(112, 236, 255, 0.25), inset 0 0 10px rgba(112, 236, 255, 0.15);
  transition: transform 0.12s, border-color 0.12s, box-shadow 0.12s;
}

.crosshair__tick {
  position: absolute;
  background: rgba(206, 249, 255, 0.7);
  box-shadow: 0 0 8px rgba(131, 240, 255, 0.6);
}

.crosshair__tick--n,
.crosshair__tick--s {
  left: 50%;
  width: 1.5px;
  height: 8px;
  margin-left: -0.75px;
}

.crosshair__tick--n { top: 0; }
.crosshair__tick--s { bottom: 0; }

.crosshair__tick--w,
.crosshair__tick--e {
  top: 50%;
  height: 1.5px;
  width: 8px;
  margin-top: -0.75px;
}

.crosshair__tick--w { left: 0; }
.crosshair__tick--e { right: 0; }

.crosshair.is-firing {
  opacity: 1;
}

.crosshair.is-firing .crosshair__ring {
  transform: scale(1.22);
  border-color: rgba(255, 231, 190, 0.85);
  box-shadow: 0 0 18px rgba(255, 205, 137, 0.5);
}

.lock-reticle {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 92px;
  height: 92px;
  transform: translate(-50%, -50%);
  z-index: 2;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s;
}

.lock-reticle.is-live { opacity: 1; }

.lock-reticle__bracket {
  position: absolute;
  width: 18px;
  height: 18px;
  border: 1.5px solid rgba(255, 112, 92, 0.9);
  filter: drop-shadow(0 0 7px rgba(255, 90, 70, 0.75));
  animation: lock-pulse 1.1s ease-in-out infinite;
}

.lock-reticle__bracket--tl { left: 0; top: 0; border-right: 0; border-bottom: 0; }
.lock-reticle__bracket--tr { right: 0; top: 0; border-left: 0; border-bottom: 0; }
.lock-reticle__bracket--bl { left: 0; bottom: 0; border-right: 0; border-top: 0; }
.lock-reticle__bracket--br { right: 0; bottom: 0; border-left: 0; border-top: 0; }

.lock-reticle__label {
  position: absolute;
  left: 50%;
  bottom: -20px;
  transform: translateX(-50%);
  padding: 2px 7px;
  border-radius: 4px;
  background: rgba(40, 8, 12, 0.55);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(255, 176, 156, 0.95);
  white-space: nowrap;
}

.damage-vignette {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  opacity: 0;
  background:
    radial-gradient(ellipse at 50% 50%, transparent 42%, rgba(255, 54, 44, 0.42) 82%, rgba(170, 12, 18, 0.72) 100%);
}

.damage-vignette.is-hit {
  animation: damage-flash 0.55s ease-out;
}

.damage-vignette.is-critical {
  opacity: 0.16;
}


/* Countdown */

.countdown {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  z-index: 7;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s, visibility 0.35s;
}

.countdown.is-live { opacity: 1; visibility: visible; }

.countdown__ring {
  position: absolute;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  border: 1px solid rgba(144, 238, 255, 0.22);
  box-shadow: 0 0 70px rgba(80, 200, 255, 0.14), inset 0 0 60px rgba(80, 200, 255, 0.06);
}

.countdown__ring::before {
  content: "";
  position: absolute;
  inset: 22px;
  border-radius: 50%;
  border: 1px dashed rgba(155, 238, 255, 0.2);
  animation: spin 14s linear infinite;
}

.countdown__value {
  position: relative;
  font-size: 118px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.06em;
  color: #f2fdff;
  text-shadow: 0 0 54px rgba(96, 226, 255, 0.55);
  font-variant-numeric: tabular-nums;
}

.countdown__value.is-pop { animation: pop 0.9s cubic-bezier(0.16, 1, 0.3, 1); }

.countdown__hint {
  position: relative;
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: rgba(213, 237, 255, 0.48);
}

/* ------------------------------------------------------------------ */
/* Modals                                                              */
/* ------------------------------------------------------------------ */

.modal {
  position: relative;
  width: min(540px, calc(100vw - 40px));
  padding: 34px 36px 28px;
  border-radius: 26px;
  background: linear-gradient(160deg, rgba(20, 30, 64, 0.82), rgba(7, 12, 30, 0.8));
  box-shadow: 0 40px 100px -30px rgba(0, 0, 0, 0.85), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  animation: modal-in 0.55s cubic-bezier(0.16, 1, 0.3, 1) both;
  overflow: hidden;
}

.modal::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 12%;
  right: 12%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(154, 241, 255, 0.6), transparent);
}

.modal__title {
  margin: 12px 0 0;
  font-size: 44px;
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1.05;
}

.modal__title--glow {
  background: linear-gradient(100deg, #f7fdff, #a9f1ff 55%, #ffd9ab);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.modal__text {
  margin: 12px 0 0;
  font-size: 13px;
  line-height: 1.6;
  color: var(--ink-soft);
  max-width: 380px;
}

.modal__actions {
  display: flex;
  gap: 10px;
  margin-top: 28px;
  flex-wrap: wrap;
}

.modal__actions .btn { flex: 1 1 auto; }

.modal__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid rgba(202, 229, 255, 0.1);
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--ink-faint);
}

.modal__foot b {
  font-weight: 500;
  color: rgba(255, 214, 158, 0.8);
  letter-spacing: 0.05em;
}

.modal__foot kbd { height: 21px; min-width: 21px; font-size: 9px; margin: 0 2px; }

.link-btn {
  padding: 0;
  border: 0;
  background: none;
  font-size: 10px;
  letter-spacing: 0.1em;
  color: rgba(143, 240, 255, 0.68);
  cursor: pointer;
  border-bottom: 1px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}

.link-btn:hover {
  color: #c9faff;
  border-bottom-color: rgba(201, 250, 255, 0.4);
}

.result-time {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  margin-top: 26px;
  padding: 18px 20px;
  border-radius: 16px;
  border: 1px solid rgba(197, 226, 255, 0.13);
  background: rgba(255, 255, 255, 0.04);
}

.result-time strong {
  font-size: 46px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.04em;
  color: #f6fdff;
  text-shadow: 0 0 34px rgba(117, 233, 255, 0.32);
}

.record {
  display: inline-flex;
  margin-top: 3px;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gold);
  text-shadow: 0 0 18px rgba(255, 208, 140, 0.6);
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 12px;
}

.result-grid > div {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 13px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(197, 226, 255, 0.08);
}

.result-grid span {
  font-size: 8.5px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.result-grid b {
  font-size: 14px;
  font-weight: 500;
  color: rgba(240, 248, 255, 0.9);
  letter-spacing: 0.01em;
}

.confetti {
  position: fixed;
  width: 7px;
  height: 7px;
  border-radius: 2px;
  pointer-events: none;
  z-index: 20;
  animation: confetti-fall linear forwards;
}

/* ------------------------------------------------------------------ */
/* Animationen                                                         */
/* ------------------------------------------------------------------ */

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.86); }
}

@keyframes rise-in {
  from { opacity: 0; transform: translateY(22px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes pop {
  0% { opacity: 0; transform: scale(1.6); filter: blur(6px); }
  22% { opacity: 1; transform: scale(1); filter: blur(0); }
  80% { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(0.86); }
}

@keyframes toast-in {
  from { opacity: 0; transform: translateY(-8px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes toast-out {
  to { opacity: 0; transform: translateY(-6px) scale(0.97); }
}

@keyframes modal-in {
  from { opacity: 0; transform: translateY(18px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes confetti-fall {
  0% { opacity: 1; transform: translate3d(0, 0, 0) rotate(0deg); }
  100% { opacity: 0; transform: translate3d(var(--dx, 0px), 110vh, 0) rotate(720deg); }
}

@keyframes damage-flash {
  0% { opacity: 0; }
  14% { opacity: 0.9; }
  100% { opacity: 0; }
}

@keyframes shield-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.55; }
}

@keyframes lock-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}

/* HUD Einblendung */

.hud:not(.is-hidden) .mission,
.hud:not(.is-hidden) .speed,
.hud:not(.is-hidden) .compass,
.hud:not(.is-hidden) .radar,
.hud:not(.is-hidden) .timer {
  animation: hud-in 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.hud:not(.is-hidden) .timer { animation-delay: 0.06s; }
.hud:not(.is-hidden) .speed { animation-delay: 0.1s; }
.hud:not(.is-hidden) .compass { animation-delay: 0.15s; }
.hud:not(.is-hidden) .radar { animation-delay: 0.2s; }

@keyframes hud-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ------------------------------------------------------------------ */
/* Responsive                                                          */
/* ------------------------------------------------------------------ */

@media (max-width: 980px) {
  .hud__bottom-right { display: none; }
  .hud__top-left { top: 18px; left: 18px; }
  .hud__top-right { top: 18px; right: 18px; }
  .hud__bottom-left { bottom: 18px; left: 18px; }
  .hud__bottom-center { bottom: 16px; }
  .mission { width: min(250px, 46vw); }
  .timer { min-width: 160px; }
  .timer__value { font-size: 27px; }
  .intro { padding: 28px; }
}

@media (max-width: 720px) {
  .intro__meta { display: none; }
  .controls { display: none; }
  .intro__footer span:first-child { display: none; }
  .hud__bottom-center { display: none; }
  .mission { width: 210px; }
  .speed { width: 186px; }
  .speed__value { font-size: 32px; }
  .modal { padding: 26px 22px 22px; }
  .modal__title { font-size: 36px; }
  .result-time strong { font-size: 38px; }
  .toasts { top: 92px; }
}

@media (max-width: 560px) {
  .intro {
    padding: 22px 22px 18px;
    overflow-y: auto;
  }
  .intro__content { max-width: 100%; }
  .title { font-size: clamp(58px, 19vw, 100px); line-height: 0.82; }
  .badge { font-size: 9px; padding: 7px 12px; }
  .lede {
    margin-top: 16px;
    font-size: 13px;
    line-height: 1.55;
    max-width: 100%;
  }
  .start-row { margin-top: 18px; gap: 12px; }
  .start-hint { display: none; }
  .intro__footer { margin-top: 22px; padding-bottom: 4px; }
  .intro__footer-right { width: 100%; justify-content: space-between; }
  .hud__top-left { top: 12px; left: 12px; }
  .hud__top-right { top: 12px; right: 12px; }
  .hud__bottom-left { bottom: 12px; left: 12px; }
  .mission { width: 198px; padding: 12px 14px; }
  .mission__title { font-size: 13px; }
  .timer { min-width: 138px; padding: 10px 13px; }
  .timer__value { font-size: 23px; }
  .icon-btn { width: 36px; height: 36px; border-radius: 11px; }
  .top-actions { gap: 6px; }
  .speed { width: 164px; padding: 12px 14px; }
  .speed__value { font-size: 28px; }
  .toasts { top: 76px; max-width: 90vw; }
  .toast { font-size: 9.5px; padding: 7px 12px; letter-spacing: 0.08em; }
  .countdown__value { font-size: 88px; }
  .countdown__ring { width: 176px; height: 176px; }
}

@media (max-height: 700px) {
  .controls { display: none; }
  .intro__meta { margin-top: 22px; padding-top: 16px; }
  .lede { margin-top: 18px; }
  .title { font-size: clamp(64px, 10vw, 132px); }
  .start-row { margin-top: 22px; }
}

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