:root {
  color-scheme: dark;
  --bg: #050712;
  --text: #f7fbff;
  --muted: #b8c3d7;
  --cyan: #4ef3ff;
  --pink: #ff4fd8;
  --green: #80ffb8;
  --amber: #ffd36a;
  --panel: rgba(8, 12, 28, 0.4);
  --line: rgba(126, 236, 255, 0.28);
  --shadow: rgba(78, 243, 255, 0.24);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
}

body {
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 14% 18%, rgba(255, 79, 216, 0.18), transparent 30vw),
    radial-gradient(circle at 84% 18%, rgba(128, 255, 184, 0.14), transparent 28vw),
    linear-gradient(135deg, #050712 0%, #0b1024 48%, #111018 100%);
  color: var(--text);
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, transparent 0%, #000 22%, #000 84%, transparent 100%);
  transform: perspective(760px) rotateX(60deg) translateY(18vh) scale(1.7);
  transform-origin: bottom center;
}

body::after {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  content: "";
  background:
    repeating-linear-gradient(
      to bottom,
      rgba(255, 255, 255, 0.035) 0,
      rgba(255, 255, 255, 0.035) 1px,
      transparent 1px,
      transparent 7px
    );
  mix-blend-mode: soft-light;
  opacity: 0.35;
}

#scene {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.audio-control {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 46px;
  padding: 8px 12px;
  border: 1px solid rgba(126, 236, 255, 0.34);
  border-radius: 999px;
  background: rgba(5, 8, 20, 0.58);
  box-shadow:
    0 0 34px rgba(78, 243, 255, 0.14),
    inset 0 0 20px rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(16px) saturate(140%);
}

.sound-toggle {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid rgba(78, 243, 255, 0.45);
  border-radius: 50%;
  background: rgba(78, 243, 255, 0.08);
  color: var(--cyan);
  cursor: pointer;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease,
    color 160ms ease;
}

.sound-toggle:hover,
.sound-toggle:focus-visible {
  border-color: var(--amber);
  color: var(--amber);
  box-shadow: 0 0 18px rgba(255, 211, 106, 0.28);
  outline: none;
  transform: translateY(-1px);
}

.sound-toggle svg {
  grid-area: 1 / 1;
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sound-toggle .icon-sound-on {
  display: none;
}

.sound-toggle.is-playing .icon-sound-off {
  display: none;
}

.sound-toggle.is-playing .icon-sound-on {
  display: block;
}

.volume-slider {
  width: 118px;
  height: 18px;
  accent-color: var(--cyan);
  cursor: pointer;
}

.page-shell {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 36px));
  min-height: 100vh;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  align-items: center;
  gap: clamp(24px, 4vw, 64px);
  padding: clamp(28px, 6vw, 72px) 0;
}

.shutdown-panel {
  width: min(760px, 100%);
  min-width: 0;
  padding: clamp(28px, 5vw, 54px);
  padding-bottom: clamp(34px, 5vw, 58px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.1), transparent 35%),
    var(--panel);
  box-shadow:
    0 24px 90px rgba(0, 0, 0, 0.42),
    0 0 60px var(--shadow),
    inset 0 0 44px rgba(78, 243, 255, 0.055);
  backdrop-filter: blur(18px) saturate(135%);
}

.status-row {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 34px;
  padding: 7px 12px;
  border: 1px solid rgba(128, 255, 184, 0.32);
  border-radius: 999px;
  background: rgba(128, 255, 184, 0.08);
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.pulse-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 0 rgba(128, 255, 184, 0.68);
  animation: pulse 1.7s ease-out infinite;
}

.kicker {
  margin: clamp(28px, 5vw, 48px) 0 0;
  color: var(--cyan);
  font-size: clamp(1rem, 1.7vw, 1.24rem);
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-shadow: 0 0 24px rgba(78, 243, 255, 0.75);
}

h1 {
  position: relative;
  margin: 6px 0 0;
  max-width: 100%;
  overflow-wrap: normal;
  white-space: nowrap;
  font-size: clamp(1.65rem, 7.6vw, 4.35rem);
  line-height: 0.94;
  font-weight: 950;
  letter-spacing: 0;
  text-transform: uppercase;
  text-wrap: balance;
}

h1::before,
h1::after {
  position: absolute;
  inset: 0;
  content: "Abgeschaltet";
  pointer-events: none;
  opacity: 0.72;
}

h1::before {
  color: var(--cyan);
  transform: translate(3px, 0);
  clip-path: inset(0 0 52% 0);
  animation: glitch-a 4.8s infinite steps(1);
}

