/**
 * 动画与微动效库 (Animations CSS)
 */

/* 屏幕震颤效果 */
.screen-shake {
  animation: shakeEffect 0.4s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

@keyframes shakeEffect {
  10%, 90% { transform: translate3d(-2px, 0, 0); }
  20%, 80% { transform: translate3d(4px, -2px, 0); }
  30%, 50%, 70% { transform: translate3d(-6px, 3px, 0); }
  40%, 60% { transform: translate3d(6px, -3px, 0); }
}

/* 连击 Combo 徽章脉动 */
.combo-pulse {
  animation: comboPulseAnim 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes comboPulseAnim {
  0% { transform: scale(0.6); opacity: 0.5; }
  60% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(1.0); }
}

/* BOSS 受击晃动与红光闪烁 */
.boss-damaged {
  animation: bossHurt 0.5s ease;
}

@keyframes bossHurt {
  0%, 100% { transform: scale(1); filter: brightness(1); }
  20%, 60% { transform: scale(0.92) translate(-6px, 4px); filter: brightness(2) drop-shadow(0 0 20px #ef4444); }
  40%, 80% { transform: scale(1.05) translate(6px, -4px); filter: brightness(1.5) drop-shadow(0 0 15px #f59e0b); }
}

/* BOSS 攻击前摇 */
.boss-attack {
  animation: bossAttackAnim 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes bossAttackAnim {
  0% { transform: scale(1); }
  40% { transform: scale(1.25) translateY(15px); filter: drop-shadow(0 0 30px #f43f5e); }
  100% { transform: scale(1); }
}

/* 呼吸闪烁 */
.pulse-icon, .warning-flashing-icon {
  display: inline-block;
  animation: warningPulse 1s infinite alternate ease-in-out;
}

@keyframes warningPulse {
  0% { transform: scale(1); opacity: 0.7; }
  100% { transform: scale(1.2); opacity: 1; filter: drop-shadow(0 0 8px #f43f5e); }
}

/* 渐入渐出 */
.fade-in {
  animation: fadeIn 0.3s ease-out forwards;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
