/* Enhanced Loading System Styles */

/* Loading Screen */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease-out, visibility 0.5s ease-out;
}

.loading-screen.hidden {
    opacity: 0;
    visibility: hidden;
}

.loading-content {
    text-align: center;
    color: white;
    max-width: 400px;
    padding: 20px;
}

.loading-logo {
    width: 120px;
    height: 120px;
    margin-bottom: 30px;
    animation: pulse 2s infinite;
}

.loading-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.loading-subtitle {
    font-size: 1.1rem;
    margin-bottom: 30px;
    opacity: 0.9;
}

.progress-container {
    width: 100%;
    max-width: 300px;
    margin: 0 auto 20px;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #fff, #f0f0f0);
    border-radius: 10px;
    width: 0%;
    transition: width 0.3s ease;
    position: relative;
    overflow: hidden;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: shimmer 2s infinite;
}

.progress-text {
    font-size: 0.9rem;
    margin-top: 10px;
    opacity: 0.8;
}

.loading-stats {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
    font-size: 0.8rem;
    opacity: 0.7;
}

.loading-tips {
    margin-top: 30px;
    font-size: 0.9rem;
    opacity: 0.8;
    font-style: italic;
}

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

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.loading-content > * {
    animation: fadeInUp 0.6s ease-out forwards;
}

.loading-content > *:nth-child(1) { animation-delay: 0.1s; }
.loading-content > *:nth-child(2) { animation-delay: 0.2s; }
.loading-content > *:nth-child(3) { animation-delay: 0.3s; }
.loading-content > *:nth-child(4) { animation-delay: 0.4s; }
.loading-content > *:nth-child(5) { animation-delay: 0.5s; }
.loading-content > *:nth-child(6) { animation-delay: 0.6s; }

/* Main Content */
.main-content {
    opacity: 0;
    transition: opacity 0.5s ease-in;
}

.main-content.loaded {
    opacity: 1;
}

/* Responsive Design */
@media (max-width: 768px) {
    .loading-title {
        font-size: 2rem;
    }
    
    .loading-subtitle {
        font-size: 1rem;
    }
    
    .loading-logo {
        width: 100px;
        height: 100px;
    }
    
    .loading-content {
        max-width: 300px;
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .loading-title {
        font-size: 1.8rem;
    }
    
    .loading-subtitle {
        font-size: 0.9rem;
    }
    
    .loading-logo {
        width: 80px;
        height: 80px;
    }
    
    .progress-container {
        max-width: 250px;
    }
}

/* Loading States */
.loading-screen.loading {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.loading-screen.complete {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    .loading-screen *,
    .main-content {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .loading-screen {
        background: #000;
    }
    
    .progress-bar {
        background: rgba(255, 255, 255, 0.3);
        border: 1px solid #fff;
    }
    
    .progress-fill {
        background: #fff;
    }
}

/* Print styles */
@media print {
    .loading-screen {
        display: none !important;
    }
    
    .main-content {
        opacity: 1 !important;
    }
} 