/* Cyberpunk Animations */

/* Glitch Effects */
@keyframes glitch-1 {
    0%, 100% {
        transform: translate(0);
    }
    20% {
        transform: translate(-2px, 2px);
    }
    40% {
        transform: translate(-2px, -2px);
    }
    60% {
        transform: translate(2px, 2px);
    }
    80% {
        transform: translate(2px, -2px);
    }
}

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

@keyframes glitch-sweep {
    0%, 100% {
        transform: translateX(-100%);
    }
    50% {
        transform: translateX(100%);
    }
}

/* Floating Animation */
@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

/* Pulse Glow */
@keyframes pulse-glow {
    0%, 100% {
        opacity: 0.5;
        transform: translate(-50%, -50%) scale(1);
    }
    50% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.1);
    }
}

/* Pulse */
@keyframes pulse {
    0%, 100% {
        transform: translateX(-50%) scale(1);
        opacity: 1;
    }
    50% {
        transform: translateX(-50%) scale(1.2);
        opacity: 0.8;
    }
}

/* Bounce */
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0) rotate(45deg);
    }
    40% {
        transform: translateY(-10px) rotate(45deg);
    }
    60% {
        transform: translateY(-5px) rotate(45deg);
    }
}

/* Neon Glow */
@keyframes neon-glow {
    0%, 100% {
        text-shadow: 
            0 0 5px currentColor,
            0 0 10px currentColor,
            0 0 15px currentColor,
            0 0 20px currentColor;
    }
    50% {
        text-shadow: 
            0 0 2px currentColor,
            0 0 5px currentColor,
            0 0 8px currentColor,
            0 0 12px currentColor;
    }
}

/* Matrix Rain Effect */
@keyframes matrix-rain {
    0% {
        transform: translateY(-100vh);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(100vh);
        opacity: 0;
    }
}

/* Particle Float */
@keyframes particle-float {
    0%, 100% {
        transform: translateY(0px) translateX(0px);
        opacity: 0.3;
    }
    25% {
        transform: translateY(-10px) translateX(5px);
        opacity: 0.7;
    }
    50% {
        transform: translateY(-20px) translateX(-5px);
        opacity: 1;
    }
    75% {
        transform: translateY(-10px) translateX(10px);
        opacity: 0.7;
    }
}

/* Scan Line */
@keyframes scan-line {
    0% {
        transform: translateY(-100%);
    }
    100% {
        transform: translateY(100vh);
    }
}

/* Data Stream */
@keyframes data-stream {
    0% {
        transform: translateX(-100%);
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
    100% {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* Hologram Flicker */
@keyframes hologram-flicker {
    0%, 100% {
        opacity: 1;
        filter: hue-rotate(0deg);
    }
    25% {
        opacity: 0.8;
        filter: hue-rotate(90deg);
    }
    50% {
        opacity: 0.9;
        filter: hue-rotate(180deg);
    }
    75% {
        opacity: 0.7;
        filter: hue-rotate(270deg);
    }
}

/* Circuit Board */
@keyframes circuit-pulse {
    0%, 100% {
        box-shadow: 
            0 0 5px var(--neon-blue),
            inset 0 0 5px var(--neon-blue);
    }
    50% {
        box-shadow: 
            0 0 20px var(--neon-blue),
            inset 0 0 10px var(--neon-blue);
    }
}

/* Loading Bar */
@keyframes loading-bar {
    0% {
        width: 0%;
    }
    100% {
        width: 100%;
    }
}

/* Typewriter Effect */
@keyframes typewriter {
    from {
        width: 0;
    }
    to {
        width: 100%;
    }
}

/* Blink Cursor */
@keyframes blink-cursor {
    0%, 50% {
        border-color: transparent;
    }
    51%, 100% {
        border-color: var(--neon-blue);
    }
}

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

/* Scale Pulse */
@keyframes scale-pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

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

/* Fade In Left */
@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Fade In Right */
@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Slide In */
@keyframes slideIn {
    from {
        transform: translateX(-100%);
    }
    to {
        transform: translateX(0);
    }
}

/* Zoom In */
@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.3);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Utility Animation Classes */
.animate-float {
    animation: float 6s ease-in-out infinite;
}

.animate-pulse-glow {
    animation: pulse-glow 3s ease-in-out infinite;
}

.animate-neon-glow {
    animation: neon-glow 2s ease-in-out infinite;
}

.animate-hologram {
    animation: hologram-flicker 4s ease-in-out infinite;
}

.animate-circuit-pulse {
    animation: circuit-pulse 2s ease-in-out infinite;
}

.animate-rotate {
    animation: rotate 10s linear infinite;
}

.animate-scale-pulse {
    animation: scale-pulse 2s ease-in-out infinite;
}

.animate-fade-in-up {
    animation: fadeInUp 0.8s ease-out;
}

.animate-fade-in-left {
    animation: fadeInLeft 0.8s ease-out;
}

.animate-fade-in-right {
    animation: fadeInRight 0.8s ease-out;
}

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

.animate-zoom-in {
    animation: zoomIn 0.8s ease-out;
}

/* Hover Animations */
.hover-glow:hover {
    text-shadow: 0 0 20px currentColor;
    transition: text-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-5px);
    transition: transform 0.3s ease;
}

.hover-scale:hover {
    transform: scale(1.05);
    transition: transform 0.3s ease;
}

.hover-rotate:hover {
    transform: rotate(5deg);
    transition: transform 0.3s ease;
}

/* Scroll Animations */
.scroll-reveal {
    /* opacity: 0.8; */
    transform: translateY(50px);
    transition: all 0.8s ease;
}

.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

.scroll-reveal-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: all 0.8s ease;
}

.scroll-reveal-left.revealed {
    opacity: 1;
    transform: translateX(0);
}

.scroll-reveal-right {
    opacity: 0;
    transform: translateX(50px);
    transition: all 0.8s ease;
}

.scroll-reveal-right.revealed {
    opacity: 1;
    transform: translateX(0);
}

/* Loading Animations */
.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(0, 255, 255, 0.3);
    border-top: 4px solid var(--neon-blue);
    border-radius: 50%;
    animation: rotate 1s linear infinite;
}

.loading-dots::after {
    content: '';
    animation: loading-dots 1.5s infinite;
}

@keyframes loading-dots {
    0%, 20% {
        content: '.';
    }
    40% {
        content: '..';
    }
    60%, 100% {
        content: '...';
    }
}

/* Particle System */
.particle {
    position: absolute;
    width: 2px;
    height: 2px;
    background: var(--neon-blue);
    border-radius: 50%;
    animation: particle-float 8s infinite linear;
    opacity: 0;
}

.particle:nth-child(odd) {
    background: var(--neon-pink);
    animation-duration: 6s;
}

.particle:nth-child(3n) {
    background: var(--neon-green);
    animation-duration: 10s;
}

/* Matrix Rain Characters */
.matrix-char {
    position: absolute;
    color: var(--neon-green);
    font-family: 'Courier New', monospace;
    font-size: 14px;
    animation: matrix-rain 3s linear infinite;
    opacity: 0;
}

/* Scan Lines */
.scan-line {
    position: absolute;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--neon-blue), transparent);
    animation: scan-line 4s linear infinite;
}

/* Data Streams */
.data-stream {
    position: absolute;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--neon-pink), transparent);
    animation: data-stream 3s linear infinite;
}

/* Responsive Animation Adjustments */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

@media (max-width: 768px) {
    .animate-float {
        animation-duration: 4s;
    }
    
    .animate-pulse-glow {
        animation-duration: 2s;
    }
    
    .particle {
        animation-duration: 6s;
    }
}

