/* Estilos para el spinner y el contenedor */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw; /* Ancho completo de la ventana */
    height: 100vh; /* Alto completo de la ventana */
    background: rgba(0, 0, 0, 0.5); /* Fondo oscuro semi-transparente */
    display: flex; /* Usar Flexbox para centrado */
    justify-content: center; /* Centrado horizontal */
    align-items: center; /* Centrado vertical */
    z-index: 9999;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.loading-container {
    display: flex;
    flex-direction: column; /* Spinner arriba, texto abajo */
    align-items: center; /* Centrado horizontal dentro del contenedor */
    justify-content: center; /* Centrado vertical dentro del contenedor */
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3; /* Color claro para el borde */
    border-top: 5px solid #3498db; /* Color principal del spinner */
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text {
    color: #fff;
    font-family: 'Arial', sans-serif;
    font-size: 1.5rem;
    margin-top: 10px; /* Espacio entre el spinner y el texto */
    text-align: center;
}

/* Responsividad */
@media (max-width: 768px) {
    .spinner {
        width: 40px;
        height: 40px;
        border-width: 4px;
    }
    .loading-text {
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    .spinner {
        width: 30px;
        height: 30px;
        border-width: 3px;
    }
    .loading-text {
        font-size: 1rem;
    }
}