/**
 * ============================================
 * Glen Infotech - Preloader Styles
 * ============================================
 * 
 * Elegant loading screen with brand colors
 */


/* ============================================
   PRELOADER CONTAINER
   ============================================ */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #0A0A0F;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

/* Hide preloader when loaded */
#preloader.loaded {
    opacity: 0;
    visibility: hidden;
}


/* ============================================
   LOADER ANIMATION
   ============================================ */

/* Circular Spinner */
.loader {
    position: relative;
    width: 80px;
    height: 80px;
}

.loader-circle {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 4px solid transparent;
    border-top-color: #FF3CAC;
    border-right-color: #FF7043;
    border-bottom-color: #FFB800;
    border-radius: 50%;
    animation: rotate 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
}

/* Staggered circles for depth effect */
.loader-circle:nth-child(2) {
    border-top-color: #FF7043;
    border-right-color: #FFB800;
    border-bottom-color: #FF3CAC;
    animation-delay: -0.4s;
    width: 90%;
    height: 90%;
    top: 5%;
    left: 5%;
}

.loader-circle:nth-child(3) {
    border-top-color: #FFB800;
    border-right-color: #FF3CAC;
    border-bottom-color: #FF7043;
    animation-delay: -0.8s;
    width: 80%;
    height: 80%;
    top: 10%;
    left: 10%;
}

/* Rotation animation */
@keyframes rotate {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}


/* ============================================
   LOADING TEXT
   ============================================ */
.loader-text {
    position: absolute;
    top: 120px;
    left: 50%;
    transform: translateX(-50%);
    font-family: 'Rajdhani', sans-serif;
    font-size: 1.25rem;
    font-weight: 600;
    background: linear-gradient(135deg, #FF3CAC 0%, #FF7043 50%, #FFB800 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: pulse 1.5s ease-in-out infinite;
    white-space: nowrap;
}

/* Pulse animation for text */
@keyframes pulse {
    0%, 100% {
        opacity: 0.6;
    }
    50% {
        opacity: 1;
    }
}


/* ============================================
   ALTERNATIVE LOADER STYLES
   ============================================ */

/* Dots Loader (Alternative) */
.dots-loader {
    display: flex;
    gap: 12px;
}

.dots-loader span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #FF7043;
    animation: bounce 1.4s infinite ease-in-out;
}

.dots-loader span:nth-child(1) {
    background: #FF3CAC;
    animation-delay: 0s;
}

.dots-loader span:nth-child(2) {
    background: #FF7043;
    animation-delay: 0.2s;
}

.dots-loader span:nth-child(3) {
    background: #FFB800;
    animation-delay: 0.4s;
}

@keyframes bounce {
    0%, 80%, 100% {
        transform: scale(0);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}


/* ============================================
   PROGRESS BAR LOADER (Alternative)
   ============================================ */
.progress-loader {
    width: 200px;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
    margin-top: 20px;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #FF3CAC 0%, #FF7043 50%, #FFB800 100%);
    background-size: 200% 100%;
    animation: progress 1.5s ease-in-out infinite;
}

@keyframes progress {
    0% {
        width: 0%;
        background-position: 0% 50%;
    }
    50% {
        width: 70%;
        background-position: 100% 50%;
    }
    100% {
        width: 100%;
        background-position: 200% 50%;
    }
}


/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 576px) {
    .loader {
        width: 60px;
        height: 60px;
    }
    
    .loader-text {
        font-size: 1rem;
        top: 100px;
    }
}
