/* Animations for UNO */

/* ============================================
   KEYFRAMES
   ============================================ */

/* Card play animation */
@keyframes cardPlay {
  0% {
    transform: scale(0.5) translateY(50px);
    opacity: 0;
  }
  100% {
    transform: scale(1) translateY(0);
    opacity: 1;
  }
}

/* Card deal animation */
@keyframes cardDeal {
  0% {
    transform: translateY(-100px) scale(0.5);
    opacity: 0;
  }
  100% {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

/* Card draw animation */
@keyframes cardDraw {
  0% {
    transform: translateX(-100px) rotate(-20deg);
    opacity: 0;
  }
  100% {
    transform: translateX(0) rotate(0);
    opacity: 1;
  }
}

/* UNO button pulse */
@keyframes unoPulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 20px rgba(229, 57, 53, 0.4);
  }
  50% {
    transform: scale(1.05);
    box-shadow: 0 0 30px rgba(229, 57, 53, 0.6);
  }
}

/* Turn indicator pulse */
@keyframes turnPulse {
  0%, 100% {
    box-shadow: 0 0 15px rgba(245, 158, 11, 0.4);
  }
  50% {
    box-shadow: 0 0 25px rgba(245, 158, 11, 0.7);
  }
}

/* Winner appear */
@keyframes winnerAppear {
  0% {
    opacity: 0;
    transform: scale(0.8) translateY(20px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* Trophy bounce */
@keyframes trophyBounce {
  0%, 100% {
    transform: translateY(0) rotate(-5deg);
  }
  50% {
    transform: translateY(-10px) rotate(5deg);
  }
}

/* Spin */
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Direction change */
@keyframes directionChange {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Color flash */
@keyframes colorFlash {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

/* Shake (for penalty) */
@keyframes shake {
  0%, 100% {
    transform: translateX(0);
  }
  10%, 30%, 50%, 70%, 90% {
    transform: translateX(-5px);
  }
  20%, 40%, 60%, 80% {
    transform: translateX(5px);
  }
}

/* Confetti fall */
@keyframes confettiFall {
  0% {
    transform: translateY(-20px) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translateY(200px) rotate(720deg);
    opacity: 0;
  }
}

/* Glow pulse */
@keyframes glowPulse {
  0%, 100% {
    box-shadow: 0 0 10px currentColor;
  }
  50% {
    box-shadow: 0 0 25px currentColor;
  }
}

/* ============================================
   ANIMATION CLASSES
   ============================================ */

.card-dealing {
  animation: cardDeal 0.4s ease-out forwards;
}

.card-drawing {
  animation: cardDraw 0.3s ease-out forwards;
}

.card-playing {
  animation: cardPlay 0.3s ease-out forwards;
}

.direction-changing {
  animation: directionChange 0.5s ease-in-out;
}

.color-changing {
  animation: colorFlash 0.3s ease-in-out 3;
}

.penalty-shake {
  animation: shake 0.5s ease-in-out;
}

.current-turn {
  animation: turnPulse 1.5s ease-in-out infinite;
}

/* ============================================
   TRANSITIONS
   ============================================ */

.uno-card {
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.player-info {
  transition: all var(--transition-base);
}

.color-indicator {
  transition: all var(--transition-base);
}

.direction-arrow {
  transition: transform var(--transition-slow);
}
