/* ================================================== */
/* 文件 3: css/animations.css (动画与特效)              */
/* ================================================== */
@keyframes scan {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}
.logo::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, cyan, magenta, transparent);
    animation: scan 4s linear infinite;
    border-radius: 2px;
}

@keyframes glowPulse {
    0% { text-shadow: 0 0 20px cyan, 0 0 40px magenta; }
    100% { text-shadow: 0 0 35px magenta, 0 0 60px cyan; }
}
.hero h1 {
    animation: glowPulse 3s infinite alternate;
}

.cursor {
    display: inline-block;
    width: 4px;
    margin-left: 5px;
    background: cyan;
    animation: blink 0.9s infinite;
    box-shadow: 0 0 10px cyan;
}
@keyframes blink { 0%,50%{opacity:1} 51%,100%{opacity:0} }

/* 滚动渐现 */
.fadeup {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}
.fadeup.show {
    opacity: 1;
    transform: translateY(0);
}

/* 故障效果 */
.glitch {
    position: relative;
}
.glitch::before, .glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}
.glitch::before {
    left: 2px;
    text-shadow: -2px 0 #ff00ff;
    clip: rect(24px, 550px, 90px, 0);
    animation: glitch-anim-1 3s infinite linear alternate-reverse;
}
.glitch::after {
    left: -2px;
    text-shadow: -2px 0 #00ffff;
    clip: rect(85px, 550px, 140px, 0);
    animation: glitch-anim-2 2.5s infinite linear alternate-reverse;
}
@keyframes glitch-anim-1 {
    0% { clip: rect(20px, 9999px, 70px, 0); }
    20% { clip: rect(10px, 9999px, 30px, 0); }
    40% { clip: rect(70px, 9999px, 120px, 0); }
    60% { clip: rect(40px, 9999px, 90px, 0); }
    80% { clip: rect(90px, 9999px, 160px, 0); }
    100% { clip: rect(10px, 9999px, 50px, 0); }
}
@keyframes glitch-anim-2 {
    0% { clip: rect(65px, 9999px, 119px, 0); }
    20% { clip: rect(7px, 9999px, 39px, 0); }
    40% { clip: rect(91px, 9999px, 140px, 0); }
    60% { clip: rect(24px, 9999px, 80px, 0); }
    80% { clip: rect(47px, 9999px, 101px, 0); }
    100% { clip: rect(82px, 9999px, 130px, 0); }
}