:root {
  --bg: #08050f;
  --bg-deep: #030207;
  --purple: #8c4dcc;
  --purple-bright: #d99cff;
  --purple-soft: #b879e8;
  --white: #f6eaff;
  --muted: #b6a3c3;
  --panel: rgba(13, 7, 21, 0.94);
  --border: rgba(206, 139, 255, 0.48);
  --shadow: rgba(151, 67, 214, 0.28);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg-deep);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow: hidden;
  color: var(--white);
  background:
    radial-gradient(
      circle at center,
      rgba(59, 27, 78, 0.2),
      transparent 40%
    ),
    var(--bg-deep);
  font-family:
    "Courier New",
    Courier,
    monospace;
}

/* ================================
   CANVAS
================================ */

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

/* ================================
   CINEMATIC OVERLAY
================================ */

.vignette {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    radial-gradient(
      ellipse at center,
      transparent 40%,
      rgba(0, 0, 0, 0.42) 100%
    );
}

.scanlines {
  position: fixed;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  opacity: 0.055;
  background:
    repeating-linear-gradient(
      to bottom,
      transparent 0,
      transparent 3px,
      #fff 4px
    );
}

/* ================================
   MAIN
================================ */

.interface {
  position: relative;
  z-index: 4;
  min-height: 100vh;
}

/* ================================
   HERO
================================ */

.hero {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(90vw, 720px);
  transform: translate(-50%, -50%);
  text-align: center;
  pointer-events: none;
}

.eyebrow {
  margin: 0 0 24px;
  color: var(--purple-soft);
  font-size: 10px;
  letter-spacing: 0.42em;
  opacity: 0.8;
}

h1 {
  margin: 0;
  font-family:
    Georgia,
    "Times New Roman",
    serif;
  font-size: clamp(48px, 9vw, 104px);
  font-weight: 400;
  letter-spacing: 0.16em;
  line-height: 0.9;
  text-shadow:
    0 0 12px rgba(218, 156, 255, 0.45),
    0 0 50px rgba(130, 58, 178, 0.2);
}

.subtitle {
  margin: 27px 0 22px;
  color: var(--muted);
  font-family: Georgia, serif;
  font-size: clamp(13px, 2vw, 17px);
  font-style: italic;
  letter-spacing: 0.08em;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: #947da3;
  font-size: 8px;
  letter-spacing: 0.24em;
}

.status-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--purple-bright);
  box-shadow: 0 0 12px var(--purple-bright);
  animation: pulse 2s infinite ease-in-out;
}

/* ================================
   ORBITAL GRAPHIC
================================ */

.central-emblem {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 145px;
  height: 145px;
  transform: translate(-50%, -50%);
  opacity: 0.18;
}

.emblem-inner {
  position: absolute;
  inset: 25px;
  border: 1px solid var(--purple-bright);
  border-radius: 50%;
  box-shadow:
    0 0 30px var(--shadow),
    inset 0 0 30px var(--shadow);
}

.emblem-line {
  position: absolute;
  left: 50%;
  top: -18px;
  width: 1px;
  height: 180px;
  background: var(--purple-bright);
  transform: rotate(45deg);
}

.emblem-dot {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--purple-bright);
  transform: translate(-50%, -50%);
  box-shadow: 0 0 20px var(--purple-bright);
}

.orbital-ring {
  position: absolute;
  left: 50%;
  top: 50%;
  border: 1px solid rgba(202, 134, 249, 0.12);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.ring-one {
  width: 230px;
  height: 72px;
  transform:
    translate(-50%, -50%)
    rotate(-18deg);
}

.ring-two {
  width: 360px;
  height: 125px;
  transform:
    translate(-50%, -50%)
    rotate(31deg);
}

.ring-three {
  width: 540px;
  height: 205px;
  transform:
    translate(-50%, -50%)
    rotate(-13deg);
}

/* ================================
   HOTSPOTS
================================ */

.hotspots {
  position: fixed;
  inset: 0;
  z-index: 8;
  pointer-events: none;
}

.hotspot {
  position: absolute;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 0;
  background: transparent;
  pointer-events: auto;
  cursor: crosshair;
}

.hotspot span {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(211, 160, 247, 0.45);
  transform: translate(-50%, -50%);
  box-shadow:
    0 0 5px rgba(216, 156, 255, 0.4);
  transition:
    width 0.25s ease,
    height 0.25s ease,
    background 0.25s ease,
    box-shadow 0.25s ease;
}

.hotspot:hover span,
.hotspot:focus-visible span,
.hotspot.active span {
  width: 8px;
  height: 8px;
  background: var(--purple-bright);
  box-shadow:
    0 0 8px var(--purple-bright),
    0 0 25px var(--purple);
}

.hotspot:focus-visible {
  outline: none;
}

.hotspot:focus-visible::after {
  content: "";
  position: absolute;
  inset: 7px;
  border: 1px solid rgba(221, 166, 255, 0.5);
  border-radius: 50%;
}

/* Individuelle Positionen */

.hotspot-1 {
  left: 15%;
  top: 30%;
}

.hotspot-2 {
  right: 18%;
  top: 25%;
}

.hotspot-3 {
  right: 12%;
  bottom: 28%;
}

.hotspot-4 {
  left: 22%;
  bottom: 22%;
}

.hotspot-5 {
  left: 50%;
  bottom: 10%;
}

/* ================================
   FLYOUT PANELS
================================ */

.flyout {
  position: fixed;
  z-index: 12;
  width: min(390px, calc(100vw - 40px));
  padding: 18px;
  border: 1px solid var(--border);
  background:
    linear-gradient(
      145deg,
      rgba(30, 14, 43, 0.96),
      rgba(7, 4, 12, 0.97)
    );
  box-shadow:
    0 20px 80px rgba(0, 0, 0, 0.55),
    0 0 35px var(--shadow);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);

  opacity: 0;
  visibility: hidden;
  pointer-events: none;

  transform:
    translateY(12px)
    scale(0.97);

  transition:
    opacity 0.28s ease,
    visibility 0.28s ease,
    transform 0.28s ease;
}

