:root {
  --bg: #020617;
  --text: #ffffff;
  --muted: rgba(232, 240, 255, 0.72);
  --cyan: #5de6ff;
  --glass: rgba(7, 15, 35, 0.48);
  --border: rgba(255, 255, 255, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

/* Background */

.space-background {
  position: fixed;
  inset: 0;
  z-index: -10;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 50%, rgba(33, 74, 130, 0.32), transparent 26%),
    radial-gradient(circle at 20% 25%, rgba(21, 180, 255, 0.14), transparent 30%),
    radial-gradient(circle at 80% 20%, rgba(255, 79, 36, 0.13), transparent 34%),
    radial-gradient(circle at 70% 80%, rgba(161, 77, 255, 0.14), transparent 32%),
    linear-gradient(135deg, #020617 0%, #030817 45%, #080514 100%);
}

.stars {
  position: absolute;
  inset: -20%;
  background-repeat: repeat;
  opacity: 0.8;
}

.stars-small {
  background-image:
    radial-gradient(1px 1px at 20px 30px, white, transparent),
    radial-gradient(1px 1px at 120px 80px, white, transparent),
    radial-gradient(1px 1px at 70px 150px, white, transparent),
    radial-gradient(1px 1px at 190px 210px, white, transparent);
  background-size: 240px 240px;
  animation: drift-stars 110s linear infinite;
}

.stars-medium {
  background-image:
    radial-gradient(2px 2px at 60px 70px, rgba(255,255,255,0.9), transparent),
    radial-gradient(2px 2px at 220px 180px, rgba(132,224,255,0.9), transparent),
    radial-gradient(2px 2px at 300px 120px, rgba(255,255,255,0.8), transparent);
  background-size: 360px 360px;
  opacity: 0.45;
  animation: drift-stars 180s linear infinite reverse;
}

.nebula {
  position: absolute;
  width: 52vw;
  height: 52vw;
  border-radius: 999px;
  filter: blur(100px);
  opacity: 0.18;
  pointer-events: none;
}

.nebula-blue {
  top: -18%;
  left: -12%;
  background: #00c8ff;
}

.nebula-purple {
  right: -18%;
  bottom: -14%;
  background: #8b5cf6;
}

.nebula-orange {
  top: 4%;
  right: 8%;
  width: 38vw;
  height: 38vw;
  background: #ff5a1f;
  opacity: 0.1;
}

@keyframes drift-stars {
  from {
    transform: translate3d(0, 0, 0);
  }

  to {
    transform: translate3d(-240px, -480px, 0);
  }
}

/* Navigation */

.top-nav {
  position: fixed;
  top: 20px;
  left: 50%;
  z-index: 50;
  width: min(1180px, calc(100% - 32px));
  height: 68px;
  padding: 0 18px 0 22px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(3, 10, 26, 0.46);
  backdrop-filter: blur(18px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: "Sora", sans-serif;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.brand-orb {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: radial-gradient(circle at 30% 30%, white, #5de6ff 38%, #0a4360 72%);
  box-shadow: 0 0 24px rgba(93, 230, 255, 0.8);
}

.nav-links {
  display: flex;
  gap: 34px;
  color: var(--muted);
  font-size: 0.88rem;
}

.nav-links a,
.login-btn {
  transition: 0.25s ease;
}

.nav-links a:hover {
  color: white;
  text-shadow: 0 0 18px rgba(93, 230, 255, 0.8);
}

.login-btn {
  padding: 11px 20px;
  border-radius: 999px;
  border: 1px solid rgba(93, 230, 255, 0.38);
  color: white;
  background: rgba(93, 230, 255, 0.08);
}

.login-btn:hover {
  background: rgba(93, 230, 255, 0.18);
  box-shadow: 0 0 28px rgba(93, 230, 255, 0.25);
}

/* Hero */

.dynizverse {
  min-height: 100vh;
}

.hero {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
}

.hero-content {
  position: absolute;
  top: 49%;
  left: 50%;
  z-index: 20;
  width: min(780px, calc(100% - 36px));
  text-align: center;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.eyebrow {
  margin: 0 0 18px;
  color: var(--cyan);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0;
  font-family: "Sora", sans-serif;
  font-size: clamp(3.8rem, 9vw, 9.5rem);
  line-height: 0.88;
  letter-spacing: -0.08em;
  text-shadow:
    0 0 26px rgba(93, 230, 255, 0.35),
    0 0 90px rgba(93, 230, 255, 0.18);
}

.subtitle {
  max-width: 610px;
  margin: 24px auto 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.6vw, 1.25rem);
  line-height: 1.7;
}

.hero-actions {
  margin-top: 34px;
  display: flex;
  justify-content: center;
  gap: 16px;
  pointer-events: auto;
}

.primary-btn,
.ghost-btn {
  padding: 15px 24px;
  border-radius: 999px;
  font-weight: 700;
  transition: 0.28s ease;
}

.primary-btn {
  background: white;
  color: #020617;
  box-shadow: 0 0 38px rgba(255, 255, 255, 0.24);
}

.primary-btn:hover {
  transform: translateY(-3px) scale(1.03);
  background: var(--cyan);
  box-shadow: 0 0 42px rgba(93, 230, 255, 0.4);
}

.ghost-btn {
  border: 1px solid var(--border);
  color: white;
  background: rgba(255,255,255,0.04);
  backdrop-filter: blur(12px);
}

.ghost-btn:hover {
  transform: translateY(-3px);
  border-color: rgba(93, 230, 255, 0.5);
  background: rgba(93, 230, 255, 0.08);
}

.center-core {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 4;
  width: 36vw;
  height: 36vw;
  max-width: 560px;
  max-height: 560px;
  min-width: 280px;
  min-height: 280px;
  transform: translate(-50%, -50%);
  border-radius: 999px;
  background:
    radial-gradient(circle, rgba(93,230,255,0.15), transparent 55%),
    radial-gradient(circle, rgba(255,255,255,0.06), transparent 42%);
  filter: blur(10px);
  opacity: 0.65;
  pointer-events: none;
}

/* Orbits */

.orbit {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 2;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.075);
  transform: translate(-50%, -50%) rotate(-18deg);
  pointer-events: none;
}

.orbit-1 {
  width: 46vw;
  height: 22vw;
}

.orbit-2 {
  width: 72vw;
  height: 38vw;
  transform: translate(-50%, -50%) rotate(13deg);
}

.orbit-3 {
  width: 94vw;
  height: 55vw;
  transform: translate(-50%, -50%) rotate(-8deg);
}

/* Galaxy Map */

.galaxy-map {
  position: absolute;
  inset: 0;
  z-index: 10;
  transition: transform 0.15s ease-out;
}

.planet {
  position: absolute;
  top: var(--y);
  left: var(--x);
  width: var(--size);
  min-height: var(--size);
  display: block;
  color: var(--glow);
  transform: translate3d(0, 0, 0);
  animation: planet-float 6s ease-in-out infinite;
  animation-delay: var(--delay);
}

.planet-image-wrap {
  position: relative;
  width: var(--size);
  height: var(--size);
  display: grid;
  place-items: center;
}

.planet-image-wrap::before {
  content: "";
  position: absolute;
  inset: 9%;
  border-radius: 999px;
  background: currentColor;
  opacity: 0.16;
  filter: blur(34px);
  transition: 0.35s ease;
}

.planet-image-wrap::after {
  content: "";
  position: absolute;
  inset: 19%;
  border-radius: 999px;
  border: 1px solid currentColor;
  opacity: 0.22;
  transform: rotate(-18deg) scaleX(1.45);
  filter: blur(0.2px);
}

.planet-image {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter:
    drop-shadow(0 0 18px rgba(255,255,255,0.15))
    drop-shadow(0 0 24px currentColor);
  transition: 0.35s ease;
}

/* Fallback, falls dein Bild noch nicht vorhanden ist */
.planet-image[src$=".png"] {
  min-height: var(--size);
}

/* Wenn Bilder fehlen, sieht man trotzdem Platzhalter-Planeten */
.planet-image-wrap:has(img:not([src])),
.planet-image-wrap img[src=""] {
  background: radial-gradient(circle at 35% 28%, white, currentColor 24%, #101827 72%);
  border-radius: 999px;
}

.planet-label {
  position: absolute;
  left: 50%;
  bottom: 4%;
  z-index: 4;
  transform: translateX(-50%);
  padding: 7px 15px;
  border: 1px solid color-mix(in srgb, currentColor 44%, transparent);
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.58);
  backdrop-filter: blur(10px);
  white-space: nowrap;
  box-shadow: 0 0 24px color-mix(in srgb, currentColor 22%, transparent);
}

.planet-label span {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: white;
}

.planet-info {
  position: absolute;
  top: 16%;
  left: 82%;
  z-index: 30;
  width: 275px;
  padding: 18px;
  border: 1px solid color-mix(in srgb, currentColor 38%, transparent);
  background:
    linear-gradient(135deg, color-mix(in srgb, currentColor 13%, transparent), rgba(2, 6, 23, 0.66));
  backdrop-filter: blur(18px);
  clip-path: polygon(0 0, 100% 0, 100% 82%, 88% 100%, 0 100%);
  opacity: 0;
  transform: translateX(-8px) translateY(8px) scale(0.96);
  pointer-events: none;
  transition: 0.28s ease;
  box-shadow: 0 0 40px color-mix(in srgb, currentColor 14%, transparent);
}

.planet-info h2 {
  margin: 0 0 8px;
  font-family: "Sora", sans-serif;
  font-size: 1.15rem;
  color: white;
}

.planet-info p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
  font-size: 0.9rem;
}

.planet:hover {
  z-index: 40;
}

.planet:hover .planet-image {
  transform: scale(1.13) rotate(5deg);
  filter:
    drop-shadow(0 0 24px rgba(255,255,255,0.35))
    drop-shadow(0 0 46px currentColor);
}

.planet:hover .planet-image-wrap::before {
  opacity: 0.28;
  filter: blur(48px);
}

.planet:hover .planet-info {
  opacity: 1;
  transform: translateX(0) translateY(0) scale(1);
}

/* Planet special positions */

.planet-gaming .planet-info,
.planet-labs .planet-info {
  left: auto;
  right: 82%;
}

.planet-nexus {
  opacity: 0.86;
}

.planet-nexus .planet-label {
  bottom: -4%;
}

.planet-home {
  opacity: 0.92;
}

/* Asteroids */

.asteroid {
  position: absolute;
  z-index: 3;
  width: 22px;
  height: 15px;
  border-radius: 60% 40% 55% 45%;
  background: linear-gradient(135deg, #6b7280, #1f2937);
  opacity: 0.5;
  filter: drop-shadow(0 0 10px rgba(255,255,255,0.12));
  animation: asteroid-drift 12s ease-in-out infinite;
}

.asteroid-1 {
  top: 24%;
  left: 36%;
}

.asteroid-2 {
  top: 67%;
  left: 69%;
  width: 34px;
  height: 23px;
  animation-delay: -3s;
}

.asteroid-3 {
  top: 82%;
  left: 9%;
  width: 18px;
  height: 13px;
  animation-delay: -5s;
}

.asteroid-4 {
  top: 29%;
  left: 88%;
  width: 28px;
  height: 20px;
  animation-delay: -1.5s;
}

@keyframes planet-float {
  0%, 100% {
    transform: translate3d(0, 0, 0);
  }

  50% {
    transform: translate3d(0, -18px, 0);
  }
}

@keyframes asteroid-drift {
  0%, 100% {
    transform: translate3d(0, 0, 0) rotate(0deg);
  }

  50% {
    transform: translate3d(12px, -18px, 0) rotate(18deg);
  }
}

/* Footer HUD */

.hud-footer {
  position: fixed;
  left: 50%;
  bottom: 18px;
  z-index: 60;
  width: min(680px, calc(100% - 32px));
  transform: translateX(-50%);
  display: flex;
  justify-content: center;
  gap: 28px;
  padding: 13px 22px;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 999px;
  background: rgba(3, 10, 26, 0.46);
  backdrop-filter: blur(16px);
  color: var(--muted);
}

.hud-footer div {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hud-footer span {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.hud-footer strong {
  color: white;
  font-size: 0.85rem;
}

/* Responsive */

@media (max-width: 1050px) {
  .nav-links {
    display: none;
  }

  .hero {
    min-height: 140vh;
  }

  .hero-content {
    top: 28%;
  }

  .galaxy-map {
    position: relative;
    min-height: 1200px;
    padding-top: 460px;
  }

  .planet {
    position: absolute;
    width: var(--size);
  }

  .planet-work {
    --x: 8% !important;
    --y: 380px !important;
    --size: 180px !important;
  }

  .planet-gaming {
    --x: 54% !important;
    --y: 460px !important;
    --size: 210px !important;
  }

  .planet-nexus {
    --x: 28% !important;
    --y: 665px !important;
    --size: 150px !important;
  }

  .planet-academy {
    --x: 7% !important;
    --y: 820px !important;
    --size: 190px !important;
  }

  .planet-home {
    --x: 52% !important;
    --y: 910px !important;
    --size: 175px !important;
  }

  .planet-labs {
    --x: 20% !important;
    --y: 1080px !important;
    --size: 200px !important;
  }

  .planet-info {
    position: relative;
    top: auto;
    left: 50% !important;
    right: auto !important;
    width: min(280px, 80vw);
    margin-top: 12px;
    transform: translateX(-50%) scale(1);
    opacity: 1;
  }

  .orbit {
    display: none;
  }

  .hud-footer {
    display: none;
  }
}

@media (max-width: 620px) {
  .top-nav {
    height: 58px;
    top: 12px;
    padding: 0 12px 0 16px;
  }

  .brand span:last-child {
    font-size: 0.82rem;
  }

  .login-btn {
    padding: 9px 14px;
    font-size: 0.82rem;
  }

  .hero-content {
    top: 25%;
  }

  .hero-actions {
    flex-direction: column;
    align-items: center;
  }

  .primary-btn,
  .ghost-btn {
    width: min(280px, 90vw);
    text-align: center;
  }

  .planet-work {
    --x: 4% !important;
  }

  .planet-gaming {
    --x: 47% !important;
  }

  .planet-nexus {
    --x: 23% !important;
  }

  .planet-academy {
    --x: 3% !important;
  }

  .planet-home {
    --x: 47% !important;
  }

  .planet-labs {
    --x: 16% !important;
  }
}

.hero-content {
  transition:
    opacity 0.8s ease,
    transform 0.8s ease,
    filter 0.8s ease;
}

body.verse-entered .hero-content {
  opacity: 0;
  transform: translate(-50%, -58%) scale(0.94);
  filter: blur(14px);
  pointer-events: none;
}

body.verse-entered .center-core {
  opacity: 0.22;
  transform: translate(-50%, -50%) scale(1.35);
}

body.verse-entered .planet {
  animation-duration: 4.5s;
}

body.verse-entered .planet-image {
  filter:
    drop-shadow(0 0 24px rgba(255,255,255,0.22))
    drop-shadow(0 0 42px currentColor);
}

body.verse-entered .planet-label {
  opacity: 1;
  transform: translateX(-50%) translateY(-4px);
}

body.verse-entered .orbit {
  border-color: rgba(93, 230, 255, 0.16);
  box-shadow: 0 0 42px rgba(93, 230, 255, 0.06);
}

body.verse-entered .hero h1,
body.verse-entered .subtitle,
body.verse-entered .eyebrow,
body.verse-entered .hero-actions {
  animation: hologram-disappear 0.8s ease forwards;
}

@keyframes hologram-disappear {
  0% {
    opacity: 1;
    letter-spacing: inherit;
    clip-path: inset(0 0 0 0);
  }

  45% {
    opacity: 0.72;
    text-shadow: 0 0 32px rgba(93, 230, 255, 0.8);
  }

  100% {
    opacity: 0;
    letter-spacing: 0.25em;
    clip-path: inset(0 0 100% 0);
  }
}

/* ============================= */
/* DynizVerse World Transition */
/* ============================= */

.warp-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  opacity: 0;
  pointer-events: none;
  overflow: hidden;
  background: #020617;
  transition: opacity 0.35s ease;
}

.warp-overlay.is-active {
  opacity: 1;
  pointer-events: auto;
}

.warp-backdrop {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at center, rgba(93, 230, 255, 0.22), transparent 24%),
    rgba(2, 6, 23, 0.9);
  opacity: 0;
}

.warp-overlay.is-active .warp-backdrop {
  animation: warpBackdrop 1.15s ease forwards;
}

.warp-image {
  position: absolute;
  width: min(95vmin, 900px);
  height: min(95vmin, 900px);
  object-fit: contain;
  opacity: 0;
  transform: scale(0.2) rotate(0deg);
  filter:
    blur(0px)
    drop-shadow(0 0 45px rgba(93, 230, 255, 0.55));
  mix-blend-mode: screen;
}

.warp-overlay.is-active .warp-image {
  animation: imageWarpOut 1.18s cubic-bezier(.15,.75,.2,1) forwards;
}

.warp-text {
  position: relative;
  z-index: 3;
  text-align: center;
  opacity: 0;
  transform: translateY(18px) scale(0.96);
}

.warp-overlay.is-active .warp-text {
  animation: warpTextIn 0.45s ease forwards 0.15s;
}

.warp-text span {
  display: block;
  font-family: "Sora", sans-serif;
  font-size: clamp(1.8rem, 5vw, 4.8rem);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: white;
  text-shadow: 0 0 34px rgba(93, 230, 255, 0.75);
}

.warp-text small {
  display: block;
  margin-top: 12px;
  color: rgba(232, 240, 255, 0.68);
  font-size: 0.74rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

body.world-transition-active .hero,
body.world-transition-active .top-nav,
body.world-transition-active .hud-footer {
  animation: pageImageWarpOut 0.9s ease forwards;
}

body.world-transition-active .planet:not(.is-selected-world) {
  opacity: 0;
  transform: scale(0.72);
  filter: blur(10px);
  transition: 0.45s ease;
}

body.world-transition-active .planet.is-selected-world {
  z-index: 9998;
  transition: 0.75s ease;
  transform: scale(1.45);
  filter:
    drop-shadow(0 0 45px currentColor)
    drop-shadow(0 0 120px currentColor);
}

@keyframes imageWarpOut {
  0% {
    opacity: 0;
    transform: scale(0.15) rotate(0deg);
    filter:
      blur(8px)
      drop-shadow(0 0 20px rgba(93, 230, 255, 0.25));
  }

  25% {
    opacity: 1;
  }

  72% {
    opacity: 1;
    transform: scale(1.15) rotate(130deg);
    filter:
      blur(0px)
      drop-shadow(0 0 70px rgba(93, 230, 255, 0.75));
  }

  100% {
    opacity: 1;
    transform: scale(4.8) rotate(220deg);
    filter:
      blur(18px)
      drop-shadow(0 0 120px rgba(93, 230, 255, 0.95));
  }
}

@keyframes warpBackdrop {
  0% {
    opacity: 0;
  }

  100% {
    opacity: 1;
  }
}

@keyframes warpTextIn {
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes pageImageWarpOut {
  to {
    opacity: 0;
    filter: blur(12px) brightness(1.4);
    transform: scale(1.04);
  }
}

/* ============================= */
/* Ambient Audio Control */
/* ============================= */

.ambient-toggle {
  position: fixed;
  right: 22px;
  bottom: 24px;
  z-index: 120;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 13px 18px;
  border: 1px solid rgba(93, 230, 255, 0.32);
  border-radius: 999px;
  background:
    linear-gradient(135deg, rgba(93, 230, 255, 0.10), rgba(255, 255, 255, 0.035)),
    rgba(3, 10, 26, 0.62);
  color: white;
  font-family: "Inter", sans-serif;
  font-weight: 800;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  backdrop-filter: blur(16px);
  cursor: pointer;
  box-shadow:
    0 0 28px rgba(93, 230, 255, 0.12),
    0 18px 60px rgba(0, 0, 0, 0.36);
  transition:
    transform 0.25s ease,
    border-color 0.25s ease,
    box-shadow 0.25s ease,
    background 0.25s ease;
}

.ambient-toggle:hover {
  transform: translateY(-3px);
  border-color: rgba(93, 230, 255, 0.68);
  box-shadow:
    0 0 36px rgba(93, 230, 255, 0.24),
    0 18px 60px rgba(0, 0, 0, 0.42);
}

.ambient-icon {
  position: relative;
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.35);
  box-shadow: 0 0 14px rgba(255, 255, 255, 0.3);
}

.ambient-icon::before,
.ambient-icon::after {
  content: "";
  position: absolute;
  inset: -6px;
  border: 1px solid rgba(93, 230, 255, 0.35);
  border-radius: 999px;
  opacity: 0;
  transform: scale(0.6);
}

.ambient-toggle.is-playing {
  border-color: rgba(93, 230, 255, 0.74);
  background:
    linear-gradient(135deg, rgba(93, 230, 255, 0.18), rgba(255, 255, 255, 0.04)),
    rgba(3, 10, 26, 0.72);
}

.ambient-toggle.is-playing .ambient-icon {
  background: #5de6ff;
  box-shadow:
    0 0 16px rgba(93, 230, 255, 0.95),
    0 0 34px rgba(93, 230, 255, 0.45);
}

.ambient-toggle.is-playing .ambient-icon::before {
  animation: ambientPulse 1.8s ease-out infinite;
}

.ambient-toggle.is-playing .ambient-icon::after {
  animation: ambientPulse 1.8s ease-out infinite 0.6s;
}

@keyframes ambientPulse {
  0% {
    opacity: 0.8;
    transform: scale(0.55);
  }

  100% {
    opacity: 0;
    transform: scale(1.8);
  }
}

@media (max-width: 620px) {
  .ambient-toggle {
    right: 14px;
    bottom: 14px;
    padding: 12px 14px;
  }

  .ambient-text {
    display: none;
  }
}