/* Reset básico */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Fondo animado en tonos vino */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    min-height: 100dvh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    background: linear-gradient(270deg, #560a0a, #9f1212, #560a0a);
    background-size: 600% 600%;
    animation: gradientAnim 15s ease infinite;
}

@keyframes gradientAnim {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Contenedor del login - Glassmorphism */
.login-box {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
    padding: 40px 30px;
    width: 100%;
    max-width: 360px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.login-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

/* Logo */
.logo {
    max-width: 120px;
    margin-bottom: 25px;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

/* Título */
.login-box h2 {
    margin-bottom: 25px;
    color: #fff;
    font-weight: 700;
    text-shadow: 1px 1px 4px rgba(0,0,0,0.5);
}

/* Inputs */
.login-box input[type="text"],
.login-box input[type="password"] {
    width: 100%;
    padding: 12px 15px;
    margin-bottom: 15px;
    border: 1px solid rgba(255,255,255,0.4);
    border-radius: 12px;
    background: rgba(255,255,255,0.25);
    color: #fff;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
}

.login-box input::placeholder {
    color: rgba(255,255,255,0.7);
}

.login-box input:focus {
    border-color: #fff;
    box-shadow: 0 0 10px rgba(255,255,255,0.6);
    outline: none;
    background: rgba(255,255,255,0.35);
}

/* Botón */
.login-box button {
    width: 100%;
    padding: 12px;
    background: rgba(255,255,255,0.25);
    color: #fff;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 700;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.login-box button:hover,
.login-box button:focus {
    background: rgba(255,255,255,0.45);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.25);
    outline: none;
}

/* Mensaje de error */
.mensaje-error {
    background-color: rgba(255, 0, 0, 0.25);
    color: #fff;
    padding: 8px 10px;
    border-radius: 8px;
    font-weight: 600;
    margin-bottom: 15px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

/* Footer */
.footer {
    margin-top: 15px;
    font-size: 13px;
    color: rgba(255,255,255,0.7);
    text-align: center;
}

/* Responsivo */
@media (max-width: 400px) {
    .login-box {
        max-width: 90%;
        padding: 25px;
    }

    .login-box input,
    .login-box button {
        font-size: 0.9rem;
        padding: 10px 12px;
    }

    .logo {
        max-width: 80px;
        margin-bottom: 15px;
    }
}

/* Botón con gradiente animado */
.login-box button {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(270deg, #b91c1c, #7f1d1d, #b91c1c);
    background-size: 600% 600%;
    animation: gradientAnimButton 8s ease infinite;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    backdrop-filter: blur(10px);
}

/* Hover y focus */
.login-box button:hover,
.login-box button:focus {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.25);
    outline: none;
}

/* Animación del gradiente */
@keyframes gradientAnimButton {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}
/* Animación del gradiente normal */
@keyframes gradientAnimButton {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Botón con gradiente animado */
.login-box button {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(270deg, #b91c1c, #7f1d1d, #b91c1c);
    background-size: 600% 600%;
    animation: gradientAnimButton 8s ease infinite;
    transition: transform 0.3s ease, box-shadow 0.3s ease, filter 0.3s ease;
    backdrop-filter: blur(10px);
}

/* Hover y focus: gradiente más rápido y colores más brillantes */
.login-box button:hover,
.login-box button:focus {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
    animation: gradientAnimButtonHover 3s ease infinite;
    filter: brightness(1.1);
    outline: none;
}

/* Animación de hover más rápida */
@keyframes gradientAnimButtonHover {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