.flyout::before {
  content: "";
  position: absolute;
  inset: 5px;
  border: 1px solid rgba(208, 147, 245, 0.08);
  pointer-events: none;
}

.flyout.visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform:
    translateY(0)
    scale(1);
}

.flyout-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 9px;
  border-bottom: 1px solid rgba(212, 154, 248, 0.17);
  color: #9b80aa;
  font-size: 8px;
  letter-spacing: 0.17em;
}

.flyout h2 {
  margin: 17px 0 9px;
  color: #e4c5ef;
  font-family: Georgia, serif;
  font-size: 18px;
  font-weight: 400;
  letter-spacing: 0.14em;
}

.flyout p {
  margin: 0;
  color: #9d8ba7;
  font-size: 11px;
  line-height: 1.75;
}

.flyout-1 {
  left: 8%;
  top: 18%;
}

.flyout-2 {
  right: 7%;
  top: 14%;
}

.flyout-3 {
  right: 6%;
  bottom: 14%;
}

.flyout-4 {
  left: 7%;
  bottom: 15%;
}

.flyout-5 {
  left: 50%;
  bottom: 12%;
  transform:
    translate(-50%, 12px)
    scale(0.97);
}

.flyout-5.visible {
  transform:
    translate(-50%, 0)
    scale(1);
}

/* ================================
   RETRO VISUALS
================================ */

.retro-visual,
.planet-visual {
  width: 100%;
  overflow: hidden;
  border: 1px solid rgba(203, 141, 245, 0.2);
  background: #08040d;
}

.retro-visual svg,
.planet-visual svg {
  display: block;
  width: 100%;
  height: auto;
}

/* ================================
   LINKS
================================ */

.retro-link {
  display: inline-flex;
  align-items: center;
  gap: 18px;
  margin-top: 18px;
  padding: 8px 0;
  color: var(--purple-bright);
  font-size: 9px;
  letter-spacing: 0.2em;
  text-decoration: none;
  border-bottom: 1px solid rgba(217, 156, 255, 0.35);
  transition:
    color 0.2s ease,
    gap 0.2s ease;
}

.retro-link:hover {
  color: #fff;
  gap: 25px;
}

/* ================================
   AUDIO
================================ */

.audio-display {
  padding: 20px 10px;
  border: 1px solid rgba(213, 154, 249, 0.17);
  background:
    linear-gradient(
      90deg,
      transparent,
      rgba(162, 82, 212, 0.08),
      transparent
    );
}

.audio-bars {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 55px;
}

.audio-bars i {
  display: block;
  width: 3px;
  height: 14px;
  background: #b06bdb;
  opacity: 0.65;
  animation: equalizer 1s ease-in-out infinite alternate;
}

.audio-bars i:nth-child(2) { animation-delay: -.2s; }
.audio-bars i:nth-child(3) { animation-delay: -.6s; }
.audio-bars i:nth-child(4) { animation-delay: -.3s; }
.audio-bars i:nth-child(5) { animation-delay: -.8s; }
.audio-bars i:nth-child(6) { animation-delay: -.1s; }
.audio-bars i:nth-child(7) { animation-delay: -.5s; }
.audio-bars i:nth-child(8) { animation-delay: -.9s; }
.audio-bars i:nth-child(9) { animation-delay: -.4s; }
.audio-bars i:nth-child(10) { animation-delay: -.7s; }

.audio-frequency {
  display: block;
  margin-top: 10px;
  text-align: center;
  color: #836c91;
  font-size: 8px;
  letter-spacing: 0.25em;
}

