/* /* ============================================================
   GALAXY CSS-ONLY ANIMATION — Enhanced Version
   ============================================================ */

/* ── CONTAINER ── */
.gl-sky {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: #020a10;
}
.gl-sky--cta {
  height: 160px;
}
.gl-sky--mini {
  height: 280px;
}

/* ── NEBULAE ── */
.gl-nebulae {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.gl-nb {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}
.gl-nb1 {
  width: 900px;
  height: 520px;
  left: 40%;
  top: 5%;
  background: radial-gradient(
    ellipse,
    rgba(2, 68, 94, 0.55) 0%,
    transparent 70%
  );
  filter: blur(36px);
  animation: gl-nb-drift1 20s ease-in-out infinite alternate;
}
.gl-nb2 {
  width: 620px;
  height: 420px;
  left: 8%;
  top: -12%;
  background: radial-gradient(
    ellipse,
    rgba(212, 175, 55, 0.18) 0%,
    transparent 70%
  );
  filter: blur(40px);
  animation: gl-nb-drift2 24s ease-in-out infinite alternate;
}
.gl-nb3 {
  width: 720px;
  height: 520px;
  right: -12%;
  bottom: -22%;
  background: radial-gradient(
    ellipse,
    rgba(2, 68, 94, 0.38) 0%,
    transparent 70%
  );
  filter: blur(36px);
  animation: gl-nb-drift1 28s ease-in-out infinite alternate-reverse;
}
.gl-nb4 {
  width: 560px;
  height: 320px;
  left: 50%;
  bottom: -10%;
  background: radial-gradient(
    ellipse,
    rgba(123, 94, 167, 0.12) 0%,
    transparent 70%
  );
  filter: blur(48px);
  animation: gl-nb-drift2 32s ease-in-out infinite alternate;
}
@keyframes gl-nb-drift1 {
  from {
    transform: translate(0, 0) scale(1);
  }
  to {
    transform: translate(38px, 22px) scale(1.1);
  }
}
@keyframes gl-nb-drift2 {
  from {
    transform: translate(0, 0) scale(1);
  }
  to {
    transform: translate(-28px, 18px) scale(1.08);
  }
}

/* ── BACKGROUND STARS ── */
.gl-bg-stars {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.gl-s {
  position: absolute;
  border-radius: 50%;
  background: #fff;
  animation: gl-twinkle var(--td, 3s) ease-in-out infinite;
  animation-delay: var(--dl, 0s);
}
.gl-s.gold {
  background: #d4af37;
}
.gl-s.blue {
  background: #9dcde8;
}
.gl-s.bright {
  filter: drop-shadow(0 0 2px rgba(255, 255, 255, 0.8));
}
.gl-s.bright.gold {
  filter: drop-shadow(0 0 2px rgba(212, 175, 55, 0.8));
}
.gl-s.bright.blue {
  filter: drop-shadow(0 0 2px rgba(157, 205, 232, 0.8));
}
@keyframes gl-twinkle {
  0%,
  100% {
    opacity: var(--lo, 0.15);
    transform: scale(1);
  }
  50% {
    opacity: var(--hi, 0.8);
    transform: scale(1.3);
  }
}

/* ── GALAXY CORE ── */
.gl-core {
  position: absolute;
  width: 120px;
  height: 60px;
  border-radius: 50%;
  background: radial-gradient(
    ellipse,
    rgba(200, 232, 245, 0.9) 0%,
    rgba(157, 205, 232, 0.5) 30%,
    rgba(2, 68, 94, 0.2) 60%,
    transparent 80%
  );
  top: 50%;
  left: 72%;
  transform: translate(-50%, -50%);
  filter: blur(8px);
  animation: gl-core-pulse 4.5s ease-in-out infinite;
}
.gl-core::after {
  content: "";
  position: absolute;
  width: 40px;
  height: 20px;
  border-radius: 50%;
  background: rgba(220, 242, 252, 0.85);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  filter: blur(3px);
}
@keyframes gl-core-pulse {
  0%,
  100% {
    opacity: 0.7;
    transform: translate(-50%, -50%) scale(1);
  }
  50% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.15);
  }
}

