/* =========================
   PRELOADER WITH DOTTED RINGS
========================= */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--anti-flash-white-color);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 999999;
}

/* Spinner wrapper */
.spinner {
    position: relative;
    width: 240px;
    height: 240px;
}

/* Common ring style */
.spinner .ring {
    position: absolute;
    border: 5px dotted transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin linear infinite;
}

/* Individual rings */
.spinner .ring1 {
    color: var(--lime-green-color);
    width: 80px;
    height: 80px;
    top: 80px;
    left: 80px;
    animation-duration: 1.5s;
}

.spinner .ring2 {
    color: var(--blue-color);
    width: 120px;
    height: 120px;
    top: 60px;
    left: 60px;
    animation-duration: 1.8s;
}

.spinner .ring3 {
    color: var(--forest-green-color);
    width: 160px;
    height: 160px;
    top: 40px;
    left: 40px;
    animation-duration: 2s;
}

.spinner .ring4 {
    color: var(--vista-blue-color);
    width: 200px;
    height: 200px;
    top: 20px;
    left: 20px;
    animation-duration: 2.2s;
}

.spinner .ring5 {
    color: #e9301d;
    width: 240px;
    height: 240px;
    top: 0;
    left: 0;
    animation-duration: 2.5s;
}

/* Glow effect */
.spinner .glow {
    position: absolute;
    width: 240px;
    height: 240px;
    border-radius: 50%;
    top: 0;
    left: 0;
    box-shadow:
        0 0 40px rgba(50, 205, 50, 0.25),
        0 0 40px rgba(0, 0, 255, 0.25),
        0 0 40px rgba(33, 136, 56, 0.25),
        0 0 40px rgba(144, 144, 238, 0.25),
        0 0 40px rgba(233, 48, 29, 0.25);
    animation: pulse 1.8s ease-in-out infinite;
}

/* Center logo */
.spinner .logo {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100px;
    height: 100px;
    z-index: 5;
}

.spinner .logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Animations */
@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(0.95);
        opacity: 0.7;
    }

    50% {
        transform: scale(1.05);
        opacity: 1;
    }
}

/* Hide animation */
#preloader.hide {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}
