/* Animation Keyframes */

@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

/* Collectible Collection Animations */
@keyframes collectParticle {
  0% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  50% {
    opacity: 0.8;
    transform: translateY(-20px) scale(1.2);
  }
  100% {
    opacity: 0;
    transform: translateY(-40px) scale(0.5);
  }
}

@keyframes damageParticle {
  0% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  50% {
    opacity: 0.8;
    transform: translateY(-15px) scale(1.1);
  }
  100% {
    opacity: 0;
    transform: translateY(-30px) scale(0.8);
  }
}

@keyframes scorePopup {
  0% {
    opacity: 0;
    transform: translateY(0) scale(0.5);
  }
  50% {
    opacity: 1;
    transform: translateY(-30px) scale(1.2);
  }
  100% {
    opacity: 0;
    transform: translateY(-60px) scale(1);
  }
}

@keyframes damagePopup {
  0% {
    opacity: 0;
    transform: translateY(0) scale(0.5);
  }
  50% {
    opacity: 1;
    transform: translateY(-20px) scale(1.1);
  }
  100% {
    opacity: 0;
    transform: translateY(-40px) scale(1);
  }
}

@keyframes playerCollect {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.2);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes playerDamage {
  0% {
    transform: scale(1) rotate(0deg);
  }
  25% {
    transform: scale(1.1) rotate(-5deg);
  }
  50% {
    transform: scale(1.1) rotate(5deg);
  }
  75% {
    transform: scale(1.1) rotate(-5deg);
  }
  100% {
    transform: scale(1) rotate(0deg);
  }
}

@keyframes collectGlow {
  0% {
    filter: brightness(1) drop-shadow(0 0 5px rgba(0, 255, 0, 0.5));
  }
  50% {
    filter: brightness(1.3) drop-shadow(0 0 15px rgba(0, 255, 0, 0.8));
  }
  100% {
    filter: brightness(1) drop-shadow(0 0 5px rgba(0, 255, 0, 0.5));
  }
}

@keyframes damageGlow {
  0% {
    filter: brightness(1) drop-shadow(0 0 5px rgba(255, 0, 0, 0.5));
  }
  50% {
    filter: brightness(1.3) drop-shadow(0 0 15px rgba(255, 0, 0, 0.8));
  }
  100% {
    filter: brightness(1) drop-shadow(0 0 5px rgba(255, 0, 0, 0.5));
  }
}

/* Animation Classes */
.collect-particle {
  position: absolute;
  width: 20px;
  height: 20px;
  background: radial-gradient(circle, #00ff00, #008000);
  border-radius: 50%;
  pointer-events: none;
  z-index: 1000;
  animation: collectParticle 0.8s ease-out forwards;
}

.damage-particle {
  position: absolute;
  width: 20px;
  height: 20px;
  background: radial-gradient(circle, #ff0000, #800000);
  border-radius: 50%;
  pointer-events: none;
  z-index: 1000;
  animation: damageParticle 0.6s ease-out forwards;
}

.score-popup {
  position: absolute;
  color: #00ff00;
  font-family: "Ranchers", sans-serif;
  font-weight: bold;
  font-size: 24px;
  pointer-events: none;
  z-index: 1000;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
  animation: scorePopup 1s ease-out forwards;
}

.damage-popup {
  position: absolute;
  color: #ff0000;
  font-family: "Ranchers", sans-serif;
  font-weight: bold;
  font-size: 20px;
  pointer-events: none;
  z-index: 1000;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
  animation: damagePopup 0.8s ease-out forwards;
}

.player-collecting {
  animation: playerCollect 0.3s ease-out;
}

.player-damaged {
  animation: playerDamage 0.4s ease-out;
}

.collectible-glow {
  animation: collectGlow 0.5s ease-out;
}

.obstacle-glow {
  animation: damageGlow 0.6s ease-in-out;
} 