/* Advanced AI Data Streams */
.ai-data-streams {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2;
}

.ai-data-stream {
    position: absolute;
    width: 2px;
    background: linear-gradient(to bottom, 
        transparent 0%, 
        #00ff88 20%, 
        #0066ff 50%, 
        #ff0066 80%, 
        transparent 100%);
    animation: aiDataFlow 3s linear infinite;
}

@keyframes aiDataFlow {
    0% { transform: translateY(-100px); opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { transform: translateY(100vh); opacity: 0; }
}

/* Interactive Node Network */
.interactive-node-network {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2;
}

.network-node {
    position: absolute;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    animation: networkNodePulse 2s ease-in-out infinite;
}

.network-node:hover {
    transform: scale(2);
}

.core-node {
    width: 20px;
    height: 20px;
    background: #ff0066;
    box-shadow: 0 0 30px #ff0066;
    animation: coreNodeRotate 4s linear infinite;
}

.data-node {
    background: #0066ff;
    box-shadow: 0 0 15px #0066ff;
}

.processing-node {
    background: #ffaa00;
    box-shadow: 0 0 15px #ffaa00;
    animation: processingNodeBlink 1s ease-in-out infinite alternate;
}

@keyframes networkNodePulse {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

@keyframes coreNodeRotate {
    0% { transform: rotate(0deg) scale(1); }
    50% { transform: rotate(180deg) scale(1.2); }
    100% { transform: rotate(360deg) scale(1); }
}

@keyframes processingNodeBlink {
    0% { opacity: 0.5; }
    100% { opacity: 1; }
}

/* Network Connections */
.network-connection {
    position: absolute;
    height: 1px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        #00ff88 20%, 
        #00ff88 80%, 
        transparent 100%);
    transform-origin: left center;
    animation: networkConnectionPulse 3s ease-in-out infinite;
}

@keyframes networkConnectionPulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.8; }
}

/* AI Brain Visualization */
.ai-brain-viz {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 120px;
    height: 120px;
    z-index: 3;
}

.brain-ring {
    position: absolute;
    border: 2px solid #00ff88;
    border-radius: 50%;
    animation: brainRingScan 4s ease-in-out infinite;
}

.brain-ring-1 {
    width: 100%;
    height: 100%;
    animation-delay: 0s;
}

.brain-ring-2 {
    width: 70%;
    height: 70%;
    top: 15%;
    left: 15%;
    border-color: #0066ff;
    animation-delay: 2s;
}

.brain-core {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 18px;
    font-weight: bold;
    color: #ff0066;
    text-shadow: 0 0 10px #ff0066;
    animation: brainCorePulse 2s ease-in-out infinite;
}

@keyframes brainRingScan {
    0%, 100% { border-color: #00ff88; transform: scale(1); }
    25% { border-color: #0066ff; transform: scale(1.05); }
    50% { border-color: #ff0066; transform: scale(1.1); }
    75% { border-color: #ffaa00; transform: scale(1.05); }
}

@keyframes brainCorePulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(-50%, -50%) scale(1.2); }
}

/* Code Matrix Effect */
.code-matrix {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    opacity: 0.1;
    z-index: 1;
}

.matrix-column {
    position: absolute;
    top: -100px;
    font-size: 12px;
    color: #00ff88;
    font-family: 'Courier New', monospace;
    animation: matrixColumnFall 10s linear infinite;
}

@keyframes matrixColumnFall {
    0% { transform: translateY(-100px); }
    100% { transform: translateY(100vh); }
}

/* Floating AI Particles */
.floating-ai-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2;
}

.floating-ai-particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: #00ff88;
    border-radius: 50%;
    animation: floatingParticleMove 8s ease-in-out infinite;
}

@keyframes floatingParticleMove {
    0%, 100% { 
        transform: translateY(0px) translateX(0px); 
        opacity: 0.3; 
    }
    25% { 
        transform: translateY(-50px) translateX(30px); 
        opacity: 1; 
    }
    50% { 
        transform: translateY(-20px) translateX(-20px); 
        opacity: 0.7; 
    }
    75% { 
        transform: translateY(-80px) translateX(50px); 
        opacity: 1; 
    }
}

/* HUD Elements */
.ai-hud {
    position: absolute;
    top: 20px;
    left: 20px;
    border: 1px solid #00ff88;
    background: rgba(0, 255, 136, 0.1);
    padding: 15px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    color: #00ff88;
    z-index: 4;
    backdrop-filter: blur(5px);
}

.hud-status {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 5px;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: #00ff88;
    border-radius: 50%;
    animation: statusDotBlink 1s ease-in-out infinite;
}

