/* Clapping animation for correct answers */
@keyframes clapping {
    0% { transform: rotate(0deg); }
    25% { transform: rotate(15deg); }
    50% { transform: rotate(0deg); }
    75% { transform: rotate(-15deg); }
    100% { transform: rotate(0deg); }
}

.clapping {
    animation: clapping 0.5s 3;
}

/* Bounce animation for correct feedback */
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-30px);
    }
    60% {
        transform: translateY(-15px);
    }
}

.bounce {
    animation: bounce 1s;
}

/* Shake animation for incorrect feedback */
@keyframes shakeElement {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    50% { transform: translateX(10px); }
    75% { transform: translateX(-10px); }
}

.shake-element {
    animation: shakeElement 0.5s;
}

/* Fade in animation */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.fade-in {
    animation: fadeIn 0.5s;
}

/* Pulse animation for elements that need attention */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.pulse {
    animation: pulse 0.8s infinite;
}

/* Confetti animation */
.confetti {
    position: absolute;
    width: 10px;
    height: 10px;
    background-color: #f00;
    opacity: 0;
}

.confetti-1 {
    background-color: #f00; /* red */
    animation: confetti-drop-1 4s ease-in-out infinite;
    left: 10%;
    top: -10px;
}

.confetti-2 {
    background-color: #0f0; /* green */
    animation: confetti-drop-2 3s ease-in-out infinite;
    left: 20%;
    top: -10px;
}

.confetti-3 {
    background-color: #00f; /* blue */
    animation: confetti-drop-3 3.5s ease-in-out infinite;
    left: 30%;
    top: -10px;
}

.confetti-4 {
    background-color: #ff0; /* yellow */
    animation: confetti-drop-4 4.5s ease-in-out infinite;
    left: 40%;
    top: -10px;
}

.confetti-5 {
    background-color: #f0f; /* magenta */
    animation: confetti-drop-5 3.2s ease-in-out infinite;
    left: 50%;
    top: -10px;
}

.confetti-6 {
    background-color: #0ff; /* cyan */
    animation: confetti-drop-6 3.8s ease-in-out infinite;
    left: 60%;
    top: -10px;
}

.confetti-7 {
    background-color: #ff9900; /* orange */
    animation: confetti-drop-7 4.2s ease-in-out infinite;
    left: 70%;
    top: -10px;
}

.confetti-8 {
    background-color: #9900ff; /* purple */
    animation: confetti-drop-8 3.4s ease-in-out infinite;
    left: 80%;
    top: -10px;
}

@keyframes confetti-drop-1 {
    0% { transform: translateY(0) rotate(0); opacity: 1; }
    100% { transform: translateY(600px) rotate(360deg); opacity: 0; }
}

@keyframes confetti-drop-2 {
    0% { transform: translateY(0) rotate(0); opacity: 1; }
    100% { transform: translateY(600px) rotate(-360deg); opacity: 0; }
}

@keyframes confetti-drop-3 {
    0% { transform: translateY(0) rotate(0); opacity: 1; }
    100% { transform: translateY(600px) rotate(180deg); opacity: 0; }
}

@keyframes confetti-drop-4 {
    0% { transform: translateY(0) rotate(0); opacity: 1; }
    100% { transform: translateY(600px) rotate(-180deg); opacity: 0; }
}

@keyframes confetti-drop-5 {
    0% { transform: translateY(0) rotate(0); opacity: 1; }
    100% { transform: translateY(600px) rotate(270deg); opacity: 0; }
}

@keyframes confetti-drop-6 {
    0% { transform: translateY(0) rotate(0); opacity: 1; }
    100% { transform: translateY(600px) rotate(-270deg); opacity: 0; }
}

@keyframes confetti-drop-7 {
    0% { transform: translateY(0) rotate(0); opacity: 1; }
    100% { transform: translateY(600px) rotate(90deg); opacity: 0; }
}

@keyframes confetti-drop-8 {
    0% { transform: translateY(0) rotate(0); opacity: 1; }
    100% { transform: translateY(600px) rotate(-90deg); opacity: 0; }
}
