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

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

/* Logo animation */
.loader-logo {
    width: 180px;
    height: auto;
    margin-bottom: 40px;
    animation: logoFloat 2s ease-in-out infinite;
    filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.3));
}

@keyframes logoFloat {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-15px);
    }
}

/* Modern spinner */
.loader-spinner {
    position: relative;
    width: 80px;
    height: 80px;
}

.spinner-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 4px solid transparent;
    border-radius: 50%;
    animation: spin 1.5s cubic-bezier(0.68, -0.55, 0.265, 1.55) infinite;
}

.spinner-ring:nth-child(1) {
    border-top-color: #ffffff;
    animation-delay: 0s;
}

.spinner-ring:nth-child(2) {
    border-right-color: rgba(255, 255, 255, 0.7);
    animation-delay: 0.2s;
}

.spinner-ring:nth-child(3) {
    border-bottom-color: rgba(255, 255, 255, 0.5);
    animation-delay: 0.4s;
}

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

/* Loading text */
.loader-text {
    margin-top: 30px;
    color: #ffffff;
    font-size: 1rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* Loading dots animation */
.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 (optional) */
.loader-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: rgba(255, 255, 255, 0.2);
    overflow: hidden;
}

.loader-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, 
        rgba(255, 255, 255, 0.8) 0%, 
        rgba(255, 255, 255, 1) 50%, 
        rgba(255, 255, 255, 0.8) 100%);
    animation: progressBar 2s ease-in-out infinite;
}

@keyframes progressBar {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .loader-logo {
        width: 140px;
        margin-bottom: 30px;
    }
    
    .loader-spinner {
        width: 60px;
        height: 60px;
    }
    
    .loader-text {
        font-size: 0.85rem;
        margin-top: 20px;
    }
}

/* Prevent body scroll when loader is active */
body.loading {
    overflow: hidden;
}
