    html,
    body {
        height: 100%;
    }

    body {
        display: -ms-flexbox;
        display: flex;
        -ms-flex-align: center;
        align-items: center;
        padding-top: 40px;
        padding-bottom: 40px;
    }


/* Enhanced loading animations and buffering elements */
.spinner-pulse {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 4rem;
    height: 4rem;
    border: 2px solid rgba(0, 123, 255, 0.2);
    border-radius: 50%;
    animation: pulse-ring 2s infinite;
}

@keyframes pulse-ring {
    0% {
        transform: translate(-50%, -50%) scale(0.8);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(1.2);
        opacity: 0;
    }
}

.verification-steps {
    max-width: 300px;
    margin: 0 auto;
}

.step-item {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    margin-bottom: 8px;
    border-radius: 8px;
    background: rgba(248, 249, 250, 0.8);
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    position: relative;
}

.step-item.active {
    background: rgba(0, 123, 255, 0.1);
    border-color: rgba(0, 123, 255, 0.3);
}

.step-item.completed {
    background: rgba(40, 167, 69, 0.1);
    border-color: rgba(40, 167, 69, 0.3);
}

.step-icon {
    width: 24px;
    height: 24px;
    margin-right: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #f8f9fa;
    color: #6c757d;
    font-size: 12px;
    transition: all 0.3s ease;
}

.step-item.active .step-icon {
    background: #007bff;
    color: white;
    animation: bounce 0.6s ease-in-out;
}

.step-item.completed .step-icon {
    background: #28a745;
    color: white;
}

.step-text {
    flex: 1;
    font-size: 14px;
    color: #495057;
    font-weight: 500;
}

.step-item.active .step-text {
    color: #007bff;
}

.step-item.completed .step-text {
    color: #28a745;
}

.step-loader {
    width: 16px;
    height: 16px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.step-item.active .step-loader {
    opacity: 1;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-4px);
    }
    60% {
        transform: translateY(-2px);
    }
}

.status-message {
    min-height: 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

#status_text {
    color: #495057;
    font-size: 16px;
    margin-bottom: 4px;
}

#status_subtext {
    color: #6c757d;
    font-size: 13px;
}

.progress {
    background-color: rgba(0, 123, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
}

.progress-bar {
    transition: width 0.3s ease;
    border-radius: 10px;
    background: linear-gradient(90deg, #007bff, #0056b3);
}

/* Breathing animation for the entire loading state */
#loading_state {
    animation: breathe 3s ease-in-out infinite;
}

@keyframes breathe {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.9; }
}

/* Card hover effect during loading */
#loading_state:not(.d-none) ~ * .card {
    box-shadow: 0 8px 25px rgba(0, 123, 255, 0.15);
    transform: translateY(-2px);
    transition: all 0.3s ease;
}
