/* ═══════════════════════════════════════════════════════════════════════════
   ANIMATIONS MODULE
   Additional animations for enhanced UI/UX
   ═══════════════════════════════════════════════════════════════════════════ */

/* ─── 1. Card Hover Lift ─────────────────────────────────────────────────── */
.player-card {
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1),
              border-color 0.2s ease,
              box-shadow 0.2s ease;
}

.player-card:hover {
  transform: translateY(-3px) scale(1.01);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

/* ─── 2. Player Death Transition ──────────────────────────────────────── */
.player-card.is-dead {
  transition: opacity 0.5s ease,
              filter 0.5s ease,
              transform 0.4s ease;
  transform: scale(0.97);
  filter: grayscale(0.7);
}

/* ─── 3. Alive Counter Breathe ─────────────────────────────────────────── */
@keyframes breathePulse {
  0%, 100% { opacity: 0.65; }
  50% { opacity: 1; }
}

.alive-indicator {
  animation: breathePulse 2.5s ease-in-out infinite;
}

/* Different timing for T vs CT for visual variety */
.team-t .alive-indicator {
  animation-delay: 0s;
  animation-duration: 2.5s;
}

.team-ct .alive-indicator {
  animation-delay: 0.5s;
  animation-duration: 2.8s;
}

/* ─── 4. Timer Urgent Pulse ────────────────────────────────────────────── */
@keyframes timerUrgent {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
    text-shadow: 0 0 10px currentColor;
  }
  50% {
    opacity: 0.85;
    transform: scale(1.04);
    text-shadow: 0 0 25px currentColor, 0 0 40px currentColor;
  }
}

.timer-urgent {
  animation: timerUrgent 0.6s ease-in-out infinite;
}

/* Extra urgent (< 5 seconds) */
.timer-critical {
  animation: timerUrgent 0.35s ease-in-out infinite;
}

/* ─── 5. Kill Feed Slide In ───────────────────────────────────────────── */
@keyframes killfeedSlide {
  0%   {
    opacity: 0;
    transform: translateX(30px);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

.kill-feed-item {
  animation: killfeedSlide 0.3s ease-out;
}

/* ─── 6. Defuse Kit Icon Pulse ────────────────────────────────────────── */
@keyframes defuseKitPulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(74, 158, 255, 0.6);
  }
  50% {
    box-shadow: 0 0 8px 2px rgba(74, 158, 255, 0.3);
  }
}

.defuse-kit-active {
  animation: defuseKitPulse 1.2s ease-in-out infinite;
}

/* ─── 7. C4 Carrier Glow ──────────────────────────────────────────────── */
@keyframes c4CarrierGlow {
  0%, 100% {
    box-shadow: 0 0 5px rgba(239, 68, 68, 0.5);
  }
  50% {
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.8),
                0 0 25px rgba(239, 68, 68, 0.4);
  }
}

.c4-badge {
  animation: c4CarrierGlow 1s ease-in-out infinite;
}

/* ─── 8. Connection Pulsing Dot ──────────────────────────────────────── */
@keyframes connectDot {
  0%, 100% {
    opacity: 0.4;
    transform: scale(0.8);
  }
  50% {
    opacity: 1;
    transform: scale(1.1);
  }
}

.connecting-indicator {
  animation: connectDot 1.5s ease-in-out infinite;
}

/* ─── 9. Weapon Active Glow ──────────────────────────────────────────── */
@keyframes weaponActiveGlow {
  0%, 100% {
    box-shadow: 0 0 0 rgba(245, 166, 35, 0);
  }
  50% {
    box-shadow: 0 0 8px rgba(245, 166, 35, 0.4);
  }
}

.weapon-active {
  animation: weaponActiveGlow 2s ease-in-out infinite;
}

/* ─── 10. Team Panel Entrance ──────────────────────────────────────────── */
@keyframes panelEntrance {
  0%   {
    opacity: 0;
    transform: translateY(10px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.team-panel {
  animation: panelEntrance 0.4s ease-out;
}

.team-panel-t {
  animation-delay: 0.1s;
  animation-fill-mode: both;
}

.team-panel-ct {
  animation-delay: 0.2s;
  animation-fill-mode: both;
}

/* ─── 11. Zoom Button Hover ─────────────────────────────────────────────── */
@keyframes zoomBtnHover {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.1); }
  100% { transform: scale(1); }
}

.zoom-btn:hover {
  animation: zoomBtnHover 0.4s ease-in-out;
}

/* ─── 12. Health Bar Low Warning ─────────────────────────────────────── */
@keyframes healthWarning {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.3); }
}

.health-bar-low {
  animation: healthWarning 0.8s ease-in-out infinite;
}

/* ─── 13. Flash Effect Intensify ─────────────────────────────────────── */
@keyframes flashIntensify {
  0%   { opacity: 0; }
  20%  { opacity: 0.8; }
  100% { opacity: 0; }
}

.flash-effect-active {
  animation: flashIntensify 0.5s ease-out;
}

/* ─── 14. Smoke/Fire Overlay Pulse ────────────────────────────────────── */
@keyframes dangerZonePulse {
  0%, 100% { opacity: 0.15; }
  50% { opacity: 0.35; }
}

.smoke-overlay {
  animation: dangerZonePulse 3s ease-in-out infinite;
}

.fire-overlay {
  animation: dangerZonePulse 1.5s ease-in-out infinite;
}

/* ─── 15. Scope Indicator Blink ──────────────────────────────────────── */
@keyframes scopeBlink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0.3; }
}

.scope-indicator {
  animation: scopeBlink 1s step-end infinite;
}

/* ─── 16. Bomb Timer Pulse ────────────────────────────────────────────── */
@keyframes bombTimerPulse {
  0%, 100% {
    box-shadow: 0 0 10px rgba(224, 82, 82, 0.3);
  }
  50% {
    box-shadow: 0 0 25px rgba(224, 82, 82, 0.6);
  }
}

.bomb-timer-active {
  animation: bombTimerPulse 1s ease-in-out infinite;
}