h1::after {
  color: var(--pink);
  transform: translate(-3px, 0);
  clip-path: inset(54% 0 0 0);
  animation: glitch-b 5.6s infinite steps(1);
}

.lead {
  max-width: 650px;
  margin: clamp(24px, 3vw, 34px) 0 0;
  color: var(--muted);
  font-size: clamp(1.05rem, 2.1vw, 1.38rem);
  line-height: 1.56;
  overflow-wrap: break-word;
}

.cta {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-width: 220px;
  min-height: 58px;
  margin-top: clamp(30px, 4vw, 44px);
  padding: 15px 24px;
  overflow: hidden;
  border: 1px solid rgba(78, 243, 255, 0.72);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(78, 243, 255, 0.22), rgba(255, 79, 216, 0.2)),
    rgba(7, 12, 28, 0.72);
  color: var(--text);
  box-shadow:
    0 0 34px rgba(78, 243, 255, 0.24),
    inset 0 0 20px rgba(255, 255, 255, 0.07);
  font-size: 1rem;
  font-weight: 900;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease;
}

.cta::before {
  position: absolute;
  inset: -2px;
  content: "";
  background: linear-gradient(110deg, transparent 20%, rgba(255, 255, 255, 0.8), transparent 50%);
  transform: translateX(-120%);
  transition: transform 520ms ease;
}

.cta span,
.cta svg {
  position: relative;
  z-index: 1;
}

.cta svg {
  width: 25px;
  height: 25px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.cta:hover,
.cta:focus-visible {
  border-color: var(--amber);
  box-shadow:
    0 0 42px rgba(255, 211, 106, 0.28),
    0 0 64px rgba(255, 79, 216, 0.2),
    inset 0 0 24px rgba(255, 255, 255, 0.1);
  transform: translateY(-3px);
  outline: none;
}

.cta:hover::before,
.cta:focus-visible::before {
  transform: translateX(120%);
}

.copyright {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 16px;
  margin: clamp(28px, 4vw, 42px) 0 0;
  color: rgba(184, 195, 215, 0.66);
  font-size: 0.74rem;
  font-weight: 700;
  line-height: 1.4;
  text-align: center;
}

.legal-trigger {
  display: block;
  margin: 9px auto -24px;
  padding: 0;
  border: 0;
  background: transparent;
  color: rgba(78, 243, 255, 0.74);
  cursor: pointer;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-align: center;
  text-transform: uppercase;
  transition:
    color 160ms ease,
    text-shadow 160ms ease;
}

.legal-trigger:hover,
.legal-trigger:focus-visible {
  color: var(--amber);
  outline: none;
  text-shadow: 0 0 16px rgba(255, 211, 106, 0.44);
}

.imprint-dialog {
  width: min(720px, calc(100% - 32px));
  padding: 0;
  border: 1px solid rgba(126, 236, 255, 0.34);
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  box-shadow:
    0 28px 120px rgba(0, 0, 0, 0.62),
    0 0 70px rgba(78, 243, 255, 0.2);
}

.imprint-dialog::backdrop {
  background:
    radial-gradient(circle at 50% 30%, rgba(78, 243, 255, 0.12), transparent 36%),
    rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(9px);
}

.imprint-shell {
  position: relative;
  overflow: hidden;
  padding: clamp(28px, 5vw, 44px);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.11), transparent 36%),
    rgba(6, 10, 24, 0.78);
}

