/**
 * Preloader Styles
 * شاشة التحميل
 */

/* Preloader Wrapper */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

#preloader.hidden {
    opacity: 0;
    visibility: hidden;
}

/* Logo Animation */
.preloader-logo {
    width: 120px;
    height: 120px;
    margin-bottom: 2rem;
    animation: logoFloat 2s ease-in-out infinite;
}

.preloader-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: brightness(0) invert(1);
}

@keyframes logoFloat {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
}

/* Spinner */
.preloader-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Loading Text */
.preloader-text {
    margin-top: 2rem;
    color: #fff;
    font-size: 1.1rem;
    font-weight: 500;
    letter-spacing: 1px;
}

/* Loading Dots Animation */
.loading-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 */
.preloader-progress {
    width: 300px;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    margin-top: 2rem;
    overflow: hidden;
}

.preloader-progress-bar {
    height: 100%;
    background: #fff;
    border-radius: 10px;
    animation: progress 2s ease-in-out;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

@keyframes progress {
    0% {
        width: 0%;
    }
    100% {
        width: 100%;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .preloader-logo {
        width: 80px;
        height: 80px;
    }
    
    .preloader-progress {
        width: 80%;
    }
}