/* --------- 1. Foundational Styles & Variables --------- */
/* Root Variables */
:root {
  /* Color Palette */
  --bg-900: #03040a;
  --bg-800: #0b1020;
  --accent: #6de3ff;
  --accent-2: #9b7bff;
  --muted: #a9b2c7;
  --glass: rgba(255, 255, 255, 0.06);
  --glass-strong: rgba(255, 255, 255, 0.08);
  --radius: 16px;
  --max-width: 1200px;
  --bg-100: #ffffff;

  /* Solar System Variables */
  --sun-size: 96px;
  --mercury-size: 24px;
  --venus-size: 30px;
  --earth-size: 24px;
  --mars-size: 19px;
  --jupiter-size: 48px;
  --saturn-size: 43px;
  --uranus-size: 34px;
  --neptune-size: 31px;
  --moon-size: 7px;

  /* Orbit Sizes */
  --mercury-orbit: 100px;
  --venus-orbit: 150px;
  --earth-orbit: 210px;
  --mars-orbit: 270px;
  --jupiter-orbit: 350px;
  --saturn-orbit: 440px;
  --uranus-orbit: 520px;
  --neptune-orbit: 600px;
  --moon-orbit: 30px;
}

/* Global Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  cursor: url("Media/Space.cur"), auto;
  user-select: text !important;
}

/* Scroll Behavior */
html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

/* Milky Way background */
#milkyway-bg {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at 50% 20%, #0b0d2b, #000000 80%);
  background-size: cover;
  background-position: center;
  filter: brightness(0.4) contrast(1.2) blur(1.2px);
  z-index: -3;
}

/* VANTA.FOG */
#vanta-fog {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0.4;
  z-index: -2;
}

/* tsParticles stars */
#tsparticles {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
}

/* Body Styles */
body {
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto,
    "Helvetica Neue", Arial;
  color: #e9f2ff;
  background: radial-gradient(
      ellipse at 20% 10%,
      rgba(155, 123, 255, 0.06) 0%,
      transparent 18%
    ),
    radial-gradient(
      ellipse at 80% 80%,
      rgba(109, 227, 255, 0.04) 0%,
      transparent 18%
    ),
    linear-gradient(180deg, var(--bg-900) 0%, var(--bg-800) 100%);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.5;
}

/* --------- 2. Layout & Reusable Components --------- */
/* Container */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
  position: relative;
  z-index: 2;
}

/* Headings */
h1,
h2,
h3 {
  font-family: "Orbitron", sans-serif;
  font-weight: 700;
}

/* Accent Gradient Text */
.accent-gradient-text {
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Links & Focus States */
a {
  color: inherit;
  text-decoration: none;
}

/* Focus States */
a:focus-visible,
label:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: 4px;
}

/* --------- 3.Header & Navigation --------- */
/* Main Header */
.main-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 10px 0;
  background: rgba(3, 4, 10, 0.5);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition: all 0.3s ease;
}

/* Header Inner */
.main-header .header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Header Brand */
.header-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Logo Icon */
.header-brand .logo-icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(109, 227, 255, 0.1);
}

.header-brand .logo-icon i {
  font-size: 22px;
  color: var(--bg-900);
}

/* Brand Text */
.header-brand .brand-text h1 {
  font-size: 1.2rem;
  letter-spacing: 0.05em;
  margin: 0;
  line-height: 1;
  color: #fff;
}

/* Brand Description */
.header-brand .brand-text p {
  font-size: 0.7rem;
  color: var(--muted);
  margin: 0;
  line-height: 1;
}

/* Main Navigation Links */
.main-nav-links a {
  padding: 8px 16px;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.9rem;
  border-radius: 99px;
  transition: color 0.2s ease, background-color 0.2s ease;
}

/* Hover States */
.main-nav-links a:hover {
  color: #fff;
  background-color: var(--glass);
}

/* --------- 4. Static Hero Section --------- */
/* Hero Background */
.static-hero {
  min-height: 100vh;
  padding-top: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
}

/* Hero Background */
.static-hero .hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: radial-gradient(
      circle at 10% 20%,
      rgba(155, 123, 255, 0.1),
      transparent 20%
    ),
    radial-gradient(
      circle at 85% 80%,
      rgba(109, 227, 255, 0.08),
      transparent 20%
    );
}

