/*---------------------------------------------
  Font
---------------------------------------------*/

@import url("https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700;800&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700;800&display=swap");

/*---------------------------------------------
  Utility
---------------------------------------------*/

:root {
  --primary-color: #0b0f18;
  --secondary-color: #131417;
  --brand-color: #327DC2;
  --white-color: #ffffff;
  --font-smoothing-webkit: antialiased;
  --moz-osx-font-smoothing: grayscale; 
}

/* Applies to all scrollable elements */
::-webkit-scrollbar {
  height: 8px;
  width: 8px;
}

::-webkit-scrollbar-thumb {
  background: var(--brand-color); /* use your CSS variable or replace with a color */
  border-radius: 10px;
}

::-webkit-scrollbar-track {
  background: #222; /* optional: customize the track background */
}

#hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  text-align: center;
  padding: 0 20px;
  overflow: hidden;
}

.container {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.space-heading {
  font-size: 2.5rem;
  font-weight: 600;
  color: #ffffff;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.4);
  margin: 10px 0 20px;
  letter-spacing: 1px;
  animation: float 5s ease-in-out infinite;
}

.space-text-subtitle {
  font-size: 1.2rem;
  max-width: 600px;
  margin: 0 auto;
  color: #cccccc;
  line-height: 1.6;
  text-shadow: 0 0 8px rgba(0, 255, 255, 0.2);
  animation: float 7s ease-in-out infinite;
}

.space-background {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: -1;
}

/* Optional space aura effect */
.space-background::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(255,255,255,0.05), transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* Planet Sizes + Vector Images */
.orbit.mercury .planet {
  width: 40px;
  height: 40px;
  background-image: url('/assets/svg/mercury.svg');
  background-size: cover;
  background-position: center;
  border-radius: 50%;
}

.orbit.venus .planet {
  width: 45px;
  height: 45px;
  background-image: url('/assets/svg/venus.svg');
  background-size: cover;
  background-position: center;
  border-radius: 50%;
}

.orbit.earth .planet {
  width: 50px;
  height: 50px;
  background-image: url('/assets/svg/earth.svg');
  background-size: cover;
  background-position: center;
  border-radius: 50%;
}

.orbit.mars .planet {
  width: 45px;
  height: 45px;
  background-image: url('/assets/svg/mars.svg');
  background-size: cover;
  background-position: center;
  border-radius: 50%;
}

.orbit.jupiter .planet {
  width: 80px;
  height: 80px;
  background-image: url('/assets/svg/jupiter.svg');
  background-size: cover;
  background-position: center;
  border-radius: 50%;
}

.orbit.saturn .planet {
  width: 75px;
  height: 75px;
  background-image: url('/assets/svg/saturn.svg');
  background-size: cover;
  background-position: center;
  border-radius: 50%;
}

.orbit.uranus .planet {
  width: 60px;
  height: 60px;
  background-image: url('/assets/svg/uranus.svg');
  background-size: cover;
  background-position: center;
  border-radius: 50%;
}

.orbit.neptune .planet {
  width: 60px;
  height: 60px;
  background-image: url('/assets/svg/neptune.svg');
  background-size: cover;
  background-position: center;
  border-radius: 50%;
}

/* Orbit Animation */
@keyframes orbitRotation {
  from { transform: rotate(0deg) translateX(var(--distance)); }
  to { transform: rotate(360deg) translateX(var(--distance)); }
}

/* Orbit Rings */
.orbit {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  transform: translate(-50%, -50%);
  animation: orbitRotation linear infinite;
  transform-origin: center;
  z-index: 2;
}

.orbit::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border: 1px dashed rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  width: calc(var(--distance) * 2);
  height: calc(var(--distance) * 2);
}

/* Planet Animation Durations */
.orbit.mercury {
  --distance: 200px;
  animation-duration: 10s;
}
.orbit.venus {
  --distance: 280px;
  animation-duration: 18s;
}
.orbit.earth {
  --distance: 370px;
  animation-duration: 26s;
}
.orbit.mars {
  --distance: 460px;
  animation-duration: 32s;
}
.orbit.jupiter {
  --distance: 580px;
  animation-duration: 40s;
}
.orbit.saturn {
  --distance: 700px;
  animation-duration: 48s;
}
.orbit.uranus {
  --distance: 820px;
  animation-duration: 56s;
}
.orbit.neptune {
  --distance: 950px;
  animation-duration: 64s;
}

