/* Estilos para páginas de autenticación - Estética Palabras en Juego */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Lora', serif;
    line-height: 1.6;
    color: #2c3e50;
    background: linear-gradient(45deg, #fff5f5 0%, #f0f8ff 50%, #f5f5dc 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    overflow-x: hidden;
}

/* Efecto de fondo similar al hero de la página principal */
body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 80%, rgba(120, 119, 198, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 119, 198, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.auth-container {
    width: 100%;
    max-width: 450px;
    position: relative;
    z-index: 1;
}

.auth-card {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 15px;
    padding: 3rem 2.5rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    text-align: center;
    border-left: 4px solid #a8dadc;
    backdrop-filter: blur(10px);
}

.auth-card h2 {
    font-family: 'Crimson Text', serif;
    color: #495057;
    margin-bottom: 2rem;
    font-size: 2rem;
    font-weight: 600;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.form-group {
    margin-bottom: 1.5rem;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #495057;
    font-weight: 500;
    font-size: 1rem;
    font-family: 'Lora', serif;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 1rem 1.2rem;
    border: 2px solid #dee2e6;
    border-radius: 10px;
    font-size: 1rem;
    font-family: 'Lora', serif;
    transition: all 0.3s ease;
    background: #fefefe;
    color: #2c3e50;
    line-height: 1.6;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #a8dadc;
    box-shadow: 0 0 0 3px rgba(168, 218, 220, 0.2);
    background: #ffffff;
}

.form-group input:hover,
.form-group select:hover {
    border-color: #a8dadc;
}

/* Estilos para checkbox "Recordar sesión" */
.checkbox-group {
    margin-bottom: 2rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 0.95rem;
    color: #495057;
    user-select: none;
    font-family: 'Lora', serif;
}

.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid #dee2e6;
    border-radius: 4px;
    margin-right: 10px;
    position: relative;
    transition: all 0.3s ease;
    background: #fefefe;
}

.checkbox-label:hover .checkmark {
    border-color: #a8dadc;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark {
    background: #a8dadc;
    border-color: #a8dadc;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.auth-btn {
    width: 100%;
    padding: 1.2rem;
    background: #d4af37;
    color: white;
    border: none;
    border-radius: 30px;
    font-size: 1.1rem;
    font-weight: 600;
    font-family: 'Crimson Text', serif;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 1rem;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.2);
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
}

.auth-btn:hover {
    background: #b8941f;
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(212, 175, 55, 0.3);
}

.auth-btn:active {
    transform: translateY(0);
}

/* Efecto de brillo en el botón */
.auth-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.auth-btn:hover::before {
    left: 100%;
}

.auth-link {
    margin-top: 1.5rem;
    color: #6c757d;
    font-size: 0.95rem;
    line-height: 1.6;
    font-family: 'Lora', serif;
}

.auth-link a {
    color: #495057;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    border-bottom: 1px solid transparent;
}

.auth-link a:hover {
    color: #a8dadc;
    border-bottom-color: #a8dadc;
}

.error-message {
    background: rgba(220, 53, 69, 0.1);
    color: #721c24;
    padding: 1rem;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(220, 53, 69, 0.2);
    font-size: 0.9rem;
    border-left: 4px solid #dc3545;
    font-family: 'Lora', serif;
}

.success-message {
    background: rgba(40, 167, 69, 0.1);
    color: #155724;
    padding: 1rem;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(40, 167, 69, 0.2);
    font-size: 0.9rem;
    border-left: 4px solid #28a745;
    font-family: 'Lora', serif;
}

/* Animación de entrada */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-card {
    animation: fadeInUp 0.8s ease-out;
}

/* Responsive */
@media (max-width: 768px) {
    body {
        padding: 15px;
    }
    
    .auth-card {
        padding: 2rem 1.5rem;
        margin: 1rem;
    }
    
    .auth-card h2 {
        font-size: 1.8rem;
    }
}

@media (max-width: 480px) {
    body {
        padding: 10px;
    }
    
    .auth-card {
        padding: 1.5rem 1rem;
    }
    
    .auth-card h2 {
        font-size: 1.6rem;
    }
    
    .form-group input,
    .form-group select {
        padding: 0.8rem 1rem;
    }
    
    .auth-btn {
        padding: 1rem;
        font-size: 1rem;
    }
}

/* Estilos adicionales para mejorar la experiencia */
.form-group input[type="password"] {
    font-family: monospace;
}

.form-group select {
    cursor: pointer;
}

.form-group input:invalid:not(:focus):not(:placeholder-shown) {
    border-color: #ffc107;
}

.form-group input:valid:not(:focus):not(:placeholder-shown) {
    border-color: #28a745;
}

/* Efecto de focus mejorado */
.form-group {
    position: relative;
}

.form-group input:focus + label,
.form-group select:focus + label {
    color: #a8dadc;
}

/* Indicador de carga para el botón */
.auth-btn.loading {
    pointer-events: none;
    opacity: 0.8;
}

.auth-btn.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid transparent;
    border-top: 2px solid #ffffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}