/* Hero Inner */
.static-hero .hero-inner {
  z-index: 1;
}

/* Title */
.title {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  letter-spacing: 0.08em;
  margin-bottom: 16px;
  text-shadow: 0 4px 24px rgba(155, 123, 255, 0.1);
}

/* Lead Paragraph */
.lead {
  max-width: 650px;
  margin: 0 auto 32px;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.1rem);
  line-height: 1.6;
}

/* Call to Action Button */
.cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 24px;
  border-radius: 999px;
  background: var(--glass);
  color: var(--accent);
  font-weight: 600;
  border: 1px solid rgba(109, 227, 255, 0.15);
  backdrop-filter: blur(8px);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.cta:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 20px rgba(109, 227, 255, 0.08);
}

/* --------- 5. Interactive Solar System Section --------- */
/* Interactive Hero */
.interactive-hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  overflow: hidden;
  background: radial-gradient(
    ellipse at 50% 50%,
    rgba(155, 123, 255, 0.1) 0%,
    transparent 70%
  );
}

/* Solar System Container */
.solar-system-container {
  position: relative;
  width: 100%;
  height: 1200px;
  display: grid;
  place-items: center;
  transform: scale(0.9);
}

/* Solar System Content */
.solar-system-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

/* Planet */
.planet {
  position: absolute;
  top: 50%;
  left: 100%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background-size: cover;
  background-position: center;
  box-shadow: inset -15px -15px 30px rgba(0, 0, 0, 0.6),
    inset 15px 15px 20px rgba(255, 255, 255, 0.2), 0 0 25px rgba(0, 0, 0, 0.5);
  transition: transform 0.3s ease-in-out, box-shadow 0.3s ease,
    z-index 0.3s ease;
}

.planet:hover {
  transform: scale(1.2);
  z-index: 50;
  box-shadow: 0 0 25px rgba(109, 227, 255, 0.6),
    inset 0 0 10px rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%) rotateZ(0deg);
}

/* Sun */
.sun:hover {
  z-index: 50;
  box-shadow: 0 0 60px 20px rgba(255, 200, 0, 0.8);
}

/* Orbit */
.orbit {
  position: absolute;
  border-radius: 50%;
  border: 1px dashed rgba(255, 255, 255, 0.1);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

/* Rotator */
.rotator {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation-name: rotate;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
}

/* Rotator Animation */
@keyframes rotate {
  from {
    transform: translate(-50%, -50%) rotate(0deg);
  }
  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

/* Sun Styles */
.sun {
  width: var(--sun-size);
  height: var(--sun-size);
  border-radius: 50%;
  background-image: url(Media/sun.jpg);
  background-size: cover;
  box-shadow: 0 0 40px 15px rgba(255, 200, 0, 0.6);
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 9;
  animation: sun-glow 6s ease-in-out infinite;
  cursor: pointer;
}

/* Planet Mercury */
.planet-mercury {
  width: var(--mercury-size);
  height: var(--mercury-size);
  background-image: url(Media/mercury.jpg);
  background-size: cover;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.5), inset 0 0 10px rgba(0, 0, 0, 0.5),
    0 0 8px #b1b1b1;
}

/* Mercury Orbit */
.mercury-orbit {
  height: calc(var(--mercury-orbit) * 2);
  width: calc(var(--mercury-orbit) * 2);
  animation-duration: 7s;
  z-index: 8;
}

/* Mercury Rotator */
.mercury-rotator {
  width: calc(var(--mercury-orbit) * 2);
  height: calc(var(--mercury-orbit) * 2);
  animation-duration: 8.8s;
}

/* Planet Venus */
.planet-venus {
  width: var(--venus-size);
  height: var(--venus-size);
  background-image: url(Media/venus.jpg);
  background-size: cover;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.5), inset 0 0 10px rgba(0, 0, 0, 0.5),
    0 0 12px #f8c25d;
}

/* Venus Orbit */
.venus-orbit {
  height: calc(var(--venus-orbit) * 2);
  width: calc(var(--venus-orbit) * 2);
  animation-duration: 10s;
  z-index: 7;
}

