:root {
    --primary: #6366f1;
    --secondary: #22d3ee;
    --accent: #a78bfa;
    --danger: #ef4444;
    --white: #ffffff;
    --glass: rgba(255, 255, 255, 0.15);
    --border-glass: rgba(255, 255, 255, 0.3);
}

/* RESET */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ================= FONDO ANIMADO ================= */
body {
    min-height: 100vh;
    font-family: 'Inter', 'Segoe UI', sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px; /* Para que no toque bordes en móvil */
    background: linear-gradient(
        -45deg,
        #0f172a,
        #1e293b,
        #312e81,
        #0ea5e9
    );
    background-size: 400% 400%;
    animation: gradientMove 12s ease infinite;
}

@keyframes gradientMove {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* ================= LOGIN CARD ================= */
form {
    width: 360px;
    padding: 36px 32px;

    background: var(--glass);
    backdrop-filter: blur(18px);
    border-radius: 24px;
    border: 1px solid var(--border-glass);

    box-shadow: 0 40px 80px rgba(0,0,0,.45);
    animation: floatIn .6s ease;

    display: flex;
    flex-direction: column;
    gap: 12px;
}

@keyframes floatIn {
    from {
        opacity: 0;
        transform: translateY(40px) scale(.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ================= TITULO ================= */
form h2 {
    text-align: center;
    margin-bottom: 24px;
    color: var(--white);
    font-weight: 700;
    letter-spacing: .5px;
    font-size: 1.6rem;
}

/* ================= INPUTS ================= */
input {
    width: 100%;
    padding: 14px 16px;
    margin-bottom: 14px;

    background: rgba(0,0,0,.35);
    color: var(--white);
    border-radius: 14px;
    border: 1px solid var(--border-glass);
    outline: none;

    font-size: 14px;
    transition: border .25s ease, box-shadow .25s ease;
}

input::placeholder {
    color: rgba(255,255,255,.65);
}

input:focus {
    border-color: var(--secondary);
    box-shadow: 0 0 0 3px rgba(34,211,238,.35);
}

/* ================= BOTÓN ================= */
button {
    width: 100%;
    padding: 14px;
    margin-top: 10px;

    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: var(--white);
    border: none;
    border-radius: 16px;

    font-size: 15px;
    font-weight: 700;
    cursor: pointer;

    box-shadow: 0 18px 40px rgba(99,102,241,.45);
    transition: transform .25s ease, box-shadow .25s ease;
}

button:hover {
    transform: translateY(-4px) scale(1.04);
    box-shadow: 0 28px 60px rgba(99,102,241,.65);
}

/* ================= MENSAJE ERROR (OPCIONAL) ================= */
.error {
    margin-bottom: 14px;
    padding: 10px;
    border-radius: 12px;
    background: rgba(239,68,68,.25);
    color: #fecaca;
    font-size: 13px;
    text-align: center;
}

/* ================= RESPONSIVE ================= */
@media (max-width: 480px) {
    body {
        padding: 16px;
    }

    form {
        width: 100%;
        max-width: 320px;
        padding: 28px 22px;
        gap: 10px;
    }

    form h2 {
        font-size: 1.4rem;
    }

    input {
        padding: 12px 14px;
        font-size: 13px;
    }

    button {
        padding: 12px;
        font-size: 14px;
    }

    .error {
        font-size: 12px;
        padding: 8px;
    }
}
