/* Custom animations and styles */
@keyframes confetti-fall {
    0% {
        transform: translateY(-100vh) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(239, 68, 68, 0.5), 0 0 40px rgba(239, 68, 68, 0.3);
    }
    50% {
        box-shadow: 0 0 30px rgba(239, 68, 68, 0.8), 0 0 60px rgba(239, 68, 68, 0.5);
    }
}

@keyframes fire-burn {
    0%, 100% {
        transform: scaleY(1) translateY(0);
        opacity: 0.9;
    }
    25% {
        transform: scaleY(1.1) translateY(-2px);
    }
    50% {
        transform: scaleY(0.9) translateY(1px);
        opacity: 1;
    }
    75% {
        transform: scaleY(1.05) translateY(-1px);
    }
}

@keyframes number-pop {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.3);
    }
    100% {
        transform: scale(1);
    }
}

@keyframes streak-fire {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.confetti {
    position: fixed;
    width: 10px;
    height: 10px;
    top: -10px;
    animation: confetti-fall 3s linear;
    z-index: 100;
    pointer-events: none;
}

.fire-animation {
    animation: fire-burn 1.5s ease-in-out infinite;
}

.pulse-glow {
    animation: pulse-glow 2s ease-in-out infinite;
}

.number-pop {
    animation: number-pop 0.5s ease-out;
}

.streak-gradient {
    background-size: 200% 200%;
    animation: streak-fire 3s ease infinite;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, #ef4444, #991b1b);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(to bottom, #dc2626, #7f1d1d);
}

/* Glitch effect for title */
@keyframes glitch {
    0%, 100% {
        text-shadow: 
            2px 0 #ff0000,
            -2px 0 #00ff00,
            0 0 10px #ff0000;
    }
    25% {
        text-shadow: 
            -2px 0 #ff0000,
            2px 0 #00ff00,
            0 0 10px #00ff00;
    }
    50% {
        text-shadow: 
            2px 2px #ff0000,
            -2px -2px #00ff00,
            0 0 15px #ff0000;
    }
    75% {
        text-shadow: 
            -2px 2px #ff0000,
            2px -2px #00ff00,
            0 0 15px #00ff00;
    }
}

.glitch-text:hover {
    animation: glitch 0.3s ease-in-out;
}

/* Matrix rain effect */
.matrix-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    pointer-events: none;
    opacity: 0.03;
    z-index: 0;
    overflow: hidden;
}

.matrix-column {
    position: absolute;
    color: #ff0000;
    font-family: monospace;
    font-size: 12px;
    white-space: nowrap;
    animation: matrix-fall 10s linear infinite;
}

@keyframes matrix-fall {
    0% {
        transform: translateY(-100%);
    }
    100% {
        transform: translateY(100vh);
    }
}