/* Venus Rotator */
.venus-rotator {
  width: calc(var(--venus-orbit) * 2);
  height: calc(var(--venus-orbit) * 2);
  animation-duration: 22.5s;
}

/* Planet Earth */
.planet-earth {
  width: var(--earth-size);
  height: var(--earth-size);
  background-image: url(Media/earth.jpg);
  background-size: cover;
  animation: texture-spin 12s linear infinite;
  transform: translate(-50%, -50%) rotateZ(23.5deg);
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.5), inset 0 0 10px rgba(0, 0, 0, 0.5),
    0 0 15px #6fa1d1;
}

/* Earth Orbit */
.earth-orbit {
  height: calc(var(--earth-orbit) * 2);
  width: calc(var(--earth-orbit) * 2);
  animation-duration: 15s;
  z-index: 6;
}

/* Earth Rotator */
.earth-rotator {
  width: calc(var(--earth-orbit) * 2);
  height: calc(var(--earth-orbit) * 2);
  animation-duration: 36.5s;
}

/* Moon Styles */
.moon {
  position: absolute;
  top: 50%;
  left: 50%;
  width: var(--moon-size);
  height: var(--moon-size);
  background-image: url(Media/moon.jpg);
  background-size: cover;
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.5), inset 0 0 5px rgba(0, 0, 0, 0.5),
    0 0 5px #bbb;
  border-radius: 50%;
  animation: moon-orbit 2.73s linear infinite;
}

/* Moon Orbit Animation */
@keyframes moon-orbit {
  from {
    transform: rotate(0deg) translateX(var(--moon-orbit)) rotate(0deg);
  }
  to {
    transform: rotate(360deg) translateX(var(--moon-orbit)) rotate(-360deg);
  }
}

/* Planet Mars */
.planet-mars {
  width: var(--mars-size);
  height: var(--mars-size);
  background-image: url(Media/mars.jpg);
  background-size: cover;
  animation: texture-spin 15s linear infinite;
  transform: translate(-50%, -50%) rotateZ(25deg);
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.5), inset 0 0 10px rgba(0, 0, 0, 0.5),
    0 0 10px #c1440e;
}

/* Mars Orbit */
.mars-orbit {
  height: calc(var(--mars-orbit) * 2);
  width: calc(var(--mars-orbit) * 2);
  animation-duration: 20s;
  z-index: 5;
}

/* Mars Rotator */
.mars-rotator {
  width: calc(var(--mars-orbit) * 2);
  height: calc(var(--mars-orbit) * 2);
  animation-duration: 68.7s;
}

/* Planet Jupiter */
.planet-jupiter {
  width: var(--jupiter-size);
  height: var(--jupiter-size);
  background-image: url(Media/jupiter.jpg);
  background-size: cover;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.5), inset 0 0 10px rgba(0, 0, 0, 0.5),
    0 0 20px #e0c9a6;
  animation: texture-spin 20s linear infinite;
  transform: translate(-50%, -50%) rotateZ(3deg);
}

/* Jupiter Orbit */
.jupiter-orbit {
  height: calc(var(--jupiter-orbit) * 2);
  width: calc(var(--jupiter-orbit) * 2);
  animation-duration: 30s;
  z-index: 4;
}

/* Jupiter Rotator */
.jupiter-rotator {
  width: calc(var(--jupiter-orbit) * 2);
  height: calc(var(--jupiter-orbit) * 2);
  animation-duration: 120s;
}

/* Planet Saturn */
.planet-saturn {
  width: var(--saturn-size);
  height: var(--saturn-size);
  background-image: url(Media/saturn.jpg);
  background-size: cover;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.5), inset 0 0 10px rgba(0, 0, 0, 0.5),
    0 0 18px #f3e5ab;
  animation: texture-spin 18s linear infinite;
  transform: translate(-50%, -50%) rotateZ(27deg);
}

/* Saturn Orbit */
.saturn-orbit {
  height: calc(var(--saturn-orbit) * 2);
  width: calc(var(--saturn-orbit) * 2);
  animation-duration: 40s;
  z-index: 3;
}

