/* ========================================
   MODERN LOADING SCREEN
   ======================================== */

.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.page-loader.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader-content {
    text-align: center;
    color: white;
}

.loader-logo {
    width: 120px;
    height: 120px;
    margin: 0 auto 30px;
    animation: pulse 2s ease-in-out infinite;
}

.loader-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: brightness(0) invert(1);
}

/* Spinner */
.loader-spinner {
    width: 60px;
    height: 60px;
    margin: 0 auto 20px;
    position: relative;
}

.loader-spinner::before,
.loader-spinner::after {
    content: '';
    position: absolute;
    border-radius: 50%;
}

.loader-spinner::before {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255, 255, 255, 0.2);
}

.loader-spinner::after {
    width: 60px;
    height: 60px;
    border: 4px solid transparent;
    border-top-color: white;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

.loader-text {
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 1px;
    margin-top: 20px;
}

.loader-dots {
    display: inline-block;
}

.loader-dots::after {
    content: '';
    animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
    0%, 20% {
        content: '';
    }
    40% {
        content: '.';
    }
    60% {
        content: '..';
    }
    80%, 100% {
        content: '...';
    }
}

/* Progress Bar */
.loader-progress {
    width: 200px;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    margin: 20px auto 0;
    overflow: hidden;
}

.loader-progress-bar {
    height: 100%;
    background: white;
    border-radius: 2px;
    animation: progress 2s ease-in-out infinite;
}

@keyframes progress {
    0% {
        width: 0%;
    }
    50% {
        width: 70%;
    }
    100% {
        width: 100%;
    }
}

/* Alternative Spinner Styles */
.loader-spinner-alt {
    width: 50px;
    height: 50px;
    margin: 0 auto;
    position: relative;
}

.loader-spinner-alt div {
    position: absolute;
    width: 6px;
    height: 6px;
    background: white;
    border-radius: 50%;
    animation: loader-spinner-alt 1.2s linear infinite;
}

.loader-spinner-alt div:nth-child(1) {
    animation-delay: 0s;
    top: 22px;
    left: 44px;
}

.loader-spinner-alt div:nth-child(2) {
    animation-delay: -0.1s;
    top: 11px;
    left: 40px;
}

.loader-spinner-alt div:nth-child(3) {
    animation-delay: -0.2s;
    top: 4px;
    left: 33px;
}

@keyframes loader-spinner-alt {
    0%, 20%, 80%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.5);
        opacity: 0.5;
    }
}

