/* ========== TECHNICAL VIRUS ANIMATION STYLES ========== */

/* Virus Animation Container */
.virus-animation-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    z-index: 1;
}

/* Virus Particles */
.virus-particle {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle, #00ff88, #00cc66);
    box-shadow: 
        0 0 20px #00ff88,
        0 0 40px #00ff88,
        0 0 60px #00ff88;
    animation: virusFloat 8s infinite ease-in-out;
}

/* Different Virus Sizes */
.virus-particle.small {
    width: 8px;
    height: 8px;
    animation-duration: 6s;
}

.virus-particle.medium {
    width: 12px;
    height: 12px;
    animation-duration: 8s;
}

.virus-particle.large {
    width: 16px;
    height: 16px;
    animation-duration: 10s;
}

/* Virus Spikes */
.virus-particle::before,
.virus-particle::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: inherit;
    box-shadow: inherit;
}

.virus-particle::before {
    transform: rotate(45deg) scale(0.8);
    animation: virusRotate 4s infinite linear;
}

.virus-particle::after {
    transform: rotate(-45deg) scale(0.6);
    animation: virusRotate 6s infinite linear reverse;
}

/* Binary Code Rain Effect */
.binary-rain {
    position: absolute;
    top: -100px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 14px;
    font-weight: 500;
    color: #ff4444;
    opacity: 0.6;
    animation: binaryFall 35s infinite linear;
    text-shadow: 0 0 15px #ff4444;
    z-index: -1;
    line-height: 1.6;
    letter-spacing: 1px;
}

/* Circuit Lines */
.circuit-line {
    position: absolute;
    background: linear-gradient(90deg, transparent, #00ff88, transparent);
    height: 1px;
    animation: circuitPulse 3s infinite ease-in-out;
    box-shadow: 0 0 10px #00ff88;
}

.circuit-line.horizontal {
    width: 200px;
    animation: circuitHorizontal 8s infinite linear;
}

/* Vertical circuit lines removed */
.circuit-line.vertical {
    display: none !important;
    position: absolute;
    animation: dataTransfer 12s infinite linear;
    box-shadow: 
        0 0 15px #00ff88,
        inset 0 0 15px rgba(0, 255, 136, 0.3);
}

.data-packet::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    background: #ffffff;
    border-radius: 2px;
    animation: dataGlow 2s infinite ease-in-out;
}

/* Glitch Effect - Red and Blue lines removed */
.glitch-effect {
    position: absolute;
    width: 100px;
    height: 2px;
    background: #00ff88;
    animation: glitchMove 5s infinite ease-in-out;
    box-shadow: 0 0 20px #00ff88;
}

.glitch-effect::before,
.glitch-effect::after {
    display: none !important; /* Remove red and blue glitch lines */
}

/* Network Nodes */
.network-node {
    position: absolute;
    width: 6px;
    height: 6px;
    background: #00ff88;
    border-radius: 50%;
    animation: nodesPulse 4s infinite ease-in-out;
    box-shadow: 0 0 15px #00ff88;
}

.network-connection {
    position: absolute;
    height: 1px;
    background: linear-gradient(90deg, #00ff88, transparent);
    animation: connectionPulse 6s infinite ease-in-out;
    transform-origin: left center;
}

/* ========== KEYFRAME ANIMATIONS ========== */

@keyframes virusFloat {
    0%, 100% {
        transform: translateY(0) translateX(0) rotate(0deg);
        opacity: 0.8;
    }
    25% {
        transform: translateY(-20px) translateX(10px) rotate(90deg);
        opacity: 1;
    }
    50% {
        transform: translateY(-10px) translateX(-15px) rotate(180deg);
        opacity: 0.9;
    }
    75% {
        transform: translateY(-30px) translateX(5px) rotate(270deg);
        opacity: 1;
    }
}

@keyframes virusRotate {
    0% {
        transform: rotate(0deg) scale(0.8);
    }
    100% {
        transform: rotate(360deg) scale(0.8);
    }
}

@keyframes binaryFall {
    0% {
        transform: translateY(-100px);
        opacity: 0;
    }
    10% {
        opacity: 0.6;
    }
    90% {
        opacity: 0.6;
    }
    100% {
        transform: translateY(calc(100vh + 100px));
        opacity: 0;
    }
}

@keyframes circuitPulse {
    0%, 100% {
        opacity: 0.3;
        box-shadow: 0 0 5px #00ff88;
    }
    50% {
        opacity: 1;
        box-shadow: 0 0 20px #00ff88;
    }
}

@keyframes circuitHorizontal {
    0% {
        transform: translateX(-220px);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateX(calc(100vw + 20px));
        opacity: 0;
    }
}

/* Vertical circuit animation removed */
@keyframes circuitVertical {
    0%, 100% {
        opacity: 0;
        display: none;
    }
    0% {
        transform: translateX(-50px) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.5;
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.2);
    }
}

@keyframes glitchMove {
    0% {
        transform: translateX(-120px) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.5;
    }
    90% {
        opacity: 0.5;
    }
    100% {
        transform: translateX(calc(100vw + 20px)) rotate(360deg);
        opacity: 0;
    }
}

@keyframes nodesPulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.7;
    }
    50% {
        transform: scale(1.5);
        opacity: 1;
    }
}

@keyframes connectionPulse {
    0% {
        transform: scaleX(0);
        opacity: 0;
    }
    50% {
        transform: scaleX(1);
        opacity: 1;
    }
    100% {
        transform: scaleX(0);
        opacity: 0;
    }
}

/* ========== RESPONSIVE DESIGN ========== */

@media (max-width: 768px) {
    .virus-particle {
        animation-duration: 6s;
    }
    
    .virus-particle.small {
        width: 6px;
        height: 6px;
    }
    
    .virus-particle.medium {
        width: 10px;
        height: 10px;
    }
    
    .virus-particle.large {
        width: 14px;
        height: 14px;
    }
    
    .binary-rain {
        font-size: 10px;
        line-height: 1.8;
        letter-spacing: 2px;
        animation: binaryFall 35s infinite linear;
        opacity: 0.4;
    }
    
    .circuit-line.horizontal {
        width: 150px;
    }
    
    /* Vertical circuit lines removed for mobile */
    .circuit-line.vertical {
        display: none !important;
    }
    
    .data-packet {
        width: 16px;
        height: 16px;
    }
}

@media (max-width: 480px) {
    .virus-particle.small {
        width: 4px;
        height: 4px;
    }
    
    .virus-particle.medium {
        width: 8px;
        height: 8px;
    }
    
    .virus-particle.large {
        width: 12px;
        height: 12px;
    }
    
    .binary-rain {
        font-size: 8px;
        line-height: 2;
        letter-spacing: 3px;
        animation: binaryFall 45s infinite linear;
        opacity: 0.3;
    }
    
    .circuit-line.horizontal {
        width: 100px;
    }
    
    /* Vertical circuit lines removed for small screens */
    .circuit-line.vertical {
        display: none !important;
    }
    
    .data-packet {
        width: 12px;
        height: 12px;
    }
}

/* ========== PERFORMANCE OPTIMIZATIONS ========== */

.virus-animation-container * {
    will-change: transform, opacity;
    backface-visibility: hidden;
    perspective: 1000px;
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    .virus-particle,
    .binary-rain,
    .circuit-line,
    .data-packet,
    .glitch-effect,
    .network-node,
    .network-connection {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}

