
/*
=====================================================================
CYBERPUNK-EFFECTS.CSS
=====================================================================
This file contains advanced CSS effects for the Cyberpunk theme,
including glitch effects, CRT scan lines, and other visual
enhancements.
=====================================================================
*/

/* Glitch Effect */
.glitch {
    position: relative;
    display: inline-block;
    color: var(--accent-blue);
    text-shadow: 2px 2px 0 var(--accent-magenta), -2px -2px 0 var(--accent-blue);
    animation: glitch-animation 2s infinite linear alternate-reverse;
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-base);
    overflow: hidden;
    clip: rect(0, 900px, 0, 0);
}

.glitch::before {
    left: 2px;
    text-shadow: -2px 0 var(--accent-magenta);
    animation: glitch-anim-1 2s infinite linear alternate-reverse;
}

.glitch::after {
    left: -2px;
    text-shadow: -2px 0 var(--accent-blue), 2px 2px var(--accent-magenta);
    animation: glitch-anim-2 2s infinite linear alternate-reverse;
}

@keyframes glitch-animation {
    0% { clip: rect(42px, 9999px, 44px, 0); }
    5% { clip: rect(12px, 9999px, 60px, 0); }
    10% { clip: rect(40px, 9999px, 40px, 0); }
    15% { clip: rect(27px, 9999px, 54px, 0); }
    20% { clip: rect(38px, 9999px, 50px, 0); }
    25% { clip: rect(18px, 9999px, 80px, 0); }
    30% { clip: rect(50px, 9999px, 20px, 0); }
    35% { clip: rect(24px, 9999px, 70px, 0); }
    40% { clip: rect(47px, 9999px, 42px, 0); }
    45% { clip: rect(52px, 9999px, 30px, 0); }
    50% { clip: rect(35px, 9999px, 55px, 0); }
    55% { clip: rect(45px, 9999px, 45px, 0); }
    60% { clip: rect(30px, 9999px, 75px, 0); }
    65% { clip: rect(15px, 9999px, 65px, 0); }
    70% { clip: rect(40px, 9999px, 35px, 0); }
    75% { clip: rect(55px, 9999px, 25px, 0); }
    80% { clip: rect(20px, 9999px, 90px, 0); }
    85% { clip: rect(50px, 9999px, 25px, 0); }
    90% { clip: rect(25px, 9999px, 75px, 0); }
    95% { clip: rect(45px, 9999px, 35px, 0); }
    100% { clip: rect(30px, 9999px, 80px, 0); }
}

@keyframes glitch-anim-1 {
    0% { clip: rect(42px, 9999px, 44px, 0); }
    5% { clip: rect(12px, 9999px, 60px, 0); }
    10% { clip: rect(40px, 9999px, 40px, 0); }
    /* ... (rest of the keyframes) ... */
}

@keyframes glitch-anim-2 {
    0% { clip: rect(42px, 9999px, 44px, 0); }
    5% { clip: rect(12px, 9999px, 60px, 0); }
    10% { clip: rect(40px, 9999px, 40px, 0); }
    /* ... (rest of the keyframes) ... */
}

/* CRT Scan Lines Effect */
.crt-effect {
    position: relative;
    overflow: hidden;
}

.crt-effect::after {
    content: " ";
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%), linear-gradient(90deg, rgba(255, 0, 0, 0.06), rgba(0, 255, 0, 0.02), rgba(0, 0, 255, 0.06));
    z-index: 2;
    background-size: 100% 2px, 3px 100%;
    pointer-events: none;
    animation: crt-flicker 0.15s infinite;
}

@keyframes crt-flicker {
    0% { opacity: 0.75; }
    50% { opacity: 0.5; }
    100% { opacity: 0.75; }
}

/* Text Scramble Effect */
.scramble-text {
    position: relative;
    overflow: hidden;
}

.scramble-text .char {
    display: inline-block;
    animation: scramble-animation 1.5s ease-out forwards;
}

@keyframes scramble-animation {
    0% {
        opacity: 0;
        transform: translateY(20px) scale(1.5);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}
