/* ===========================
   RESET & BASE
=========================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg-dark: #050510;
  --bg-card: #0d0d2b;
  --bg-card2: #0a0a1e;
  --accent: #7b5ef8;
  --accent2: #00d4ff;
  --accent3: #ff6b9d;
  --text-primary: #f0f0ff;
  --text-muted: #8888bb;
  --border: rgba(123, 94, 248, 0.25);
  --font-display: 'Orbitron', monospace;
  --font-body: 'Inter', sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-primary);
  font-family: var(--font-body);
  overflow-x: hidden;
  line-height: 1.7;
}

/* ===========================
   SCROLLBAR
=========================== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-dark); }
::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 3px; }

/* ===========================
   NAVBAR
=========================== */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2.5rem;
  background: rgba(5, 5, 16, 0.7);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: background 0.3s;
}

.navbar.scrolled {
  background: rgba(5, 5, 16, 0.95);
}

.nav-brand {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--accent2);
  letter-spacing: 2px;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 2rem;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  transition: color 0.3s;
}

.nav-links a:hover {
  color: var(--accent2);
}

.hamburger {
  display: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-primary);
}

/* ===========================
   HERO
=========================== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  background: radial-gradient(ellipse at 50% 60%, #1a0a3e 0%, #050510 70%);
}

.stars {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.star {
  position: absolute;
  border-radius: 50%;
  background: white;
  animation: twinkle var(--dur, 3s) ease-in-out infinite alternate;
  opacity: var(--op, 0.7);
}

@keyframes twinkle {
  from { opacity: var(--op, 0.7); transform: scale(1); }
  to   { opacity: 0.1; transform: scale(0.5); }
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 750px;
  padding: 2rem;
}

.hero-subtitle {
  font-family: var(--font-display);
  font-size: 0.85rem;
  letter-spacing: 6px;
  color: var(--accent2);
  text-transform: uppercase;
  margin-bottom: 1rem;
  animation: fadeUp 0.8s ease both;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 8vw, 5.5rem);
  font-weight: 900;
  line-height: 1.05;
  background: linear-gradient(135deg, #fff 0%, var(--accent2) 40%, var(--accent) 80%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 1.5rem;
  animation: fadeUp 0.9s 0.1s ease both;
}

.hero-desc {
  font-size: 1.15rem;
  color: var(--text-muted);
  margin-bottom: 2.5rem;
  animation: fadeUp 1s 0.2s ease both;
}

.btn-primary {
  display: inline-block;
  padding: 0.9rem 2.5rem;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #fff;
  text-decoration: none;
  border-radius: 50px;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 1px;
  transition: transform 0.3s, box-shadow 0.3s;
  box-shadow: 0 0 30px rgba(123, 94, 248, 0.4);
  animation: fadeUp 1s 0.3s ease both;
}

.btn-primary:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 0 50px rgba(0, 212, 255, 0.5);
}

.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
}

.scroll-indicator span {
  display: block;
  width: 20px;
  height: 35px;
  border: 2px solid rgba(255,255,255,0.3);
  border-radius: 10px;
  position: relative;
}

.scroll-indicator span::after {
  content: '';
  display: block;
  width: 4px;
  height: 8px;
  background: var(--accent2);
  border-radius: 2px;
  position: absolute;
  top: 5px;
  left: 50%;
  transform: translateX(-50%);
  animation: scrollBob 1.5s ease-in-out infinite;
}

@keyframes scrollBob {
  0%,100% { top: 5px; opacity: 1; }
  50% { top: 15px; opacity: 0.3; }
}

/* ===========================
   SECTIONS
=========================== */
.section {
  padding: 6rem 1rem;
}

.section-dark {
  background: linear-gradient(180deg, #070718 0%, #0a0a1e 100%);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 4vw, 2.5rem);
  font-weight: 700;
  text-align: center;
  margin-bottom: 1rem;
  background: linear-gradient(90deg, var(--accent2), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-desc {
  text-align: center;
  color: var(--text-muted);
  font-size: 1.05rem;
  margin-bottom: 3.5rem;
}

/* ===========================
   PLANETS GRID
=========================== */
.planets-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}

.planet-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.8rem 1.5rem;
  text-align: center;
  transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
  position: relative;
  overflow: hidden;
}

.planet-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 80% 20%, rgba(var(--color), 0.08), transparent 60%);
  pointer-events: none;
}

.planet-card:hover {
  transform: translateY(-6px);
  border-color: rgba(123, 94, 248, 0.6);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5), 0 0 20px rgba(123, 94, 248, 0.15);
}

.planet-icon {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  margin: 0 auto 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  box-shadow: 0 4px 20px rgba(0,0,0,0.4);
}

.planet-card h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  margin-bottom: 0.6rem;
  color: var(--text-primary);
}

.planet-card p {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
  line-height: 1.6;
}

.planet-tag {
  display: inline-block;
  padding: 0.25rem 0.8rem;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  background: rgba(123, 94, 248, 0.15);
  color: var(--accent2);
  border: 1px solid rgba(0, 212, 255, 0.3);
}

/* ===========================
   TIMELINE
=========================== */
.timeline {
  position: relative;
  max-width: 760px;
  margin: 0 auto;
  padding-left: 2rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 20px;
  top: 0; bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, var(--accent), var(--accent2), var(--accent3));
  border-radius: 1px;
}

.timeline-item {
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
  margin-bottom: 2.5rem;
  position: relative;
}

.timeline-dot {
  flex-shrink: 0;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 2px solid var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  z-index: 1;
  box-shadow: 0 0 15px rgba(123, 94, 248, 0.4);
}

.timeline-content {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.2rem 1.5rem;
  flex: 1;
  transition: border-color 0.3s;
}

