/* ========================================
   COMPUTATIONAL CONSCIOUSNESS - REFINED
   Subtle Professional Effects
   ======================================== */

/* ========== FLOWING DATA STREAMS ========== */
.data-stream {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
    opacity: 0.08;
}

.data-column {
    position: absolute;
    top: -100%;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    color: rgba(59, 130, 246, 0.5);
    writing-mode: vertical-rl;
    letter-spacing: 2px;
    animation: dataFlow linear infinite;
    text-shadow: 0 0 6px rgba(59, 130, 246, 0.3);
}

@keyframes dataFlow {
    0% {
        top: -100%;
        opacity: 0;
    }
    10% {
        opacity: 0.4;
    }
    90% {
        opacity: 0.4;
    }
    100% {
        top: 100%;
        opacity: 0;
    }
}

/* Generate multiple columns with different speeds */
.data-column:nth-child(1) { left: 5%; animation-duration: 18s; animation-delay: 0s; }
.data-column:nth-child(2) { left: 15%; animation-duration: 22s; animation-delay: 3s; }
.data-column:nth-child(3) { left: 25%; animation-duration: 16s; animation-delay: 6s; }
.data-column:nth-child(4) { left: 35%; animation-duration: 24s; animation-delay: 2s; }
.data-column:nth-child(5) { left: 45%; animation-duration: 20s; animation-delay: 5s; }
.data-column:nth-child(6) { left: 55%; animation-duration: 18s; animation-delay: 8s; }
.data-column:nth-child(7) { left: 65%; animation-duration: 23s; animation-delay: 4s; }
.data-column:nth-child(8) { left: 75%; animation-duration: 17s; animation-delay: 7s; }
.data-column:nth-child(9) { left: 85%; animation-duration: 21s; animation-delay: 2.5s; }
.data-column:nth-child(10) { left: 95%; animation-duration: 19s; animation-delay: 5.5s; }

/* ========== NEURAL NETWORK GRID ========== */
.neural-grid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    opacity: 0.04;
}

.neural-grid svg {
    width: 100%;
    height: 100%;
}

.grid-line {
    stroke: rgba(59, 130, 246, 0.25);
    stroke-width: 1;
    animation: gridPulse 5s ease-in-out infinite;
}

.grid-node {
    fill: rgba(59, 130, 246, 0.4);
    animation: nodePulse 4s ease-in-out infinite;
}

@keyframes gridPulse {
    0%, 100% { opacity: 0.2; }
    50% { opacity: 0.5; }
}

@keyframes nodePulse {
    0%, 100% {
        opacity: 0.4;
        r: 2;
    }
    50% {
        opacity: 0.8;
        r: 4;
    }
}

/* ========== GLITCH ASSEMBLY EFFECT ========== */
.glitch-assemble {
    position: relative;
    animation: glitchAssemble 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
}

@keyframes glitchAssemble {
    0% {
        transform: translate(0);
        opacity: 0;
        filter: blur(6px);
    }
    20% {
        transform: translate(-3px, 3px);
        opacity: 0.4;
    }
    40% {
        transform: translate(3px, -3px);
        opacity: 0.7;
    }
    60% {
        transform: translate(-1px, 1px);
        filter: blur(3px);
    }
    100% {
        transform: translate(0);
        opacity: 1;
        filter: blur(0);
    }
}

.glitch-assemble:nth-child(1) { animation-delay: 0.1s; }
.glitch-assemble:nth-child(2) { animation-delay: 0.2s; }
.glitch-assemble:nth-child(3) { animation-delay: 0.3s; }

/* ========== GEOMETRIC PATTERN OVERLAY ========== */
.geometric-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    opacity: 0.03;
    background-image:
        linear-gradient(rgba(59, 130, 246, 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(59, 130, 246, 0.08) 1px, transparent 1px);
    background-size: 120px 120px;
    animation: geometricShift 40s linear infinite;
}

@keyframes geometricShift {
    0% {
        background-position: 0 0;
    }
    100% {
        background-position: 120px 120px;
    }
}

/* ========== COMPUTATIONAL PULSE EFFECT ========== */
.compute-pulse {
    position: relative;
}

