/* preloader.css */

/* ========================================
   Full Page Preloader (First Load)
======================================== */
/* Force preloader on top of everything */
#preloader,
#mini-preloader {
    position: fixed !important;
    z-index: 999999 !important;
}

#preloader.full-page {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 50%, #bae6fd 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

#preloader.full-page.loaded {
    opacity: 0;
    visibility: hidden;
}

/* Background Animation Particles */
.preloader-bg {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.particle {
    position: absolute;
    border-radius: 50%;
    background: rgba(20, 108, 148, 0.1);
    animation: float 20s infinite ease-in-out;
}

.particle:nth-child(1) {
    width: 80px;
    height: 80px;
    left: 10%;
    top: 20%;
    animation-delay: 0s;
}

.particle:nth-child(2) {
    width: 60px;
    height: 60px;
    left: 80%;
    top: 30%;
    animation-delay: 2s;
}

.particle:nth-child(3) {
    width: 100px;
    height: 100px;
    left: 50%;
    top: 60%;
    animation-delay: 4s;
}

.particle:nth-child(4) {
    width: 50px;
    height: 50px;
    left: 20%;
    top: 70%;
    animation-delay: 6s;
}

.particle:nth-child(5) {
    width: 70px;
    height: 70px;
    left: 70%;
    top: 80%;
    animation-delay: 8s;
}

@keyframes float {
    0%,
    100% {
        transform: translateY(0) translateX(0) scale(1);
        opacity: 0.3;
    }
    25% {
        transform: translateY(-30px) translateX(20px) scale(1.1);
        opacity: 0.5;
    }
    50% {
        transform: translateY(-60px) translateX(-20px) scale(0.9);
        opacity: 0.4;
    }
    75% {
        transform: translateY(-30px) translateX(30px) scale(1.05);
        opacity: 0.6;
    }
}

/* Logo Container */
.preloader-content {
    position: relative;
    z-index: 2;
    text-align: center;
}

.logo-container {
    position: relative;
    width: 300px;
    height: 300px;
    margin: 0 auto 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: logoEntrance 1.2s ease-out;
}

@keyframes logoEntrance {
    0% {
        opacity: 0;
        transform: scale(0.5) rotate(-10deg);
    }
    60% {
        transform: scale(1.1) rotate(5deg);
    }
    100% {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
}

/* Frosted Glass Background */
.glass-effect {
    position: absolute;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 50%;
    border: 2px solid rgba(20, 108, 148, 0.2);
    box-shadow: 0 8px 32px rgba(20, 108, 148, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
    animation: glassGlow 3s ease-in-out infinite;
}

@keyframes glassGlow {
    0%,
    100% {
        box-shadow: 0 8px 32px rgba(20, 108, 148, 0.15),
            inset 0 1px 0 rgba(255, 255, 255, 0.5),
            0 0 30px rgba(25, 167, 206, 0.2);
    }
    50% {
        box-shadow: 0 8px 32px rgba(20, 108, 148, 0.15),
            inset 0 1px 0 rgba(255, 255, 255, 0.5),
            0 0 60px rgba(25, 167, 206, 0.4);
    }
}

/* Logo Image */
.logo-img {
    position: relative;
    z-index: 1;
    width: 200px;
    height: auto;
    filter: drop-shadow(0 10px 30px rgba(25, 167, 206, 0.3));
    animation: logoFloat 3s ease-in-out infinite;
}

@keyframes logoFloat {
    0%,
    100% {
        transform: translateY(0px) rotate(0deg);
    }
    50% {
        transform: translateY(-10px) rotate(2deg);
    }
}

/* Rotating Ring */
.rotating-ring {
    position: absolute;
    width: 320px;
    height: 320px;
    border: 3px solid transparent;
    border-top-color: rgba(20, 108, 148, 0.6);
    border-right-color: rgba(25, 167, 206, 0.3);
    border-radius: 50%;
    animation: rotate 2s linear infinite;
}

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

/* Loading Text */
.loading-text {
    color: #146c94;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    margin-bottom: 1.5rem;
    animation: textPulse 2s ease-in-out infinite;
}

@keyframes textPulse {
    0%,
    100% {
        opacity: 0.6;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
}

/* Loading Dots */
.loading-dots {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: linear-gradient(135deg, #146c94, #19a7ce);
    animation: dotBounce 1.4s ease-in-out infinite;
    box-shadow: 0 0 20px rgba(25, 167, 206, 0.6);
}

.dot:nth-child(1) {
    animation-delay: 0s;
}

.dot:nth-child(2) {
    animation-delay: 0.2s;
}

.dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes dotBounce {
    0%,
    80%,
    100% {
        transform: scale(1);
        opacity: 0.5;
    }
    40% {
        transform: scale(1.3);
        opacity: 1;
    }
}

/* Progress Bar */
.progress-container {
    width: 300px;
    height: 4px;
    background: rgba(20, 108, 148, 0.2);
    border-radius: 10px;
    overflow: hidden;
    margin: 2rem auto 1rem;
    box-shadow: inset 0 2px 4px rgba(20, 108, 148, 0.1);
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #146c94, #19a7ce, #146c94);
    background-size: 200% 100%;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(25, 167, 206, 0.6);
    animation: progressMove 2s ease-in-out infinite,
        progressGlow 1.5s ease-in-out infinite;
    width: 0%;
    transition: width 0.3s ease;
}

@keyframes progressMove {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

@keyframes progressGlow {
    0%,
    100% {
        box-shadow: 0 0 20px rgba(25, 167, 206, 0.6);
    }
    50% {
        box-shadow: 0 0 40px rgba(25, 167, 206, 1);
    }
}

/* Percentage Text */
.percentage-text {
    color: #146c94;
    font-size: 0.875rem;
    font-weight: 600;
    margin-top: 0.5rem;
    letter-spacing: 0.05em;
}

/* Shimmer Effect */
.shimmer {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.4),
        transparent
    );
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}
