@keyframes glitch {
    0% {
        transform: translate(0);
        text-shadow: none;
    }
    20% {
        transform: translate(-2px, 2px);
        text-shadow: 2px 0 var(--accent), -2px 0 var(--accent-secondary);
    }
    40% {
        transform: translate(-2px, -2px);
        text-shadow: -2px 0 var(--accent), 2px 0 var(--accent-secondary);
    }
    60% {
        transform: translate(2px, 2px);
        text-shadow: 2px 0 var(--accent-secondary), -2px 0 var(--accent);
    }
    80% {
        transform: translate(2px, -2px);
        text-shadow: -2px 0 var(--accent-secondary), 2px 0 var(--accent);
    }
    100% {
        transform: translate(0);
        text-shadow: none;
    }
}

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

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

@keyframes slideIn {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes wave {
    0%, 100% {
        transform: translateY(0);
    }
    25% {
        transform: translateY(-5px);
    }
    75% {
        transform: translateY(5px);
    }
}

.glitch-text {
    animation: glitch 0.5s infinite;
}

.fade-in {
    animation: fadeIn 1s ease-out;
}

.pulse {
    animation: pulse 2s infinite;
}

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

.bounce {
    animation: bounce 1s infinite;
}

.rotate {
    animation: rotate 2s linear infinite;
}

nav a {
    animation: slideIn 0.5s ease-out;
}

nav li:nth-child(1) a { animation-delay: 0s; }
nav li:nth-child(2) a { animation-delay: 0.1s; }
nav li:nth-child(3) a { animation-delay: 0.2s; }
nav li:nth-child(4) a { animation-delay: 0.3s; }
nav li:nth-child(5) a { animation-delay: 0.4s; }
nav li:nth-child(6) a { animation-delay: 0.5s; }

body.low-spec-mode .glitch-text,
body.low-spec-mode .fade-in,
body.low-spec-mode .pulse,
body.low-spec-mode .slide-in,
body.low-spec-mode .bounce,
body.low-spec-mode .rotate,
body.low-spec-mode nav a {
    animation: none !important;
}
