/* Fade In Wrapper */
@keyframes fadeInOnce {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Neon Pulse - Duration 3.4s (Fibonacci 34) */
@keyframes neon-slow-pulse {
    from {
        opacity: 0.92;
        text-shadow: 0 0 4px #edffff, 0 0 10px #53fff4, 0 0 21px #53fff4,
            0 0 34px #bc13fe, 0 0 55px #bc13fe, 0 0 89px #bc13fe;
    }

    to {
        opacity: 1;
        text-shadow: 0 0 6px #edffff, 0 0 14px #53fff4, 0 0 26px #53fff4,
            0 0 42px #bc13fe, 0 0 89px #bc13fe, 0 0 120px #bc13fe;
    }
}

/* Logo Pulse */
@keyframes pulse {

    0%,
    50%,
    100% {
        transform: scale(1);
    }

    25%,
    75% {
        transform: scale(1.1);
    }
}

/* Logo Spin Impact */
@keyframes spinImpact {
    0% {
        transform: rotateX(0deg);
    }

    25% {
        transform: rotateX(2160deg);
        /* 6 Full Spins (360 * 6) */
    }

    50% {
        transform: rotateX(1080deg);
    }

    75% {
        transform: rotateX(720deg);
    }

    100% {
        transform: rotateX(360deg);
    }
}

/* Neon Stable */
@keyframes neon-stable {

    0%,
    100% {
        opacity: 1;
        text-shadow: 0 0 4px #edffff, 0 0 10px #53fff4, 0 0 20px #53fff4, 0 0 35px #bc13fe;
    }

    50% {
        opacity: 0.95;
        text-shadow: 0 0 4px #edffff, 0 0 10px #53fff4, 0 0 18px #53fff4, 0 0 32px #bc13fe;
    }
}

/* Neon Short Circuit */
@keyframes neon-short-circuit {
    0% {
        opacity: 1;
    }

    5% {
        opacity: 0.1;
        text-shadow: none;
    }

    10% {
        opacity: 1;
        text-shadow: 0 0 4px #edffff, 0 0 10px #53fff4;
    }

    15% {
        opacity: 0.1;
        text-shadow: none;
    }

    20% {
        opacity: 1;
    }

    25% {
        opacity: 0.1;
        text-shadow: none;
    }

    30% {
        opacity: 1;
    }

    70% {
        opacity: 1;
    }

    75% {
        opacity: 0.4;
    }

    80% {
        opacity: 1;
    }

    100% {
        opacity: 1;
    }
}

/* AI Background Spin */
@keyframes ai-spin {
    to {
        transform: rotate(360deg);
    }
}

/* SOTA Cinematic Entrance - Diversified */
@keyframes enter-bottom {
    0% {
        opacity: 0;
        transform: translateY(50px) scale(0.95);
        filter: blur(10px);
    }

    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0);
    }
}

@keyframes enter-left {
    0% {
        opacity: 0;
        transform: translateX(-50px) scale(0.95);
        filter: blur(10px);
    }

    100% {
        opacity: 1;
        transform: translateX(0) scale(1);
        filter: blur(0);
    }
}

@keyframes enter-right {
    0% {
        opacity: 0;
        transform: translateX(50px) scale(0.95);
        filter: blur(10px);
    }

    100% {
        opacity: 1;
        transform: translateX(0) scale(1);
        filter: blur(0);
    }
}

@keyframes enter-top {
    0% {
        opacity: 0;
        transform: translateY(-50px) scale(0.95);
        filter: blur(10px);
    }

    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0);
    }
}

/* Stagger Classes */
.sota-enter {
    opacity: 0;
    /* Default fallback handled by JS randomization now, or basic fade */
    animation-duration: 0.8s;
    animation-timing-function: cubic-bezier(0.2, 0.8, 0.2, 1);
    animation-fill-mode: forwards;
}

.enter-from-bottom {
    animation-name: enter-bottom;
}

.enter-from-left {
    animation-name: enter-left;
}

.enter-from-right {
    animation-name: enter-right;
}

.enter-from-top {
    animation-name: enter-top;
}

.delay-1 {
    animation-delay: 0.1s;
}

.delay-2 {
    animation-delay: 0.2s;
}

.delay-3 {
    animation-delay: 0.3s;
}

.delay-4 {
    animation-delay: 0.4s;
}

.delay-5 {
    animation-delay: 0.5s;
}

/* Nanobots (Cyber-Ants) */
.nanobot {
    position: absolute;
    width: 4px;
    height: 4px;
    background: #53fff4;
    border-radius: 50%;
    pointer-events: none;
    z-index: 1000;
    box-shadow: 0 0 5px #53fff4;
    transition: transform 0.1s linear;
    /* Smooth-ish rotation */
}

/* Trail effect */
.nanobot::after {
    content: '';
    position: absolute;
    top: 50%;
    left: -4px;
    width: 6px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(83, 255, 244, 0.5));
    transform: translateY(-50%);
}

/* Konami Mode Classes */
body.matrix-mode {
    filter: hue-rotate(90deg) contrast(1.2);
}

body.matrix-mode .trinity-card {
    animation: glitch-skew 0.2s infinite;
}