/* Original wedding homepage sky, retained for the public memory page. */
/* --- Time-of-Day Themes --- */
html[data-sky-theme="theme-morning"] body {
  --color-bg: #fdf3e7;
  --color-secondary: #fde2c5;
}
html[data-sky-theme="theme-morning"] body #sun-moon-anim {
  background: #fbeaa5;
  box-shadow:
    0 0 40px 10px #fde2c5,
    0 0 80px 20px rgba(253, 196, 128, 0.5);
  animation: rise-set 30s linear infinite;
}
html[data-sky-theme="theme-day"] body {
  --color-bg: #f0f8ff;
  --color-secondary: #fbeaa5;
}
html[data-sky-theme="theme-day"] body #sun-moon-anim {
  background: #fff3a8;
  box-shadow:
    0 0 45px 12px #fbeaa5,
    0 0 90px 25px rgba(255, 220, 140, 0.55);
  animation: rise-set 30s linear infinite;
  animation-delay: -15s;
}
html[data-sky-theme="theme-evening"] body {
  --color-bg: #f8e7f5;
  --color-secondary: #f5b9b0;
}
html[data-sky-theme="theme-evening"] body #sun-moon-anim {
  background: #ffc9a3;
  box-shadow:
    0 0 45px 12px #f5b9b0,
    0 0 90px 25px rgba(230, 140, 180, 0.55);
  animation: rise-set 30s linear infinite;
  animation-delay: -22s;
}
html[data-sky-theme="theme-night"] body {
  --border-color-night: rgba(240, 238, 230, 0.7);
  --color-text: #fefdf8;
  --color-bg: #2c3e50;
  --color-primary: #5a7d8c;
  --color-secondary: #fbeaa5;
  --color-accent: #f5b9b0;
  --border-style: 2px solid var(--border-color-night);
}
html[data-sky-theme="theme-night"] body #sun-moon-anim {
  background: #f4f4f4;
  box-shadow:
    0 0 25px 6px #ffffff,
    0 0 60px 18px rgba(200, 215, 255, 0.55);
  animation: rise-set 30s linear infinite;
}

/* --- Sky Animations (RESTORED FULLY) --- */
#sky-elements {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 1;
  overflow: hidden;
  pointer-events: none; /* Allows clicking through */
}

#sun-moon-anim {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  position: absolute;
  z-index: 1;
  transition:
    background-color 1s ease,
    box-shadow 1s ease;
  pointer-events: auto; /* Make ONLY the sun/moon clickable */
  cursor: pointer;
}
@keyframes rise-set {
  0% {
    transform: translate(-10vw, 38vh) rotate(0deg);
  }
  50% {
    transform: translate(50vw, 2vh) rotate(180deg);
  } /* apex sits above the page */
  100% {
    transform: translate(110vw, 38vh) rotate(360deg);
  }
}

/* --- Celestial Glow (huge radial halo that tracks the sun/moon).
   Glow fades in/out at the cycle edges so the wrap-around teleport from
   right-of-screen back to left-of-screen isn't a visible flash. --- */
