body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    /* La URL del fondo ahora es dinámica, definida en index.php */
    background-size: cover; 
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    color: #f8f9fa; 
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6); 
    z-index: -1; 
}

.top-bar {
    background-color: rgba(255, 255, 255, 0.9); 
    color: #343a40;
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    border-top: 5px solid #007bff;
    flex-wrap: wrap;
    z-index: 10;
}

.top-bar-left,
.top-bar-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.top-bar-button {
    background-color: transparent;
    color: #007bff;
    border: 2px solid #007bff;
    padding: 10px 18px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease;
    text-decoration: none;
}

.top-bar-button:hover {
    background-color: #007bff;
    color: white;
}

.main-content {
    flex-grow: 1;
    background-color: transparent; 
    color: white; 
    padding: 60px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    z-index: 1; 
    position: relative; 
}

.university-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 40px;
    gap: 15px;
    text-align: center;
}

.uptt-logo-main {
    width: 150px;
    height: auto;
    animation: bounceIn 1s ease-out;
    filter: drop-shadow(0 0 10px rgba(0,0,0,0.5)); 
}

.text-info {
    font-size: 1.2em;
    text-align: center;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.7); 
}

.university-name {
    font-weight: 700;
    font-size: 2.2em;
    margin-bottom: 5px;
    color: white; 
}

.faculty-name {
    font-size: 1.4em;
    color: #e0e0e0; 
}

.welcome-section {
    text-align: center;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.7); 
}

.welcome-section h1 {
    font-size: 2em;
    margin-bottom: 15px;
    max-width: 800px;
    color: white; 
}

.footer {
    background-color: rgba(0, 0, 0, 0.7); 
    color: white;
    text-align: center;
    padding: 15px;
    font-size: 0.9em;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    z-index: 1; 
    position: relative;
}

@keyframes bounceIn {
    0% { transform: scale(0.1); opacity: 0; }
    60% { transform: scale(1.1); opacity: 1; }
    80% { transform: scale(0.9); }
    100% { transform: scale(1); }
}

@keyframes animatetop {
    from {top: -50px; opacity: 0;}
    to {top: 0; opacity: 1;}
}

.modal {
    display: none; 
    position: fixed;
    z-index: 1001;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.6); 
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: #ffffff;
    padding: 40px 30px;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3); 
    width: 90%;
    max-width: 450px;
    position: relative;
    animation-name: animatetop;
    animation-duration: 0.5s;
    text-align: left; 
}

.modal-content h2 {
    text-align: center;
    margin-bottom: 30px;
    color: #343a40;
    font-size: 28px;
}

.close-button {
    color: #6c757d;
    position: absolute;
    top: 15px;
    right: 25px;
    font-size: 30px;
    font-weight: 300;
    transition: color 0.3s ease;
}

.close-button:hover,
.close-button:focus {
    color: #343a40;
    text-decoration: none;
    cursor: pointer;
}

.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #6c757d;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ced4da;
    border-radius: 8px;
    box-sizing: border-box;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.form-group input:focus {
    border-color: #007bff;
    outline: none;
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 25px;
    justify-content: flex-start;
}

.modal-content button[type="submit"] {
    width: 100%;
    padding: 15px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.modal-content button[type="submit"]:hover {
    background-color: #0056b3;
}

.error-message {
    background-color: #f8d7da;
    color: #721c24;
    padding: 12px;
    text-align: center;
    border-radius: 8px;
    margin-bottom: 20px;
    font-weight: 500;
    display: none;
    border: 1px solid #f5c6cb;
}

.forgot-password-link {
    text-align: center; /* 1. Centrar el enlace dentro de su div */
    margin-bottom: 20px; /* 3. Separación del botón de Iniciar Sesión */
    margin-top: -10px; /* Acercar un poco más si hay mucho espacio después del campo password */
}

.forgot-password-link a {
    color: #007bff; /* 2. Color azul */
    text-decoration: none;
    font-size: 0.95em;
    transition: color 0.2s ease;
}

.forgot-password-link a:hover {
    color: #0056b3; /* Un azul más oscuro al pasar el ratón */
    text-decoration: underline;
}

.btn-recovery-option {
    display: block; /* Para que cada botón ocupe su propia línea */
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin-bottom: 10px; /* Separación entre botones */
    text-align: center;
}

/* Estilo para el botón 1 (Reestablecer por Correo) */
#showEmailRecovery {
    background-color: #007bff;
    color: white;
}
#showEmailRecovery:hover {
    background-color: #0056b3;
}

/* Estilo para el botón 2 (Solicitar Reinicio a Admin) */
#showAdminRecovery {
    background-color: #ffc107; /* Amarillo/Naranja de advertencia */
    color: #343a40; /* Texto oscuro para contraste */
    border: 1px solid #ffc107;
}
#showAdminRecovery:hover {
    background-color: #e0a800;
}

/* Estilo para el botón de envío en el formulario de Admin (rojo) */
#forgotPassAdminForm button[type="submit"] {
    background-color: #dc3545 !important;
}
#forgotPassAdminForm button[type="submit"]:hover {
    background-color: #c82333 !important;
}

/* Estilo para el área de texto de razón */
#adminRecoveryFormContainer textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ced4da;
    border-radius: 8px;
    box-sizing: border-box;
    font-size: 16px;
}

#adminRecoveryFormContainer textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ced4da;
    border-radius: 8px;
    box-sizing: border-box;
    font-size: 16px;
}

/* NUEVO: Estilo para el enlace "Volver" */
.back-to-selection {
    display: inline-block !important; /* Asegurar que no tome el 100% */
    margin-top: 15px !important;
    text-decoration: none;
    color: #6c757d !important; /* Color gris suave */
    font-size: 0.9em;
    font-weight: 500;
    transition: color 0.3s ease;
}
.back-to-selection:hover {
    color: #007bff !important; /* Se vuelve azul al pasar el ratón */
    text-decoration: underline;
}

#forgotPassModal .modal-content .success {
    background-color: #d4edda;
    color: #155724;
    padding: 12px;
    border-radius: 8px;
    margin-top: 10px;
    font-weight: 500;
    border: 1px solid #c3e6cb;
}

#forgotPassModal .modal-content .error {
    background-color: #f8d7da;
    color: #721c24;
    padding: 12px;
    border-radius: 8px;
    margin-top: 10px;
    font-weight: 500;
    border: 1px solid #f5c6cb;
}