:root {
    --rojoPrincipal: #d90429;
    --rojoOscuro: #8d0801;
    --oscuroFondo: #0b090a;
    --blanco: #fff;
    --fuente: 'Quicksand', sans-serif;
}

html {
    box-sizing: border-box;
    height: 100%;
}

*, *::after, *::before {
    box-sizing: inherit;
}

body {
    font-family: var(--fuente);
    background-color: var(--oscuroFondo);
    margin: 0;
    padding: 0;
    height: 100vh;
    width: 100vw;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

/* Video fijo abarcando toda la pantalla de fondo */
.imagen-formulario {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1;
    overflow: hidden;
    background-color: #000;
}

.video-fondo {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%);
    object-fit: cover;
}

/* Capa oscura translúcida sobre el video para unificar el contraste */
.imagen-formulario::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(11, 9, 10, 0.6); /* Oscurece el video de fondo uniformemente */
    z-index: 2;
}

/* Contenedor que centra la caja de login en el medio exacto */
.contenedor-formulario {
    position: relative;
    z-index: 10;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
}

/* Formulario flotante con fondo TRASLÚCIDO y efecto esmerilado */
.formulario {
    width: 420px;
    max-width: 90%;
    padding: 40px;
    background: rgba(11, 9, 10, 0.75); /* Fondo semitransparente (se ve el video por detrás) */
    backdrop-filter: blur(12px); /* Efecto de vidrio esmerilado moderno */
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.12); /* Sutil borde brillante */
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.7);
    display: flex;
    flex-direction: column;
}

/* Logo pequeño adaptado */
.logo-container {
    text-align: center;
    margin-bottom: 15px;
}

.logo-login {
    max-width: 120px;
    height: auto;
}

.texto-formulario h2, .input label, .password-olvidada a, .texto-formulario p, .custom-control-label {
    color: var(--blanco);
}

.texto-formulario h2 {
    font-size: 26px;
    text-align: center;
    margin-bottom: 5px;
}

.texto-formulario p {
    font-size: 15px;
    text-align: center;
    color: #d3d3d3;
    margin-bottom: 20px;
}

.input label {
    display: block;
    font-size: 14px;
    font-weight: bold;
    margin: 8px 0 4px 0;
}

.input input {
    width: 100%;
    padding: 10px 14px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background-color: rgba(22, 22, 22, 0.6);
    color: var(--blanco);
    outline: none;
    font-size: 15px;
}

    .input input:focus {
        border-color: var(--rojoPrincipal);
        background-color: rgba(22, 22, 22, 0.9);
    }

.form-group {
    margin: 12px 0;
}

.custom-control-label {
    font-size: 13px;
    cursor: pointer;
}

/* Alerta de error elegante */
.alert-danger {
    background-color: rgba(217, 4, 41, 0.3);
    border: 1px solid var(--rojoPrincipal);
    color: #ff8080;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 13px;
    text-align: center;
    margin-top: 5px;
}

.input input[type="submit"] {
    background-color: var(--rojoPrincipal);
    color: var(--blanco);
    font-size: 16px;
    font-weight: bold;
    border: none;
    margin-top: 10px;
    cursor: pointer;
    transition: background-color .3s ease-in-out;
}

    .input input[type="submit"]:hover {
        background-color: var(--rojoOscuro);
    }
