/* Loader Styles */
.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.page-loader.loaded {
    opacity: 0;
    visibility: hidden;
}

.loader-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
}

.loader-logo {
    width: 120px;
    height: 120px;
    animation: logoScale 2s ease-in-out infinite;
}

.loader-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: brightness(0) invert(1); /* Make logo white */
}

.loader-text {
    color: white;
    font-size: 1.5rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 20px;
    opacity: 0.9;
    animation: fadeInOut 2s ease-in-out infinite;
}

.loader-spinner {
    width: 60px;
    height: 60px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top: 3px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loader-progress {
    width: 200px;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    overflow: hidden;
    position: relative;
}

.loader-progress-bar {
    width: 0%;
    height: 100%;
    background: white;
    border-radius: 2px;
    animation: progressLoad 3s ease-out forwards;
}

/* Animations */
@keyframes logoScale {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

@keyframes fadeInOut {
    0%, 100% {
        opacity: 0.9;
    }
    50% {
        opacity: 0.6;
    }
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

@keyframes progressLoad {
    0% {
        width: 0%;
    }
    25% {
        width: 25%;
    }
    50% {
        width: 60%;
    }
    75% {
        width: 85%;
    }
    100% {
        width: 100%;
    }
}

/* Loading dots animation */
.loader-dots {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

.loader-dot {
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
    animation: dotBounce 1.4s ease-in-out infinite both;
}

.loader-dot:nth-child(1) { animation-delay: -0.32s; }
.loader-dot:nth-child(2) { animation-delay: -0.16s; }
.loader-dot:nth-child(3) { animation-delay: 0s; }

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

/* Responsive design */
@media (max-width: 768px) {
    .loader-logo {
        width: 100px;
        height: 100px;
    }
    
    .loader-text {
        font-size: 1.3rem;
    }
    
    .loader-progress {
        width: 150px;
    }
}

@media (max-width: 480px) {
    .loader-logo {
        width: 80px;
        height: 80px;
    }
    
    .loader-text {
        font-size: 1.1rem;
    }
    
    .loader-progress {
        width: 120px;
    }
    
    .loader-spinner {
        width: 45px;
        height: 45px;
    }
}