/* ==========================================================================
   CouplePlay — Animations
   ========================================================================== */

/* ---------- Fade Animations ---------- */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInLeft {
    from { opacity: 0; transform: translateX(-30px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes fadeInRight {
    from { opacity: 0; transform: translateX(30px); }
    to { opacity: 1; transform: translateX(0); }
}

/* ---------- Scale Animations ---------- */
@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.8); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes scaleInBounce {
    0% { opacity: 0; transform: scale(0.3); }
    50% { transform: scale(1.05); }
    70% { transform: scale(0.95); }
    100% { opacity: 1; transform: scale(1); }
}

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

/* ---------- Slide Animations ---------- */
@keyframes slideInLeft {
    from { transform: translateX(-100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes slideInRight {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes slideUp {
    from { transform: translateY(100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* ---------- Rotate ---------- */
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes spinSlow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ---------- Pulse ---------- */
@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.05); opacity: 0.9; }
}

@keyframes pulseGlow {
    0%, 100% { box-shadow: 0 0 5px rgba(255, 79, 129, 0.3); }
    50% { box-shadow: 0 0 25px rgba(255, 79, 129, 0.6); }
}

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

/* ---------- Bounce ---------- */
@keyframes bounce {
    0%, 20%, 53%, 100% { transform: translateY(0); }
    40% { transform: translateY(-20px); }
    70% { transform: translateY(-10px); }
    90% { transform: translateY(-4px); }
}

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

/* ---------- Float ---------- */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes floatSlow {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    33% { transform: translateY(-8px) rotate(1deg); }
    66% { transform: translateY(-4px) rotate(-1deg); }
}

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

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

/* ---------- Card Lift ---------- */
@keyframes cardLift {
    from { transform: translateY(0) scale(1); box-shadow: var(--shadow-md); }
    to { transform: translateY(-8px) scale(1.02); box-shadow: var(--shadow-xl); }
}

/* ---------- Ripple ---------- */
@keyframes ripple {
    0% { transform: scale(0); opacity: 0.6; }
    100% { transform: scale(4); opacity: 0; }
}

/* ---------- Glow ---------- */
@keyframes glow {
    0%, 100% { box-shadow: 0 0 5px var(--primary), 0 0 10px var(--primary); }
    50% { box-shadow: 0 0 20px var(--primary), 0 0 40px var(--primary); }
}

/* ---------- Typing ---------- */
@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* ---------- Floating Background Particles ---------- */
.floating-particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.particle {
    position: absolute;
    border-radius: 50%;
    opacity: 0.15;
    animation: floatParticle linear infinite;
}

@keyframes floatParticle {
    0% { transform: translateY(100vh) rotate(0deg); opacity: 0; }
    10% { opacity: 0.15; }
    90% { opacity: 0.15; }
    100% { transform: translateY(-100px) rotate(720deg); opacity: 0; }
}

/* ---------- Utility Classes ---------- */
.animate-fadeIn { animation: fadeIn 0.5s ease forwards; }
.animate-fadeInUp { animation: fadeInUp 0.5s ease forwards; }
.animate-fadeInDown { animation: fadeInDown 0.5s ease forwards; }
.animate-fadeInLeft { animation: fadeInLeft 0.5s ease forwards; }
.animate-fadeInRight { animation: fadeInRight 0.5s ease forwards; }
.animate-scaleIn { animation: scaleIn 0.4s ease forwards; }
.animate-scaleInBounce { animation: scaleInBounce 0.6s ease forwards; }
.animate-bounce { animation: bounce 1s ease; }
.animate-bounceIn { animation: bounceIn 0.5s ease forwards; }
.animate-pulse { animation: pulse 2s ease infinite; }
.animate-float { animation: float 3s ease infinite; }
.animate-shake { animation: shake 0.5s ease; }
.animate-pop { animation: pop 0.3s ease; }
.animate-spin { animation: spin 1s linear infinite; }

/* Staggered delays */
.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }
.delay-5 { animation-delay: 0.5s; }
.delay-6 { animation-delay: 0.6s; }
.delay-7 { animation-delay: 0.7s; }
.delay-8 { animation-delay: 0.8s; }

/* Initially hidden for animation */
.animate-on-load {
    opacity: 0;
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ---------- Confetti Container ---------- */
.confetti-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 999;
    overflow: hidden;
}

.confetti-piece {
    position: absolute;
    top: -20px;
    width: 10px;
    height: 10px;
    animation: confettiFall 3s linear forwards;
}

/* ---------- Winner Celebration ---------- */
@keyframes winnerGlow {
    0% { text-shadow: 0 0 10px rgba(255, 215, 0, 0.5); }
    50% { text-shadow: 0 0 30px rgba(255, 215, 0, 0.8), 0 0 60px rgba(255, 215, 0, 0.4); }
    100% { text-shadow: 0 0 10px rgba(255, 215, 0, 0.5); }
}

.winner-text {
    animation: winnerGlow 1.5s ease infinite;
    color: var(--accent) !important;
}

/* ---------- Progress Bar Animation ---------- */
@keyframes progressFill {
    from { width: 0%; }
}

.progress-bar-animated {
    animation: progressFill 1s ease forwards;
}

/* ---------- Shimmer Effect ---------- */
@keyframes shimmer {
    0% { background-position: -200px 0; }
    100% { background-position: calc(200px + 100%) 0; }
}

.shimmer {
    background: linear-gradient(90deg, var(--bg-card) 0%, var(--bg-card-hover) 50%, var(--bg-card) 100%);
    background-size: 200px 100%;
    animation: shimmer 1.5s infinite;
}