/* Meteorite Styling */
.meteorite {
  position: absolute;
  width: 5px;
  height: 5px;
  background-color: #ff0; /* Meteorite color */
  border-radius: 50%;
  box-shadow: 0 0 5px #ff0; /* Glow effect */
  animation: meteoriteFall 3s linear infinite, meteoriteMove 5s linear infinite;
}

/* Meteorite Fall Animation */
@keyframes meteoriteFall {
  0% {
    transform: translateY(0) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translateY(100vh) rotate(360deg);
    opacity: 0;
  }
}

/* Meteorite Movement Animation */
@keyframes meteoriteMove {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(200px);
  }
}

.stars {
  position: absolute;
  width: 100%;
  height: 100%;
  background: url('https://www.transparenttextures.com/patterns/stardust.png') repeat;
  animation: starScroll 60s linear infinite;
}

@keyframes starScroll {
  from {
    background-position: 0 0;
  }
  to {
    background-position: -1000px 1000px;
  }
}

.shooting-star {
  position: absolute;
  width: 3px;
  height: 3px;
  background: white;
  box-shadow: 0 0 6px 3px white;
  border-radius: 50%;
  animation: shootingStar 2s linear forwards;
  z-index: 0;
}

@keyframes shootingStar {
  0% {
    transform: translate(0, 0) scale(1);
    opacity: 1;
  }
  100% {
    transform: translate(100vw, 100vh) scale(0.5);
    opacity: 0;
  }
}

@keyframes drift {
  0% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-10px) rotate(1deg); }
  100% { transform: translateY(0) rotate(0deg); }
}

@keyframes float {
  0% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
  100% { transform: translateY(0); }
}

/* Unique animations per planet */
.orbit.mercury {
  --distance: 200px;
  animation-duration: 10s;
}

.orbit.venus {
  --distance: 280px;
  animation-duration: 18s;
}

.orbit.earth {
  --distance: 370px;
  animation-duration: 26s;
}

.orbit.mars {
  --distance: 460px;
  animation-duration: 32s;
}

.orbit.jupiter {
  --distance: 580px;
  animation-duration: 40s;
}

.orbit.saturn {
  --distance: 700px;
  animation-duration: 48s;
}

.orbit.uranus {
  --distance: 820px;
  animation-duration: 56s;
}

.orbit.neptune {
  --distance: 950px;
  animation-duration: 64s;
}

/* Sun Styling */
.sun {
  position: absolute;
  width: 250px;
  height: 250px;
  background: radial-gradient(circle, #fff200, #ff8c00, #ff4500);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  box-shadow:
    0 0 80px 40px rgba(255, 165, 0, 0.4),
    0 0 100px 80px rgba(255, 200, 0, 0.2),
    inset 0 0 30px #fff;
  animation: sunPulse 6s ease-in-out infinite;
  z-index: 3;
}

@keyframes sunPulse {
  0%, 100% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.9;
  }
  50% {
    transform: translate(-50%, -50%) scale(1.05);
    opacity: 1;
  }
}

/* Explosion effect on planets */
@keyframes explode {
  0% {
    transform: scale(1) rotate(0deg);
    opacity: 1;
  }
  50% {
    transform: scale(2) rotate(180deg);
    opacity: 0.5;
  }
  100% {
    transform: scale(1) rotate(360deg);
    opacity: 0;
  }
}

/* Reset planet state after explosion */
@keyframes resetPlanet {
  0% {
    transform: scale(2) rotate(180deg);
    opacity: 0.5;
  }
  100% {
    transform: scale(1) rotate(0deg);
    opacity: 1;
  }
}

.planet.exploding {
  animation: explode 2s forwards;
}

.planet.reset {
  animation: resetPlanet 1s forwards;
}
