/* Advanced Animations */

/* Typing effect for status messages */
@keyframes typing {
    from { width: 0; }
    to { width: 100%; }
}

/* Pulse effect for important elements */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(0.98);
    }
}

/* Shine effect */
@keyframes shine {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

/* Data flow animation */
@keyframes dataFlow {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Neon glow animation */
@keyframes neonGlow {
    0%, 100% {
        text-shadow: 
            0 0 10px rgba(0, 255, 65, 0.8),
            0 0 20px rgba(0, 255, 65, 0.5),
            0 0 30px rgba(0, 255, 65, 0.3);
    }
    50% {
        text-shadow: 
            0 0 20px rgba(0, 255, 65, 1),
            0 0 40px rgba(0, 255, 65, 0.7),
            0 0 60px rgba(0, 255, 65, 0.5);
    }
}

/* Matrix rain effect (subtle) */
@keyframes matrixRain {
    0% {
        transform: translateY(-100%);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(100vh);
        opacity: 0;
    }
}

/* Scanning line */
@keyframes scanLine {
    0% {
        top: 0%;
        opacity: 0;
    }
    50% {
        opacity: 0.3;
    }
    100% {
        top: 100%;
        opacity: 0;
    }
}

/* Border glow */
@keyframes borderGlow {
    0%, 100% {
        box-shadow: 
            0 0 5px rgba(0, 255, 65, 0.2),
            0 0 10px rgba(0, 255, 65, 0.1);
    }
    50% {
        box-shadow: 
            0 0 15px rgba(0, 255, 65, 0.4),
            0 0 30px rgba(0, 255, 65, 0.2);
    }
}

/* Slide in from left */
@keyframes slideInLeft {
    from {
        transform: translateX(-20px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Slide in from right */
@keyframes slideInRight {
    from {
        transform: translateX(20px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Fade in */
@keyframes fadeInUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Number counter animation */
@keyframes countUp {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Tab activation animation */
@keyframes tabActivate {
    0% {
        transform: scale(0.95);
        opacity: 0.5;
    }
    50% {
        transform: scale(1.02);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Category hover animation */
@keyframes categoryPulse {
    0%, 100% {
        border-top-color: var(--primary-color);
    }
    50% {
        border-top-color: var(--secondary-color);
    }
}

/* Icon spin on hover */
@keyframes iconSpin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* ============================================
   RESPONSIVE ANIMATIONS - MOBILE OPTIMIZATION
   ============================================ */

/* Reduce animation complexity on mobile */
@media screen and (max-width: 768px) {
    /* Faster, simpler animations */
    @keyframes gridMove {
        0%, 100% { 
            transform: translateY(0) scale(1);
            opacity: 0.03;
        }
        50% { 
            transform: translateY(-10px) scale(1);
            opacity: 0.05;
        }
    }

    @keyframes scanline {
        0% { top: -100%; }
        100% { top: 200%; }
    }

    @keyframes glow {
        0%, 100% { 
            box-shadow: 0 0 10px rgba(0, 255, 65, 0.3);
        }
        50% { 
            box-shadow: 0 0 15px rgba(0, 255, 65, 0.5);
        }
    }

    /* Reduce animation duration */
    .grid-bg {
        animation-duration: 40s;
    }

    .scanline {
        animation-duration: 6s;
    }

    * {
        transition-duration: 0.2s !important;
    }
}

/* Disable heavy animations on small screens */
@media screen and (max-width: 480px) {
    /* Minimal animations for performance */
    .scanline {
        animation: none;
        display: none;
    }

    @keyframes gridMove {
        0%, 100% { opacity: 0.02; }
        50% { opacity: 0.04; }
    }

    .grid-bg {
        animation-duration: 60s;
        opacity: 0.02;
    }

    /* Disable glow animations */
    @keyframes glow {
        0%, 100% { box-shadow: none; }
    }

    /* Faster slide animations */
    @keyframes slideDown {
        from {
            opacity: 0;
            transform: translateY(-10px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    /* Instant fade */
    @keyframes fadeIn {
        from { opacity: 0; }
        to { opacity: 1; }
    }

    /* No border flow on mobile */
    @keyframes borderFlow {
        0%, 100% { border-color: rgba(0, 255, 65, 0.2); }
        50% { border-color: rgba(0, 255, 65, 0.3); }
    }

    /* Minimal tab activation */
    @keyframes tabActivate {
        0% { transform: scale(1); }
        50% { transform: scale(1.02); }
        100% { transform: scale(1); }
    }
}

/* Disable all animations for reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .scanline,
    .grid-bg {
        animation: none !important;
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    /* Faster animations for touch */
    * {
        transition-duration: 0.15s !important;
    }

    /* Disable complex background animations */
    .grid-bg {
        animation: none;
        opacity: 0.03;
    }

    .scanline {
        animation-duration: 8s;
        opacity: 0.02;
    }
}

