/* Importamos una fuente más moderna */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600&display=swap');

body {
    background: linear-gradient(135deg, #000000, #008000); /* Black to green gradient */
    color: #ffffff;
    font-family: 'Inter', sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
    overflow: hidden;
    position: relative; /* For positioning the bubbles */
}

/* Bubbles container */
.bubbles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1; /* Behind the login container */
    overflow: hidden;
}

.bubble {
    position: absolute;
    bottom: -50px;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    animation: float 6s infinite ease-in-out; /* Faster animation */
}

.bubble:nth-child(1) {
    left: 5%;
    animation-duration: 5s;
    animation-delay: 1s;
}

.bubble:nth-child(2) {
    left: 15%;
    animation-duration: 4s;
    animation-delay: 2s;
}

.bubble:nth-child(3) {
    left: 25%;
    animation-duration: 6s;
    animation-delay: 1.5s;
}

.bubble:nth-child(4) {
    left: 35%;
    animation-duration: 5s;
    animation-delay: 1s;
}

.bubble:nth-child(5) {
    left: 45%;
    animation-duration: 4.5s;
    animation-delay: 2.5s;
}

.bubble:nth-child(6) {
    left: 55%;
    animation-duration: 5.5s;
    animation-delay: 1.2s;
}

.bubble:nth-child(7) {
    left: 65%;
    animation-duration: 4.8s;
    animation-delay: 1.8s;
}

.bubble:nth-child(8) {
    left: 75%;
    animation-duration: 5.2s;
    animation-delay: 2.2s;
}

.bubble:nth-child(9) {
    left: 85%;
    animation-duration: 4.6s;
    animation-delay: 1.6s;
}

.bubble:nth-child(10) {
    left: 95%;
    animation-duration: 5.1s;
    animation-delay: 2.1s;
}

@keyframes float {
    0% {
        transform: translateY(0);
        opacity: 0.5;
    }
    50% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100vh);
        opacity: 0;
    }
}

.login-container {
    background-color: #ffffff;
    padding: 30px;
    border-radius: 10px; /* Bordes más redondeados */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); /* Sombra más profesional */
    width: 90%; /* Adjust width for smaller screens */
    max-width: 400px;
    margin: auto; /* Center the container */
    
    /* Animación de entrada */
    animation: fadeInUp 0.8s ease-out forwards;
}

/* Definición de la animación */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-container h1 {
    text-align: center;
    margin-bottom: 30px;
    color: #1a1a1a;
    font-weight: 600;
    letter-spacing: -1px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #555;
    font-size: 0.9rem;
    font-weight: bold; /* Make labels more prominent */
    color: #121212; /* Ensure good contrast */
}

.form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 1.5px solid #eee;
    border-radius: 8px;
    background-color: #fdfdfd;
    color: #333;
    font-size: 1rem;
    box-sizing: border-box; /* Crucial para que el padding no rompa el ancho */
    transition: all 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: #6200ea;
    box-shadow: 0 0 0 4px rgba(98, 0, 234, 0.1); /* Efecto de halo moderno */
    background-color: #fff;
}

.form-actions {
    display: flex;
    justify-content: space-between; /* Alinea checkbox y link en la misma línea */
    align-items: center;
    margin-bottom: 25px;
    font-size: 0.85rem;
}
/* --- AJUSTE DE LOGOS EN EL LOGIN --- */

.logo-section {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px; /* Espacio entre el logo de MinTic y el texto */
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f0f0f0; /* Línea divisoria suave */
}

/* El logo de MinTic (logo.png) */
.nav-logo {
    height: 85px; /* Tamaño aumentado para que sea proporcional al texto */
    width: auto;
    object-fit: contain;
}

.logo-text {
    display: flex;
    flex-direction: column;
    text-align: left;
}

/* Nombre de la marca en Negro para que se vea sobre el blanco */
.brand-name {
    color: #000000 !important; /* Forzamos negro puro */
    font-weight: 700;
    font-size: 1.6rem; /* Tamaño similar al logo */
    line-height: 1;
    margin: 0;
}

/* Frase inferior en Negro resaltado */
.brand-tagline {
    color: #16c006 !important; /* Forzamos negro puro */
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
    margin-top: 5px;
}

/* Ajuste opcional: quitar el H1 si ya no lo usas para que no robe espacio */
.login-container h1 {
    display: none; 
}
/* --- RESPONSIVE PARA EL ENCABEZADO DE LOGOS --- */

