.galaxy-container {
  position: relative;
  width: 100%;
  height: 100vh;
  background: #05081dff;
  overflow: hidden;
}

/* Main nebula clouds */
.nebula {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  animation: nebulaFlow 8s ease-in-out infinite;
}

.nebula-1 {
  width: 400px;
  height: 300px;
  background: radial-gradient(
    ellipse,
    rgba(255, 105, 180, 0.6) 0%,
    rgba(138, 43, 226, 0.4) 40%,
    transparent 70%
  );
  top: 20%;
  right: 30%;
  animation: nebulaFlow 8s ease-in-out infinite,
    colorShift1 10s ease-in-out infinite;
  animation-delay: 0s, -2s;
}

.nebula-2 {
  width: 500px;
  height: 350px;
  background: radial-gradient(
    ellipse,
    rgba(72, 61, 139, 0.5) 0%,
    rgba(123, 104, 238, 0.3) 50%,
    transparent 80%
  );
  top: 40%;
  left: 20%;
  animation: nebulaFlow 10s ease-in-out infinite,
    colorShift2 12s ease-in-out infinite;
  animation-delay: -2s, -4s;
}

.nebula-3 {
  width: 300px;
  height: 200px;
  background: radial-gradient(
    ellipse,
    rgba(186, 85, 211, 0.4) 0%,
    rgba(75, 0, 130, 0.2) 60%,
    transparent 90%
  );
  bottom: 30%;
  right: 20%;
  animation: nebulaFlow 6s ease-in-out infinite,
    colorShift3 8s ease-in-out infinite;
  animation-delay: -4s, -6s;
}

.nebula-4 {
  width: 350px;
  height: 250px;
  background: radial-gradient(
    ellipse,
    rgba(65, 105, 225, 0.3) 0%,
    rgba(30, 144, 255, 0.2) 50%,
    transparent 80%
  );
  top: 60%;
  left: 40%;
  animation: nebulaFlow 9s ease-in-out infinite,
    colorShift4 11s ease-in-out infinite;
  animation-delay: -6s, -3s;
}

/* Smaller nebula details */
.nebula-small {
  position: absolute;
  border-radius: 50%;
  filter: blur(30px);
  animation: smallNebulaFloat 6s linear infinite, pulse 3s ease-in-out infinite;
}

.small-1 {
  width: 150px;
  height: 100px;
  background: radial-gradient(
    ellipse,
    rgba(255, 20, 147, 0.3) 0%,
    transparent 70%
  );
  top: 10%;
  left: 60%;
  animation-delay: -1s, -0.5s;
}

.small-2 {
  width: 120px;
  height: 80px;
  background: radial-gradient(
    ellipse,
    rgba(138, 43, 226, 0.25) 0%,
    transparent 70%
  );
  bottom: 20%;
  left: 10%;
  animation-delay: -3s, -1.5s;
}

/* Stars */
.stars {
  position: absolute;
  width: 100%;
  height: 100%;
}

.star {
  position: absolute;
  background: white;
  border-radius: 50%;
  animation: intenseTwinkle 2s ease-in-out infinite,
    starFloat 15s linear infinite;
}

.star-1 {
  width: 2px;
  height: 2px;
  top: 15%;
  left: 20%;
  animation-delay: 0s;
}
.star-2 {
  width: 1px;
  height: 1px;
  top: 25%;
  left: 70%;
  animation-delay: -1s;
}
.star-3 {
  width: 3px;
  height: 3px;
  top: 40%;
  left: 15%;
  animation-delay: -2s;
}
.star-4 {
  width: 1px;
  height: 1px;
  top: 60%;
  left: 80%;
  animation-delay: -0.5s;
}
.star-5 {
  width: 2px;
  height: 2px;
  top: 70%;
  left: 30%;
  animation-delay: -1.5s;
}
.star-6 {
  width: 1px;
  height: 1px;
  top: 30%;
  left: 90%;
  animation-delay: -2.5s;
}
.star-7 {
  width: 2px;
  height: 2px;
  top: 80%;
  left: 60%;
  animation-delay: -3s;
}
.star-8 {
  width: 1px;
  height: 1px;
  top: 50%;
  left: 45%;
  animation-delay: -0.8s;
}
.star-9 {
  width: 3px;
  height: 3px;
  top: 35%;
  left: 85%;
  animation-delay: -1.2s;
}
.star-10 {
  width: 1px;
  height: 1px;
  top: 75%;
  left: 25%;
  animation-delay: -2.8s;
}
.star-11 {
  width: 2px;
  height: 2px;
  top: 20%;
  left: 50%;
  animation-delay: -0.3s;
}
.star-12 {
  width: 1px;
  height: 1px;
  top: 90%;
  left: 40%;
  animation-delay: -1.8s;
}
.star-13 {
  width: 2px;
  height: 2px;
  top: 10%;
  left: 75%;
  animation-delay: -2.3s;
}
.star-14 {
  width: 1px;
  height: 1px;
  top: 45%;
  left: 10%;
  animation-delay: -0.7s;
}
.star-15 {
  width: 3px;
  height: 3px;
  top: 65%;
  left: 95%;
  animation-delay: -1.7s;
}

/* Bright stars */
.bright-star {
  position: absolute;
  width: 4px;
  height: 4px;
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.9) 0%,
    rgba(173, 216, 230, 0.6) 50%,
    transparent 100%
  );
  border-radius: 50%;
  animation: superBrightTwinkle 3s ease-in-out infinite,
    starDrift 20s linear infinite;
}

.bright-1 {
  top: 25%;
  left: 40%;
  animation-delay: 0s, -5s;
}
.bright-2 {
  top: 55%;
  left: 75%;
  animation-delay: -1s, -10s;
}
.bright-3 {
  top: 85%;
  left: 15%;
  animation-delay: -2s, -15s;
}

