/* ================= 🌟 基础与排版 ================= */
.ua-wrapper { padding: 32px 0; }
.ua-header { text-align: center; margin-bottom: 32px; }
.ua-title { font-size: 1.8rem; font-weight: 800; color: var(--text-main); margin-bottom: 12px; }
.ua-subtitle { color: var(--text-muted); max-width: 800px; margin: 0 auto; line-height: 1.6; }

/* ================= 🌟 网格布局 (彻底修复溢出) ================= */
.ua-workspace { display: grid; grid-template-columns: 360px 1fr; gap: 24px; align-items: stretch; }
.ua-col-left { display: flex; flex-direction: column; gap: 24px; }
.ua-col-right { display: flex; flex-direction: column; gap: 24px; height: 100%; min-height: 0; min-width: 0; }
@media(max-width: 900px) { .ua-workspace { grid-template-columns: 1fr; } }

/* ================= 🌟 卡片风格 ================= */
.ua-card { background: var(--bg-surface); border: 1px solid var(--border-color); border-radius: 20px; padding: 28px; box-shadow: 0 4px 16px rgba(0,0,0,0.03); display: flex; flex-direction: column; box-sizing: border-box; }
.ua-panel-title { font-weight: 700; color: var(--text-main); font-size: 1.1rem; border-bottom: 1px solid var(--border-color); padding-bottom: 16px; margin-bottom: 20px; display: flex; justify-content: space-between; align-items: center; }

/* ================= 🌟 表单组件 ================= */
.ua-form-group { margin-bottom: 20px; }
.ua-label { display: block; font-size: 0.9rem; font-weight: 600; color: var(--text-muted); margin-bottom: 8px; }
.ua-select, .ua-input { width: 100%; box-sizing: border-box; padding: 12px 16px; border: 2px solid var(--border-color); border-radius: 10px; background: var(--bg-body); color: var(--text-main); font-size: 1rem; transition: 0.2s; outline: none; }
.ua-select:focus, .ua-input:focus { border-color: var(--primary-color); box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1); }
.ua-input::-webkit-outer-spin-button, .ua-input::-webkit-inner-spin-button { -webkit-appearance: none; }

/* 按钮 */
.ua-btn-primary { width: 100%; padding: 14px; background: var(--primary-color); color: #fff; font-size: 1.1rem; font-weight: bold; border: none; border-radius: 12px; cursor: pointer; transition: 0.2s; margin-top: auto; }
.ua-btn-primary:hover { opacity: 0.9; transform: translateY(-2px); box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.3); }
.ua-link-btn { font-size: 0.85rem; color: var(--primary-color); cursor: pointer; font-weight: 600; transition: 0.2s; }
.ua-link-btn:hover { opacity: 0.7; }

/* ================= 🌟 生成结果区 (自适应 Textarea) ================= */
.ua-result-box { 
    background: rgba(var(--primary-rgb), 0.05); border: 2px dashed rgba(var(--primary-rgb), 0.3); 
    border-radius: 16px; padding: 20px; text-align: center; margin-bottom: 8px; 
    display: flex; flex-direction: column; align-items: center; 
    width: 100%; box-sizing: border-box; overflow: hidden;
}

.ua-result-textarea { 
    width: 100%; max-width: 100%; box-sizing: border-box;
    height: auto; min-height: 80px; padding: 10px; 
    background: transparent; border: none; resize: none; 
    /* UA 较长，字号设小一点 */
    font-size: clamp(0.9rem, 1.5vw, 1.1rem); font-weight: 600; color: var(--primary-color); 
    font-family: monospace; letter-spacing: 0px; text-align: left; 
    outline: none; line-height: 1.5; margin-bottom: 16px; transition: 0.3s;
    white-space: pre-wrap; word-break: break-all; overflow: hidden; 
}
.ua-result-textarea::-webkit-scrollbar { width: 6px; }
.ua-result-textarea::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 4px; }

.ua-result-textarea.batch-mode { 
    height: 160px; background: var(--bg-body); 
    border: 1px solid var(--border-color); border-radius: 8px; 
    padding: 12px; overflow-y: auto; font-size: 0.9rem;
}

.ua-btn-copy { padding: 10px 24px; background: var(--bg-body); border: 1px solid var(--border-color); border-radius: 20px; font-weight: 600; color: var(--text-main); cursor: pointer; transition: 0.2s; flex-shrink: 0; }
.ua-btn-copy:hover { border-color: var(--primary-color); color: var(--primary-color); box-shadow: 0 2px 8px rgba(var(--primary-rgb), 0.15); }

/* ================= 🌟 历史列表 ================= */
.history-card { display: flex; flex-direction: column; min-height: 0; }
.ua-history-list { 
    list-style: none; padding: 0; margin: 0; max-height: 240px; 
    overflow-y: auto; overflow-x: hidden; display: flex; flex-direction: column; gap: 8px; padding-right: 6px; 
}
.ua-history-list::-webkit-scrollbar { width: 6px; }
.ua-history-list::-webkit-scrollbar-track { background: var(--bg-body); border-radius: 4px; }
.ua-history-list::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 4px; }
.ua-history-list::-webkit-scrollbar-thumb:hover { background: var(--primary-color); }

.hist-item { 
    display: flex; justify-content: space-between; align-items: center; 
    padding: 12px 16px; background: var(--bg-body); border-radius: 10px; 
    border: 1px solid var(--border-color); transition: 0.2s; 
    width: 100%; box-sizing: border-box; min-width: 0;
}
.hist-item:hover { border-color: var(--primary-color); box-shadow: inset 3px 0 0 var(--primary-color); }

.hist-num { 
    font-family: monospace; font-size: 0.85rem; color: var(--text-main); 
    flex: 1 1 0%; min-width: 0; margin-right: 16px; 
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; 
}
.hist-copy { background: transparent; border: none; color: var(--text-muted); cursor: pointer; transition: 0.2s; font-size: 1.1rem; flex-shrink: 0; }
.hist-copy:hover { color: var(--primary-color); transform: scale(1.1); }

/* ================= 🌟 SEO 文章 ================= */
.ua-seo-box { margin-top: 32px; background: var(--bg-surface); padding: 32px; border-radius: 20px; border: 1px solid var(--border-color); box-sizing: border-box; width: 100%; }
.ua-seo-box h2 { font-size: 1.25rem; margin-bottom: 16px; color: var(--text-main); margin-top: 24px; }
.ua-seo-box h2:first-child { margin-top: 0; }
.ua-seo-box p, .ua-seo-box li { color: var(--text-muted); line-height: 1.8; margin-bottom: 12px; }
.ua-seo-box ul { padding-left: 20px; }