/* ===========================================
   Animation Styles - Keyframes & Animation Classes
   =========================================== */

/* Keyframes */
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

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

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

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

@keyframes floatUp {
  0% {
    opacity: 1;
    transform: translate(0, 0) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(var(--random-x), -80px) scale(0.5);
  }
}

@keyframes cureBlink {
  0%, 100% {
    box-shadow: 0 0 0 3px rgba(255, 193, 7, 0.8), 0 0 15px rgba(255, 193, 7, 0.6);
  }
  50% {
    box-shadow: 0 0 0 5px rgba(255, 235, 59, 0.9), 0 0 25px rgba(255, 235, 59, 0.8);
  }
}

@keyframes spawnBlink {
  0% {
    filter: drop-shadow(0 0 0 transparent);
  }
  30% {
    filter: drop-shadow(0 0 20px rgba(255, 255, 0, 1)) drop-shadow(0 0 30px rgba(255, 230, 0, 0.9));
  }
  100% {
    filter: drop-shadow(0 0 0 transparent);
  }
}

@keyframes countdownPop {
  0% {
    transform: scale(2);
    opacity: 0;
  }
  30% {
    transform: scale(1);
    opacity: 1;
  }
  80% {
    transform: scale(1);
    opacity: 1;
  }
  100% {
    transform: scale(0.8);
    opacity: 0;
  }
}

/* Animation Classes */
.anim-pop {
  animation: pop 0.3s ease-in-out;
}

.anim-shake {
  animation: shake 0.3s ease-in-out;
}

.anim-heartbeat {
  animation: heartbeat 0.5s ease-in-out;
}

.spawn-blink {
  animation: spawnBlink 1s ease-out;
}

/* Timer Warning */
.timer-warning {
  color: #dc3545 !important;
  animation: pulse 1s infinite;
}

/* Floating Heart Effect */
.floating-heart {
  position: absolute;
  font-size: 1.5rem;
  font-family: 'Apple Color Emoji', 'Segoe UI Emoji', 'Noto Color Emoji', 'Android Emoji', sans-serif;
  pointer-events: none;
  z-index: 100;
  animation: floatUp 1s ease-out forwards;
  --random-x: 0px;
}

/* Update Notice Animation */
@keyframes noticeBlink {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.6;
    transform: scale(1.02);
  }
}

.update-notice {
  text-align: center;
}

.update-notice-text {
  display: inline-block;
  font-size: 0.9rem;
  font-weight: bold;
  color: #fff;
  background: linear-gradient(135deg, #EF5350, #C62828);
  padding: 6px 16px;
  border: none;
  border-radius: 20px;
  box-shadow: 0 2px 8px rgba(198, 40, 40, 0.4);
  animation: noticeBlink 1.2s ease-in-out infinite;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.update-notice-text:hover {
  transform: scale(1.05);
}

.update-notice-text:active {
  transform: scale(0.98);
}

/* Update Modal (Preview / Info) */
.update-content {
  padding: 0.5rem;
}

.update-header {
  text-align: center;
  margin-bottom: 1rem;
}

.update-name {
  display: inline-block;
  font-size: 1.2rem;
  font-weight: bold;
  color: white;
  background: linear-gradient(135deg, #EF5350 0%, #E53935 50%, #C62828 100%);
  padding: 8px 24px;
  border-radius: 50px;
  border: 3px solid #FFCDD2;
  box-shadow: 0 3px 10px rgba(198, 40, 40, 0.4);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.update-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem 0;
}

.update-item {
  padding: 8px 12px;
  margin-bottom: 8px;
  background: #f8f9fa;
  border-radius: 8px;
  border-left: 4px solid #E53935;
  font-size: 0.95rem;
}

.update-item::before {
  content: "✨ ";
}

.update-note {
  text-align: center;
  font-size: 0.8rem;
  color: #888;
  margin: 0;
}

/* Bonus Score Float Animation */
@keyframes bonusFloat {
  0% {
    opacity: 0;
    transform: translateY(0) scale(0.8);
  }
  10% {
    opacity: 1;
    transform: translateY(-5px) scale(1.2);
  }
  60% {
    opacity: 1;
    transform: translateY(-30px) scale(1.1);
  }
  100% {
    opacity: 0;
    transform: translateY(-50px) scale(0.8);
  }
}

.bonus-score-popup {
  position: absolute;
  font-size: 2.2rem;
  font-weight: bold;
  color: #FF5500;
  -webkit-text-stroke: 1px #FF5500;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
  pointer-events: none;
  z-index: 1000;
  animation: bonusFloat 1.2s ease-out forwards;
  white-space: nowrap;
}
