/* =============================================
   Professional Loading Progress Overlay
   ============================================= */

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.92);
    backdrop-filter: blur(12px);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.loading-overlay.show {
    opacity: 1;
    visibility: visible;
}

.loading-card {
    background: linear-gradient(135deg,
            rgba(22, 24, 30, 0.98) 0%,
            rgba(18, 20, 26, 0.98) 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    padding: 48px 40px;
    min-width: 480px;
    max-width: 540px;
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.6),
        0 0 0 1px rgba(255, 255, 255, 0.05) inset;
    text-align: center;
    animation: scaleIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.loading-spinner {
    width: 64px;
    height: 64px;
    margin: 0 auto 28px;
    border: 3px solid rgba(29, 185, 195, 0.15);
    border-top-color: #1db9c3;
    border-right-color: #1db9c3;
    border-radius: 50%;
    animation: spin 1s cubic-bezier(0.68, -0.55, 0.27, 1.55) infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading-text {
    font-size: 20px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 36px;
    letter-spacing: -0.3px;
}

.loading-steps {
    display: flex;
    flex-direction: column;
    gap: 14px;
    text-align: left;
}

.loading-step {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 12px;
    border: 1px solid transparent;
    opacity: 0.4;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.loading-step.active {
    opacity: 1;
    background: linear-gradient(135deg, rgba(29, 185, 195, 0.12), rgba(29, 185, 195, 0.06));
    border-color: rgba(29, 185, 195, 0.3);
    transform: translateX(4px);
    box-shadow:
        0 4px 12px rgba(29, 185, 195, 0.15),
        0 0 0 1px rgba(29, 185, 195, 0.1) inset;
}

.loading-step.complete {
    opacity: 0.65;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.08), rgba(16, 185, 129, 0.04));
    border-color: rgba(16, 185, 129, 0.2);
}

.loading-step.error {
    opacity: 1;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.12), rgba(239, 68, 68, 0.06));
    border-color: rgba(239, 68, 68, 0.3);
    box-shadow:
        0 4px 12px rgba(239, 68, 68, 0.15),
        0 0 0 1px rgba(239, 68, 68, 0.1) inset;
}

.step-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    flex-shrink: 0;
}

.step-icon i {
    font-size: 26px;
    color: rgba(255, 255, 255, 0.5);
    transition: color 0.3s;
}

.loading-step.active .step-icon i {
    color: #1db9c3;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.6;
    }
}

.loading-step.complete .step-icon i {
    color: #10b981;
}

.loading-step.error .step-icon i {
    color: #ef4444;
}

.step-text {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.75);
    font-weight: 500;
    letter-spacing: -0.2px;
    line-height: 1.4;
}

.loading-step.active .step-text {
    color: #fff;
    font-weight: 600;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .loading-card {
        min-width: auto;
        width: calc(100% - 32px);
        padding: 36px 24px;
    }

    .loading-text {
        font-size: 18px;
        margin-bottom: 28px;
    }

    .loading-steps {
        gap: 12px;
    }

    .loading-step {
        padding: 12px 14px;
    }

    .step-text {
        font-size: 13px;
    }
}