/* ===================================
   Slap the Character - Custom Styles
   =================================== */

/* Screen Shake Animation */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

.shake {
    animation: shake 0.5s cubic-bezier(.36,.07,.19,.97) both;
}

/* Button Press Animation */
@keyframes button-press {
    0% { transform: scale(1); }
    50% { transform: scale(0.9); }
    100% { transform: scale(1); }
}

.slap-button:active {
    animation: button-press 0.15s ease-out;
}

/* Counter Pop Animation */
@keyframes counter-pop {
    0% { transform: scale(1); }
    50% { transform: scale(1.15); color: #ef4444; }
    100% { transform: scale(1); }
}

.counter-pop {
    animation: counter-pop 0.3s ease-out;
}

/* Confetti Particle */
@keyframes confetti-fall {
    0% {
        transform: translateY(-100%) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}

.confetti {
    position: absolute;
    width: 10px;
    height: 10px;
    top: 0;
    animation: confetti-fall 3s linear forwards;
}

/* Glow Pulse Animation */
@keyframes glow-pulse {
    0%, 100% { 
        box-shadow: 0 0 20px rgba(239, 68, 68, 0.4);
    }
    50% { 
        box-shadow: 0 0 40px rgba(239, 68, 68, 0.6), 0 0 60px rgba(239, 68, 68, 0.3);
    }
}

.slap-button {
    animation: glow-pulse 2s ease-in-out infinite;
}

.slap-button:disabled {
    animation: none;
}

/* Video Container Hover Effect */
.video-glow {
    transition: box-shadow 0.3s ease;
}

.video-glow:hover {
    box-shadow: 0 0 30px rgba(239, 68, 68, 0.3);
}

/* Smooth Number Transitions */
#total-slaps,
#friday-slaps {
    transition: transform 0.2s ease-out;
}

/* Mobile Optimizations */
@media (max-width: 640px) {
    .slap-button {
        padding: 1rem 2.5rem;
        font-size: 1.25rem;
    }
    
    #total-slaps {
        font-size: 2.5rem;
    }
}

/* Ripple Effect */
@keyframes ripple {
    0% {
        transform: scale(0);
        opacity: 1;
    }
    100% {
        transform: scale(4);
        opacity: 0;
    }
}

.ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    animation: ripple 0.6s linear;
    pointer-events: none;
}

/* Friday Special Glow */
.friday-mode #friday-slaps {
    text-shadow: 0 0 20px rgba(34, 197, 94, 0.5);
}

/* Slap Impact Flash */
@keyframes slap-flash {
    0% { opacity: 0; }
    50% { opacity: 0.3; }
    100% { opacity: 0; }
}

.slap-flash {
    position: fixed;
    inset: 0;
    background: radial-gradient(circle at center, rgba(239, 68, 68, 0.5) 0%, transparent 70%);
    animation: slap-flash 0.3s ease-out forwards;
    pointer-events: none;
    z-index: 40;
}