/* ── GALAXY SPIRAL RINGS ── */
.gl-galaxy-wrap {
  position: absolute;
  top: 50%;
  left: 72%;
  transform: translate(-50%, -50%);
}
.gl-arm {
  position: absolute;
  border-radius: 50%;
  border: 1px solid transparent;
  transform-origin: center;
}
.gl-arm--1 {
  width: 104px;
  height: 104px;
  margin: -52px 0 0 -52px;
  border-color: rgba(157, 205, 232, 0.38);
  animation: gl-spin-cw 72s linear infinite;
}
.gl-arm--2 {
  width: 170px;
  height: 170px;
  margin: -85px 0 0 -85px;
  border-color: rgba(157, 205, 232, 0.26);
  animation: gl-spin-ccw 88s linear infinite;
}
.gl-arm--3 {
  width: 244px;
  height: 244px;
  margin: -122px 0 0 -122px;
  border-color: rgba(157, 205, 232, 0.18);
  animation: gl-spin-cw 105s linear infinite;
}
.gl-arm--4 {
  width: 324px;
  height: 324px;
  margin: -162px 0 0 -162px;
  border-color: rgba(212, 175, 55, 0.14);
  animation: gl-spin-ccw 124s linear infinite;
}
.gl-arm--5 {
  width: 408px;
  height: 408px;
  margin: -204px 0 0 -204px;
  border-color: rgba(157, 205, 232, 0.1);
  animation: gl-spin-cw 148s linear infinite;
}
.gl-arm--6 {
  width: 496px;
  height: 496px;
  margin: -248px 0 0 -248px;
  border-color: rgba(212, 175, 55, 0.07);
  animation: gl-spin-ccw 170s linear infinite;
}
.gl-arm--7 {
  width: 590px;
  height: 590px;
  margin: -295px 0 0 -295px;
  border-color: rgba(157, 205, 232, 0.05);
  animation: gl-spin-cw 200s linear infinite;
}
@keyframes gl-spin-cw {
  from {
    transform: rotateZ(0deg) rotateX(72deg);
  }
  to {
    transform: rotateZ(360deg) rotateX(72deg);
  }
}
@keyframes gl-spin-ccw {
  from {
    transform: rotateZ(0deg) rotateX(72deg);
  }
  to {
    transform: rotateZ(-360deg) rotateX(72deg);
  }
}

/* ── ARM PARTICLE DOTS ── */
.gl-arm-dots {
  position: absolute;
  top: 50%;
  left: 72%;
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: transparent;
  animation: gl-spin-cw 100s linear infinite;
  box-shadow:
    60px 0px 0 1px rgba(157, 205, 232, 0.55),
    -55px 5px 0 0.5px rgba(157, 205, 232, 0.38),
    30px -50px 0 1px rgba(212, 175, 55, 0.65),
    -30px 48px 0 0.5px rgba(157, 205, 232, 0.42),
    80px 20px 0 0.5px rgba(212, 175, 55, 0.42),
    -80px -18px 0 1px rgba(157, 205, 232, 0.32),
    100px -30px 0 0.5px rgba(157, 205, 232, 0.38),
    -95px 28px 0 0.5px rgba(212, 175, 55, 0.28),
    120px 5px 0 1px rgba(157, 205, 232, 0.28),
    -115px -10px 0 0.5px rgba(157, 205, 232, 0.22),
    50px 80px 0 0.5px rgba(212, 175, 55, 0.32),
    -45px -82px 0 1px rgba(157, 205, 232, 0.28),
    140px -15px 0 0.5px rgba(157, 205, 232, 0.22),
    -138px 18px 0 0.5px rgba(212, 175, 55, 0.2),
    10px 120px 0 0.5px rgba(157, 205, 232, 0.22),
    -12px-118px 0 1px rgba(157, 205, 232, 0.25),
    162px -8px 0 0.5px rgba(157, 205, 232, 0.18),
    -158px 12px 0 0.5px rgba(212, 175, 55, 0.15),
    75px 140px 0 1px rgba(157, 205, 232, 0.18),
    -70px-135px 0 0.5px rgba(212, 175, 55, 0.18);
}
.gl-arm-dots--2 {
  animation: gl-spin-ccw 140s linear infinite;
  box-shadow:
    45px -65px 0 1px rgba(212, 175, 55, 0.4),
    -48px 60px 0 0.5px rgba(157, 205, 232, 0.3),
    90px -10px 0 0.5px rgba(157, 205, 232, 0.3),
    -88px 14px 0 1px rgba(212, 175, 55, 0.25),
    110px 45px 0 0.5px rgba(157, 205, 232, 0.22),
    -105px -40px 0 0.5px rgba(212, 175, 55, 0.2),
    130px -55px 0 1px rgba(157, 205, 232, 0.2),
    -128px 50px 0 0.5px rgba(212, 175, 55, 0.16);
}

/* ── LEFT FADE OVERLAY ── */
.gl-left-fade {
  background: linear-gradient(
    90deg,
    rgba(2, 13, 20, 0.98) 0%,
    rgba(2, 13, 20, 0.92) 30%,
    rgba(2, 13, 20, 0.6) 55%,
    rgba(2, 13, 20, 0) 100%
  );
}

/* ── PLANET ── */
.gl-planet-wrap {
  position: absolute;
  top: 28%;
  left: 79%;
  width: 88px;
  height: 88px;
  transform: translate(-50%, -50%);
}
.gl-planet {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: radial-gradient(
    circle at 35% 32%,
    #1a8ab5 0%,
    #02445e 45%,
    #010c16 100%
  );
  position: relative;
  overflow: hidden;
  box-shadow:
    inset -12px -8px 28px rgba(0, 0, 0, 0.75),
    inset 4px 4px 16px rgba(10, 110, 154, 0.2),
    0 0 35px rgba(2, 68, 94, 0.45);
}
.gl-planet-bands {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent 0px,
    transparent 13px,
    rgba(212, 175, 55, 0.06) 13px,
    rgba(212, 175, 55, 0.06) 19px
  );
  animation: gl-bands 20s linear infinite;
}
.gl-planet-cloud {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(
      ellipse 55% 25% at 40% 38%,
      rgba(255, 255, 255, 0.05) 0%,
      transparent 100%
    ),
    radial-gradient(
      ellipse 35% 15% at 65% 62%,
      rgba(10, 110, 154, 0.1) 0%,
      transparent 100%
    );
}
.gl-planet-shine {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(
    circle at 68% 68%,
    rgba(10, 110, 154, 0.45) 0%,
    transparent 58%
  );
}
@keyframes gl-bands {
  from {
    background-position: 0 0;
  }
  to {
    background-position: 0 88px;
  }
}

