/* Who Said What? - Quiz Game Styles */

/* Timer bar depletion */
@keyframes wsw-timer-deplete {
    from { width: 100%; }
    to { width: 0%; }
}

.wsw-timer-bar {
    animation: wsw-timer-deplete linear forwards;
    transform-origin: left;
}

/* Score float up */
@keyframes wsw-score-float {
    0% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    50% {
        opacity: 1;
        transform: translateY(-20px) scale(1.2);
    }
    100% {
        opacity: 0;
        transform: translateY(-40px) scale(0.8);
    }
}

.wsw-score-float {
    animation: wsw-score-float 1s ease-out forwards;
    pointer-events: none;
}

/* Correct answer pulse */
@keyframes wsw-correct-pulse {
    0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.6); }
    50% { box-shadow: 0 0 20px 4px rgba(16, 185, 129, 0.4); }
    100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.wsw-correct {
    border-color: #10b981 !important;
    animation: wsw-correct-pulse 0.8s ease-out;
}

/* Wrong answer shake */
@keyframes wsw-shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-4px); }
    40%, 80% { transform: translateX(4px); }
}

.wsw-wrong {
    border-color: #ef4444 !important;
    animation: wsw-shake 0.4s ease-in-out;
}

/* Quote slide in */
@keyframes wsw-quote-enter {
    from {
        opacity: 0;
        transform: translateY(15px) scale(0.97);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.wsw-quote-enter {
    animation: wsw-quote-enter 0.4s ease-out;
}

/* Option card pop in (staggered via inline style) */
@keyframes wsw-option-pop {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(10px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.wsw-option-pop {
    animation: wsw-option-pop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

/* Streak fire pulse */
@keyframes wsw-streak-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
}

.wsw-streak-pulse {
    animation: wsw-streak-pulse 0.6s ease-in-out;
}

/* Progress bar fill */
.wsw-progress-fill {
    transition: width 0.4s ease-out;
}

/* Result score count up */
@keyframes wsw-score-reveal {
    from {
        opacity: 0;
        transform: scale(0.5);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.wsw-score-reveal {
    animation: wsw-score-reveal 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Round transition */
@keyframes wsw-round-enter {
    0% {
        opacity: 0;
        transform: scale(0.7);
    }
    60% {
        opacity: 1;
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

.wsw-round-enter {
    animation: wsw-round-enter 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Intro avatar bounce */
@keyframes wsw-avatar-bounce {
    from {
        opacity: 0;
        transform: translateY(8px) scale(0.85);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.wsw-avatar-bounce {
    animation: wsw-avatar-bounce 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .wsw-timer-bar,
    .wsw-score-float,
    .wsw-correct,
    .wsw-wrong,
    .wsw-quote-enter,
    .wsw-option-pop,
    .wsw-streak-pulse,
    .wsw-score-reveal,
    .wsw-round-enter,
    .wsw-avatar-bounce {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}