@keyframes statusDotBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* Performance Optimizations */
.ai-data-stream,
.network-node,
.network-connection,
.floating-ai-particle {
    will-change: transform, opacity;
    backface-visibility: hidden;
    perspective: 1000px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .ai-brain-viz {
        width: 80px;
        height: 80px;
        top: 10px;
        right: 10px;
    }
    
    .brain-core {
        font-size: 14px;
    }
    
    .ai-hud {
        font-size: 10px;
        padding: 10px;
    }
    
    .network-node {
        width: 8px;
        height: 8px;
    }
    
    .core-node {
        width: 14px;
        height: 14px;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    .ai-data-stream,
    .network-node,
    .network-connection,
    .brain-ring,
    .brain-core,
    .floating-ai-particle,
    .status-dot {
        animation: none;
    }
    
    .network-node {
        opacity: 0.8;
    }
    
    .status-dot {
        opacity: 1;
    }
}

/* Animated Data Particles */
.data-particle {
    position: absolute;
    width: 3px;
    height: 3px;
    background: linear-gradient(45deg, #667eea, #764ba2);
    border-radius: 50%;
    animation: particleMove 8s linear infinite;
}

.data-particle:nth-child(1) { 
    top: 10%; left: 5%; 
    animation-delay: 0s; 
    animation-duration: 6s;
}
.data-particle:nth-child(2) { 
    top: 30%; left: 15%; 
    animation-delay: 1s; 
    animation-duration: 8s;
}
.data-particle:nth-child(3) { 
    top: 60%; left: 25%; 
    animation-delay: 2s; 
    animation-duration: 7s;
}
.data-particle:nth-child(4) { 
    top: 80%; left: 35%; 
    animation-delay: 3s; 
    animation-duration: 9s;
}
.data-particle:nth-child(5) { 
    top: 20%; right: 20%; 
    animation-delay: 4s; 
    animation-duration: 6s;
}
.data-particle:nth-child(6) { 
    top: 50%; right: 10%; 
    animation-delay: 5s; 
    animation-duration: 8s;
}

@keyframes particleMove {
    0% { 
        transform: translateY(0px) translateX(0px) scale(0.5); 
        opacity: 0; 
    }
    10% { 
        opacity: 1; 
        transform: scale(1);
    }
    25% { 
        transform: translateY(-100px) translateX(50px) scale(1.2); 
    }
    50% { 
        transform: translateY(-50px) translateX(-30px) scale(0.8); 
    }
    75% { 
        transform: translateY(-150px) translateX(80px) scale(1.5); 
    }
    90% { 
        opacity: 1; 
    }
    100% { 
        transform: translateY(-200px) translateX(100px) scale(0); 
        opacity: 0; 
    }
}

/* Advanced Knowledge Graph */
.knowledge-graph-advanced {
    position: relative;
    width: 100%;
    height: 400px;
    overflow: hidden;
}

.graph-node {
    position: absolute;
    width: 8px;
    height: 8px;
    background: #667eea;
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(102, 126, 234, 0.6);
    animation: nodeGlow 3s ease-in-out infinite;
}

.graph-node.core {
    width: 16px;
    height: 16px;
    background: #764ba2;
    box-shadow: 0 0 20px rgba(118, 75, 162, 0.8);
    animation: coreRotation 6s linear infinite;
}

.graph-node.data {
    background: #00ff88;
    box-shadow: 0 0 8px rgba(0, 255, 136, 0.6);
    animation: dataProcessing 2s ease-in-out infinite;
}

.graph-connection {
    position: absolute;
    height: 1px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(102, 126, 234, 0.6) 20%, 
        rgba(102, 126, 234, 0.6) 80%, 
        transparent 100%);
    transform-origin: left center;
    animation: connectionFlow 4s ease-in-out infinite;
}

@keyframes nodeGlow {
    0%, 100% { 
        opacity: 0.6; 
        transform: scale(1); 
    }
    50% { 
        opacity: 1; 
        transform: scale(1.3); 
    }
}

@keyframes coreRotation {
    0% { 
        transform: rotate(0deg) scale(1); 
        box-shadow: 0 0 20px rgba(118, 75, 162, 0.8);
    }
    25% { 
        transform: rotate(90deg) scale(1.2); 
        box-shadow: 0 0 30px rgba(118, 75, 162, 1);
    }
    50% { 
        transform: rotate(180deg) scale(1); 
        box-shadow: 0 0 20px rgba(118, 75, 162, 0.8);
    }
    75% { 
        transform: rotate(270deg) scale(1.2); 
        box-shadow: 0 0 30px rgba(118, 75, 162, 1);
    }
    100% { 
        transform: rotate(360deg) scale(1); 
        box-shadow: 0 0 20px rgba(118, 75, 162, 0.8);
    }
}

@keyframes dataProcessing {
    0%, 100% { 
        opacity: 0.7; 
        background: #00ff88;
    }
    50% { 
        opacity: 1; 
        background: #0066ff;
    }
}

@keyframes connectionFlow {
    0% { 
        opacity: 0.3; 
        background: linear-gradient(90deg, 
            transparent 0%, 
            rgba(102, 126, 234, 0.6) 20%, 
            rgba(102, 126, 234, 0.6) 80%, 
            transparent 100%);
    }
    50% { 
        opacity: 0.8; 
        background: linear-gradient(90deg, 
            transparent 0%, 
            rgba(0, 255, 136, 0.8) 20%, 
            rgba(0, 255, 136, 0.8) 80%, 
            transparent 100%);
    }
    100% { 
        opacity: 0.3; 
        background: linear-gradient(90deg, 
            transparent 0%, 
            rgba(102, 126, 234, 0.6) 20%, 
            rgba(102, 126, 234, 0.6) 80%, 
            transparent 100%);
    }
}

/* AI Circuit Pattern */
.circuit-pattern {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.1;
    background-image: 
        linear-gradient(90deg, rgba(102, 126, 234, 0.3) 1px, transparent 1px),
        linear-gradient(rgba(102, 126, 234, 0.3) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: circuitMove 20s linear infinite;
}

@keyframes circuitMove {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

/* Holographic Effect */
.holographic {
    position: relative;
    overflow: hidden;
}

.holographic::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 30%,
        rgba(102, 126, 234, 0.1) 50%,
        transparent 70%
    );
    animation: holographicScan 8s linear infinite;
    pointer-events: none;
}

@keyframes holographicScan {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

/* Data Stream Visualization */
.data-stream-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
}

.data-stream-line {
    position: absolute;
    width: 2px;
    background: linear-gradient(to bottom,
        transparent 0%,
        rgba(0, 255, 136, 0.8) 20%,
        rgba(102, 126, 234, 0.8) 50%,
        rgba(118, 75, 162, 0.8) 80%,
        transparent 100%);
    animation: streamFlow 4s linear infinite;
}

.data-stream-line:nth-child(1) { 
    left: 10%; height: 150px; animation-delay: 0s; 
}
.data-stream-line:nth-child(2) { 
    left: 30%; height: 200px; animation-delay: 0.8s; 
}
.data-stream-line:nth-child(3) { 
    left: 50%; height: 120px; animation-delay: 1.6s; 
}
.data-stream-line:nth-child(4) { 
    left: 70%; height: 180px; animation-delay: 2.4s; 
}
.data-stream-line:nth-child(5) { 
    left: 90%; height: 160px; animation-delay: 3.2s; 
}

@keyframes streamFlow {
    0% { 
        transform: translateY(-100px); 
        opacity: 0; 
    }
    10% { 
        opacity: 1; 
    }
    90% { 
        opacity: 1; 
    }
    100% { 
        transform: translateY(calc(100vh + 100px)); 
        opacity: 0; 
    }
}

/* AI Processing Indicator */
.ai-processor {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 60px;
    margin: 20px;
}

.processor-core {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    background: #667eea;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: processorPulse 2s ease-in-out infinite;
}

.processor-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    border: 2px solid rgba(102, 126, 234, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: processorRotate 4s linear infinite;
}

.processor-ring:nth-child(2) {
    width: 40px;
    height: 40px;
    animation-duration: 3s;
    animation-direction: reverse;
}

.processor-ring:nth-child(3) {
    width: 60px;
    height: 60px;
    animation-duration: 5s;
}

@keyframes processorPulse {
    0%, 100% { 
        transform: translate(-50%, -50%) scale(1); 
        background: #667eea;
    }
    50% { 
        transform: translate(-50%, -50%) scale(1.2); 
        background: #764ba2;
    }
}

@keyframes processorRotate {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Quantum Effect */
.quantum-field {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 80%, rgba(102, 126, 234, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(118, 75, 162, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(0, 255, 136, 0.05) 0%, transparent 50%);
    animation: quantumShift 12s ease-in-out infinite;
}

@keyframes quantumShift {
    0%, 100% { 
        transform: scale(1) rotate(0deg); 
        opacity: 0.3;
    }
    33% { 
        transform: scale(1.1) rotate(120deg); 
        opacity: 0.5;
    }
    66% { 
        transform: scale(0.9) rotate(240deg); 
        opacity: 0.4;
    }
}

/* Responsive Enhancements */
@media (max-width: 768px) {
    .data-particle {
        width: 2px;
        height: 2px;
    }
    
    .graph-node {
        width: 6px;
        height: 6px;
    }
    
    .graph-node.core {
        width: 12px;
        height: 12px;
    }
    
    .ai-processor {
        width: 40px;
        height: 40px;
        margin: 10px;
    }
    
    .processor-core {
        width: 15px;
        height: 15px;
    }
    
    .processor-ring:nth-child(2) {
        width: 30px;
        height: 30px;
    }
    
    .processor-ring:nth-child(3) {
        width: 40px;
        height: 40px;
    }
}

/* Performance Optimizations */
.data-particle,
.graph-node,
.graph-connection,
.data-stream-line {
    will-change: transform, opacity;
    backface-visibility: hidden;
    perspective: 1000px;
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    .data-particle,
    .graph-node,
    .graph-connection,
    .data-stream-line,
    .processor-core,
    .processor-ring,
    .quantum-field,
    .circuit-pattern,
    .holographic::before {
        animation: none;
    }
}
