/* ============================================
   ANIMATIONS
   ============================================ */

/* Confetti Canvas */
#confetti-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
}

/* Badge Reveal */
.badge-reveal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.badge-reveal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.badge-reveal-content {
    text-align: center;
    transform: scale(0);
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.badge-reveal-overlay.active .badge-reveal-content {
    transform: scale(1);
}

.badge-reveal-icon {
    width: 150px;
    height: 150px;
    margin: 0 auto var(--space-lg);
    animation: badgeGlow 2s ease infinite;
}

.badge-reveal-title {
    font-family: var(--font-display);
    font-size: 2rem;
    color: var(--color-gold);
    margin-bottom: var(--space-sm);
    text-shadow: 0 0 30px rgba(197,160,63,0.5);
}

.badge-reveal-desc {
    color: var(--color-parchment);
    font-size: 1rem;
    margin-bottom: var(--space-xl);
    max-width: 350px;
}

@keyframes badgeGlow {
    0%, 100% { filter: drop-shadow(0 0 20px rgba(197,160,63,0.4)); }
    50% { filter: drop-shadow(0 0 40px rgba(197,160,63,0.7)); }
}

/* Stage Unlock Animation */
@keyframes unlockGlow {
    0% {
        box-shadow: 0 0 0 0 rgba(197,160,63,0.6);
    }
    50% {
        box-shadow: 0 0 0 20px rgba(197,160,63,0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(197,160,63,0);
    }
}

.stage-unlocking {
    animation: unlockGlow 0.8s ease 3;
}

/* Score Counter Animation */
.score-counter {
    display: inline-block;
    transition: all 0.1s ease;
}

.score-counter.counting {
    animation: countPulse 0.1s ease;
}

@keyframes countPulse {
    0% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* Streak indicator */
.streak-indicator {
    position: fixed;
    top: 20%;
    right: 20px;
    background: linear-gradient(135deg, var(--color-crimson), var(--color-crimson-dark));
    color: white;
    padding: 8px 16px;
    border-radius: var(--radius-lg);
    font-weight: 700;
    font-size: 1rem;
    opacity: 0;
    transform: translateX(100px);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 100;
    box-shadow: 0 4px 20px rgba(196,30,58,0.4);
}

.streak-indicator.active {
    opacity: 1;
    transform: translateX(0);
}

/* Page transition */
.page-enter {
    animation: fadeIn 0.3s ease;
}

/* Floating animation for decorative elements */
.float-animation {
    animation: float 3s ease-in-out infinite;
}

/* Slide up for list items */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.slide-up {
    animation: slideUp 0.4s ease-out both;
}

.slide-up:nth-child(1) { animation-delay: 0.05s; }
.slide-up:nth-child(2) { animation-delay: 0.1s; }
.slide-up:nth-child(3) { animation-delay: 0.15s; }
.slide-up:nth-child(4) { animation-delay: 0.2s; }
.slide-up:nth-child(5) { animation-delay: 0.25s; }
.slide-up:nth-child(6) { animation-delay: 0.3s; }
.slide-up:nth-child(7) { animation-delay: 0.35s; }
.slide-up:nth-child(8) { animation-delay: 0.4s; }
.slide-up:nth-child(9) { animation-delay: 0.45s; }
.slide-up:nth-child(10) { animation-delay: 0.5s; }