.compute-pulse::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(1);
    opacity: 0;
    animation: computePulse 4s ease-out infinite;
}

@keyframes computePulse {
    0% {
        transform: translate(-50%, -50%) scale(0.85);
        opacity: 0.6;
    }
    100% {
        transform: translate(-50%, -50%) scale(1.8);
        opacity: 0;
    }
}

/* ========== SCAN LINE EFFECT ========== */
.scan-line {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg,
        transparent,
        rgba(59, 130, 246, 0.3) 50%,
        transparent);
    pointer-events: none;
    z-index: 9999;
    animation: scanLineMove 10s linear infinite;
    opacity: 0.2;
}

@keyframes scanLineMove {
    0% {
        top: 0;
        opacity: 0;
    }
    10% {
        opacity: 0.2;
    }
    90% {
        opacity: 0.2;
    }
    100% {
        top: 100%;
        opacity: 0;
    }
}

/* ========== BINARY RAIN (SUBTLE) ========== */
.binary-particle {
    position: fixed;
    font-family: 'Courier New', monospace;
    font-size: 10px;
    color: rgba(59, 130, 246, 0.15);
    pointer-events: none;
    z-index: 1;
    animation: binaryFall linear forwards;
}

@keyframes binaryFall {
    0% {
        top: -20px;
        opacity: 0;
    }
    10% {
        opacity: 0.2;
    }
    90% {
        opacity: 0.2;
    }
    100% {
        top: 100vh;
        opacity: 0;
    }
}

/* ========== HOLOGRAPHIC SHIMMER ========== */
.holographic-shimmer {
    position: relative;
    overflow: hidden;
}

.holographic-shimmer::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 35%,
        rgba(59, 130, 246, 0.06) 50%,
        transparent 65%
    );
    animation: shimmerMove 10s linear infinite;
    pointer-events: none;
}

@keyframes shimmerMove {
    0% {
        transform: translate(-100%, -100%) rotate(45deg);
    }
    100% {
        transform: translate(100%, 100%) rotate(45deg);
    }
}

/* ========== PROCESSING INDICATOR ========== */
.processing-dots {
    display: inline-flex;
    gap: 4px;
}

.processing-dot {
    width: 5px;
    height: 5px;
    background: rgba(59, 130, 246, 0.5);
    border-radius: 50%;
    animation: processingDot 1.4s ease-in-out infinite;
}

.processing-dot:nth-child(1) { animation-delay: 0s; }
.processing-dot:nth-child(2) { animation-delay: 0.2s; }
.processing-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes processingDot {
    0%, 80%, 100% {
        opacity: 0.25;
        transform: scale(0.8);
    }
    40% {
        opacity: 0.8;
        transform: scale(1.1);
    }
}

/* ========== ENERGY FIELD AROUND GLOBE ========== */
.energy-field {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 115%;
    height: 115%;
    border: 1px solid rgba(59, 130, 246, 0.15);
    border-radius: 50%;
    animation: energyPulse 5s ease-in-out infinite;
}

.energy-field:nth-child(2) {
    animation-delay: 1.5s;
    width: 130%;
    height: 130%;
}

.energy-field:nth-child(3) {
    animation-delay: 3s;
    width: 145%;
    height: 145%;
}

@keyframes energyPulse {
    0%, 100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.92);
    }
    50% {
        opacity: 0.3;
        transform: translate(-50%, -50%) scale(1.05);
    }
}

/* ========== RESPONSIVE OPTIMIZATIONS ========== */
@media (max-width: 768px) {
    .data-stream {
        opacity: 0.05;
    }

    .neural-grid {
        opacity: 0.02;
    }

    .geometric-overlay {
        opacity: 0.02;
    }

    .data-column:nth-child(n+6) {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .data-column,
    .scan-line,
    .binary-particle,
    .holographic-shimmer::before,
    .energy-field,
    .processing-dot {
        animation: none;
    }
}

/* ========== PERFORMANCE OPTIMIZATIONS ========== */
.data-stream,
.neural-grid,
.geometric-overlay,
.scan-line {
    will-change: transform, opacity;
    transform: translateZ(0);
    backface-visibility: hidden;
}
