/* Enhanced Loading Screen */
.loading-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #E3F2FD 0%, #FFFFFF 50%, #E8F5E9 100%);
    z-index: 9999;
    transition: opacity 0.5s ease-out;
}

.loading-content {
    text-align: center;
    padding: 2rem;
    max-width: 500px;
}

.loading-logo {
    width: 180px;
    height: auto;
    margin-bottom: 1.5rem;
    animation: logoFadeIn 0.8s ease-out, logoPulse 2s ease-in-out infinite 1s;
}

@keyframes logoFadeIn {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(-30px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes logoPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.loading-text {
    margin: 1.5rem 0;
    animation: textFadeIn 1s ease-out 0.3s both;
}

.loading-text h2 {
    font-size: 1.5rem;
    font-weight: bold;
    color: #1565C0;
    margin: 0 0 0.5rem 0;
    font-family: 'IRANSans', sans-serif;
}

.loading-text p {
    font-size: 1rem;
    color: #666;
    margin: 0;
    font-family: 'IRANSans', sans-serif;
}

@keyframes textFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Loading Spinner */
.loading-spinner {
    margin: 2rem 0 1rem 0;
    animation: spinnerFadeIn 1s ease-out 0.5s both;
}

.spinner {
    width: 50px;
    height: 50px;
    margin: 0 auto;
    border: 4px solid #E3F2FD;
    border-top: 4px solid #1565C0;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes spinnerFadeIn {
    from {
        opacity: 0;
        transform: scale(0.5);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Loading Bar */
.loading-bar {
    width: 100%;
    height: 4px;
    background-color: #E3F2FD;
    border-radius: 2px;
    overflow: hidden;
    margin-top: 2rem;
    animation: barFadeIn 1s ease-out 0.7s both;
}

.loading-bar-progress {
    height: 100%;
    background: linear-gradient(90deg, #1565C0 0%, #1976D2 50%, #42A5F5 100%);
    border-radius: 2px;
    width: 0%;
    transition: width 0.3s ease-out;
}

@keyframes barFadeIn {
    from {
        opacity: 0;
        transform: scaleX(0);
    }
    to {
        opacity: 1;
        transform: scaleX(1);
    }
}

/* Responsive Loading */
@media (max-width: 768px) {
    .loading-logo {
        width: 140px;
    }
    
    .loading-text h2 {
        font-size: 1.2rem;
    }
    
    .loading-text p {
        font-size: 0.9rem;
    }
    
    .spinner {
        width: 40px;
        height: 40px;
    }
}

