body {
    font-family: 'Poppins', 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e9f2 100%);
    color: #2c3e50;
    line-height: 1.7;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s ease;
}

.container {
    background-color: rgba(255, 255, 255, 0.95);
    padding: 40px 50px;
    margin: 20px auto;
    max-width: 450px;
    width: 90%;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1);
    border-radius: 16px;
    transform: translateY(0);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    border-top: 5px solid #000000;
}

.container:hover {
    transform: translateY(-10px);
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.15);
}

.container::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(to right, #000000, #4700c3);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.5s ease;
}

.container:hover::before {
    transform: scaleX(1);
}

h1 {
    text-align: center;
    margin: 0 0 30px 0;
    font-size: 32px;
    color: #1a1a1a;
    font-weight: 700;
    letter-spacing: -0.5px;
    position: relative;
    padding-bottom: 15px;
}

h1::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(to right, #000000, #4700c3);
    border-radius: 3px;
}

form {
    display: flex;
    flex-direction: column;
    animation: slideUp 0.8s cubic-bezier(0.165, 0.84, 0.44, 1);
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

label {
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 14px;
    color: #485461;
    transition: all 0.3s;
}

input[type="text"], input[type="email"], input[type="password"] {
    padding: 16px 20px;
    border: 2px solid rgba(0, 0, 0, 0.08);
    margin-bottom: 25px;
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.3s ease;
    background-color: rgba(245, 247, 250, 0.8);
    color: #2c3e50;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05);
}

input[type="text"]:focus, input[type="email"]:focus, input[type="password"]:focus {
    border-color: #4700c3;
    outline: none;
    box-shadow: 0 0 0 3px rgba(71, 0, 195, 0.15);
    background-color: #ffffff;
    transform: translateY(-2px);
}

input[type="text"]::placeholder, input[type="email"]::placeholder, input[type="password"]::placeholder {
    color: #aab7c4;
    transition: color 0.3s ease;
}

input[type="text"]:focus::placeholder, input[type="email"]:focus::placeholder, input[type="password"]:focus::placeholder {
    color: #cbd5e0;
}

input[type="submit"] {
    background: linear-gradient(to right, #000000, #28013b);
    color: #ffffff;
    padding: 18px 24px;
    border: none;
    cursor: pointer;
    transition: all 0.4s ease;
    border-radius: 12px;
    font-weight: 600;
    font-size: 16px;
    letter-spacing: 1px;
    text-transform: uppercase;
    box-shadow: 0 10px 20px rgba(40, 1, 59, 0.3);
    margin-top: 15px;
    position: relative;
    overflow: hidden;
}

input[type="submit"]::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: all 0.6s ease;
}

input[type="submit"]:hover {
    background: linear-gradient(to right, #28013b, #4700c3);
    box-shadow: 0 15px 30px rgba(71, 0, 195, 0.4);
    transform: translateY(-3px);
}

input[type="submit"]:hover::before {
    left: 100%;
}

input[type="submit"]:active {
    transform: translateY(0);
    box-shadow: 0 5px 15px rgba(71, 0, 195, 0.3);
}

.login-link {
    margin-top: 35px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 15px;
    color: #718096;
}

.login-link p {
    margin-right: 10px;
    font-size: 15px;
}

.login-link a {
    color: #4700c3;
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 600;
    position: relative;
}

.login-link a::after {
    content: "";
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(to right, #4700c3, #28013b);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.login-link a:hover {
    color: #28013b;
}

.login-link a:hover::after {
    transform: scaleX(1);
}

/* Añadir efecto sutil para errores */
.alert {
    background-color: rgba(254, 226, 226, 0.5);
    border-left: 4px solid #f56565;
    color: #c53030;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 25px;
    font-size: 14px;
    animation: shake 0.6s ease-in-out;
    box-shadow: 0 5px 15px rgba(197, 48, 48, 0.1);
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

/* Adaptar para dispositivos móviles */
@media (max-width: 576px) {
    .container {
        padding: 30px 25px;
    }
    
    h1 {
        font-size: 28px;
    }
    
    input[type="text"], input[type="email"], input[type="password"], input[type="submit"] {
        padding: 14px 16px;
    }
}