/* ============================================================
   ENTRY ANIMATION — Star Burst + Sparkles
   ============================================================ */

#wanderlust-entry {
  position: fixed;
  inset: 0;
  z-index: 999999;
  background: radial-gradient(ellipse at center, #1a3a52 0%, #0a1929 60%, #050f18 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: opacity 0.8s ease, visibility 0.8s ease;
  opacity: 1;
  visibility: visible;
}

#wanderlust-entry.hide {
  opacity: 0;
  visibility: hidden;
}

#wanderlust-entry.remove {
  display: none;
}

/* Center logo/text */
.entry-center {
  position: relative;
  z-index: 5;
  text-align: center;
  color: #ffffff;
  transform: scale(0.9);
  opacity: 0;
  animation: entryCenterIn 0.9s cubic-bezier(0.25, 0.8, 0.25, 1) 0.6s forwards;
}

.entry-center .entry-logo {
  font-size: clamp(2rem, 6vw, 4rem);
  font-weight: 800;
  letter-spacing: -1.5px;
  background: linear-gradient(135deg, #ff5a5f 0%, #ffb703 50%, #ff5a5f 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: entryShimmer 2s linear infinite;
  margin-bottom: 12px;
  line-height: 1.1;
}

.entry-center .entry-tagline {
  font-size: clamp(0.8rem, 1.5vw, 1rem);
  letter-spacing: 4px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.7);
  font-weight: 500;
  opacity: 0;
  animation: entryTaglineIn 0.8s ease 1.2s forwards;
}

@keyframes entryCenterIn {
  to { transform: scale(1); opacity: 1; }
}
@keyframes entryTaglineIn {
  to { opacity: 1; }
}
@keyframes entryShimmer {
  to { background-position: 200% center; }
}

/* Stars container */
.entry-stars {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 3;
}

/* Individual star */
.entry-star {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 4px;
  height: 4px;
  background: #ffffff;
  border-radius: 50%;
  box-shadow:
    0 0 6px 1px rgba(255, 255, 255, 0.9),
    0 0 12px 2px rgba(255, 183, 3, 0.6);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0);
  will-change: transform, opacity;
}

.entry-star.gold {
  background: #ffb703;
  box-shadow:
    0 0 8px 2px rgba(255, 183, 3, 0.9),
    0 0 16px 3px rgba(255, 90, 95, 0.5);
}

.entry-star.pink {
  background: #ff5a5f;
  box-shadow:
    0 0 8px 2px rgba(255, 90, 95, 0.9),
    0 0 16px 4px rgba(255, 90, 95, 0.4);
}

/* Small sparkle twinkle */
.entry-sparkle {
  position: absolute;
  width: 2px;
  height: 2px;
  background: #ffffff;
  border-radius: 50%;
  opacity: 0;
  animation: sparkleTwinkle 1.5s ease-in-out infinite;
}
.entry-sparkle.gold { background: #ffb703; }
.entry-sparkle.pink { background: #ff5a5f; }

@keyframes sparkleTwinkle {
  0%, 100% { opacity: 0; transform: scale(0.5); }
  50%      { opacity: 1; transform: scale(1.3); }
}

/* Expanding ring burst */
.entry-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  border: 2px solid rgba(255, 183, 3, 0.7);
  border-radius: 50%;
  transform: translate(-50%, -50%) scale(0);
  opacity: 1;
  pointer-events: none;
  will-change: transform, opacity;
  box-shadow: 0 0 40px rgba(255, 183, 3, 0.4);
}

/* Burst star animation (radiating outward) */
@keyframes starBurst {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0);
  }
  15% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.2);
  }
  70% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate(calc(-50% + var(--tx)), calc(-50% + var(--ty))) scale(0.6);
  }
}

/* Expanding ring */
@keyframes ringExpand {
  0% {
    transform: translate(-50%, -50%) scale(0);
    opacity: 1;
    border-width: 4px;
  }
  100% {
    transform: translate(-50%, -50%) scale(8);
    opacity: 0;
    border-width: 1px;
  }
}

/* Prevent page scroll while animation plays */
body.entry-playing {
  overflow: hidden !important;
}

/* Mobile adjustments */
@media (max-width: 480px) {
  .entry-center .entry-logo { font-size: 2.2rem; letter-spacing: -0.5px; }
  .entry-center .entry-tagline { font-size: 0.7rem; letter-spacing: 3px; }
}

/* Reduced motion — skip most animations */
@media (prefers-reduced-motion: reduce) {
  .entry-star,
  .entry-sparkle,
  .entry-ring { display: none !important; }
  .entry-center { animation: entryCenterIn 0.3s ease forwards; }
  .entry-center .entry-tagline { animation: entryTaglineIn 0.3s ease 0.2s forwards; }
}