:root {
  --space-deep: #070b14;
  --space-mid: #0f1c33;
  --space-glow: #1d355e;
  --nebula-cyan: #00b4d8;
  --nebula-coral: #ff7f50;
  --accent-blue: #48cae4;
  --accent-gold: #ffd166;
  --accent-orange: #f77f00;
  --text-primary: #ecf4ff;
  --text-muted: #9db1ce;
  --star: #ffffff;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

body {
  font-family: "Space Mono", monospace;
  color: var(--text-primary);
  background: radial-gradient(circle at 20% 15%, rgba(72, 202, 228, 0.17) 0, transparent 38%),
    radial-gradient(circle at 85% 80%, rgba(247, 127, 0, 0.16) 0, transparent 40%),
    linear-gradient(180deg, var(--space-glow) 0%, var(--space-mid) 52%, var(--space-deep) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

#starfield {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

.star {
  position: absolute;
  border-radius: 50%;
  background: var(--star);
  animation: twinkle var(--duration) ease-in-out infinite;
  animation-delay: var(--delay);
}

@keyframes twinkle {
  0%,
  100% {
    opacity: var(--base-opacity);
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.2);
  }
}

.nebula {
  position: fixed;
  border-radius: 50%;
  filter: blur(110px);
  opacity: 0.35;
  pointer-events: none;
  z-index: 0;
}

.nebula-1 {
  width: 580px;
  height: 580px;
  top: -220px;
  left: -120px;
  background: radial-gradient(circle, var(--nebula-cyan), transparent 70%);
  animation: nebula-float 18s ease-in-out infinite alternate;
}

.nebula-2 {
  width: 620px;
  height: 620px;
  bottom: -260px;
  right: -120px;
  background: radial-gradient(circle, var(--nebula-coral), transparent 70%);
  animation: nebula-float 22s ease-in-out infinite alternate-reverse;
}

@keyframes nebula-float {
  from {
    transform: translate(0, 0) scale(1);
  }
  to {
    transform: translate(26px, 20px) scale(1.08);
  }
}

.hero {
  width: 100%;
  max-width: 980px;
  height: 100%;
  max-height: 100vh;
  padding: 2.25rem 1.25rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 5;
}

.date-container {
  text-align: center;
  margin-bottom: 1.5rem;
}

.date {
  display: block;
  font-family: "Orbitron", sans-serif;
  font-size: clamp(2.1rem, 10vw, 7.5rem);
  font-weight: 900;
  letter-spacing: 0.14em;
  line-height: 1;
  background: linear-gradient(120deg, var(--accent-blue), var(--accent-gold), var(--accent-orange));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 25px rgba(72, 202, 228, 0.32));
  animation: date-glow 3s ease-in-out infinite alternate;
}

.subtitle {
  margin-top: 0.9rem;
  color: var(--text-muted);
  letter-spacing: 0.22em;
  font-size: clamp(0.7rem, 2vw, 0.95rem);
  text-transform: uppercase;
  opacity: 0;
  animation: reveal 0.9s ease-out 0.35s forwards;
}

@keyframes date-glow {
  from {
    filter: drop-shadow(0 0 20px rgba(72, 202, 228, 0.3));
  }
  to {
    filter: drop-shadow(0 0 42px rgba(247, 127, 0, 0.4));
  }
}

@keyframes reveal {
  to {
    opacity: 1;
  }
}

.planets-orbit {
  position: relative;
  width: min(90vw, 760px);
  height: 300px;
  display: flex;
  align-items: center;
  justify-content: space-around;
}

.planet {
  border: none;
  background: none;
  position: relative;
  display: block;
  cursor: pointer;
  z-index: 20;
  animation: float 6s ease-in-out infinite;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.planet:hover,
.planet:focus-visible {
  transform: scale(1.24) translateY(-8px);
}

.planet:focus-visible {
  outline: 2px solid rgba(255, 209, 102, 0.85);
  outline-offset: 4px;
  border-radius: 999px;
}

.planet-body,
.planet-shadow,
.atmosphere {
  position: absolute;
  inset: 0;
  border-radius: 50%;
}

.planet-body {
  display: block;
}

.planet-shadow {
  top: 60%;
  filter: blur(8px);
  opacity: 0.55;
}

.orbit {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(236, 244, 255, 0.12);
  border-radius: 50%;
  pointer-events: none;
  animation: orbit-glow 4.8s ease-in-out infinite alternate;
}

.orbit-monitor {
  width: 124px;
  height: 124px;
}

.planet.monitor {
  width: 38px;
  height: 38px;
  animation-delay: -0.5s;
}

.planet.monitor .planet-body {
  background: radial-gradient(circle at 35% 30%, #d8e4f7, #95afcf 55%, #617694);
  box-shadow: inset -5px -4px 11px rgba(0, 0, 0, 0.42), 0 0 24px rgba(216, 228, 247, 0.35);
}

.planet.monitor .planet-shadow {
  background: rgba(0, 0, 0, 0.62);
  transform: scale(0.9, 0.36);
}

.orbit-files {
  width: 210px;
  height: 210px;
}

.planet.files {
  width: 52px;
  height: 52px;
  animation-delay: -1.8s;
}

.planet.files .planet-body {
  background: radial-gradient(circle at 35% 30%, #f7ebcf, #f3d389 55%, #d8a633);
  box-shadow: inset -6px -6px 14px rgba(0, 0, 0, 0.34), 0 0 30px rgba(255, 209, 102, 0.42);
}

.planet.files .planet-shadow {
  background: rgba(0, 0, 0, 0.58);
  transform: scale(0.88, 0.34);
}

.orbit-opencode {
  width: 314px;
  height: 314px;
}

.planet.opencode {
  width: 44px;
  height: 44px;
  animation-delay: -3s;
}

.planet.opencode .planet-body {
  background: radial-gradient(circle at 35% 30%, #98d7ef, #3ca5c8 55%, #2c6f8d);
  box-shadow: inset -6px -5px 14px rgba(0, 0, 0, 0.4), 0 0 28px rgba(72, 202, 228, 0.48);
}

.planet.opencode .planet-shadow {
  background: rgba(0, 0, 0, 0.62);
  transform: scale(0.9, 0.32);
}

.planet.opencode .atmosphere {
  inset: -4px;
  background: radial-gradient(circle, transparent 58%, rgba(72, 202, 228, 0.34));
  animation: atmosphere-pulse 3s ease-in-out infinite;
}

@keyframes atmosphere-pulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.55;
  }
  50% {
    transform: scale(1.08);
    opacity: 1;
  }
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-13px);
  }
}

@keyframes orbit-glow {
  from {
    border-color: rgba(236, 244, 255, 0.07);
  }
  to {
    border-color: rgba(236, 244, 255, 0.2);
  }
}

.instructions {
  margin-top: 1rem;
  opacity: 0;
  animation: reveal 0.9s ease-out 0.7s forwards;
}

.instruction-text {
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.planet-info {
  position: fixed;
  left: 50%;
  bottom: 1.8rem;
  transform: translateX(-50%);
  width: min(90vw, 420px);
  padding: 1rem 1.15rem;
  border-radius: 14px;
  border: 1px solid rgba(236, 244, 255, 0.2);
  background: rgba(7, 11, 20, 0.74);
  backdrop-filter: blur(18px);
  z-index: 50;
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.planet-info.hidden {
  opacity: 0;
  transform: translateX(-50%) translateY(18px);
  pointer-events: none;
}

.planet-name {
  font-family: "Orbitron", sans-serif;
  color: var(--accent-blue);
  font-size: 1.12rem;
  margin-bottom: 0.25rem;
}

.planet-fact {
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.45;
}

.planet-link {
  margin-top: 0.75rem;
  display: inline-block;
  text-decoration: none;
  color: #0a203b;
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent-blue), #8be1f2);
  padding: 0.45rem 0.8rem;
  border-radius: 10px;
}

.planet-link:hover,
.planet-link:focus-visible {
  filter: brightness(1.08);
}

@media (max-width: 650px) {
  .hero {
    padding-top: 1rem;
    justify-content: flex-start;
  }

  .planets-orbit {
    height: 240px;
    margin-top: 0.25rem;
    gap: 0.7rem;
  }

  .orbit-monitor {
    width: 94px;
    height: 94px;
  }

  .orbit-files {
    width: 162px;
    height: 162px;
  }

  .orbit-opencode {
    width: 226px;
    height: 226px;
  }

  .planet.monitor {
    width: 30px;
    height: 30px;
  }

  .planet.files {
    width: 42px;
    height: 42px;
  }

  .planet.opencode {
    width: 36px;
    height: 36px;
  }

  .instructions {
    margin-top: 0.25rem;
  }

  .planet-info {
    bottom: 1rem;
  }
}
