body {
    margin: 0;
    padding: 0;
    font-family: 'Helvetica Neue', Arial, sans-serif;
    background-image: url('../img/s2.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #333;
    overflow: hidden; /* Previene las barras de desplazamiento */
    position: relative;
}

.container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
    position: absolute; /* Asegura que el contenedor ocupe toda la pantalla */
}

.login-form {
    background: rgba(255, 255, 255, 0.9);
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
    text-align: center;
    width: 320px;
    border: 1px solid #e0e0e0;
    position: fixed; /* Fija el formulario en la pantalla */
    top: 50%; /* Centra el formulario verticalmente */
    left: 50%; /* Centra el formulario horizontalmente */
    transform: translate(-50%, -50%); /* Ajuste final para centrar el formulario */
    z-index: 1;
}

.logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 35px;
}

.logo-container img {
    width: 12%;
    margin-right: 20px;
}

.logo-container h1 {
    font-size: 23px;
    color: #505050;
    margin: 0;
    font-weight: 500;
}

.login-form h2 {
    margin-bottom: 20px;
    font-size: 20px;
    color: #404040;
    font-weight: 300;
}

.login-form label {
    display: block;
    margin-bottom: 5px;
    font-size: 14px;
    color: #666;
    text-align: left;
}

.login-form input {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 6px;
    background: linear-gradient(145deg, #f9f9f9, #e0e0e0);
    font-size: 14px;
    box-sizing: border-box;
    box-shadow: inset 1px 1px 2px rgba(0, 0, 0, 0.1), inset -1px -1px 2px rgba(255, 255, 255, 0.5);
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.login-form input:focus {
    outline: none;
    box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
    border-color: #c2c2c2;
}

.login-form input::placeholder {
    color: #888;
    opacity: 1;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1), -1px -1px 2px rgba(255, 255, 255, 0.5);
}

.login-form button {
    width: 80%;
    padding: 10px;
    background: #ff8000;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: background-color 0.2s ease; /* Transición más rápida al pasar el mouse */
    margin: 0 auto;
    display: block;
}

.login-form button:hover {
    background-color: #ff8c00;
    color: #333;
}

#loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: none; /* Comienza oculto */
    justify-content: center;
    align-items: center;
    z-index: 1000; /* Asegura que el overlay esté encima */
}

#loading-spinner {
    position: relative;
    width: 120px; /* Ajusta el tamaño */
    height: 120px; /* Ajusta el tamaño */
    display: flex;
    justify-content: center;
    align-items: center;
}

#loading-spinner img {
    position: absolute;
    width: 60px; /* Tamaño de la imagen */
    height: 60px; /* Tamaño de la imagen */
    z-index: 10; /* Asegura que la imagen esté encima del borde */
}

#loading-spinner::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border: 8px solid rgba(0, 0, 0, 0.1);
    border-top-color: #ff8000; /* Color de acento */
    border-radius: 50%;
    animation: spin 0.55s linear infinite; /* Rotación más rápida */
    transform: translate(-50%, -50%);
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}
