/* Falling Stars Effect */

.stars-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9998;
  overflow: hidden;
}

/* Falling star */
.falling-star {
  position: absolute;
  color: #ffd700;
  text-shadow:
    0 0 10px #ffd700,
    0 0 20px #ffec8b,
    0 0 30px #fff8dc,
    0 0 40px #ffd700;
  pointer-events: none;
  filter: drop-shadow(0 0 8px rgba(255, 215, 0, 0.8));
  animation: star-twinkle 0.3s ease-in-out infinite alternate;
}

@keyframes star-twinkle {
  0% {
    filter: drop-shadow(0 0 8px rgba(255, 215, 0, 0.8)) brightness(1);
  }
  100% {
    filter: drop-shadow(0 0 12px rgba(255, 215, 0, 1)) brightness(1.2);
  }
}

/* Impact effect */
.falling-star.star-impact {
  animation: star-burst 0.5s ease-out forwards;
}

@keyframes star-burst {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.5);
    opacity: 0.8;
    text-shadow:
      0 0 20px #ffd700,
      0 0 40px #ffec8b,
      0 0 60px #fff8dc;
  }
  100% {
    transform: scale(0.5);
    opacity: 0;
  }
}

/* Glittering letters */
.star-letter {
  display: inline;
  animation: letter-glitter 0.6s ease-in-out infinite alternate;
  animation-fill-mode: both;
}

@keyframes letter-glitter {
  0% {
    color: inherit;
    text-shadow: none;
  }
  25% {
    color: var(--glitter-color, #ffd700);
    text-shadow:
      0 0 5px var(--glitter-color, #ffd700),
      0 0 10px var(--glitter-color, #ffd700);
  }
  50% {
    color: inherit;
    text-shadow: none;
  }
  75% {
    color: var(--glitter-color, #ff6b6b);
    text-shadow:
      0 0 8px var(--glitter-color, #ff6b6b),
      0 0 15px var(--glitter-color, #ff6b6b);
  }
  100% {
    color: inherit;
    text-shadow: none;
  }
}

/* Rainbow shimmer effect for variety */
.star-letter:nth-child(3n) {
  animation-duration: 0.5s;
}

.star-letter:nth-child(3n+1) {
  animation-duration: 0.7s;
}

.star-letter:nth-child(3n+2) {
  animation-duration: 0.4s;
}

/* Sparkle particles around glittering text */
.star-glitter-active {
  position: relative;
}

.star-glitter-active::before,
.star-glitter-active::after {
  content: '✦';
  position: absolute;
  font-size: 10px;
  animation: sparkle-float 1s ease-in-out infinite;
  pointer-events: none;
  opacity: 0.8;
}

.star-glitter-active::before {
  top: -5px;
  left: 0;
  color: #ffd700;
  animation-delay: 0s;
}

.star-glitter-active::after {
  bottom: -5px;
  right: 0;
  color: #ff6b6b;
  animation-delay: 0.5s;
}

@keyframes sparkle-float {
  0%, 100% {
    transform: translateY(0) scale(1);
    opacity: 0.3;
  }
  50% {
    transform: translateY(-3px) scale(1.2);
    opacity: 1;
  }
}

/* Mobile adjustments */
@media (max-width: 768px) {
  .falling-star {
    font-size: 14px !important;
  }
}