#celestial-glow {
  position: absolute;
  top: 0;
  left: 0;
  width: 60px;
  height: 60px;
  pointer-events: none;
  z-index: 0;
  animation:
    rise-set 30s linear infinite,
    celestial-glow-fade 30s linear infinite;
}
@keyframes celestial-glow-fade {
  0%,
  100% {
    opacity: 0;
  }
  10%,
  90% {
    opacity: 1;
  }
}
#celestial-glow::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 280vw;
  height: 280vh; /* big enough that the halo never clips */
  transform: translate(-50%, -50%);
  border-radius: 50%;
  transition: background 1.5s ease;
  opacity: 0.9;
  /* Explicit 130vw gradient radius with very low trailing alphas so the
     final fade-to-transparent is below human perception — no visible edge. */
  background: radial-gradient(
    circle 130vw,
    rgba(255, 240, 180, 0.55) 0%,
    rgba(255, 232, 168, 0.4) 8%,
    rgba(255, 222, 155, 0.26) 18%,
    rgba(255, 215, 145, 0.16) 30%,
    rgba(255, 212, 140, 0.09) 42%,
    rgba(255, 210, 140, 0.04) 55%,
    rgba(255, 210, 140, 0.015) 70%,
    rgba(255, 210, 140, 0.004) 85%,
    transparent 100%
  );
}
html[data-sky-theme="theme-morning"] body #celestial-glow {
  animation-delay: 0s, 0s;
}
html[data-sky-theme="theme-morning"] body #celestial-glow::before {
  background: radial-gradient(
    circle 130vw,
    rgba(255, 208, 150, 0.55) 0%,
    rgba(254, 200, 140, 0.4) 8%,
    rgba(253, 196, 128, 0.26) 18%,
    rgba(253, 192, 122, 0.16) 30%,
    rgba(253, 196, 128, 0.09) 42%,
    rgba(253, 196, 128, 0.04) 55%,
    rgba(253, 196, 128, 0.015) 70%,
    rgba(253, 196, 128, 0.004) 85%,
    transparent 100%
  );
}
html[data-sky-theme="theme-day"] body #celestial-glow {
  animation-delay:
    -15s,
    -15s;
}
html[data-sky-theme="theme-day"] body #celestial-glow::before {
  background: radial-gradient(
    circle 130vw,
    rgba(255, 245, 180, 0.55) 0%,
    rgba(255, 235, 165, 0.4) 8%,
    rgba(255, 225, 148, 0.26) 18%,
    rgba(255, 222, 142, 0.16) 30%,
    rgba(255, 220, 140, 0.09) 42%,
    rgba(255, 220, 140, 0.04) 55%,
    rgba(255, 220, 140, 0.015) 70%,
    rgba(255, 220, 140, 0.004) 85%,
    transparent 100%
  );
}
html[data-sky-theme="theme-evening"] body #celestial-glow {
  animation-delay:
    -22s,
    -22s;
}
html[data-sky-theme="theme-evening"] body #celestial-glow::before {
  background: radial-gradient(
    circle 130vw,
    rgba(255, 175, 155, 0.55) 0%,
    rgba(252, 170, 160, 0.4) 8%,
    rgba(248, 165, 168, 0.26) 18%,
    rgba(240, 150, 178, 0.16) 30%,
    rgba(232, 142, 180, 0.09) 42%,
    rgba(230, 140, 180, 0.04) 55%,
    rgba(230, 140, 180, 0.015) 70%,
    rgba(230, 140, 180, 0.004) 85%,
    transparent 100%
  );
}
html[data-sky-theme="theme-night"] body #celestial-glow {
  animation-delay: 0s, 0s;
}
html[data-sky-theme="theme-night"] body #celestial-glow::before {
  opacity: 0.7;
  background: radial-gradient(
    circle 130vw,
    rgba(210, 220, 250, 0.45) 0%,
    rgba(190, 205, 245, 0.32) 8%,
    rgba(170, 190, 238, 0.22) 18%,
    rgba(145, 170, 225, 0.14) 30%,
    rgba(125, 155, 215, 0.08) 42%,
    rgba(120, 150, 210, 0.03) 55%,
    rgba(120, 150, 210, 0.012) 70%,
    rgba(120, 150, 210, 0.003) 85%,
    transparent 100%
  );
}

/* Sun Particle Explosion */
.sun-particle {
  position: fixed; /* Position relative to viewport */
  width: 10px;
  height: 10px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 100;
  animation: explode 1s ease-out forwards;
}
@keyframes explode {
  from {
    transform: translate(0, 0);
    opacity: 1;
  }
  to {
    transform: translate(var(--x), var(--y));
    opacity: 0;
  }
}

/* Cloud Styles (Denser) */
.cloud {
  position: absolute;
  width: 120px;
  height: 40px;
  background: #ffffff;
  border-radius: 20px;
  opacity: 0.8;
  transition:
    opacity 1.5s ease,
    background-color 1.5s ease,
    filter 1.5s ease;
  animation: drift 60s linear infinite;
}
.cloud::before,
.cloud::after {
  content: "";
  position: absolute;
  background: #ffffff;
  border-radius: 50%;
  transition: background-color 1.5s ease;
}
.cloud::before {
  width: 50px;
  height: 50px;
  top: -25px;
  left: 20px;
}
.cloud::after {
  width: 60px;
  height: 60px;
  top: -20px;
  right: 15px;
}
/* Clouds */
#cloud-1 {
  top: 20vh;
  transform: scale(0.8);
  animation-duration: 45s;
}
#cloud-2 {
  top: 35vh;
  transform: scale(1.1);
  animation-duration: 60s;
  animation-delay: -10s;
}
#cloud-3 {
  top: 25vh;
  transform: scale(0.6);
  animation-duration: 70s;
  animation-delay: -30s;
}
#cloud-4 {
  top: 40vh;
  transform: scale(0.9);
  animation-duration: 50s;
  animation-delay: -20s;
}
#cloud-5 {
  top: 15vh;
  transform: scale(0.7);
  animation-duration: 80s;
  animation-delay: -5s;
}

@keyframes drift {
  from {
    transform: translateX(-200px);
  }
  to {
    transform: translateX(100vw);
  }
}
/* Night clouds */
html[data-sky-theme="theme-night"] body .cloud {
  background: #4a6078;
  opacity: 0.3;
  filter: blur(1px);
}
html[data-sky-theme="theme-night"] body .cloud::before,
html[data-sky-theme="theme-night"] body .cloud::after {
  background: #4a6078;
}