@media (max-width: 480px) {
    .logo-section {
        flex-direction: column; /* Apila el logo sobre el texto en móviles */
        gap: 10px;
        text-align: center;
        padding-bottom: 10px;
        margin-bottom: 20px;
    }

    .nav-logo {
        height: 65px; /* Reducimos un poco el logo institucional en móvil */
    }

    .logo-text {
        text-align: center; /* Centramos el texto cuando están apilados */
    }

    .brand-name {
        font-size: 1.4rem; /* Texto un poco más pequeño para que no rompa */
    }

    .brand-tagline {
        font-size: 0.55rem; /* Ajuste fino del tagline */
        letter-spacing: 0.5px;
    }
}

/* Ajuste para tablets o pantallas medianas */
@media (min-width: 481px) and (max-width: 768px) {
    .nav-logo {
        height: 75px; 
    }
    
    .brand-name {
        font-size: 1.5rem;
    }
}
/* Estilos para el checkbox y el enlace */
.form-actions label {
    color: #666;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    font-weight: bold; /* Bold text for 'Recordar contraseña' */
    color: #121212; /* Ensure good contrast */
}

.form-actions a {
    color: #6200ea;
    text-decoration: none;
    font-weight: 600;
}

.form-actions a:hover {
    text-decoration: underline;
}

/* Estilo de Botones */
.btn {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, background-color 0.3s, box-shadow 0.3s;
    margin-bottom: 12px;
}

.btn:active {
    transform: scale(0.98); /* Efecto de clic */
}

.btn-login {
    background-color: #16c006; /* Cambiado a un morado elegante en lugar de rojo */
    color: white;
    box-shadow: 0 4px 12px rgba(98, 0, 234, 0.2);
}

.btn-login:hover {
    background-color: #05a510;
    box-shadow: 0 6px 15px rgba(98, 0, 234, 0.3);
}


.register-text {
    text-align: center;
    margin-top: 10px;
    color: #000000; /* Black text for the register prompt */
    font-weight: bold; /* More noticeable font weight */
    font-size: 14px; /* Reduced font size to match labels */
}

.register-text a {
    text-decoration: none; /* Remove underline from links */
    color: #6200ea; /* Keep the link color */
}

.register-text a:hover {
    text-decoration: underline; /* Add underline on hover for clarity */
}

/* Responsive styles for the login form */
@media (max-width: 480px) {
    body {
        /* Añadimos un poco de padding al body para que el contenedor 
           nunca toque los bordes físicos de la pantalla */
        padding: 20px;
        box-sizing: border-box;
    }

    .login-container {
        /* Ajustamos el ancho para que deje ver el fondo a los lados */
        width: 85%; 
        max-width: 320px; 
        
        /* Reducimos el padding interno para ganar espacio */
        padding: 25px 20px;
        
        /* Evitamos que el formulario se pegue arriba o abajo */
        margin: auto; 
        
        /* Añadimos una ligera transparencia para que sea más "Pro" */
        background-color: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(5px);
    }

    .login-container h1 {
        font-size: 1.5rem; /* Título un poco más pequeño en mobile */
        margin-bottom: 20px;
    }

    .form-group input {
        font-size: 16px; /* Evita que iOS haga zoom automático al clickear */
        padding: 10px;
    }

    .btn {
        padding: 12px; /* Mantenemos un tamaño cómodo para el dedo */
    }
}
    .modal-overlay {
            display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
            background: rgba(0,0,0,0.5); z-index: 1000; justify-content: center; align-items: center;
        }
        .modal-content {
            background: white; padding: 20px; border-radius: 8px; text-align: center; max-width: 300px;
        }
        .btn-close { margin-top: 15px; cursor: pointer; padding: 5px 15px; }

.back-to-login {
    position: absolute;
    top: 10px;
    left: 10px;
    width: 50px;
    height: 50px;
    border-radius: 50%; /* Make it circular */
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); /* Subtle shadow */
    z-index: 1000; /* Ensure it stays on top */
    background-color: transparent; /* No background by default */
}

.back-to-login:hover {
    transform: scale(1.1); /* Slight zoom effect */
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.2); /* Stronger shadow on hover */
}

.back-to-login img.home-icon {
    width: 30px; /* Adjust icon size for responsiveness */
    height: 30px;
    animation: pulse 1.5s infinite; /* Keep animation */
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

.toggle-password {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #6200ea;
    font-size: 18px;
}

.toggle-password:hover {
    color: #3700b3;
}

@media (max-width: 768px) {
    .back-to-login {
        width: 50px;
        height: 50px;
        background-color: #0c120c; /* Green background for responsive */
    }

    .back-to-login img.home-icon {
        width: 25px;
        height: 25px;
    }
}
.modal-overlay {
    display: none; 
    position: fixed; 
    top: 0; left: 0; 
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.7); /* Fondo oscuro semi-transparente */
    z-index: 10000; /* Por encima de todo */
    justify-content: center; 
    align-items: center;
    backdrop-filter: blur(4px); /* Efecto moderno de desenfoque */
}