/* ============================================
   FORMULARIO DE REGISTRO MEJORADO
   Solo maneja el layout de 2 columnas
   El ancho lo maneja styles.css
   ============================================ */

/* Grid de 2 columnas para el formulario de REGISTRO */
#nuevo-registro-form {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px 32px;
    margin-top: 32px;
}

/* Campos que ocupan toda la fila */
#nuevo-registro-form > .form-field:has(#reg-email),
#nuevo-registro-form > .form-field:has(#reg-password),
#nuevo-registro-form > .form-field:has(#reg-password-confirm),
#nuevo-registro-form > div:has(#password-strength),
#nuevo-registro-form > div:has(#reg-terminos),
#nuevo-registro-form > button {
    grid-column: 1 / -1;
}

/* Grupos de campos con label */
.form-field {
    display: flex;
    flex-direction: column;
    width: 100%;
}

/* Labels más visibles y con mejor espaciado */
.form-field > label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 15px;
    letter-spacing: 0.01em;
}

/* Inputs más grandes y espaciosos */
#nuevo-registro-form input,
#nuevo-registro-form select {
    width: 100%;
    padding: 16px 18px;
    border: 2px solid var(--border);
    border-radius: 12px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 16px;
    transition: all 0.3s ease;
    font-family: inherit;
}

#nuevo-registro-form input:focus,
#nuevo-registro-form select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(236, 72, 153, 0.1);
    transform: translateY(-1px);
}

#nuevo-registro-form input::placeholder {
    color: var(--text-secondary);
    opacity: 0.7;
}

/* Password groups */
.password-group {
    position: relative;
}

.password-group input {
    padding-right: 45px;
}

/* Mensajes de validación */
#username-message,
#password-match-indicator {
    font-size: 14px;
    margin-top: 8px;
    font-weight: 600;
    display: block;
}

#edad-calculada {
    font-size: 14px;
    margin-top: 8px;
    font-weight: 600;
    display: block;
}

.form-field small {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 6px;
    display: block;
    line-height: 1.4;
}

/* Indicador de fortaleza de contraseña */
#password-strength {
    margin-top: 8px;
    margin-bottom: 16px;
}

#password-strength > div {
    height: 6px;
    background: var(--border);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 6px;
}

#password-strength-bar {
    height: 100%;
    transition: all 0.3s ease;
    border-radius: 3px;
}

#password-strength-text {
    font-size: 13px;
    font-weight: 600;
}

/* Checkboxes más grandes y claros */
#nuevo-registro-form input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    margin-right: 10px;
}

/* Sección de términos */
#nuevo-registro-form > div:has(#reg-terminos) {
    background: rgba(236, 72, 153, 0.05);
    padding: 24px;
    border-radius: 12px;
    border: 2px solid rgba(236, 72, 153, 0.2);
    margin-top: 8px;
}

#nuevo-registro-form > div:has(#reg-terminos) label {
    font-size: 15px;
    line-height: 1.6;
}

/* Botón de registro */
#btn-registrarse {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, var(--accent) 0%, #db2777 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

#btn-registrarse:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(236, 72, 153, 0.3);
}

#btn-registrarse:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Título del formulario */
#register-form h2 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 12px;
    text-align: center;
    background: linear-gradient(135deg, var(--accent) 0%, #db2777 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Descripción del formulario */
#register-form > .auth-box > p {
    text-align: center;
    font-size: 15px;
    line-height: 1.6;
}

/* Aviso de prohibición */
#register-form p[style*="color: var(--accent)"] {
    background: rgba(236, 72, 153, 0.1);
    padding: 12px;
    border-radius: 8px;
    border-left: 4px solid var(--accent);
}

/* Toggle form link */
.toggle-form {
    text-align: center;
    margin-top: 24px;
    font-size: 14px;
}

.toggle-form a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
}

.toggle-form a:hover {
    text-decoration: underline;
}

/* Responsive - Mobile */
@media (max-width: 768px) {
    #nuevo-registro-form {
        grid-template-columns: 1fr;
        gap: 20px;
        margin-top: 24px;
    }
    
    /* Todos los campos ocupan 1 columna en móvil */
    #nuevo-registro-form > .form-field,
    #nuevo-registro-form > div,
    #nuevo-registro-form > button {
        grid-column: 1;
    }
    
    #register-form h2 {
        font-size: 26px;
    }
    
    #nuevo-registro-form input,
    #nuevo-registro-form select {
        padding: 14px 16px;
        font-size: 16px;
    }
}

/* Responsive - Mobile pequeño */
@media (max-width: 480px) {
    #register-form h2 {
        font-size: 24px;
    }
    
    #nuevo-registro-form {
        gap: 18px;
    }
}

/* Animación de entrada */
#register-form {
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
