/* Global Loader Animation - Minimal Style */

.global-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    pointer-events: none;
}

.global-loader.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* Loader Content Container */
.loader-content {
    text-align: center;
    position: relative;
    z-index: 1;
}

/* Neural Network Animation - Main Container */
.neural-network {
    width: 100px;
    height: 100px;
    position: relative;
    margin: 0 auto;
}

/* SVG for particles and connections */
.neural-svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 0 20px rgba(100, 200, 255, 0.3));
}

/* Animated particles */
.particle {
    r: 3px;
    fill: url(#particleGradient);
    filter: drop-shadow(0 0 4px rgba(141, 177, 217, 0.8));
    animation: particlePulse 2s ease-in-out infinite;
}

.particle:nth-child(1) { animation-delay: 0s; }
.particle:nth-child(2) { animation-delay: 0.2s; }
.particle:nth-child(3) { animation-delay: 0.4s; }
.particle:nth-child(4) { animation-delay: 0.6s; }
.particle:nth-child(5) { animation-delay: 0.8s; }
.particle:nth-child(6) { animation-delay: 1s; }
.particle:nth-child(7) { animation-delay: 1.2s; }
.particle:nth-child(8) { animation-delay: 1.4s; }

@keyframes particlePulse {
    0%, 100% {
        r: 2px;
        opacity: 0.5;
        filter: drop-shadow(0 0 2px rgba(141, 177, 217, 0.4));
    }
    50% {
        r: 4px;
        opacity: 1;
        filter: drop-shadow(0 0 8px rgba(141, 177, 217, 1));
    }
}

/* Connection lines animation */
.connection {
    stroke: url(#connectionGradient);
    stroke-width: 1.5;
    fill: none;
    opacity: 0.3;
    animation: connectionFlow 3s ease-in-out infinite;
}

.connection:nth-child(1) { animation-delay: 0s; }
.connection:nth-child(2) { animation-delay: 0.3s; }
.connection:nth-child(3) { animation-delay: 0.6s; }
.connection:nth-child(4) { animation-delay: 0.9s; }
.connection:nth-child(5) { animation-delay: 1.2s; }
.connection:nth-child(6) { animation-delay: 1.5s; }

@keyframes connectionFlow {
    0% {
        stroke-dasharray: 0, 100;
        opacity: 0.1;
    }
    50% {
        opacity: 0.5;
    }
    100% {
        stroke-dasharray: 100, 100;
        opacity: 0.1;
    }
}

/* Orbiting rings */
.orbit-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: 1.5px solid transparent;
    border-top-color: rgba(141, 177, 217, 0.6);
    border-right-color: rgba(141, 177, 217, 0.3);
    border-radius: 50%;
    animation: orbit linear infinite;
}

.orbit-ring:nth-child(1) {
    width: 40px;
    height: 40px;
    animation-duration: 4s;
    border-top-color: rgba(141, 177, 217, 0.8);
    border-right-color: rgba(141, 177, 217, 0.5);
}

.orbit-ring:nth-child(2) {
    width: 60px;
    height: 60px;
    animation-duration: 6s;
    animation-direction: reverse;
    border-top-color: rgba(141, 177, 217, 0.6);
    border-right-color: rgba(141, 177, 217, 0.3);
}

.orbit-ring:nth-child(3) {
    width: 80px;
    height: 80px;
    animation-duration: 8s;
    border-top-color: rgba(141, 177, 217, 0.4);
    border-right-color: rgba(141, 177, 217, 0.2);
}

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

/* Center dot */
.center-dot {
    position: absolute;
    width: 8px;
    height: 8px;
    background: radial-gradient(circle, rgba(141, 177, 217, 1), rgba(141, 177, 217, 0.4));
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 12px rgba(141, 177, 217, 1), inset 0 0 6px rgba(141, 177, 217, 0.8);
    animation: centerPulse 2s ease-in-out infinite;
}

@keyframes centerPulse {
    0%, 100% {
        width: 8px;
        height: 8px;
        box-shadow: 0 0 12px rgba(141, 177, 217, 1), inset 0 0 6px rgba(141, 177, 217, 0.8);
    }
    50% {
        width: 12px;
        height: 12px;
        box-shadow: 0 0 18px rgba(141, 177, 217, 1), inset 0 0 8px rgba(141, 177, 217, 1);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .neural-network {
        width: 100px;
        height: 100px;
        margin: 0 auto;
    }

    .orbit-ring:nth-child(1) {
        width: 40px;
        height: 40px;
    }

    .orbit-ring:nth-child(2) {
        width: 60px;
        height: 60px;
    }

    .orbit-ring:nth-child(3) {
        width: 80px;
        height: 80px;
    }
}