/* Saturn Rotator */
.saturn-rotator {
  width: calc(var(--saturn-orbit) * 2);
  height: calc(var(--saturn-orbit) * 2);
  animation-duration: 290s;
}

/* Saturn Rings */
.rings {
  position: absolute;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transform: rotateX(70deg);
}

.rings::before,
.rings::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  box-sizing: border-box;
}

.rings::before {
  width: 210%;
  height: 210%;
  box-shadow: inset 0 0 0 8px rgba(243, 229, 171, 0.7),
    inset 0 0 0 12px rgba(243, 229, 171, 0.4);
  clip-path: polygon(0 0, 100% 0, 100% 50%, 0 50%);
}

.rings::after {
  width: 210%;
  height: 210%;
  box-shadow: inset 0 0 0 8px rgba(243, 229, 171, 0.9),
    inset 0 0 0 12px rgba(243, 229, 171, 0.6);
  clip-path: polygon(0 50%, 100% 50%, 100% 100%, 0 100%);
}

/* Planet Uranus */
.planet-uranus {
  width: var(--uranus-size);
  height: var(--uranus-size);
  background-image: url(Media/uranus.jpg);
  background-size: cover;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.5), inset 0 0 10px rgba(0, 0, 0, 0.5),
    0 0 15px #a4d8e8;
  animation: texture-spin 22s linear infinite;
  transform: translate(-50%, -50%) rotateZ(98deg);
}

/* Uranus Orbit */
.uranus-orbit {
  height: calc(var(--uranus-orbit) * 2);
  width: calc(var(--uranus-orbit) * 2);
  animation-duration: 50s;
  z-index: 2;
}

/* Uranus Rotator */
.uranus-rotator {
  width: calc(var(--uranus-orbit) * 2);
  height: calc(var(--uranus-orbit) * 2);
  animation-duration: 420s;
}

/* Planet Neptune */
.planet-neptune {
  width: var(--neptune-size);
  height: var(--neptune-size);
  background-image: url(Media/neptune.jpg);
  background-size: cover;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.5), inset 0 0 10px rgba(0, 0, 0, 0.5),
    0 0 15px #5b87e8;
  animation: texture-spin 20s linear infinite;
  transform: translate(-50%, -50%) rotateZ(28deg);
}

/* Neptune Orbit */
.neptune-orbit {
  height: calc(var(--neptune-orbit) * 2);
  width: calc(var(--neptune-orbit) * 2);
  animation-duration: 60s;
  z-index: 1;
}

/* Neptune Rotator */
.neptune-rotator {
  width: calc(var(--neptune-orbit) * 2);
  height: calc(var(--neptune-orbit) * 2);
  animation-duration: 650s;
}

/* Tooltip Styles */
.planet::before {
  content: "";
  position: absolute;
  inset: -10px;
  border-radius: 50%;
}

.planet::after,
.sun::after {
  content: attr(data-info);
  position: absolute;
  top: -36px;
  left: 50%;
  transform: translateX(-50%);
  transform-origin: center;
  background: rgba(0, 0, 0, 0.85);
  color: #fff;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 0.75rem;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  z-index: 200;
  transition: opacity 0.18s ease, transform 0.18s ease;
  will-change: transform;
}

.planet:hover::after,
.sun:hover::after {
  opacity: 1;
  transform: translateX(-50%) translateY(-6px);
}

/* Unrotate Planet Textures */
@keyframes unrotate {
  from {
    transform: translateX(-50%) rotate(0deg);
  }
  to {
    transform: translateX(-50%) rotate(-360deg);
  }
}

/* Mercury Rotator */
.mercury-rotator .planet-mercury::after {
  animation: unrotate 8.8s linear infinite;
}

/* Venus Rotator */
.venus-rotator .planet-venus::after {
  animation: unrotate 22.5s linear infinite;
}

/* Earth Rotator */
.earth-rotator .planet-earth::after {
  animation: unrotate 36.5s linear infinite;
}

/* Mars Rotator */
.mars-rotator .planet-mars::after {
  animation: unrotate 68.7s linear infinite;
}

/* Jupiter Rotator */
.jupiter-rotator .planet-jupiter::after {
  animation: unrotate 120s linear infinite;
}

