/* login.css */
body {
    font-family: 'Poppins', sans-serif;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: #0d0d1a;
    color: #333333;
    overflow: hidden;
    position: relative;
}

/* Fondo de la página de login con gradiente animado */
.login-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1;
    /* Gradiente animado como overlay */
    background-image: linear-gradient(135deg, rgba(26, 26, 46, 0.8) 0%, rgba(51, 0, 78, 0.8) 50%, rgba(26, 26, 46, 0.8) 100%);
    animation: backgroundMove 20s infinite alternate;
}

@keyframes backgroundMove {
    from {
        background-position: 0% 0%;
    }

    to {
        background-position: 100% 100%;
    }
}

/* Overlay oscuro con desenfoque */
.login-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    z-index: 2;
}

.login-card {
    position: relative;
    z-index: 3;
    background: rgba(255, 255, 255, 0.95);
    padding: 30px 40px;
    border-radius: 25px;
    box-shadow: 0 0 10px rgba(155, 81, 224, 0.6), 0 0 20px rgba(155, 81, 224, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    width: 100%;
    max-width: 550px;
    text-align: center;
    animation: fadeIn 0.8s ease-out;
    transform-style: preserve-3d;
    transition: transform 0.3s ease;
}

.login-card:hover {
    transform: perspective(1000px) rotateY(2deg);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-header {
    margin-bottom: 25px;
}

.login-logo {
    max-width: 160px;
    margin-bottom: 15px;
    filter: drop-shadow(0 0 10px rgba(155, 81, 224, 0.6), 0 0 20px rgba(155, 81, 224, 0.4));
}

.login-header h2 {
    font-size: 2.2em;
    color: #333333;
    margin: 0;
    font-weight: 700;
}

.alert {
    background-color: #d4edda;
    color: #155724;
    padding: 12px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #c3e6cb;
    font-size: 0.9em;
}

.form-group {
    margin-bottom: 20px;
    text-align: left;
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: #333333;
    font-size: 1.1em;
}

.form-control {
    width: calc(100% - 24px);
    padding: 15px 12px;
    border: 1px solid #cccccc;
    border-radius: 12px;
    font-size: 1em;
    background-color: #ffffff;
    color: #333333;
    transition: all 0.3s ease;
}

.form-control::placeholder {
    color: #999;
}

.form-control:focus {
    border-color: #9B51E0;
    box-shadow: 0 0 0 3px rgba(155, 81, 224, 0.3);
    outline: none;
}

.form-control.is-invalid {
    border-color: #e74c3c;
}

.invalid-feedback {
    color: #e74c3c;
    font-size: 0.85em;
    margin-top: 5px;
    display: block;
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    font-size: 0.95em;
}

.remember-me {
    display: flex;
    align-items: center;
    color: #333333;
    cursor: pointer;
    user-select: none;
}

.remember-me input[type="checkbox"] {
    margin-right: 8px;
    accent-color: #A601B3;
    width: 18px;
    height: 18px;
}

.forgot-password-link {
    color: #3004E1;
    text-decoration: none;
    transition: color 0.3s ease, text-shadow 0.3s ease;
}

.forgot-password-link:hover {
    color: #A601B3;
    text-decoration: underline;
    text-shadow: 0 0 5px rgba(155, 81, 224, 0.5);
}

.btn-primary {
    background-image: #3004E1;
    color: white;
    padding: 15px 25px;
    border: none;
    border-radius: 12px;
    font-size: 1.15em;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    box-shadow: 0 0 10px #A601B3;
}

.btn-primary:hover {
    background-image: #3004E1;
    transform: scale(1.02);
    box-shadow: 0 0 15px #A601B3;
}

.login-footer {
    margin-top: 25px;
    font-size: 0.95em;
    color: #333333;
}

.login-footer a {
    color: #3004E1;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease, text-shadow 0.3s ease;
}

.login-footer a:hover {
    color: #3004E1;
    text-decoration: underline;
    text-shadow: 0 0 5px rgba(155, 81, 224, 0.5);
}

/* Media Queries para responsividad */
@media (max-width: 768px) {
    .login-card {
        margin: 20px;
        padding: 25px;
        max-width: 90%;
        width: 100%; /* Asegura que la tarjeta ocupe el ancho disponible */
    }

    .login-header h2 {
        font-size: 1.8em;
    }

    .form-options {
        flex-direction: column;
        gap: 15px;
    }

    .form-control {
        width: 100%; /* Ajusta el ancho de los campos al 100% */
        padding: 12px 10px;
    }
}

@media (max-width: 480px) {
    .login-card {
        margin: 15px;
        padding: 20px;
        max-width: 95%;
    }

    .login-header h2 {
        font-size: 1.6em;
    }

    .login-logo {
        max-width: 130px;
    }

    .btn-primary {
        padding: 12px 20px;
        font-size: 1em;
    }
}