/* ============================================================
   ESTILOS PREMIUM PARA DJANGO-ALLAUTH CON MICROANIMACIONES
   ============================================================ */

@import url('animations.css');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ============================================================
   BODY & BACKGROUND
   ============================================================ */

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f1729 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1e293b;
    position: relative;
    overflow-x: hidden;
}

/* Efecto de fondo animado */
body::before {
    content: '';
    position: fixed;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: float 20s ease-in-out infinite;
    pointer-events: none;
    z-index: -1;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(25px, 25px); }
}

.container {
    width: 100%;
    max-width: 420px;
    padding: 20px;
    animation: fadeInUp 0.6s ease-out;
}

/* ============================================================
   CARD PRINCIPAL - PROFUNDIDAD PREMIUM
   ============================================================ */

.card, .form-container, form {
    background: white;
    border-radius: 20px;
    padding: 48px 40px;
    margin: 0 auto;
    max-width: 420px;
    position: relative;
    overflow: hidden;
    
    /* Profundidad profesional - múltiples sombras */
    box-shadow: 
        0 1px 3px rgba(0, 0, 0, 0.08),
        0 4px 12px rgba(0, 0, 0, 0.1),
        0 12px 32px rgba(0, 0, 0, 0.12),
        0 20px 48px rgba(0, 0, 0, 0.1);
    
    animation: fadeInUp 0.5s ease-out;
    transition: all 0.3s ease-out;
    border: 1px solid rgba(255, 255, 255, 0.5);
}

/* Efecto hover en cards */
.card:hover, .form-container:hover {
    box-shadow: 
        0 2px 4px rgba(0, 0, 0, 0.1),
        0 6px 16px rgba(0, 0, 0, 0.12),
        0 16px 40px rgba(0, 0, 0, 0.15),
        0 24px 56px rgba(0, 0, 0, 0.12);
    transform: translateY(-8px);
}

/* ============================================================
   TÍTULOS - CON GRADIENTE Y ANIMACIÓN
   ============================================================ */

h1, h2 {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-align: center;
    margin-bottom: 16px;
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.5px;
    animation: fadeInDown 0.5s ease-out;
}

h1 { font-size: 32px; }

/* ============================================================
   PÁRRAFOS - MEJORADO
   ============================================================ */

p {
    color: #64748b;
    text-align: center;
    margin-bottom: 24px;
    font-size: 14px;
    line-height: 1.6;
    animation: fadeInUp 0.5s ease-out 0.1s both;
}

/* ============================================================
   LABELS - CON CONTRASTE
   ============================================================ */

label {
    display: block;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 10px;
    font-size: 13px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    opacity: 0.85;
    animation: fadeInLeft 0.4s ease-out both;
}

label:nth-of-type(1) { animation-delay: 0.15s; }
label:nth-of-type(2) { animation-delay: 0.2s; }
label:nth-of-type(3) { animation-delay: 0.25s; }
label:nth-of-type(4) { animation-delay: 0.3s; }

/* ============================================================
   INPUTS - DISEÑO PREMIUM
   ============================================================ */

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
textarea,
select {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 14px;
    margin-bottom: 20px;
    background: #f8fafc;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: inherit;
}

/* Estado hover en inputs */
input[type="text"]:hover,
input[type="email"]:hover,
input[type="password"]:hover,
input[type="number"]:hover,
textarea:hover,
select:hover {
    border-color: #cbd5e1;
    background: #ffffff;
}

/* Estado focus - Con glow */
input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: #10b981;
    background: #ffffff;
    box-shadow: 
        0 0 0 4px rgba(16, 185, 129, 0.08),
        0 0 0 8px rgba(16, 185, 129, 0.04),
        inset 0 1px 2px rgba(0, 0, 0, 0.02);
    animation: scaleIn 0.2s ease-out;
}

textarea {
    resize: vertical;
    min-height: 100px;
    line-height: 1.5;
}

/* ============================================================
   BOTONES PRIMARIOS - ANIMACIONES PREMIUM
   ============================================================ */

button,
input[type="submit"],
.btn {
    width: 100%;
    padding: 14px 24px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.3px;
    cursor: pointer;
    margin-bottom: 14px;
    position: relative;
    overflow: hidden;
    
    /* Animaciones */
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.25);
    
    /* Efecto de ripple */
}

button::before,
input[type="submit"]::before,
.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    pointer-events: none;
}

/* Hover con animación */
button:hover,
input[type="submit"]:hover,
.btn:hover {
    transform: translateY(-3px);
    box-shadow: 
        0 8px 25px rgba(16, 185, 129, 0.35),
        0 2px 4px rgba(0, 0, 0, 0.05);
    animation: bounce-soft 0.6s ease-out;
}

button:active,
input[type="submit"]:active,
.btn:active {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
}

/* Estado disabled */
button:disabled,
input[type="submit"]:disabled,
.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* ============================================================
   BOTONES SECUNDARIOS
   ============================================================ */

.btn-secondary,
button[type="reset"] {
    background: #f1f5f9;
    color: #475569;
    border: 2px solid #e2e8f0;
    box-shadow: none;
}

.btn-secondary:hover,
button[type="reset"]:hover {
    background: #e2e8f0;
    border-color: #cbd5e1;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* ============================================================
   LINKS - CON HOVER ELEGANTE
   ============================================================ */

a {
    color: #10b981;
    text-decoration: none;
    transition: all 0.25s ease;
    position: relative;
    font-weight: 500;
}

a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #10b981 0%, #059669 100%);
    transition: width 0.3s ease;
}

