/* --- Matrix Background Styles --- */
#matrix-rain {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    opacity: 0.7;
}

/* Animation Utilities */
@keyframes glitch {
    0% {
        text-shadow: 2px 0 var(--matrix-green), -2px 0 var(--matrix-dark-green);
        opacity: 1;
    }
    25% {
        text-shadow: -2px 0 var(--matrix-green), 2px 0 var(--matrix-dark-green);
        opacity: 0.8;
    }
    50% {
        text-shadow: 2px 0 var(--matrix-green), -2px 0 var(--matrix-dark-green);
        opacity: 1;
    }
    75% {
        text-shadow: -2px 0 var(--matrix-green), 2px 0 var(--matrix-dark-green);
        opacity: 0.8;
    }
    100% {
        text-shadow: 2px 0 var(--matrix-green), -2px 0 var(--matrix-dark-green);
        opacity: 1;
    }
}

@keyframes typing {
    from { width: 0 }
    to { width: 100% }
}

@keyframes blink {
    50% { border-color: transparent }
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.05); opacity: 0.8; }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes flicker {
    0%, 19.999%, 22%, 62.999%, 64%, 64.999%, 70%, 100% {
        opacity: 1;
        text-shadow: 0 0 4px var(--matrix-green), 0 0 11px var(--matrix-green), 0 0 19px var(--matrix-green);
    }
    20%, 21.999%, 63%, 63.999%, 65%, 69.999% {
        opacity: 0.4;
        text-shadow: none;
    }
}

@keyframes matrix-scroll {
    0% { transform: translateY(0); }
    100% { transform: translateY(-50%); }
}

@keyframes fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes wave {
    0% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
    100% { transform: translateY(0); }
}

@keyframes falling {
    0% {
        transform: translateY(-20px);
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
    100% {
        transform: translateY(20px);
        opacity: 0;
    }
}

/* Terminal blinking cursor animation */
@keyframes blink-cursor {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* Character cascade animation for breaking code */
@keyframes cascade {
    0% { 
        transform: translateY(-20px);
        opacity: 0;
    }
    100% { 
        transform: translateY(0);
        opacity: 1;
    }
}
