/* =================================== */
/* --- ESTILOS GLOBALES --- */
/* =================================== */
body, html {
    height: 100%;
    margin: 0;
    font-family: 'Poppins', sans-serif;
    overflow: hidden;
}

/* =================================== */
/* --- LAYOUT PRINCIPAL --- */
/* =================================== */
.login-container {
    display: flex;
    width: 100vw;
    height: 100vh;
    background-color: #0d3fc9cc;
}

/* =================================== */
/* --- PANEL DE VIDEO Y ANIMACIÓN --- */
/* =================================== */
.video-panel {
    flex: 1 1 55%;
    position: relative;
    overflow: hidden;
    background-color: #000;
}

#video-bg {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translateX(-50%) translateY(-50%);
    object-fit: cover;
    z-index: 1;
}

.video-panel .contenedor-animacion {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    width: 80%;
    max-width: 700px;
    color: white;
    text-align: center;
    text-shadow: 0px 2px 8px rgba(0, 0, 0, 0.8);
}

.saludo-dinamico, .mensaje-principal {
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
    white-space: pre-wrap;
    margin: 0;
    padding: 0;
}

.saludo-dinamico { font-size: 2.5rem; font-weight: 700; margin-bottom: 1rem; }
.mensaje-principal { font-size: 1.2rem; font-weight: 400; line-height: 1.6; }

/* Efecto de escritura */
.escribiendo::after {
    content: '|';
    display: inline-block;
    vertical-align: baseline;
    animation: parpadeo 0.7s infinite;
    color: #4dabf7;
}

@keyframes parpadeo {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* =================================== */
/* --- PANEL DEL FORMULARIO --- */
/* =================================== */
.form-panel {
    flex: 1 1 30%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    overflow-y: auto;
    background-color: #1a2533;
}

.login-card {
    width: 100%;
    max-width: 450px;
    color: #fff;
    padding: 0.3rem;
    background-color: #2c3e50;
    border-radius: 1rem;
    box-shadow: 0 5px 15px 0 rgba(0, 0, 0, 0.20);
    transition: all 0.3s ease;
}

/* --- Encabezado del Login --- */
.login-header { text-align: center; margin-bottom: 1.5rem; }
.login-header .icon { font-size: 3rem; margin-bottom: 0.75rem; color: #4dabf7; }
.login-header h1 { font-weight: 600; display: inline-flex; align-items: center; justify-content: center; gap: 0.6rem; width: 100%; min-height: 43px; }
.login-header .play-icon { font-size: 2.2rem; color: #4dabf7; }
.login-header .brand-name { font-size: 1rem; font-weight: 500; color: rgba(255, 255, 255, 0.6); margin-top: -0.5rem; margin-bottom: 1rem; letter-spacing: 1px; min-height: 24px; }
#header-subtitle { color: rgba(255, 255, 255, 0.8); min-height: 48px; }

/* --- Inputs del Formulario --- */
.form-group { position: relative; margin-bottom: 1.5rem; }
.form-group .icon { position: absolute; top: 50%; left: 0.75rem; transform: translateY(-50%); color: rgba(255, 255, 255, 0.8); }
.form-control { background: transparent; border: none; border-bottom: 2px solid rgba(255, 255, 255, 0.3); border-radius: 0; padding-left: 2.5rem; color: #fff; height: 50px; }
.form-control:focus { box-shadow: none; background: transparent; border-color: #4dabf7; color: #fff; }
.form-control::placeholder { color: rgba(255, 255, 255, 0.6); }
.forgot-password-link { text-decoration: none; font-size: 0.9rem; color: rgba(255, 255, 255, 0.8); }

/* --- Botones y Acciones --- */
.actions-container { padding-top: 1rem; margin-top: 1.25rem; border-top: 1px solid rgba(255, 255, 255, 0.2); text-align: center; }
.actions-container h6 { margin-bottom: 1rem; font-weight: 500; color: rgba(255, 255, 255, 0.9); }
.buttons-group { display: flex; justify-content: center; gap: 1rem; margin-bottom: 1.25rem; }
.buttons-group:last-child { margin-bottom: 0; }
.quick-access-button, .download-button { display: inline-flex; align-items: center; justify-content: center; padding: 0.7rem 1.2rem; font-weight: 500; color: #fff; border-radius: 0.5rem; text-decoration: none; transition: all 0.3s ease; flex: 1; max-width: 48%; font-size: 0.9rem; }
.quick-access-button i, .download-button i { font-size: 1.2rem; margin-right: 0.6rem; }

.quick-access-button { background-color: rgba(255, 255, 255, 0.1); border: 1px solid rgba(255, 255, 255, 0.15); }
.quick-access-button:hover { background-color: rgba(255, 255, 255, 0.25); transform: translateY(-2px); }

.download-button { background-color: hsla(131, 41%, 46%, 0.7); border: 1px solid hsla(131, 41%, 46%, 0.8); }
.download-button:hover { background-color: hsla(131, 41%, 46%, 0.9); transform: translateY(-2px); }


/* =================================== */
/* --- REGLAS ADAPTATIVAS (RESPONSIVE) --- */
/* =================================== */

/* ---- POR ALTURA (Para Laptops y Monitores Pequeños) ---- */
@media (max-height: 820px) and (min-width: 769px) {
    .login-card {
        padding: 1.5rem;
        transform: scale(0.95);
        transform-origin: center;
    }
    .login-header { margin-bottom: 1rem; }
    .login-header .icon { font-size: 2.5rem; }
    .login-header h1 { font-size: 1.9rem; min-height: auto; }
    .form-group { margin-bottom: 1rem; }
    .form-control { height: 45px; }
    .actions-container { margin-top: 1rem; padding-top: 1rem; }
    .actions-container h6 { margin-bottom: 0.5rem; font-size: 0.9rem; }
    .buttons-group { margin-bottom: 0.75rem; }
    .quick-access-button, .download-button { padding: 0.6rem 1rem; font-size: 0.85rem; }
}

/* ---- POR ANCHO (Para Tabletas) ---- */
@media (max-width: 992px) {
    .login-container { flex-direction: column; }
    .video-panel { flex: 0 0 40vh; }
    .form-panel { flex-grow: 1; justify-content: flex-start; padding-top: 2rem; }
}

/* ---- POR ANCHO (Para Teléfonos) ---- */
@media (max-width: 768px) {
    .video-panel { display: none; }
    .form-panel { flex: 1 1 100%; padding: 1rem; align-items: flex-start; }
    .login-card { padding: 1rem; background-color: transparent; box-shadow: none; transform: scale(1); }
    .login-header h1 { font-size: 1.8rem; min-height: 38px; }
    .login-header .play-icon { font-size: 1.9rem; }
    .login-header .brand-name { font-size: 0.9rem; min-height: 22px; }
    #header-subtitle { font-size: 0.9rem; min-height: 42px; }
    
    .actions-container { margin-top: 1rem; padding-top: 1rem; }
    .actions-container h6 { font-size: 0.9rem; margin-bottom: 0.5rem; }
    .buttons-group { flex-direction: row; gap: 0.5rem; margin-bottom: 0.75rem; }
    .quick-access-button, .download-button { padding: 0.5rem 0.8rem; font-size: 0.8rem; max-width: 100%; }
    .quick-access-button i, .download-button i { font-size: 1rem; margin-right: 0.4rem; }
}