.imprint-shell::before {
  position: absolute;
  inset: 0;
  pointer-events: none;
  content: "";
  background-image:
    linear-gradient(rgba(78, 243, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(78, 243, 255, 0.07) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: radial-gradient(circle at 50% 45%, #000 0%, transparent 74%);
  opacity: 0.48;
}

.imprint-close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid rgba(78, 243, 255, 0.42);
  border-radius: 50%;
  background: rgba(78, 243, 255, 0.08);
  color: var(--cyan);
  cursor: pointer;
  transition:
    color 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.imprint-close:hover,
.imprint-close:focus-visible {
  border-color: var(--amber);
  color: var(--amber);
  box-shadow: 0 0 22px rgba(255, 211, 106, 0.24);
  outline: none;
  transform: translateY(-1px);
}

.imprint-close svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
}

.imprint-kicker,
.imprint-dialog h2,
.imprint-grid {
  position: relative;
  z-index: 1;
}

.imprint-kicker {
  margin: 0 0 10px;
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.imprint-dialog h2 {
  margin: 0 0 24px;
  color: var(--text);
  font-size: clamp(2.4rem, 7vw, 4.4rem);
  line-height: 0.9;
  text-transform: uppercase;
  text-shadow:
    2px 0 0 rgba(78, 243, 255, 0.62),
    -2px 2px 0 rgba(255, 79, 216, 0.42);
}

.imprint-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.imprint-grid section {
  min-height: 150px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(4, 7, 18, 0.38);
  box-shadow: inset 0 0 28px rgba(78, 243, 255, 0.055);
}

.imprint-grid .imprint-wide {
  grid-column: 1 / -1;
  min-height: 0;
}

.imprint-grid h3 {
  margin: 0 0 12px;
  color: rgba(184, 195, 215, 0.76);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.imprint-grid p {
  margin: 0;
  color: rgba(247, 251, 255, 0.92);
  font-size: 1rem;
  line-height: 1.65;
}

.imprint-grid a {
  color: var(--cyan);
  font-weight: 800;
  text-decoration: none;
}

.imprint-grid a:hover,
.imprint-grid a:focus-visible {
  color: var(--amber);
  outline: none;
}

.music-credit {
  position: relative;
  z-index: 1;
  margin: 20px 0 0;
  color: rgba(184, 195, 215, 0.68);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-align: center;
  text-transform: uppercase;
}

.telemetry {
  align-self: end;
  display: grid;
  gap: 12px;
  margin-bottom: clamp(24px, 8vw, 94px);
}

.telemetry div {
  min-height: 82px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(4, 7, 18, 0.3);
  box-shadow: inset 0 0 26px rgba(78, 243, 255, 0.05);
  backdrop-filter: blur(14px);
}

.telemetry span,
.telemetry strong {
  display: block;
}

.telemetry span {
  color: rgba(184, 195, 215, 0.72);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.telemetry strong {
  margin-top: 10px;
  color: var(--text);
  font-size: clamp(0.96rem, 1.5vw, 1.08rem);
  line-height: 1.2;
}

@keyframes pulse {
  70% {
    box-shadow: 0 0 0 12px rgba(128, 255, 184, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(128, 255, 184, 0);
  }
}

@keyframes glitch-a {
  0%,
  86%,
  100% {
    transform: translate(3px, 0);
  }
  87% {
    transform: translate(-5px, 2px);
  }
  89% {
    transform: translate(7px, -3px);
  }
  91% {
    transform: translate(2px, 1px);
  }
}

@keyframes glitch-b {
  0%,
  80%,
  100% {
    transform: translate(-3px, 0);
  }
  81% {
    transform: translate(6px, -2px);
  }
  83% {
    transform: translate(-8px, 3px);
  }
  85% {
    transform: translate(-2px, -1px);
  }
}

@media (max-width: 860px) {
  .page-shell {
    grid-template-columns: 1fr;
    align-content: center;
    gap: 20px;
  }

  .telemetry {
    width: 100%;
    align-self: auto;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-bottom: 0;
  }
}

@media (max-width: 620px) {
  .audio-control {
    top: 12px;
    right: auto;
    left: min(calc(100vw - 160px), 230px);
    gap: 8px;
    width: 148px;
    padding: 7px 9px;
  }

  .volume-slider {
    width: 82px;
  }

  .page-shell {
    width: 100%;
    max-width: 100vw;
    min-height: 100svh;
    grid-template-columns: minmax(0, min(320px, calc(100vw - 72px)));
    justify-content: start;
    padding: 22px 12px;
    overflow: hidden;
  }

  .shutdown-panel {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    padding: 22px;
    padding-bottom: 30px;
  }

  .status-row {
    max-width: 100%;
    font-size: 0.68rem;
  }

  h1 {
    font-size: clamp(1.55rem, 7vw, 1.95rem);
    max-width: 100%;
  }

  .lead {
    max-width: 100%;
    font-size: 1rem;
  }

  .cta {
    width: 100%;
    min-width: 0;
  }

  .copyright {
    margin: 22px 0 0;
    font-size: 0.68rem;
  }

  .legal-trigger {
    margin: 8px auto -16px;
    font-size: 0.66rem;
  }

  .imprint-dialog {
    width: min(340px, calc(100% - 24px));
  }

  .imprint-shell {
    padding: 24px;
  }

  .imprint-dialog h2 {
    font-size: 2.15rem;
  }

  .imprint-grid {
    grid-template-columns: 1fr;
  }

  .telemetry {
    grid-template-columns: 1fr;
    width: 100%;
    max-width: 100%;
  }

  .telemetry div {
    min-height: 68px;
  }
}

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