/* ZenRoot Custom Loader Styles */

/* Global Loader Overlay */
#global-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.9); /* Light mode bg with blur */
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

[data-bs-theme="dark"] #global-loader {
    background-color: rgba(11, 16, 33, 0.85); /* Dark mode bg */
}

#global-loader.visible {
    opacity: 1;
    visibility: visible;
}

/* Solar System Loader Container */
.zr-loader-system {
    position: relative;
    width: 80px;
    height: 80px;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Sun (Center) */
.zr-loader-sun {
    width: 20px;
    height: 20px;
    background-color: var(--accent-color);
    border-radius: 50%;
    box-shadow: 0 0 20px var(--accent-color);
    animation: sun-pulse 2s ease-in-out infinite;
    z-index: 10;
}

/* Orbits */
.zr-loader-orbit {
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(142, 68, 173, 0.15); /* Light accent border */
    display: flex;
    justify-content: center;
    align-items: center;
}

[data-bs-theme="dark"] .zr-loader-orbit {
    border-color: rgba(162, 155, 254, 0.15);
}

/* Inner Orbit */
.orbit-inner {
    width: 50px;
    height: 50px;
    animation: orbit-spin 3s linear infinite;
}

/* Outer Orbit */
.orbit-outer {
    width: 80px;
    height: 80px;
    animation: orbit-spin 5s linear infinite reverse;
}

/* Planets */
.zr-loader-planet {
    position: absolute;
    border-radius: 50%;
}

/* Inner Planet (Gold) */
.orbit-inner .zr-loader-planet {
    top: -4px; /* Position on the ring */
    width: 8px;
    height: 8px;
    background-color: var(--secondary-accent-color);
    box-shadow: 0 0 8px var(--secondary-accent-color);
}

/* Outer Planet (Indigo/Blue) */
.orbit-outer .zr-loader-planet {
    bottom: -5px; /* Position on the ring */
    width: 10px;
    height: 10px;
    background-color: #6366f1; 
    box-shadow: 0 0 10px #6366f1;
}

[data-bs-theme="dark"] .orbit-outer .zr-loader-planet {
    background-color: #818cf8;
    box-shadow: 0 0 10px #818cf8;
}

/* Animations */
@keyframes sun-pulse {
    0%, 100% { transform: scale(1); opacity: 1; box-shadow: 0 0 20px var(--accent-color); }
    50% { transform: scale(0.9); opacity: 0.8; box-shadow: 0 0 10px var(--accent-color); }
}

@keyframes orbit-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