/* Saturn Rotator */
.saturn-rotator .planet-saturn::after {
  animation: unrotate 290s linear infinite;
}

/* Uranus Rotator */
.uranus-rotator .planet-uranus::after {
  animation: unrotate 420s linear infinite;
}

/* Neptune Rotator */
.neptune-rotator .planet-neptune::after {
  animation: unrotate 650s linear infinite;
}

/* Sun Rotator */
.sun::after {
  animation: none;
}

/* 3D Effect */
.planet,
.sun {
  transform-style: preserve-3d;
}

/* Planet Tooltips */
.planet::after,
.sun::after {
  transform-origin: center;
  pointer-events: none;
}

/* Sun Glow */
@keyframes sun-glow {
  50% {
    box-shadow: 0 0 50px #f97316, 0 0 80px #f59e0b;
  }
}

/* Texture Spin */
@keyframes texture-spin {
  from {
    background-position: 0 0;
  }
  to {
    background-position: 100% 0;
  }
}

/* --------- 6. Modal Styles --------- */
.modal-toggle {
  display: none;
}

/* Modal Container */
.modal-container {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(3, 4, 10, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0s 0.3s linear;
}

/* Modal Backdrop */
.modal-backdrop {
  position: absolute;
  inset: 0;
  cursor: pointer;
}

/* Modal Content */
.modal-content {
  position: relative;
  z-index: 201;
  background: var(--bg-800);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  max-width: 90%;
  width: 1000px;
  max-height: 90vh;
  overflow-y: auto;
  transform: scale(0.95);
  transition: transform 0.3s ease;
}

/* Close Button */
.modal-close-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  background: var(--glass);
  border-radius: 50%;
  color: var(--muted);
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
  z-index: 202;
}

.modal-close-btn:hover {
  background: var(--glass-strong);
  color: #fff;
}

.modal-close-btn i {
  font-size: 20px;
}

.modal-body {
  padding: 32px;
}

/* Modal Triggers */
#sun-toggle:checked ~ #sun-modal,
#mercury-toggle:checked ~ #mercury-modal,
#venus-toggle:checked ~ #venus-modal,
#earth-toggle:checked ~ #earth-modal,
#mars-toggle:checked ~ #mars-modal,
#jupiter-toggle:checked ~ #jupiter-modal,
#saturn-toggle:checked ~ #saturn-modal,
#uranus-toggle:checked ~ #uranus-modal,
#neptune-toggle:checked ~ #neptune-modal {
  opacity: 1;
  visibility: visible;
  transition-delay: 0s;
}

/* Modal Content */
#sun-toggle:checked ~ #sun-modal .modal-content,
#mercury-toggle:checked ~ #mercury-modal .modal-content,
#venus-toggle:checked ~ #venus-modal .modal-content,
#earth-toggle:checked ~ #earth-modal .modal-content,
#mars-toggle:checked ~ #mars-modal .modal-content,
#jupiter-toggle:checked ~ #jupiter-modal .modal-content,
#saturn-toggle:checked ~ #saturn-modal .modal-content,
#uranus-toggle:checked ~ #uranus-modal .modal-content,
#neptune-toggle:checked ~ #neptune-modal .modal-content {
  transform: scale(1);
}

/* Section Inner */
.modal-body .section-inner {
  display: grid;
  gap: 32px;
  align-items: center;
  grid-template-columns: 1fr 460px;
}

/* Section Inner Reversed */
.modal-body .section-inner.reversed {
  grid-template-columns: 460px 1fr;
}

/* Planet Card */
.planet-card {
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  min-height: 380px;
  box-shadow: 0 20px 60px rgba(2, 6, 18, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.03);
  background: var(--glass);
}

