/* Planet detail page entry animations */

/* Keyframes */
@keyframes planet-enter {
  0% {
    transform: scale(0);
    opacity: 0;
  }
  60% {
    transform: scale(1.1);
    opacity: 1;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes planet-glow-pulse {
  0% {
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.1));
  }
  50% {
    filter: drop-shadow(0 0 25px rgba(255, 255, 255, 0.35));
  }
  100% {
    filter: drop-shadow(0 0 0px rgba(255, 255, 255, 0));
  }
}

@keyframes fade-slide-up {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fade-in {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

/* Planet illustration - scale in with glow pulse */
.planet-hero .planet-illustration:not(.planet-illustration-wrapper .planet-illustration),
.planet-hero .planet-illustration-wrapper {
  animation: planet-enter 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) both,
             planet-glow-pulse 1.2s ease-in-out 0.6s both;
}

/* Planet name and tagline */
.planet-hero .planet-name {
  opacity: 0;
  animation: fade-slide-up 0.5s ease-out 0.5s both;
}

.planet-hero .planet-tagline {
  opacity: 0;
  animation: fade-slide-up 0.5s ease-out 0.65s both;
}

/* Stats grid - staggered entry */
.stats-grid .stat-card {
  opacity: 0;
  animation: fade-slide-up 0.4s ease-out both;
}

.stats-grid .stat-card:nth-child(1) { animation-delay: 0.8s; }
.stats-grid .stat-card:nth-child(2) { animation-delay: 0.9s; }
.stats-grid .stat-card:nth-child(3) { animation-delay: 1.0s; }
.stats-grid .stat-card:nth-child(4) { animation-delay: 1.1s; }
.stats-grid .stat-card:nth-child(5) { animation-delay: 1.2s; }
.stats-grid .stat-card:nth-child(6) { animation-delay: 1.3s; }

/* Fun facts - fade in after stats */
.facts-section h2 {
  opacity: 0;
  animation: fade-in 0.4s ease-out 1.5s both;
}

.facts-section .fact-card:nth-of-type(1) {
  opacity: 0;
  animation: fade-slide-up 0.4s ease-out 1.6s both;
}

.facts-section .fact-card:nth-of-type(2) {
  opacity: 0;
  animation: fade-slide-up 0.4s ease-out 1.75s both;
}

.facts-section .fact-card:nth-of-type(3) {
  opacity: 0;
  animation: fade-slide-up 0.4s ease-out 1.9s both;
}

/* Back button */
.planet-detail > .back-btn {
  opacity: 0;
  animation: fade-in 0.4s ease-out 2.1s both;
}

/* Reduced motion: show everything immediately */
@media (prefers-reduced-motion: reduce) {
  .planet-hero .planet-illustration,
  .planet-hero .planet-illustration-wrapper,
  .planet-hero .planet-name,
  .planet-hero .planet-tagline,
  .stats-grid .stat-card,
  .facts-section h2,
  .facts-section .fact-card,
  .planet-detail > .back-btn {
    opacity: 1 !important;
    animation: none !important;
    transform: none !important;
  }
}