/* Cosmic dust */
.cosmic-dust {
  position: absolute;
  width: 100%;
  height: 100%;
  background: radial-gradient(
      2px 2px at 20px 30px,
      rgba(255, 255, 255, 0.1),
      transparent
    ),
    radial-gradient(
      2px 2px at 40px 70px,
      rgba(255, 255, 255, 0.05),
      transparent
    ),
    radial-gradient(
      1px 1px at 90px 40px,
      rgba(255, 255, 255, 0.08),
      transparent
    ),
    radial-gradient(
      1px 1px at 130px 80px,
      rgba(255, 255, 255, 0.03),
      transparent
    ),
    radial-gradient(
      2px 2px at 160px 30px,
      rgba(255, 255, 255, 0.06),
      transparent
    );
  background-repeat: repeat;
  background-size: 200px 100px;
  animation: fastCosmicDrift 15s linear infinite,
    dustShimmer 6s ease-in-out infinite;
}

/* Animations */
@keyframes nebulaFlow {
  0% {
    transform: translate(0, 0) rotate(0deg) scale(1);
  }
  25% {
    transform: translate(80px, -60px) rotate(6deg) scale(1.1);
  }
  50% {
    transform: translate(-60px, 40px) rotate(-4deg) scale(0.9);
  }
  75% {
    transform: translate(50px, 70px) rotate(8deg) scale(1.15);
  }
  100% {
    transform: translate(0, 0) rotate(0deg) scale(1);
  }
}

@keyframes colorShift1 {
  0% {
    filter: blur(60px) hue-rotate(0deg) brightness(1);
  }
  33% {
    filter: blur(50px) hue-rotate(15deg) brightness(1.1);
  }
  66% {
    filter: blur(70px) hue-rotate(-10deg) brightness(0.9);
  }
  100% {
    filter: blur(60px) hue-rotate(0deg) brightness(1);
  }
}

@keyframes colorShift2 {
  0% {
    filter: blur(60px) hue-rotate(0deg) brightness(1);
  }
  50% {
    filter: blur(45px) hue-rotate(-20deg) brightness(1.2);
  }
  100% {
    filter: blur(60px) hue-rotate(0deg) brightness(1);
  }
}

@keyframes colorShift3 {
  0% {
    filter: blur(60px) hue-rotate(0deg) brightness(1);
  }
  40% {
    filter: blur(55px) hue-rotate(25deg) brightness(0.8);
  }
  80% {
    filter: blur(65px) hue-rotate(-15deg) brightness(1.15);
  }
  100% {
    filter: blur(60px) hue-rotate(0deg) brightness(1);
  }
}

@keyframes colorShift4 {
  0% {
    filter: blur(60px) hue-rotate(0deg) brightness(1);
  }
  30% {
    filter: blur(70px) hue-rotate(-30deg) brightness(1.3);
  }
  70% {
    filter: blur(50px) hue-rotate(20deg) brightness(0.85);
  }
  100% {
    filter: blur(60px) hue-rotate(0deg) brightness(1);
  }
}

@keyframes smallNebulaFloat {
  0% {
    transform: translate(0, 0) rotate(0deg);
  }
  33% {
    transform: translate(50px, -40px) rotate(4deg);
  }
  66% {
    transform: translate(-30px, 50px) rotate(-6deg);
  }
  100% {
    transform: translate(0, 0) rotate(0deg);
  }
}

@keyframes pulse {
  0%,
  100% {
    opacity: 0.3;
    transform: scale(1);
  }
  50% {
    opacity: 0.6;
    transform: scale(1.1);
  }
}

@keyframes intenseTwinkle {
  0%,
  100% {
    opacity: 0.2;
    transform: scale(0.8);
  }
  25% {
    opacity: 1;
    transform: scale(1.2);
  }
  50% {
    opacity: 0.4;
    transform: scale(1);
  }
  75% {
    opacity: 0.8;
    transform: scale(1.1);
  }
}

@keyframes starFloat {
  0% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-3px);
  }
  100% {
    transform: translateY(0px);
  }
}

@keyframes superBrightTwinkle {
  0%,
  100% {
    opacity: 0.6;
    transform: scale(1) rotate(0deg);
  }
  25% {
    opacity: 1;
    transform: scale(1.3) rotate(90deg);
  }
  50% {
    opacity: 0.8;
    transform: scale(1.1) rotate(180deg);
  }
  75% {
    opacity: 0.9;
    transform: scale(1.2) rotate(270deg);
  }
}

@keyframes starDrift {
  0% {
    transform: translate(0, 0);
  }
  25% {
    transform: translate(15px, -10px);
  }
  50% {
    transform: translate(-10px, 15px);
  }
  75% {
    transform: translate(10px, 20px);
  }
  100% {
    transform: translate(0, 0);
  }
}

@keyframes fastCosmicDrift {
  0% {
    transform: translateX(0) translateY(0);
  }
  50% {
    transform: translateX(-200px) translateY(-20px);
  }
  100% {
    transform: translateX(-400px) translateY(0);
  }
}

@keyframes dustShimmer {
  0%,
  100% {
    opacity: 0.3;
  }
  50% {
    opacity: 0.7;
  }
}

/* Responsive */
@media (max-width: 768px) {
  .nebula-1,
  .nebula-2,
  .nebula-3,
  .nebula-4 {
    width: 70%;
    height: 200px;
  }

  .content h1 {
    font-size: 2rem;
  }

  .logo {
    top: 20px;
    left: 20px;
    font-size: 1.2rem;
  }
}
