/* Animations for ClueChain game */

/* Fireworks animation for game over screen */
.firework {
  position: absolute;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  box-shadow: 0 0 10px 1px rgba(255, 255, 255, 0.9);
  background-color: #f44336;
  opacity: 0;
  transform-origin: center;
  z-index: 9999;
  pointer-events: none;
  animation: firework-burst 1s ease-out forwards;
}

@keyframes firework-burst {
  0% {
    transform: scale(0.1);
    opacity: 0;
  }
  40% {
    opacity: 1;
  }
  70% {
    transform: scale(1);
    box-shadow: 0 0 20px 10px rgba(255, 200, 0, 0.7),
                0 0 40px 15px rgba(255, 0, 100, 0.5),
                0 0 60px 20px rgba(50, 200, 255, 0.3);
  }
  100% {
    transform: scale(1.2);
    opacity: 0;
  }
}

/* Celebration confetti */
.confetti {
  position: absolute;
  width: 10px;
  height: 10px;
  opacity: 0;
  pointer-events: none;
  z-index: 9998;
  animation: confetti-fall 4s ease-in-out forwards;
}

@keyframes confetti-fall {
  0% {
    opacity: 1;
    transform: translateY(-100px) rotate(0deg);
  }
  100% {
    opacity: 0;
    transform: translateY(600px) rotate(720deg);
  }
}

/* Correct word animation */
@keyframes correct-word-pulse {
  0% {
    transform: scale(1);
    background-color: rgba(76, 175, 80, 0.3);
  }
  50% {
    transform: scale(1.05);
    background-color: rgba(76, 175, 80, 0.7);
    box-shadow: 0 0 15px rgba(76, 175, 80, 0.9);
  }
  100% {
    transform: scale(1);
    background-color: rgba(76, 175, 80, 0.3);
  }
}

.word-correct-animation {
  animation: correct-word-pulse 0.6s ease-in-out;
}

/* Sparkle effect for correct guesses */
.sparkle {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background-color: #ffeb3b;
  opacity: 0;
  pointer-events: none;
  z-index: 9997;
  animation: sparkle 0.8s ease-out forwards;
}

@keyframes sparkle {
  0% {
    transform: scale(0) rotate(0deg);
    opacity: 0;
  }
  50% {
    opacity: 1;
  }
  100% {
    transform: scale(1.5) rotate(90deg);
    opacity: 0;
  }
}

/* Game over celebration container */
.celebration-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9000;
  overflow: hidden;
}