a:hover {
    color: #059669;
}

a:hover::after {
    width: 100%;
}

/* ============================================================
   DIVIDERS - ELEGANTE
   ============================================================ */

.divider {
    display: flex;
    align-items: center;
    margin: 32px 0;
    color: #cbd5e1;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, #cbd5e1, transparent);
}

.divider span {
    padding: 0 16px;
    font-size: 12px;
    color: #94a3b8;
    font-weight: 500;
    animation: fadeIn 0.5s ease-out 0.3s both;
}

/* ============================================================
   ALERTAS Y MENSAJES - CON ANIMACIONES
   ============================================================ */

/* Mensajes de error */
.errorlist,
.alert,
.error,
.form-error {
    background: linear-gradient(135deg, #fee2e2 0%, #fef0f0 100%);
    color: #7f1d1d;
    padding: 16px 16px 16px 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    border-left: 5px solid #ef4444;
    font-size: 14px;
    animation: slideInFromTop 0.4s ease-out;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

/* Mensajes de éxito */
.success,
.alert-success {
    background: linear-gradient(135deg, #dcfce7 0%, #ecfdf5 100%);
    color: #166534;
    padding: 16px 16px 16px 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    border-left: 5px solid #22c55e;
    font-size: 14px;
    animation: slideInFromTop 0.4s ease-out;
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.15);
    border: 1px solid rgba(34, 197, 94, 0.2);
}

/* Mensajes de info */
.info,
.alert-info {
    background: linear-gradient(135deg, #dbeafe 0%, #f0f9ff 100%);
    color: #1e40af;
    padding: 16px 16px 16px 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    border-left: 5px solid #3b82f6;
    font-size: 14px;
    animation: slideInFromTop 0.4s ease-out;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
    border: 1px solid rgba(59, 130, 246, 0.2);
}

/* ============================================================
   LISTAS
   ============================================================ */

ul, ol {
    margin-left: 24px;
    margin-bottom: 20px;
}

li {
    margin-bottom: 10px;
    color: #475569;
    line-height: 1.6;
    transition: all 0.25s ease;
}

li:hover {
    color: #10b981;
    padding-left: 4px;
}

/* ============================================================
   TABLAS
   ============================================================ */

table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 24px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

th {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    padding: 14px 16px;
    text-align: left;
    font-weight: 700;
    border-bottom: 2px solid #e2e8f0;
    color: #1e293b;
    font-size: 13px;
    letter-spacing: 0.3px;
}

td {
    padding: 14px 16px;
    border-bottom: 1px solid #e2e8f0;
    color: #475569;
    transition: all 0.2s ease;
}

tr:hover td {
    background: #f8fafc;
}

/* ============================================================
   HELP TEXT
   ============================================================ */

.help-text,
.small,
.field-help {
    display: block;
    font-size: 12px;
    color: #94a3b8;
    margin-top: -14px;
    margin-bottom: 14px;
    font-weight: 400;
}

/* ============================================================
   CHECKBOX Y RADIO - MEJORADOS
   ============================================================ */

input[type="checkbox"],
input[type="radio"] {
    margin-right: 10px;
    cursor: pointer;
    width: 18px;
    height: 18px;
    accent-color: #10b981;
    transition: all 0.2s ease;
}

input[type="checkbox"]:hover,
input[type="radio"]:hover {
    transform: scale(1.1);
}

/* ============================================================
   FIELDSET
   ============================================================ */

fieldset {
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    background: #f8fafc;
    transition: all 0.3s ease;
}

fieldset:hover {
    border-color: #cbd5e1;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.08);
}

legend {
    padding: 0 12px;
    font-weight: 700;
    color: #1e293b;
    font-size: 13px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* ============================================================
   FORMULARIOS
   ============================================================ */

form {
    width: 100%;
}

.form-row {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
    animation: stagger-children;
}

.form-row > div {
    flex: 1;
}

/* ============================================================
   SECCIÓN DE LINKS
   ============================================================ */

.links {
    text-align: center;
    margin-top: 28px;
    animation: fadeInUp 0.5s ease-out 0.4s both;
}

.links a {
    display: inline-block;
    margin: 6px 10px;
    font-size: 13px;
    font-weight: 500;
}

/* ============================================================
   UTILITIES
   ============================================================ */

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-3 { margin-top: 20px; }
.mb-3 { margin-bottom: 20px; }
.mt-4 { margin-top: 28px; }
.mb-4 { margin-bottom: 28px; }

/* ============================================================
   RESPONSIVE - Mantener diseño premium en mobile
   ============================================================ */

@media (max-width: 640px) {
    .container,
    .card,
    form {
        padding: 32px 24px;
        border-radius: 16px;
    }
    
    h1, h2 {
        font-size: 24px;
        margin-bottom: 12px;
    }
    
    p {
        margin-bottom: 20px;
        font-size: 13px;
    }
    
    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="number"],
    textarea,
    select {
        padding: 12px 14px;
        font-size: 16px;
        margin-bottom: 16px;
    }
    
    button,
    input[type="submit"],
    .btn {
        padding: 12px 20px;
        margin-bottom: 10px;
        font-size: 14px;
    }
    
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    
    body::before {
        background-size: 30px 30px;
    }
}
