/* Keyframes */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes glitch {
    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);
    }
}

@keyframes pulse-glow {
    0% {
        box-shadow: 0 0 10px rgba(124, 77, 255, 0.2);
    }

    50% {
        box-shadow: 0 0 25px rgba(124, 77, 255, 0.5);
    }

    100% {
        box-shadow: 0 0 10px rgba(124, 77, 255, 0.2);
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Classes */
.fade-in-up {
    animation: fadeIn 0.8s ease-out forwards;
    opacity: 0;
}

.delay-100 {
    animation-delay: 0.1s;
}

.delay-200 {
    animation-delay: 0.2s;
}

.delay-300 {
    animation-delay: 0.3s;
}

/* Glitch Effect */
.glitch {
    position: relative;
    color: var(--primary-color);
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.glitch::before {
    left: 2px;
    text-shadow: -1px 0 red;
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch 5s infinite linear alternate-reverse;
}

.glitch::after {
    left: -2px;
    text-shadow: -1px 0 blue;
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch 5s infinite linear alternate-reverse;
}

/* Loader */
#loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease-out, visibility 0.5s;
}

.loader-spinner {
    width: 60px;
    height: 60px;
    border: 3px solid rgba(124, 77, 255, 0.1);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    border-right-color: var(--secondary-color);
    animation: spin 0.8s linear infinite;
    margin-bottom: 20px;
    box-shadow: 0 0 15px rgba(124, 77, 255, 0.2);
}

.loader-text {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    letter-spacing: 5px;
    color: #fff;
    text-transform: uppercase;
}

/* Particle Background */
#particles-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    opacity: 0.6;
}

/* Ensure content is above particles */
nav,
section,
header,
footer {
    position: relative;
    z-index: 1;
}