/* animations.css — حركات الواجهة (نعومة + حياة). */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes wobble { 0%,100% { transform: rotate(-8deg); } 50% { transform: rotate(8deg); } }

@keyframes bannerPop {
  0% { opacity: 0; transform: scale(.4); }
  25% { opacity: 1; transform: scale(1.15); }
  70% { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(1); }
}
@keyframes badgeBump {
  0% { transform: scale(1); } 40% { transform: scale(1.25); } 100% { transform: scale(1); }
}
/* نبض/رجفة رقم النسبة عند الخطر (≥115%) */
@keyframes pctDanger {
  0%,100% { transform: translateX(0) scale(1); }
  25% { transform: translateX(-1.5px) scale(1.08); }
  75% { transform: translateX(1.5px) scale(1.08); }
}
/* عدّ تنازلي قوي: يدخل كبيراً ويستقرّ */
@keyframes countPop {
  0%   { opacity: 0; transform: scale(1.8); }
  18%  { opacity: 1; transform: scale(.92); }
  40%  { transform: scale(1.04); }
  100% { opacity: 0; transform: scale(1); }
}
/* «قاتل!» — انطلاقة نابضة */
@keyframes fightPop {
  0%   { opacity: 0; transform: scale(.4) rotate(-6deg); }
  20%  { opacity: 1; transform: scale(1.3) rotate(3deg); }
  45%  { transform: scale(.98) rotate(0); }
  70%  { transform: scale(1.08); }
  100% { opacity: 0; transform: scale(1.05); }
}
/* «طاح!» — قفزة كبيرة بدوران وارتداد */
@keyframes koPop {
  0%   { opacity: 0; transform: scale(.3) rotate(-14deg); }
  18%  { opacity: 1; transform: scale(1.4) rotate(7deg); }
  42%  { transform: scale(1.0) rotate(-3deg); }
  68%  { opacity: 1; transform: scale(1.14) rotate(0); }
  100% { opacity: 0; transform: scale(1.1); }
}
@keyframes dropPulse {
  0% { transform: translateY(-6px); opacity: 0; }
  20% { opacity: 1; } 100% { transform: translateY(0); opacity: .9; }
}
@keyframes winnerPop {
  0% { transform: scale(0) rotate(-20deg); }
  60% { transform: scale(1.18) rotate(6deg); }
  100% { transform: scale(1) rotate(0); }
}
@keyframes crownDrop {
  0% { transform: translateX(-50%) translateY(-40px) rotate(-20deg); opacity: 0; }
  70% { transform: translateX(-50%) translateY(4px) rotate(8deg); opacity: 1; }
  100% { transform: translateX(-50%) translateY(0) rotate(0); opacity: 1; }
}
@keyframes confettiFall {
  0% { transform: translateY(-20px) rotate(0); opacity: 1; }
  100% { transform: translateY(420px) rotate(540deg); opacity: 0; }
}

/* قطع الكونفيتي */
.confetti { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.confetti i {
  position: absolute; top: -10px; width: 10px; height: 14px; border-radius: 2px;
  animation: confettiFall linear forwards;
}

/* نبض زر القدرة الجاهزة */
@keyframes abilityReady {
  0%,100% { box-shadow: var(--shadow-pop), 0 0 0 0 rgba(176,140,255,.6); }
  50% { box-shadow: var(--shadow-pop), 0 0 0 10px rgba(176,140,255,0); }
}
.act-btn.ability.has { animation: abilityReady 1.4s ease-in-out infinite; }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; animation-iteration-count: 1 !important; }
}
