/* Reset básico */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Fondo animado del body */
body {
    font-family: Arial, sans-serif;
    height: 100vh;
    width: 100vw;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    background-image: linear-gradient(rgba(0, 0, 0, 0.25), rgba(0, 0, 0, 0.25)),
                      url('../img/fondo_login.jpg');
    background-repeat: no-repeat;
    background-position: center center;
    background-size: cover;
    background-attachment: fixed;
    background-blend-mode: overlay;
    animation: sutilZoom 30s ease-in-out infinite alternate;
}

@keyframes sutilZoom {
    0% { transform: scale(1); }
    100% { transform: scale(1.02); }
}

/* Contenedor del login con efecto glassmorphism */
.login-container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 400px;
    padding: 2em;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    text-align: center;
}

/* Título */
.login-container h2 {
    margin-bottom: 1em;
    color: #004488;
    font-weight: bold;
}

/* Etiquetas */
.login-container label {
    display: block;
    margin-bottom: 5px;
    color: #fff; /* Fuerza blanco */
    text-shadow: 0 0 2px rgba(0, 0, 0, 0.4); /* Mejora legibilidad */
}

/* Inputs con transparencia */
.login-container input[type="text"],
.login-container input[type="password"] {
    width: 100%;
    padding: 10px 12px;
    margin-bottom: 1.2em;
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 6px;
    background-color: rgba(255, 255, 255, 0.50);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    color: #222;
    font-size: 15px;
}

.login-container input::placeholder {
    color: #444;
}

.login-container input:focus {
    border-color: #66aaff;
    outline: none;
}

/* Botón de ingreso */
.login-container button {
    width: 100%;
    background-color: #004488;
    color: white;
    padding: 10px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.2s ease;
}

.login-container button:hover {
    background-color: #0066cc;
}

/* Mensajes de error */
.login-container .error {
    color: #ffaaaa;
    margin-bottom: 1em;
    text-align: center;
}


.input-icono {
    position: relative;
    margin-bottom: 1.2em;
}

.input-icono input {
    width: 100%;
padding: 10px 36px;
}

/* Ícono izquierdo (👤, 🔒) */
.input-icono .icono.izquierda {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-90%);
    font-size: 17px;
    color: #666;
    pointer-events: none;
    z-index: 2;
}

/* Ícono derecho (👁️) */
.input-icono .icono.derecha {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-90%);
    font-size: 17px;
    color: #666;
    cursor: pointer;
    z-index: 2;
}

/* Doble ícono: deja espacio a ambos lados */
.input-icono.doble-icono input {
    padding-left: 36px;
    padding-right: 36px;
}


/* Checkbox */
.recordar-container {
    margin-bottom: 1.5em;
    font-size: 14px;
    color: #ffffff;  /* Blanco puro */
    text-shadow: 0 0 2px rgba(0,0,0,0.3); /* Opcional para mejor contraste */
}

.recordar-container input[type="checkbox"] {
    transform: scale(1.2);
    margin-right: 8px;
    cursor: pointer;
}

/* Contenedor de partículas */
#particles-js {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    background: transparent;
}



/* CARGA ANTES DE CARGAR LA IMAGEN COMPLETA */
/* PRELOADER */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: #ffffff; /* Puedes usar #f9f9f9 o un color neutro */
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 5px solid #cccccc;
    border-top: 5px solid #007bff;
    border-radius: 50%;
    animation: spin 0.9s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
