/* Анимация печатающего текста */
.typewriter {
    overflow: hidden;
    border-right: 2px solid #0f0;
    white-space: nowrap;
    margin: 0 auto;
    animation: typing 3.5s steps(40, end), blink-caret 0.75s step-end infinite;
}

.typewriter.delay-1 {
    animation: typing 3.5s steps(40, end), blink-caret 0.75s step-end infinite;
    animation-delay: 1s;
    animation-fill-mode: both;
}

.typewriter.delay-2 {
    animation: typing 3.5s steps(40, end), blink-caret 0.75s step-end infinite;
    animation-delay: 2s;
    animation-fill-mode: both;
}

.typewriter.delay-3 {
    animation: typing 3.5s steps(40, end), blink-caret 0.75s step-end infinite;
    animation-delay: 3s;
    animation-fill-mode: both;
}

.typewriter.delay-4 {
    animation: typing 3.5s steps(40, end), blink-caret 0.75s step-end infinite;
    animation-delay: 4s;
    animation-fill-mode: both;
}

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

@keyframes blink-caret {
    from, to { border-color: transparent }
    50% { border-color: #0f0; }
}

/* Анимация мерцания текста */
.glitch-text {
    position: relative;
    display: inline-block;
}

.glitch-text::before,
.glitch-text::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.glitch-text::before {
    animation: glitch-effect 3s infinite;
    color: #f0f;
    z-index: -1;
    clip-path: polygon(0 0, 100% 0, 100% 45%, 0 45%);
}

.glitch-text::after {
    animation: glitch-effect 2s infinite;
    color: #0ff;
    z-index: -2;
    clip-path: polygon(0 60%, 100% 60%, 100% 100%, 0 100%);
}

@keyframes glitch-effect {
    0% {
        transform: translate(0);
    }
    20% {
        transform: translate(-2px, 2px);
    }
    40% {
        transform: translate(-2px, -2px);
    }
    60% {
        transform: translate(2px, 2px);
    }
    80% {
        transform: translate(2px, -2px);
    }
    100% {
        transform: translate(0);
    }
}

/* Анимация сканирования */
.scan-effect {
    position: relative;
    overflow: hidden;
}

.scan-effect::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(to bottom, 
        rgba(0, 255, 0, 0.2), 
        rgba(0, 255, 0, 0.8), 
        rgba(0, 255, 0, 0.2));
    animation: scan 2s linear infinite;
    z-index: 10;
}

@keyframes scan {
    0% {
        top: 0%;
    }
    100% {
        top: 100%;
    }
}

/* Анимация пульсации */
.pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(0, 255, 0, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(0, 255, 0, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(0, 255, 0, 0);
    }
}

/* Анимация появления */
.fade-in {
    animation: fadeIn 1.5s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.slide-in {
    animation: slideIn 1s ease-out;
}

@keyframes slideIn {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}
