/* === Keyframes === */
@keyframes correctPulse {
    0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4); }
    50% { box-shadow: 0 0 0 12px rgba(34, 197, 94, 0); }
    100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

@keyframes wrongShake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-8px); }
    40% { transform: translateX(8px); }
    60% { transform: translateX(-6px); }
    80% { transform: translateX(6px); }
}

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

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes countUp {
    from { opacity: 0; transform: scale(0.5); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes progressFill {
    from { background-position: 200% 0; }
    to { background-position: -200% 0; }
}

@keyframes shimmer {
    from { background-position: -200px 0; }
    to { background-position: calc(200px + 100%) 0; }
}

/* === Animation Utilities === */
.fade-in {
    animation: fadeIn 0.3s ease;
}

.slide-up {
    animation: fadeSlideUp 0.4s ease;
}

.scale-in {
    animation: scaleIn 0.3s ease;
}

/* === Skeleton Loading === */
.skeleton {
    background: linear-gradient(90deg, var(--color-border-light) 0px, #f0f0f0 40px, var(--color-border-light) 80px);
    background-size: 200px 100%;
    animation: shimmer 1.5s infinite linear;
    border-radius: var(--radius-sm);
}

.skeleton-card {
    height: 280px;
    border-radius: var(--radius-md);
}

.skeleton-text {
    height: 16px;
    margin-bottom: 8px;
}

.skeleton-text.short {
    width: 60%;
}

/* === Transition Classes for JS === */
.question-enter {
    opacity: 0;
    transform: translateY(20px);
}

.question-enter-active {
    opacity: 1;
    transform: translateY(0);
    transition: all 0.4s ease;
}

.question-exit {
    opacity: 1;
    transform: translateY(0);
}

.question-exit-active {
    opacity: 0.5;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

/* === Score Counter Animation === */
.score-counting {
    animation: countUp 0.3s ease;
}

/* === Card Stagger Animation (for load more) === */
.card-stagger {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeSlideUp 0.4s ease forwards;
}

.card-stagger:nth-child(1) { animation-delay: 0s; }
.card-stagger:nth-child(2) { animation-delay: 0.05s; }
.card-stagger:nth-child(3) { animation-delay: 0.1s; }
.card-stagger:nth-child(4) { animation-delay: 0.15s; }
.card-stagger:nth-child(5) { animation-delay: 0.2s; }
.card-stagger:nth-child(6) { animation-delay: 0.25s; }

/* === Progress Bar Animated Stripe === */
.progress-bar-fill.animated {
    background-image: linear-gradient(
        45deg,
        rgba(255,255,255,0.15) 25%,
        transparent 25%,
        transparent 50%,
        rgba(255,255,255,0.15) 50%,
        rgba(255,255,255,0.15) 75%,
        transparent 75%,
        transparent
    );
    background-size: 1rem 1rem;
    animation: progressFill 1s linear infinite;
}
