html, body {
  margin: 0;
  padding: 0;
  height: 200vh;
  overflow-x: hidden;
  background: linear-gradient(to bottom, #000814, #001d3d, #003566);
  color: white;
  font-family: 'Arial', sans-serif;
}

#solar-system-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  overflow: visible;
  pointer-events: none;
  z-index: 0;
}

#solar-system {
  display: block;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at center, #000000, #0a0a0a 70%);
}

#moon-container {
  position: fixed;
  bottom: -800px; /* Start far off screen */
  left: 50%;
  transform: translateX(-50%);
  width: 700px;
  height: 700px;
  transition: bottom 2.5s ease-out, opacity 2.5s ease-out;
  opacity: 0;
  pointer-events: none;
  perspective: 1000px;
  overflow: hidden;
}

#moon {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
}

#moon-container.show {
  bottom: -350px;
  opacity: 1;     /* Also fade in */
}

.moon-sphere {
  position: absolute;
  width: 700px;
  height: 700px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 25%, #f0f0f0, #d5d5d5, #b0b0b0, #8a8a8a, #4a4a4a);
  box-shadow: 
    0 0 140px 56px rgba(255, 255, 255, 0.15),
    inset -112px -112px 168px rgba(0, 0, 0, 0.4),
    inset 84px 84px 140px rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.lunar-surface {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: 
    radial-gradient(circle at 25% 30%, rgba(100, 100, 100, 0.8) 28px, transparent 42px),
    radial-gradient(circle at 70% 40%, rgba(80, 80, 80, 0.9) 42px, transparent 63px),
    radial-gradient(circle at 45% 65%, rgba(90, 90, 90, 0.7) 21px, transparent 35px),
    radial-gradient(circle at 80% 70%, rgba(70, 70, 70, 0.8) 14px, transparent 28px),
    radial-gradient(circle at 15% 75%, rgba(85, 85, 85, 0.6) 35px, transparent 56px),
    radial-gradient(circle at 60% 20%, rgba(75, 75, 75, 0.9) 49px, transparent 70px),
    radial-gradient(circle at 30% 85%, rgba(95, 95, 95, 0.5) 25px, transparent 40px),
    radial-gradient(circle at 85% 25%, rgba(65, 65, 65, 0.7) 17px, transparent 31px);
}

.mare-regions {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: 
    radial-gradient(ellipse 140px 105px at 35% 45%, rgba(60, 60, 60, 0.6), transparent),
    radial-gradient(ellipse 84px 119px at 65% 30%, rgba(70, 70, 70, 0.5), transparent),
    radial-gradient(ellipse 105px 70px at 20% 70%, rgba(65, 65, 65, 0.4), transparent),
    radial-gradient(ellipse 119px 84px at 75% 60%, rgba(55, 55, 55, 0.7), transparent);
}

.lunar-highlights {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: 
    radial-gradient(circle at 30% 25%, rgba(255, 255, 255, 0.3) 70px, transparent 140px),
    radial-gradient(circle at 25% 35%, rgba(255, 255, 255, 0.2) 49px, transparent 98px),
    radial-gradient(circle at 40% 30%, rgba(255, 255, 255, 0.15) 84px, transparent 168px);
}

.lunar-shadows {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: 
    radial-gradient(circle at 70% 75%, rgba(0, 0, 0, 0.3) 105px, transparent 210px),
    radial-gradient(circle at 80% 60%, rgba(0, 0, 0, 0.2) 70px, transparent 140px),
    radial-gradient(circle at 65% 80%, rgba(0, 0, 0, 0.25) 84px, transparent 168px);
}

.terminator-line {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: linear-gradient(135deg, 
    transparent 0%, 
    transparent 45%, 
    rgba(0, 0, 0, 0.6) 55%, 
    rgba(0, 0, 0, 0.8) 65%, 
    rgba(0, 0, 0, 0.9) 100%);
}

@keyframes moonRotate {
  from { transform: rotateY(0deg) rotateX(5deg); }
  to { transform: rotateY(360deg) rotateX(5deg); }
}

.star {
  position: fixed;
  background: white;
  border-radius: 50%;
  animation: twinkle 3s infinite;
}

@keyframes twinkle {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}

.content {
  min-height: 200vh; /* allow scroll */
  padding: 100px;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
}

.content h1 {
  font-size: 3rem;
  text-align: center;
  margin-bottom: 2rem;
  background: linear-gradient(45deg, #ffd700, #ff6b35);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.content p {
  font-size: 1.2rem;
  line-height: 1.6;
  max-width: 800px;
  margin: 0 auto 2rem;
  text-align: center;
  transform: translateY(40px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
  color: #b8b8b8;
}

a.back-home {
  position: fixed;
  top: 20px;
  left: 20px;
  padding: 0.3rem 0.8rem;
  font-size: 0.9rem;
  background: linear-gradient(45deg, #ffd700, #ff6b35);
  color: #000814;
  font-weight: bold;
  text-decoration: none;
  border-radius: 6px;
  box-shadow: 0 3px 6px rgba(255, 107, 53, 0.4);
  transition: background 0.3s ease, color 0.3s ease, transform 0.2s ease;
  z-index: 1000;
}

a.back-home:hover {
  background: linear-gradient(45deg, #ff6b35, #ffd700);
  color: #fff;
  transform: scale(1.05);
}

.asteroid {
  position: absolute;
  background: #8B4513;
  border-radius: 50%;
  opacity: 0.6;
}