/* Pulsing Effect */
@keyframes Pulsing {
  0%,
  100% {
    box-shadow: inset 0 0 10px 2px var(--color1, rgba(109, 227, 255, 0.4)),
      inset 0 0 20px 4px var(--color2, rgba(155, 123, 255, 0.4));
    opacity: 0.7;
  }
  20% {
    box-shadow: inset 0 0 15px 4px var(--color1, rgba(109, 227, 255, 0.8)),
      inset 0 0 30px 6px var(--color2, rgba(155, 123, 255, 0.6));
    opacity: 1;
  }
  40% {
    box-shadow: inset 0 0 8px 2px var(--color1, rgba(109, 227, 255, 0.5)),
      inset 0 0 15px 3px var(--color2, rgba(155, 123, 255, 0.4));
    opacity: 0.6;
  }
  60% {
    box-shadow: inset 0 0 20px 5px var(--color1, rgba(109, 227, 255, 0.9)),
      inset 0 0 40px 8px var(--color2, rgba(155, 123, 255, 0.7));
    opacity: 1;
  }
  80% {
    box-shadow: inset 0 0 12px 3px var(--color1, rgba(109, 227, 255, 0.6)),
      inset 0 0 25px 5px var(--color2, rgba(155, 123, 255, 0.5));
    opacity: 0.8;
  }
}

/* Modal Content */
.modal-content {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
}

/* Pulsing Effect */
.modal-content::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  animation: Pulsing 3s ease-in-out infinite;
  z-index: 1;
}

/* Sun Modal Border */
#sun-modal .modal-content::before {
  --color1: rgba(255, 200, 0, 1);
  --color2: rgba(255, 80, 0, 0.9);
  animation: Pulsing 1.2s steps(4) infinite;
}

/* Mercury Modal Border */
#mercury-modal .modal-content::before {
  --color1: rgba(200, 200, 200, 0.8);
  --color2: rgba(150, 150, 150, 0.6);
}

/* Venus Modal Border */
#venus-modal .modal-content::before {
  --color1: rgba(255, 170, 60, 0.8);
  --color2: rgba(255, 120, 50, 0.6);
}

/* Earth Modal Border */
#earth-modal .modal-content::before {
  --color1: rgba(0, 150, 255, 0.8);
  --color2: rgba(0, 255, 150, 0.6);
}

/* Mars Modal Border */
#mars-modal .modal-content::before {
  --color1: rgba(255, 80, 60, 0.8);
  --color2: rgba(200, 40, 30, 0.6);
}

/* Jupiter Modal Border */
#jupiter-modal .modal-content::before {
  --color1: rgba(255, 220, 180, 0.8);
  --color2: rgba(200, 120, 80, 0.6);
}

/* Saturn Modal Border */
#saturn-modal .modal-content::before {
  --color1: rgba(255, 220, 120, 0.8);
  --color2: rgba(180, 140, 80, 0.6);
}

/* Uranus Modal Border */
#uranus-modal .modal-content::before {
  --color1: rgba(120, 255, 255, 0.8);
  --color2: rgba(80, 200, 200, 0.6);
}

/* Neptune Modal Border */
#neptune-modal .modal-content::before {
  --color1: rgba(100, 140, 255, 0.8);
  --color2: rgba(60, 100, 200, 0.6);
}

/* Planet Image */
.planet-image {
  width: 450px;
  height: 450px;
  background-position: center;
  background-size: cover;
  position: relative;
  z-index: 2;
}

/* Facts Section */
.facts .accent-line {
  width: 64px;
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  margin-bottom: 20px;
}

/* Planet Name */
.planet-name {
  display: flex;
  gap: 16px;
  align-items: center;
  margin-bottom: 24px;
}

.planet-name h2 {
  font-size: 2.5rem;
  color: #fff;
  margin: 0;
}

.planet-name .kv {
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: 4px;
}

/* Planet Symbol */
.planet-name .symbol {
  width: 50px;
  height: 50px;
  flex-shrink: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  display: grid;
  place-items: center;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent-2);
  font-family: "Orbitron", sans-serif;
  box-shadow: inset 0 -6px 18px rgba(0, 0, 0, 0.45);
}

/* Description */
.desc {
  color: var(--muted);
  font-size: 1rem;
  max-width: 50ch;
  margin-bottom: 16px;
}

/* Read More Link */
.read-more-link {
  display: inline-block;
  margin-bottom: 24px;
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--glass);
  color: var(--accent);
  font-weight: 600;
  font-size: 0.9rem;
  border: 1px solid rgba(109, 227, 255, 0.15);
  transition: transform 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
}

.read-more-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 10px rgba(109, 227, 255, 0.08);
  color: #fff;
}

/* Facts Grid */
.fact-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