/* ── RINGS ── */
.gl-ring-wrap {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 240px;
  height: 240px;
  pointer-events: none;
}
.gl-ring {
  position: absolute;
  border-radius: 50%;
  border-style: solid;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scaleY(0.26);
}
.gl-ring--outer {
  width: 190px;
  height: 190px;
  border-width: 8px;
  border-color: rgba(212, 175, 55, 0.38);
  box-shadow: 0 0 8px rgba(212, 175, 55, 0.15);
}
.gl-ring--inner {
  width: 148px;
  height: 148px;
  border-width: 4px;
  border-color: rgba(212, 175, 55, 0.2);
}
.gl-ring-front {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 190px;
  height: 190px;
  transform: translate(-50%, -50%) scaleY(0.26);
  border-radius: 50%;
  border-style: solid;
  border-width: 8px;
  border-color: transparent transparent rgba(212, 175, 55, 0.68)
    rgba(212, 175, 55, 0.68);
  pointer-events: none;
}

/* ── MOON ── */
.gl-moon-orbit-path {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 210px;
  height: 78px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 0.5px solid rgba(212, 175, 55, 0.18);
  pointer-events: none;
}
.gl-moon-orbit {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 210px;
  height: 210px;
  transform: translate(-50%, -50%);
  animation: gl-moon-orbit 9s linear infinite;
}
@keyframes gl-moon-orbit {
  from {
    transform: translate(-50%, -50%) rotateZ(0deg) scaleY(0.37);
  }
  to {
    transform: translate(-50%, -50%) rotateZ(360deg) scaleY(0.37);
  }
}
.gl-moon {
  position: absolute;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  top: 0;
  left: 50%;
  margin-left: -6.5px;
  margin-top: -6.5px;
  background: radial-gradient(circle at 35% 35%, #c8e8f5, #4a6a78);
  box-shadow: inset -2px -1px 4px rgba(0, 0, 0, 0.4);
}
.gl-moon::before {
  content: "";
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.2);
  top: 28%;
  left: 55%;
}

/* ── SHOOTING STARS ── */
.gl-shoot {
  position: absolute;
  top: var(--y);
  left: var(--x);
  width: var(--len, 150px);
  height: 2px;
  z-index: 10;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.18) 35%,
    rgba(255, 255, 255, 0.72) 100%
  );
  border-radius: 999px;
  filter: drop-shadow(0 0 5px #fff) drop-shadow(0 0 12px #9dcde8);
  transform: rotate(var(--ang, 34deg));
  animation: gl-shoot-fly var(--dur, 10s) linear var(--del, 0s) infinite;
}
@keyframes gl-shoot-fly {
  0% {
    transform: translate(0, 0) rotate(var(--ang, 34deg));
    opacity: 0;
  }
  5% {
    opacity: 1;
  }
  80% {
    opacity: 0.7;
  }
  100% {
    transform: translate(860px, 460px) rotate(var(--ang, 34deg));
    opacity: 0;
  }
}

/* ── PLANET GLOW HALO ── */
.gl-planet-wrap::before {
  content: "";
  position: absolute;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: radial-gradient(
    ellipse,
    rgba(2, 68, 94, 0.5) 0%,
    transparent 70%
  );
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  filter: blur(20px);
  pointer-events: none;
  z-index: -1;
}

/* ── MINI / CTA OVERRIDES ── */
.gl-sky--mini .gl-core,
.gl-sky--cta .gl-core {
  width: 60px;
  height: 30px;
  left: 58%;
}

.gl-sky--mini .gl-planet-wrap,
.gl-sky--cta .gl-planet-wrap {
  display: none;
}

.gl-sky--mini .gl-arm--1 {
  width: 50px;
  height: 50px;
  margin: -25px 0 0 -25px;
}
.gl-sky--mini .gl-arm--2 {
  width: 85px;
  height: 85px;
  margin: -42px 0 0 -42px;
}
.gl-sky--mini .gl-arm--3 {
  width: 120px;
  height: 120px;
  margin: -60px 0 0 -60px;
}
.gl-sky--mini .gl-arm--4 {
  width: 155px;
  height: 155px;
  margin: -77px 0 0 -77px;
}
.gl-sky--mini .gl-arm--5,
.gl-sky--mini .gl-arm--6,
.gl-sky--mini .gl-arm--7 {
  display: none;
}
