/* Reset y configuración base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}


body {
    font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: #b795d3;
    background-image: 
        radial-gradient(at 40% 20%, hsla(228, 62%, 59%, 0.12) 0px, transparent 50%),
        radial-gradient(at 80% 0%, hsla(189, 42%, 75%, 0.08) 0px, transparent 50%),
        radial-gradient(at 0% 50%, hsla(355, 85%, 93%, 0.05) 0px, transparent 50%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    line-height: 1.6;
}

/* Contenedor principal */
.container {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(226, 232, 240, 0.8);
    border-radius: 24px;
    padding: 48px 40px;
    width: 100%;
    max-width: 480px;
    box-shadow: 
        0 25px 50px -12px rgba(0, 0, 0, 0.25),
        0 0 0 1px rgba(255, 255, 255, 0.8);
    position: relative;
    overflow: hidden;
}

.container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6, #06b6d4);
    border-radius: 24px 24px 0 0;
}

/* Título principal */
h2 {
    color: #0f172a;
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 12px;
    letter-spacing: -0.02em;
    text-align: center;
}

h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6);
    margin: 16px auto 32px;
    border-radius: 2px;
}

/* Formulario */
form {
    margin-bottom: 32px;
}

/* Labels */
label {
    display: block;
    color: #374151;
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Campos de entrada */
input[type="text"] {
    width: 100%;
    padding: 16px 20px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 500;
    background: #fafafa;
    color: #111827;
    margin-bottom: 24px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
}

input[type="text"]:focus {
    border-color: #3b82f6;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
    transform: translateY(-1px);
}

input[type="text"]:hover {
    border-color: #d1d5db;
    background: #ffffff;
}

/* Botón principal */
button[type="submit"] {
    width: 100%;
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white;
    border: none;
    padding: 18px 24px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    box-shadow: 0 4px 14px 0 rgba(59, 130, 246, 0.4);
    position: relative;
    overflow: hidden;
}

button[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px 0 rgba(59, 130, 246, 0.5);
    background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
}

button[type="submit"]:active {
    transform: translateY(0);
    box-shadow: 0 4px 14px 0 rgba(59, 130, 246, 0.4);
}

/* Separador */
.container > br {
    display: none;
}

.container > br + a {
    margin-top: 24px;
    display: block;
}

/* Botones secundarios */
button[type="button"] {
    width: 100%;
    background: transparent;
    color: #6b7280;
    border: 2px solid #e5e7eb;
    padding: 14px 24px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 12px;
    cursor: pointer;
    margin-bottom: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

button[type="button"]:hover {
    background: #f9fafb;
    border-color: #d1d5db;
    color: #374151;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

button[type="button"]:active {
    transform: translateY(0);
}

/* Enlaces */
a {
    text-decoration: none;
}

a:last-child button {
    margin-bottom: 0;
}

/* Estados de validación */
input[type="text"].error {
    border-color: #ef4444;
    background: #fef2f2;
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.1);
}

input[type="text"].success {
    border-color: #10b981;
    background: #f0fdf4;
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.1);
}

/* Mensajes de validación */
.error-message {
    color: #ef4444;
    font-size: 12px;
    font-weight: 500;
    margin-top: -16px;
    margin-bottom: 16px;
    text-align: left;
    opacity: 0;
    animation: fadeIn 0.3s ease forwards;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Loading state para el botón */
button[type="submit"].loading {
    color: transparent;
    position: relative;
}

button[type="submit"].loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    border: 2px solid #ffffff40;
    border-top: 2px solid #ffffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    transform: translate(-50%, -50%);
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Responsive */
@media (max-width: 480px) {
    .container {
        padding: 32px 24px;
        margin: 20px;
        border-radius: 20px;
    }
    
    h2 {
        font-size: 28px;
    }
    
    input[type="text"], button {
        padding: 14px 16px;
        font-size: 15px;
    }
}
