/**
 * Page Loader Styles - Simple & Professional
 * Clean loading screen dengan icon melayang
 */

.pre-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

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

.pre-loader-box {
    text-align: center;
    padding: 40px;
}

/* Floating Spinner Loader - Pure CSS */
.loader-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 25px;
    position: relative;
    animation: float 2s ease-in-out infinite;
}

/* Spinner circle */
.loader-icon::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 5px solid #e3e6f0;
    border-top: 5px solid #1b00ff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

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

/* Loading Text */
.loading-text {
    font-size: 16px;
    color: #495057;
    font-weight: 500;
    letter-spacing: 0.5px;
}

/* Subtle fade-in animation untuk text */
.loading-text::after {
    content: '';
    animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
    0%, 20% { content: ''; }
    40% { content: '.'; }
    60% { content: '..'; }
    80%, 100% { content: '...'; }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .pre-loader {
        background: rgba(20, 25, 40, 0.95);
    }
    
    .circle-loader::before {
        border-color: #2d3748;
    }
    
    .circle-loader::after {
        border-top-color: #4299e1;
    }
    
    .dots-loader .dot {
        background: #4299e1;
    }
    
    .loader-logo {
        color: #4299e1;
    }
    
    .loading-text {
        color: #a0aec0;
    }
    
    .particle {
        background: rgba(66, 153, 225, 0.3);
    }
}

/* Mobile responsive */
@media (max-width: 768px) {
    .pre-loader-box {
        padding: 30px 20px;
    }
    
    .loader-icon {
        font-size: 52px;
        margin-bottom: 20px;
    }
    
    .loading-text {
        font-size: 14px;
    }
}

/* Reduced motion support - untuk accessibility */
@media (prefers-reduced-motion: reduce) {
    .loader-icon {
        animation: none;
    }
    
    .loading-text::after {
        animation: none;
        content: '...';
    }
}