/* Fact Item */
.fact {
  background: var(--glass);
  padding: 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.02);
}

/* Fact Item Label */
.fact label {
  display: block;
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 4px;
}

/* Fact Item Value */
.fact strong {
  display: block;
  font-size: 1rem;
  color: #fff;
  font-weight: 600;
}

/* --------- 7. Cosmic Discoveries Section --------- */
.discoveries-section {
  padding: 80px 0;
  text-align: center;
}

.section-header {
  max-width: 700px;
  margin: 0 auto 48px;
}

/* Eyebrow */
.section-header .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 99px;
  font-size: 0.8rem;
  font-weight: 600;
  background: var(--glass);
  border: 1px solid rgba(109, 227, 255, 0.1);
  color: var(--accent);
  margin-bottom: 16px;
}

/* Section Title */
.section-header h2 {
  font-size: 3rem;
  margin-bottom: 12px;
}

/* Section Description */
.section-header p {
  color: var(--muted);
  font-size: 1.1rem;
}

/* Discoveries Grid */
.discoveries-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  text-align: left;
}

/* Discovery Card */
.discovery-card {
  background: var(--glass-strong);
  padding: 24px;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.04);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Discovery Card Hover Effect */
.discovery-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(109, 227, 255, 0.05);
}

/* Discovery Card Icon */
.discovery-card .icon {
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  margin-bottom: 20px;
}

.discovery-card .icon i {
  font-size: 24px;
  color: var(--bg-800);
}

.discovery-card h3 {
  font-size: 1.25rem;
  color: #fff;
  margin-bottom: 8px;
}

.discovery-card p {
  color: var(--muted);
  font-size: 0.95rem;
}

/* --------- 8. Footer --------- */
.main-footer {
  padding: 48px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(3, 4, 10, 0.5);
  text-align: center;
}

.main-footer p {
  color: var(--muted);
  font-size: 0.9rem;
}

/* SCROLLBAR STYLING - WebKit (Chrome, Edge, Safari) */
::-webkit-scrollbar {
  width: 12px;
}

/* Scrollbar Track */
::-webkit-scrollbar-track {
  background: var(--bg-900);
}

/* Scrollbar Thumb */
::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border-radius: 6px;
  border: 2px solid var(--bg-900);
  transition: all 0.3s ease-in-out;
  box-shadow: 0 0 6px var(--accent);
}

/* Scrollbar Thumb Hover */
::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  box-shadow: 0 0 12px var(--accent-2), 0 0 18px var(--accent);
}

/* SCROLLBAR STYLING - Firefox */
* {
  scrollbar-width: auto;
  scrollbar-color: var(--accent) var(--bg-900);
}

/* SELECTION STYLING */
::selection {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: var(--bg-100);
}

/* Firefox */
::-moz-selection {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: var(--bg-100);
}