/* Star Styles */
.star {
  position: absolute;
  width: 3px;
  height: 3px;
  background: #ffffff;
  border-radius: 50%;
  opacity: 0;
  box-shadow: 0 0 5px #ffffff;
  transition: opacity 1.5s ease;
  animation: twinkle 2s infinite alternate;
}
html[data-sky-theme="theme-night"] body .star {
  opacity: 1;
}
@keyframes twinkle {
  from {
    opacity: 0.3;
  }
  to {
    opacity: 1;
  }
}
/* Star positions (All 20) */
#star-1 {
  top: 10%;
  left: 15%;
  animation-delay: 0.5s;
}
#star-2 {
  top: 30%;
  left: 30%;
  animation-delay: 1s;
}
#star-3 {
  top: 15%;
  left: 70%;
  animation-delay: 0.2s;
}
#star-4 {
  top: 50%;
  left: 50%;
  animation-delay: 1.5s;
}
#star-5 {
  top: 40%;
  left: 85%;
  animation-delay: 0.7s;
}
#star-6 {
  top: 60%;
  left: 20%;
  animation-delay: 1.2s;
}
#star-7 {
  top: 80%;
  left: 75%;
  animation-delay: 0.3s;
}
#star-8 {
  top: 5%;
  left: 90%;
  animation-delay: 0.8s;
}
#star-9 {
  top: 70%;
  left: 5%;
  animation-delay: 0.1s;
}
#star-10 {
  top: 25%;
  left: 45%;
  animation-delay: 1.3s;
}
#star-11 {
  top: 45%;
  left: 5%;
  animation-delay: 0.6s;
}
#star-12 {
  top: 85%;
  left: 30%;
  animation-delay: 1.1s;
}
#star-13 {
  top: 90%;
  left: 90%;
  animation-delay: 0.4s;
}
#star-14 {
  top: 55%;
  left: 65%;
  animation-delay: 1.7s;
}
#star-15 {
  top: 20%;
  left: 80%;
  animation-delay: 0.9s;
}
#star-16 {
  top: 75%;
  left: 40%;
  animation-delay: 0.2s;
}
#star-17 {
  top: 60%;
  left: 95%;
  animation-delay: 1.4s;
}
#star-18 {
  top: 35%;
  left: 20%;
  animation-delay: 0.3s;
}
#star-19 {
  top: 5%;
  left: 50%;
  animation-delay: 1.6s;
}
#star-20 {
  top: 95%;
  left: 50%;
  animation-delay: 1.8s;
}

/* Constellation Styles */
.constellation {
  position: absolute;
  opacity: 0;
  transition: opacity 1.5s ease;
}
html[data-sky-theme="theme-night"] body .constellation {
  opacity: 1;
}
.c-star {
  /* Constellation star */
  position: absolute;
  width: 4px;
  height: 4px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 0 6px #fff;
  animation: twinkle 3s infinite alternate;
  animation-delay: 0.5s;
}
#big-dipper {
  top: 15%;
  left: 10%;
  width: 130px;
  height: 60px;
}
#orion {
  top: 60%;
  left: 70%;
  width: 70px;
  height: 80px;
}

/* 1. Ambient aurora backdrop behind the main container.
      Uses fixed ::before so it never affects layout. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(
      circle at 15% 20%,
      rgba(245, 185, 176, 0.18),
      transparent 45%
    ),
    radial-gradient(
      circle at 85% 10%,
      rgba(251, 234, 165, 0.18),
      transparent 50%
    ),
    radial-gradient(
      circle at 50% 95%,
      rgba(142, 197, 160, 0.18),
      transparent 55%
    );
  filter: blur(40px);
  animation: aurora-drift 24s ease-in-out infinite alternate;
}
@keyframes aurora-drift {
  0% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  50% {
    transform: translate3d(-2%, 1%, 0) scale(1.04);
  }
  100% {
    transform: translate3d(1%, -2%, 0) scale(1.02);
  }
}

/* Night theme: deeper, richer aurora */
html[data-sky-theme="theme-night"] body::before {
  background:
    radial-gradient(
      circle at 15% 20%,
      rgba(90, 125, 140, 0.35),
      transparent 45%
    ),
    radial-gradient(
      circle at 85% 10%,
      rgba(251, 234, 165, 0.1),
      transparent 50%
    ),
    radial-gradient(
      circle at 50% 95%,
      rgba(245, 185, 176, 0.18),
      transparent 55%
    );
}

body {
  background-color: var(--color-bg, #f0f8ff);
  transition: background-color 1s ease;
}
#sky-elements {
  z-index: 0;
}
#sun-moon-anim {
  pointer-events: none;
  cursor: default;
}
.star {
  visibility: hidden;
}
.theme-night .star {
  visibility: visible;
}
@media (prefers-reduced-motion: reduce) {
  body::before,
  #sky-elements * {
    animation: none !important;
    transition: none !important;
  }
  #sun-moon-anim,
  #celestial-glow {
    transform: translate(80vw, 5vh);
  }
  #cloud-1 {
    left: 2%;
  }
  #cloud-2 {
    left: 80%;
  }
  #cloud-3 {
    left: 45%;
  }
  #cloud-4 {
    left: 65%;
  }
  #cloud-5 {
    left: 20%;
  }
}
