/* Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Smooth scroll */
html {
  scroll-behavior: smooth;
}

/* Body with moving starfield */
body {
  font-family: "Segoe UI", Tahoma, sans-serif;
  color: #fff;
  background: #000;
  overflow-x: hidden;
  position: relative;
}

/* Starfield layers */
body::before,
body::after {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 200%;
  height: 200%;
  background: url("https://www.transparenttextures.com/patterns/stardust.png")
    repeat;
  opacity: 0.5;
  z-index: -2;
  animation: moveStars 100s linear infinite;
}
body::after {
  animation-duration: 200s;
  opacity: 0.3;
}

/* Starfield animation */
@keyframes moveStars {
  0% {
    transform: translate(0, 0);
  }
  100% {
    transform: translate(-50%, -50%);
  }
}

/* Rocket */
.rocket {
  position: fixed;
  bottom: -150px; /* start below screen */
  left: 10%;
  width: 80px;
  animation: fly 15s linear infinite;
  z-index: 2;
}

.rocket img {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 0 20px #ff4d4d);
}

/* Rocket */
.rocket {
  position: fixed;
  top: 40px; /* Distance from top of page */
  left: -100px; /* Start outside screen */
  width: 80px;
  animation: flyAcross 12s linear infinite;
  z-index: 10;
}

.rocket img {
  width: 100%;
  height: auto;
  transform: rotate(0deg); /* Rotate to face right */
  filter: drop-shadow(0 0 15px #ff4d4d);
}

/* Horizontal flight animation */
@keyframes flyAcross {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(120vw); /* Move fully across screen */
  }
}


/* Asteroid Belt Container */
.asteroid-belt {
  position: absolute;
  bottom: 20px; /* just above the bottom of hero section */
  left: 0;
  width: 100%;
  height: 50px; /* belt height */
  overflow: hidden;
  z-index: 5;
  pointer-events: none;
}

/* Individual Asteroids */
.asteroid-belt .asteroid {
  position: absolute;
  bottom: 0;
  width: 20px;
  height: 20px;
  background: radial-gradient(circle, #ccc 0%, #888 70%, transparent 100%);
  border-radius: 50%;
  box-shadow: 0 0 10px #fff, 0 0 20px #fffa;
  animation: moveAsteroid linear infinite;
}

/* Different starting positions */
.asteroid-belt .asteroid:nth-child(1) { left: -50px; animation-duration: 12s; }
.asteroid-belt .asteroid:nth-child(2) { left: -150px; animation-duration: 15s; width: 25px; height: 25px; }
.asteroid-belt .asteroid:nth-child(3) { left: -300px; animation-duration: 10s; width: 15px; height: 15px; }
.asteroid-belt .asteroid:nth-child(4) { left: -500px; animation-duration: 18s; width: 30px; height: 30px; }
.asteroid-belt .asteroid:nth-child(5) { left: -650px; animation-duration: 14s; width: 18px; height: 18px; }

/* Horizontal movement + sparkle */
@keyframes moveAsteroid {
  0% {
    transform: translateX(0) scale(1);
    opacity: 0.7;
    box-shadow: 0 0 5px #fff, 0 0 10px #fffa;
  }
  50% {
    transform: translateX(50vw) scale(1.2);
    opacity: 1;
    box-shadow: 0 0 10px #fff, 0 0 20px #fffa;
  }
  100% {
    transform: translateX(110vw) scale(1);
    opacity: 0.7;
    box-shadow: 0 0 5px #fff, 0 0 10px #fffa;
  }
}



/* Hero Section */
.hero {
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 0 20px;
  z-index: 1;
  position: relative;
}
.hero h1 {
  font-size: 3rem;
  text-transform: uppercase;
  letter-spacing: 4px;
  text-shadow: 0 0 20px #7df9ff;
}
.hero p {
  margin: 20px 0;
  font-size: 1.2rem;
  max-width: 600px;
  line-height: 1.6;
  color: #cce7ff;
}
.btn {
  display: inline-block;
  padding: 12px 30px;
  background: linear-gradient(45deg, #6ec6ff, #8e2de2);
  color: white;
  border-radius: 50px;
  text-decoration: none;
  font-weight: bold;
  letter-spacing: 1px;
  transition: 0.3s;
  box-shadow: 0 0 20px #6ec6ff;
}
.btn:hover {
  transform: scale(1.05);
  box-shadow: 0 0 30px #8e2de2;
}

/* Planet Section */
.planets {
  padding: 60px 20px;
  text-align: center;
  background: rgba(0, 0, 0, 0.85);
  position: relative;
  z-index: 1;
}
.planets h2 {
  font-size: 2.8rem;
  color: #7df9ff;
  margin-bottom: 50px;
}

/* Planet Grid */
.planet-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  max-width: 1200px;
  margin: 0 auto;
}

/* Planet Card */
.planet-card {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 20px;
  overflow: hidden;
  transition: transform 0.5s ease, box-shadow 0.5s ease;
  backdrop-filter: blur(5px);
  position: relative;
  animation: float 6s ease-in-out infinite alternate;
}
.planet-card img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  border-radius: 20px 20px 0 0;
  transition: transform 0.5s ease, box-shadow 0.5s ease;
  filter: drop-shadow(0 0 15px #7df9ff);
}
.planet-card:hover {
  transform: translateY(-12px); /* float up slightly */
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5); /* shadow for depth */
}
.planet-card:hover img {
  transform: scale(1.1); /* only scale */
  box-shadow: 0 0 20px #7df9ff, 0 0 40px #8e2de2; /* glow */
}
.planet-info {
  padding: 20px;
}
.planet-info h3 {
  font-size: 1.5rem;
  color: #ffda79;
  margin-bottom: 10px;
}
.planet-info p {
  font-size: 0.95rem;
  color: #ddd;
}

/* Floating animation */
@keyframes float {
  0% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
  100% {
    transform: translateY(0px);
  }
}

/* Footer */
footer {
  padding: 20px;
  text-align: center;
  background: rgba(0, 0, 0, 0.8);
  font-size: 0.9rem;
  position: relative;
  z-index: 1;
}

/* Planet Card Hover - No Tilt */

/* Responsive */
@media (max-width: 768px) {
  .hero h1 {
    font-size: 2.2rem;
    letter-spacing: 2px;
  }
  .hero p {
    font-size: 1rem;
    max-width: 90%;
  }
  .planets h2 {
    font-size: 2rem;
  }
}