.audio-button {
  margin-top: 17px;
  padding: 10px 15px;
  border: 1px solid rgba(214, 153, 250, 0.45);
  color: var(--purple-bright);
  background: rgba(114, 53, 151, 0.08);
  font: inherit;
  font-size: 9px;
  letter-spacing: 0.16em;
  cursor: pointer;
  transition:
    background 0.2s ease,
    box-shadow 0.2s ease,
    color 0.2s ease;
}

.audio-button:hover,
.audio-button:focus-visible {
  color: #fff;
  background: rgba(157, 76, 202, 0.22);
  box-shadow: 0 0 20px rgba(174, 91, 221, 0.18);
  outline: none;
}

.audio-button.small {
  margin-top: 15px;
}

/* ================================
   PANEL ACTIONS
================================ */

.panel-actions {
  display: flex;
  align-items: center;
  gap: 25px;
}

/* ================================
   STAR MAP
================================ */

.star-map {
  position: relative;
  height: 170px;
  overflow: hidden;
  border: 1px solid rgba(212, 154, 249, 0.18);
  background:
    radial-gradient(
      circle at center,
      rgba(116, 53, 157, 0.1),
      transparent 55%
    ),
    #07040b;
}

.map-star {
  position: absolute;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #e4b7fa;
  box-shadow: 0 0 10px #bf7de9;
}

.s1 {
  left: 17%;
  top: 35%;
}

.s2 {
  left: 43%;
  top: 67%;
}

.s3 {
  left: 64%;
  top: 26%;
}

.s4 {
  left: 78%;
  top: 58%;
}

.s5 {
  left: 53%;
  top: 43%;
}

.map-line {
  position: absolute;
  height: 1px;
  background: rgba(201, 137, 240, 0.35);
  transform-origin: left center;
}

.l1 {
  left: 18%;
  top: 37%;
  width: 120px;
  transform: rotate(19deg);
}

.l2 {
  left: 43%;
  top: 67%;
  width: 100px;
  transform: rotate(-55deg);
}

.l3 {
  left: 53%;
  top: 43%;
  width: 115px;
  transform: rotate(-9deg);
}

.map-label {
  position: absolute;
  color: #8b7198;
  font-size: 9px;
}

.alpha {
  left: 13%;
  top: 27%;
}

.beta {
  left: 72%;
  top: 18%;
}

.gamma {
  left: 45%;
  bottom: 15%;
}

/* ================================
   TERMINAL
================================ */

.terminal {
  padding: 13px;
  border-left: 2px solid rgba(206, 141, 247, 0.4);
  background: rgba(0, 0, 0, 0.2);
}

.terminal p {
  margin: 3px 0;
  color: #8e6f9e;
  font-size: 9px;
  line-height: 1.55;
}

.cursor {
  animation: blink 1s step-end infinite;
}

/* ================================
   FOOTER
================================ */

.minimal-footer {
  position: fixed;
  left: 22px;
  right: 22px;
  bottom: 17px;
  z-index: 7;

  display: flex;
  justify-content: space-between;

  color: rgba(150, 126, 160, 0.45);
  font-size: 7px;
  letter-spacing: 0.2em;
}

/* ================================
   ANIMATIONS
================================ */

@keyframes pulse {
  0%, 100% {
    opacity: 0.35;
    transform: scale(0.8);
  }

  50% {
    opacity: 1;
    transform: scale(1.2);
  }
}

@keyframes equalizer {
  from {
    height: 8px;
  }

  to {
    height: 42px;
  }
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

/* ================================
   RESPONSIVE
================================ */

@media (max-width: 700px) {
  body {
    overflow: auto;
  }

  .hero {
    width: 94vw;
  }

  .eyebrow {
    font-size: 8px;
    letter-spacing: 0.25em;
  }

  .subtitle {
    font-size: 12px;
  }

  .ring-one {
    width: 180px;
    height: 60px;
  }

  .ring-two {
    width: 280px;
    height: 100px;
  }

  .ring-three {
    width: 410px;
    height: 160px;
  }

  .hotspot-1 {
    left: 8%;
    top: 22%;
  }

  .hotspot-2 {
    right: 8%;
    top: 20%;
  }

  .hotspot-3 {
    right: 8%;
    bottom: 25%;
  }

  .hotspot-4 {
    left: 8%;
    bottom: 25%;
  }

  .hotspot-5 {
    left: 50%;
    bottom: 8%;
  }

  .flyout {
    left: 20px !important;
    right: 20px !important;
    bottom: auto !important;
    top: 50% !important;
    width: auto;
    max-height: 78vh;
    overflow-y: auto;
    transform:
      translateY(-46%)
      scale(0.97) !important;
  }

  .flyout.visible {
    transform:
      translateY(-50%)
      scale(1) !important;
  }

  .minimal-footer {
    position: fixed;
    bottom: 10px;
    font-size: 6px;
  }
}

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