/* ================================================
   CUSTOM PRELOADER - ULTRA MODERN DESIGN
   ================================================ */

.custom-login-preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0s linear 0.3s;
}

.custom-login-preloader.show {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.3s ease;
}

.preloader-content {
    /* make content fixed centered (resilient to parent transforms) */
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 220px;
    height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Triple Ring Spinner */
.spinner-rings {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.spinner-ring {
    position: absolute;
    border-radius: 50%;
    border: 3px solid transparent;
}

.spinner-ring-1 {
    width: 140px;
    height: 140px;
    top: -70px;
    left: -70px;
    border-top-color: #d9534f;
    border-right-color: #d9534f;
    animation: spin-ring-1 1.5s cubic-bezier(0.68, -0.55, 0.27, 1.55) infinite;
}

.spinner-ring-2 {
    width: 100px;
    height: 100px;
    top: -50px;
    left: -50px;
    border-bottom-color: #f0ad4e;
    border-left-color: #f0ad4e;
    animation: spin-ring-2 1.2s cubic-bezier(0.68, -0.55, 0.27, 1.55) infinite;
    animation-delay: 0.1s;
}

.spinner-ring-3 {
    width: 60px;
    height: 60px;
    top: -30px;
    left: -30px;
    border-top-color: #5bc0de;
    border-right-color: #5bc0de;
    animation: spin-ring-3 1s cubic-bezier(0.68, -0.55, 0.27, 1.55) infinite;
    animation-delay: 0.2s;
}

@keyframes spin-ring-1 {
    0% {
        transform: rotate(0deg);
    }

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

@keyframes spin-ring-2 {
    0% {
        transform: rotate(0deg);
    }

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

@keyframes spin-ring-3 {
    0% {
        transform: rotate(0deg);
    }

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

/* Center Circle with Glow */
.spinner-center {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin-top: -20px;
    margin-left: -20px;
    background: linear-gradient(135deg, #d9534f 0%, #c9302c 100%);
    border-radius: 50%;
    box-shadow:
        0 0 20px rgba(217, 83, 79, 0.6),
        0 0 40px rgba(217, 83, 79, 0.4),
        0 0 60px rgba(217, 83, 79, 0.2);
    animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {

    0%,
    100% {
        transform: scale(1);
        box-shadow:
            0 0 20px rgba(217, 83, 79, 0.6),
            0 0 40px rgba(217, 83, 79, 0.4),
            0 0 60px rgba(217, 83, 79, 0.2);
    }

    50% {
        transform: scale(1.1);
        box-shadow:
            0 0 30px rgba(217, 83, 79, 0.8),
            0 0 50px rgba(217, 83, 79, 0.6),
            0 0 70px rgba(217, 83, 79, 0.4);
    }
}

/* Loading Text */
.preloader-text-wrapper {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-top: 30px;
    text-align: center;
    white-space: nowrap;
}

.preloader-main-text {
    font-size: 18px;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 8px 0;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    letter-spacing: 1px;
}

.preloader-sub-text {
    font-size: 13px;
    font-weight: 500;
    color: #e0e0e0;
    margin: 0;
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.5);
}

/* Animated Dots */
.loading-dots {
    display: inline-block;
}

.loading-dots span {
    animation: dot-blink 1.4s infinite;
    opacity: 0;
}

.loading-dots span:nth-child(1) {
    animation-delay: 0s;
}

.loading-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.loading-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes dot-blink {

    0%,
    60%,
    100% {
        opacity: 0;
    }

    30% {
        opacity: 1;
    }
}

/* Particles Effect */
.preloader-particles {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 200px;
    height: 200px;
    margin-top: -100px;
    margin-left: -100px;
    pointer-events: none;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: #ffffff;
    border-radius: 50%;
    opacity: 0;
    animation: particle-float 3s ease-in-out infinite;
}

.particle:nth-child(1) {
    top: 20%;
    left: 50%;
    animation-delay: 0s;
}

.particle:nth-child(2) {
    top: 50%;
    left: 80%;
    animation-delay: 0.5s;
}

.particle:nth-child(3) {
    top: 80%;
    left: 50%;
    animation-delay: 1s;
}

.particle:nth-child(4) {
    top: 50%;
    left: 20%;
    animation-delay: 1.5s;
}

@keyframes particle-float {

    0%,
    100% {
        opacity: 0;
        transform: translateY(0) scale(1);
    }

    50% {
        opacity: 0.8;
        transform: translateY(-20px) scale(1.5);
    }
}

/* Progress Bar */
.preloader-progress {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-top: 70px;
    width: 200px;
    height: 3px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    overflow: hidden;
}

.preloader-progress-bar {
    height: 100%;
    background: linear-gradient(90deg,
            #d9534f 0%,
            #f0ad4e 50%,
            #5bc0de 100%);
    border-radius: 10px;
    animation: progress-slide 2s ease-in-out infinite;
    box-shadow: 0 0 10px rgba(217, 83, 79, 0.8);
}

@keyframes progress-slide {
    0% {
        width: 0%;
    }

    50% {
        width: 70%;
    }

    100% {
        width: 100%;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .preloader-content {
        width: 160px;
        height: 160px;
    }

    .spinner-ring-1 {
        width: 120px;
        height: 120px;
        top: -60px;
        left: -60px;
    }

    .spinner-ring-2 {
        width: 85px;
        height: 85px;
        top: -42.5px;
        left: -42.5px;
    }

    .spinner-ring-3 {
        width: 50px;
        height: 50px;
        top: -25px;
        left: -25px;
    }

    .preloader-main-text {
        font-size: 16px;
    }

    .preloader-sub-text {
        font-size: 12px;
    }
}