.timeline-content:hover {
  border-color: rgba(0, 212, 255, 0.5);
}

.timeline-year {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.8rem;
  color: var(--accent2);
  letter-spacing: 2px;
  margin-bottom: 0.4rem;
}

.timeline-content h3 {
  font-size: 1.1rem;
  margin-bottom: 0.4rem;
  color: var(--text-primary);
}

.timeline-content p {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* ===========================
   FACTS
=========================== */
.facts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.fact-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2rem 1rem;
  text-align: center;
  transition: transform 0.3s, box-shadow 0.3s;
}

.fact-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 35px rgba(0, 212, 255, 0.12);
}

.fact-number {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 900;
  background: linear-gradient(135deg, var(--accent2), var(--accent3));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.5rem;
}

.fact-label {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.trivia-box {
  background: linear-gradient(135deg, rgba(123, 94, 248, 0.1), rgba(0, 212, 255, 0.05));
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2rem 2.5rem;
  text-align: center;
  max-width: 640px;
  margin: 0 auto;
}

.trivia-box h3 {
  font-size: 1.2rem;
  margin-bottom: 1rem;
  color: var(--accent2);
}

.trivia-box p {
  font-size: 1rem;
  color: var(--text-primary);
  margin-bottom: 1.5rem;
  min-height: 50px;
}

.btn-secondary {
  padding: 0.7rem 2rem;
  border: 2px solid var(--accent);
  background: transparent;
  color: var(--accent);
  border-radius: 50px;
  font-weight: 700;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.3s;
  font-family: var(--font-body);
}

.btn-secondary:hover {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 0 20px rgba(123, 94, 248, 0.4);
}

/* ===========================
   GALLERY
=========================== */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.gallery-item {
  border-radius: 12px;
  overflow: hidden;
}

.gallery-item.g-wide {
  grid-column: span 2;
}

.space-art {
  width: 100%;
  height: 220px;
  display: flex;
  align-items: flex-end;
  padding: 1rem;
  position: relative;
  cursor: pointer;
  transition: transform 0.3s;
  overflow: hidden;
}

.space-art:hover {
  transform: scale(1.02);
}

.space-art span {
  position: relative;
  z-index: 2;
  font-size: 0.85rem;
  font-weight: 600;
  color: rgba(255,255,255,0.85);
  background: rgba(0,0,0,0.4);
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  backdrop-filter: blur(4px);
}

.nebula {
  background:
    radial-gradient(circle at 30% 50%, rgba(255,100,200,0.6) 0%, transparent 40%),
    radial-gradient(circle at 70% 40%, rgba(100,150,255,0.5) 0%, transparent 40%),
    radial-gradient(circle at 50% 70%, rgba(255,200,50,0.3) 0%, transparent 30%),
    linear-gradient(135deg, #0a0020, #150a30, #0d1a40);
}

.blackhole {
  background:
    radial-gradient(circle at 50% 50%, #000 0%, #000 15%, rgba(255,150,0,0.8) 20%, rgba(255,100,0,0.5) 28%, rgba(100,0,150,0.4) 38%, transparent 55%),
    linear-gradient(135deg, #000005, #05000f);
}

.galaxy {
  background:
    radial-gradient(ellipse at 50% 50%, rgba(200,180,255,0.9) 0%, rgba(150,100,255,0.6) 15%, rgba(80,50,180,0.3) 40%, transparent 70%),
    radial-gradient(circle at 30% 60%, rgba(255,200,200,0.2) 0%, transparent 30%),
    linear-gradient(135deg, #020010, #0a0525);
}

.aurora {
  background:
    linear-gradient(180deg, #000a05 0%, rgba(0,200,100,0.5) 40%, rgba(0,100,255,0.4) 60%, rgba(100,0,200,0.3) 80%, #010508 100%),
    radial-gradient(ellipse at 50% 40%, rgba(50,255,150,0.3) 0%, transparent 60%);
}

.mars-surface {
  background:
    linear-gradient(180deg, #1a0a00 0%, #3d1a00 30%, #5c2800 50%, #8b4513 70%, #a0522d 100%),
    radial-gradient(ellipse at 30% 60%, rgba(200,100,50,0.5) 0%, transparent 40%),
    radial-gradient(ellipse at 70% 70%, rgba(150,60,20,0.6) 0%, transparent 35%);
}

/* ===========================
   FOOTER
=========================== */
.footer {
  background: #020208;
  border-top: 1px solid var(--border);
  padding: 3rem 1rem;
  text-align: center;
}

.footer-brand {
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--accent2);
  margin-bottom: 0.5rem;
}

.footer p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

.footer-links {
  display: flex;
  gap: 2rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: color 0.3s;
}

.footer-links a:hover {
  color: var(--accent2);
}

.footer-copy {
  font-size: 0.78rem !important;
  color: #444466 !important;
}

/* ===========================
   ANIMATIONS
=========================== */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}

.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===========================
   RESPONSIVE
=========================== */
@media (max-width: 768px) {
  .nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: rgba(5, 5, 16, 0.97);
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--border);
    gap: 1rem;
  }

  .nav-links.open {
    display: flex;
  }

  .hamburger {
    display: block;
  }

  .timeline {
    padding-left: 1rem;
  }

  .timeline::before {
    left: 12px;
  }

  .gallery-grid {
    grid-template-columns: 1fr 1fr;
  }

  .gallery-item.g-wide {
    grid-column: span 2;
  }

  .trivia-box {
    padding: 1.5rem;
  }
}

@media (max-width: 480px) {
  .navbar {
    padding: 1rem 1.2rem;
  }

  .section {
    padding: 4rem 1rem;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .gallery-item.g-wide {
    grid-column: span 1;
  }

  .facts-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
