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

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

/* ================= 🌟 卡片风格 ================= */
.rag-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; }
.rag-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: 24px; display: flex; justify-content: space-between; align-items: center; }

/* ================= 🌟 表单组件 ================= */
.rag-form-group { margin-bottom: 20px; display: flex; flex-direction: column; }
.rag-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.rag-label { display: block; font-size: 0.9rem; font-weight: 600; color: var(--text-muted); margin-bottom: 8px; }

.rag-select { 
    width: 100%; box-sizing: border-box; padding: 12px 14px; 
    border: 2px solid var(--border-color); border-radius: 10px; 
    background: var(--bg-body); color: var(--text-main); 
    font-size: 1rem; font-weight: 600; transition: 0.2s; outline: none; cursor: pointer;
}
.rag-select:focus { border-color: var(--primary-color); box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1); }

.rag-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; }
.rag-btn-primary:hover { opacity: 0.9; transform: translateY(-2px); box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.3); }

/* ================= 🌟 结果面板 ================= */
.rag-result-box { display: flex; flex-direction: column; flex: 1; min-height: 300px; }
.rag-result-textarea { 
    width: 100%; flex: 1; box-sizing: border-box; padding: 20px; 
    background: #1e1e24; border: 1px solid var(--border-color); border-radius: 12px; 
    font-size: 1rem; font-weight: 600; color: #a4b0be; 
    font-family: 'Courier New', Courier, monospace; text-align: left; 
    outline: none; line-height: 1.6; resize: none; word-break: break-all;
}
.rag-result-textarea:focus { border-color: var(--primary-color); box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1); }
.rag-result-textarea::-webkit-scrollbar { width: 6px; }
.rag-result-textarea::-webkit-scrollbar-thumb { background: #4b6584; border-radius: 4px; }

.rag-btn-copy { padding: 8px 16px; background: transparent; border: 1px solid var(--primary-color); border-radius: 20px; font-weight: 600; color: var(--primary-color); cursor: pointer; transition: 0.2s; font-size: 0.85rem; }
.rag-btn-copy:hover { background: var(--primary-color); color: #fff; }

/* ================= 🌟 SEO 文章 ================= */
.rag-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%; }
.rag-seo-box h2 { font-size: 1.25rem; margin-bottom: 16px; color: var(--text-main); margin-top: 24px; }
.rag-seo-box h2:first-child { margin-top: 0; }
.rag-seo-box p, .rag-seo-box li { color: var(--text-muted); line-height: 1.8; margin-bottom: 12px; }
.rag-seo-box ul { padding-left: 20px; }