/* ------- 9. Responsive Tweaks ---------- */
/* Mobile Styles */
@media (max-width: 768px) {
  body {
    background-attachment: scroll;
  }

  /* Background Effects */
  #milkyway-bg,
  #vanta-fog,
  #tsparticles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    will-change: transform;
    transform: translateZ(0);
    backface-visibility: hidden;
    -webkit-transform: translateZ(0);
    -webkit-backface-visibility: hidden;
    touch-action: none;
  }

  /* Solar System Container */
  .solar-system-container {
    height: 90vh;
    transform: scale(0.85);
  }

  /* Solar System Content */
  .solar-system-content {
    transform: translate(-50%, -50%) scale(0.9);
  }

  /* Orbit */
  @media (orientation: portrait) {
    .orbit {
      transform: translate(-50%, -50%) scaleX(0.7);
    }
  }

  :root {
    /* Planet Sizes */
    --sun-size: 70px;
    --mercury-size: 14px;
    --venus-size: 18px;
    --earth-size: 20px;
    --mars-size: 16px;
    --jupiter-size: 32px;
    --saturn-size: 30px;
    --uranus-size: 24px;
    --neptune-size: 22px;
    --moon-size: 6px;

    /* Orbit Sizes */
    --mercury-orbit: 80px;
    --venus-orbit: 130px;
    --earth-orbit: 190px;
    --mars-orbit: 260px;
    --jupiter-orbit: 350px;
    --saturn-orbit: 450px;
    --uranus-orbit: 550px;
    --neptune-orbit: 650px;
  }

  .title {
    font-size: 2rem;
  }

  .lead {
    font-size: 0.95rem;
    padding: 0 10px;
  }

  .cta {
    padding: 10px 18px;
    font-size: 0.85rem;
  }

  .discoveries-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .modal-body {
    padding: 24px 16px;
  }

  .modal-body .section-inner {
    grid-template-columns: 1fr !important;
    text-align: center;
    gap: 20px;
  }

  .planet-card {
    min-height: auto;
    background: none;
    border: none;
    box-shadow: none;
  }

  .planet-image {
    width: 100%;
    max-width: 200px;
    height: auto;
    aspect-ratio: 1 / 1;
    margin: 0 auto;
    border-radius: 50%;
  }

  .planet-name h2 {
    font-size: 1.6rem;
  }

  .fact-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .menu-icon {
    display: flex;
  }

  .main-nav-links {
    position: fixed;
    top: 60px;
    right: 0;
    background: rgba(3, 4, 10, 0.9);
    backdrop-filter: blur(12px);
    width: 220px;
    height: calc(100% - 60px);
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 20px;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    z-index: 100;
  }

  /* Menu Toggle */
  .menu-toggle:checked ~ .main-nav-links {
    transform: translateX(0);
  }

  /* Menu Icon */
  .menu-toggle:checked + .menu-icon span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }

  .menu-toggle:checked + .menu-icon span:nth-child(2) {
    opacity: 0;
  }

  .menu-toggle:checked + .menu-icon span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
  }

  .modal-content {
    max-width: 95%;
    width: auto;
  }
}

/* Portrait Mode Hint */
@media (max-width: 768px) and (orientation: portrait) {
  body::before {
    content: "📱 For best experience, rotate your phone to landscape and open fullscreen.";
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 1rem;
    font-weight: 500;
    z-index: 9999;
    padding: 20px;
    animation: fadeOutHint 5s ease-in-out forwards;
    animation-delay: 4s;
  }
}

/* Landscape Mode Hint */
@media (max-width: 768px) and (orientation: landscape) {
  :root {
    --mercury-orbit: 60px;
    --venus-orbit: 90px;
    --earth-orbit: 130px;
    --mars-orbit: 170px;
    --jupiter-orbit: 220px;
    --saturn-orbit: 280px;
    --uranus-orbit: 340px;
    --neptune-orbit: 400px;
  }

  .solar-system-container {
    transform: scale(0.85);
    height: 100vh;
  }

  /* Landscape Mode Hint */
  body::after {
    content: "↩️ Rotate back to portrait for normal view.";
    position: fixed;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    font-size: 0.85rem;
    padding: 6px 12px;
    border-radius: 999px;
    z-index: 9999;
  }
}

/* Keyframes - Fade Out Hint */
@keyframes fadeOutHint {
  0% {
    opacity: 1;
  }
  80% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    visibility: hidden;
  }
}

/* Mobile Styles */
@media (max-width: 480px) {
  .header-brand .brand-text h1 {
    font-size: 1rem;
  }

  .modal-body {
    padding: 20px;
  }

  .planet-image {
    max-width: 200px;
  }

  .cta {
    padding: 10px 18px;
    font-size: 0.85rem;
  }
}

/* ----- Mobile Nav Toggle ----- */
.menu-toggle {
  display: none;
}

.menu-icon {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 26px;
  height: 20px;
  cursor: pointer;
  z-index: 101;
}

.menu-icon span {
  display: block;
  height: 3px;
  background: var(--accent);
  border-radius: 2px;
  transition: 0.3s ease;
}

.menu-toggle {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  clip: rect(0, 0, 0, 0);
  overflow: hidden;
}

.menu-toggle:checked ~ .main-nav-links {
  transform: translateX(0);
}

.menu-toggle:checked + .menu-icon span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.menu-toggle:checked + .menu-icon span:nth-child(2) {
  opacity: 0;
}
.menu-toggle:checked + .menu-icon span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

/* ----- END OF STYLES ----- */
