/* ===== 基础变量 ===== */
:root {
  --primary: #6C5CE7;
  --primary-light: #A29BFE;
  --primary-dark: #5A4BD1;
  --primary-bg: #F0EDFF;
  --success: #00B894;
  --success-bg: #E8FFF8;
  --warning: #FDCB6E;
  --warning-bg: #FFF9E6;
  --danger: #E17055;
  --danger-bg: #FFF0EC;
  --info: #74B9FF;
  --info-bg: #EBF5FF;
  --text-primary: #2D3436;
  --text-secondary: #636E72;
  --text-light: #B2BEC3;
  --bg-primary: #FAFAFA;
  --bg-white: #FFFFFF;
  --bg-card: #FFFFFF;
  --border: #E8E8E8;
  --border-light: #F0F0F0;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
}

/* ===== Reset ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
}

/* ===== 头部 ===== */
.header {
  background: linear-gradient(135deg, var(--primary) 0%, #8B7CF8 50%, var(--primary-light) 100%);
  color: white;
  padding: 2rem 1.5rem;
  text-align: center;
}
.header-content { max-width: 800px; margin: 0 auto; }
.back-link { display: inline-block; color: rgba(255,255,255,0.75); font-size: 0.85rem; text-decoration: none; margin-bottom: 0.75rem; transition: color 0.2s; }
.back-link:hover { color: white; }
.logo { display: flex; align-items: center; justify-content: center; gap: 0.75rem; margin-bottom: 0.5rem; }
.logo-icon { font-size: 2rem; }
.logo h1 { font-size: 1.75rem; font-weight: 700; letter-spacing: -0.5px; }
.tagline { font-size: 0.95rem; opacity: 0.9; }

/* ===== 主区域 ===== */
.main {
  display: grid;
  grid-template-columns: 440px 1fr;
  gap: 1.5rem;
  max-width: 1440px;
  margin: 1.5rem auto;
  padding: 0 1.5rem;
}
@media (max-width: 1024px) { .main { grid-template-columns: 1fr; } }

/* ===== 面板通用 ===== */
.input-panel, .output-panel {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
  overflow: hidden;
}
.output-panel { min-height: 600px; }
.panel-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-light);
}
.panel-header h2 { font-size: 1.1rem; font-weight: 600; color: var(--text-primary); }

/* ===== 模式切换 Tab ===== */
.mode-tabs {
  display: flex; border-bottom: 1px solid var(--border-light);
}
.mode-tab {
  flex: 1; padding: 0.85rem; border: none; background: none;
  font-size: 0.9rem; font-weight: 500; color: var(--text-secondary);
  cursor: pointer; transition: all 0.2s; font-family: inherit;
  border-bottom: 2px solid transparent;
}
.mode-tab:hover { color: var(--primary); background: var(--primary-bg); }
.mode-tab.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; }

/* ===== 输入方式 Tab ===== */
.input-type-tabs {
  display: flex; gap: 0.5rem; padding: 1rem 1.5rem 0;
}
.input-type-tab {
  padding: 0.45rem 0.85rem; border: 1.5px solid var(--border); border-radius: 100px;
  background: var(--bg-white); color: var(--text-secondary); font-size: 0.8rem;
  cursor: pointer; transition: all 0.2s; font-family: inherit;
}
.input-type-tab:hover { border-color: var(--primary-light); color: var(--primary); }
.input-type-tab.active { border-color: var(--primary); background: var(--primary-bg); color: var(--primary); font-weight: 600; }

/* ===== 输入区 ===== */
.input-body { padding: 0 1.5rem 1.5rem; }
.input-section { display: none; padding-top: 1rem; }
.input-section.active { display: block; }

.form-group { margin-bottom: 1rem; }
.form-group label { display: block; font-size: 0.875rem; font-weight: 600; color: var(--text-primary); margin-bottom: 0.5rem; }
.required { color: var(--danger); }
.form-group input[type="text"], .form-group textarea {
  width: 100%; padding: 0.75rem 1rem; font-size: 0.9rem;
  border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  background: var(--bg-white); color: var(--text-primary);
  transition: all 0.2s; outline: none; font-family: inherit;
}
.form-group input[type="text"]:focus, .form-group textarea:focus {
  border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-bg);
}
.form-group input::placeholder, .form-group textarea::placeholder { color: var(--text-light); }
.form-group textarea { resize: vertical; min-height: 80px; }

.char-count { text-align: right; font-size: 0.8rem; color: var(--text-light); margin-top: 0.35rem; }

/* ===== 平台选择器 ===== */
.platform-selector { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.platform-btn {
  padding: 0.4rem 0.75rem; border: 1.5px solid var(--border); border-radius: 100px;
  background: var(--bg-white); color: var(--text-secondary); font-size: 0.8rem;
  cursor: pointer; transition: all 0.2s; font-family: inherit;
}
.platform-btn:hover { border-color: var(--primary-light); color: var(--primary); }
.platform-btn.active { border-color: var(--primary); background: var(--primary-bg); color: var(--primary); font-weight: 600; }

/* ===== 上传区 ===== */
.upload-area {
  border: 2px dashed var(--border); border-radius: var(--radius-md);
  padding: 2rem; text-align: center; cursor: pointer;
  transition: all 0.2s; margin-top: 1rem;
}
.upload-area:hover, .upload-area.dragover { border-color: var(--primary); background: var(--primary-bg); }
.upload-icon { font-size: 2.5rem; margin-bottom: 0.5rem; }
.upload-area p { color: var(--text-secondary); font-size: 0.9rem; margin-bottom: 0.25rem; }
.upload-link { color: var(--primary); font-weight: 600; cursor: pointer; text-decoration: underline; }
.upload-hint { font-size: 0.8rem !important; color: var(--text-light) !important; }
.upload-result {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.85rem 1rem; background: var(--success-bg); border-radius: var(--radius-sm);
  font-size: 0.9rem; margin-top: 1rem;
}
.upload-clear-btn {
  margin-left: auto; padding: 0.3rem 0.6rem; border: 1px solid var(--border);
  border-radius: 6px; background: white; color: var(--text-secondary); font-size: 0.75rem;
  cursor: pointer; font-family: inherit;
}

/* ===== 顶部插件引导条 ===== */
.extension-bar {
  background: linear-gradient(135deg, #1A1A2E 0%, #3D3178 100%);
  color: white; padding: 0.85rem 1.5rem;
}
.ext-inner {
  max-width: 1440px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  flex-wrap: wrap;
}
.ext-info { display: flex; align-items: center; gap: 0.75rem; flex: 1; min-width: 0; }
.ext-icon { font-size: 1.5rem; flex-shrink: 0; }
.ext-info strong { display: block; font-size: 0.9rem; margin-bottom: 0.1rem; }
.ext-desc { font-size: 0.78rem; opacity: 0.7; line-height: 1.4; }
.ext-actions { display: flex; gap: 0.5rem; flex-shrink: 0; }
.ext-btn {
  padding: 0.45rem 0.9rem; border-radius: 6px; font-size: 0.8rem;
  font-weight: 600; text-decoration: none; cursor: pointer;
  border: 1.5px solid rgba(255,255,255,0.3); transition: all 0.2s;
  font-family: inherit; white-space: nowrap;
}
.ext-btn-primary { background: white; color: #3D3178; border-color: white; }
.ext-btn-primary:hover { background: #F0EDFF; }
.ext-btn-ghost { background: transparent; color: rgba(255,255,255,0.85); }
.ext-btn-ghost:hover { background: rgba(255,255,255,0.1); color: white; }

/* ===== 插件采集：已接收数据 ===== */
.ext-received {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 1rem 1.15rem; background: var(--success-bg); border: 1.5px solid var(--success);
  border-radius: var(--radius-md); margin-bottom: 1rem; margin-top: 1rem;
}
.ext-received-icon { font-size: 1.5rem; }
.ext-received-info strong { font-size: 0.92rem; display: block; color: var(--text-primary); }
.ext-received-info p { font-size: 0.8rem; color: var(--text-secondary); margin-top: 0.15rem; }

/* ===== 插件采集：分步引导 ===== */
.ext-guide { padding-top: 1rem; }
.ext-step {
  display: flex; gap: 0.85rem; padding: 0.85rem 0;
  border-bottom: 1px solid var(--border-light);
}
.ext-step:last-of-type { border-bottom: none; }
.ext-step-num {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--primary); color: white;
  font-size: 0.8rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; margin-top: 0.1rem;
}
.ext-step-body { flex: 1; min-width: 0; }
.ext-step-title { font-size: 0.9rem; font-weight: 600; color: var(--text-primary); margin-bottom: 0.35rem; }
.ext-step-desc { font-size: 0.82rem; color: var(--text-secondary); line-height: 1.6; }
.ext-step-desc code {
  background: #EDEAFF; color: var(--primary-dark); padding: 0.1rem 0.4rem;
  border-radius: 4px; font-size: 0.78rem;
}
.ext-step-detail { margin-top: 0.5rem; font-size: 0.78rem; color: var(--text-light); line-height: 1.6; }

/* 下载按钮 */
.ext-download-btn {
  display: inline-block; padding: 0.55rem 1.15rem;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: white; border-radius: var(--radius-sm); font-size: 0.85rem;
  font-weight: 600; text-decoration: none; transition: all 0.2s;
  margin-bottom: 0.5rem;
}
.ext-download-btn:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(108,92,231,0.35); }

/* 共用插件提示 */
.ext-shared-tip {
  display: flex; align-items: flex-start; gap: 0.4rem;
  margin-top: 0.6rem; padding: 0.6rem 0.75rem;
  background: var(--warning-bg); border-radius: var(--radius-sm);
  font-size: 0.78rem; color: #8B6914; line-height: 1.5;
}
.ext-shared-icon { font-size: 0.9rem; flex-shrink: 0; margin-top: 0.05rem; }

/* 悬浮按钮预览 */
.ext-btn-preview {
  display: flex; gap: 0.6rem; margin-top: 0.6rem; flex-wrap: wrap;
}
.ext-preview-fab {
  display: inline-flex; align-items: center; gap: 0.3rem;
  padding: 0.4rem 0.85rem; border-radius: 100px;
  font-size: 0.78rem; font-weight: 600; color: white;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.fab-price { background: linear-gradient(135deg, #6C5CE7, #A29BFE); }
.fab-review { background: linear-gradient(135deg, #00B894, #55EFC4); }

/* 子步骤 */
.ext-sub-steps { padding-left: 1.25rem; margin-top: 0.35rem; }
.ext-sub-steps li { margin-bottom: 0.3rem; }

/* 支持平台标签 */
.ext-platforms {
  display: flex; align-items: center; gap: 0.4rem; flex-wrap: wrap;
  padding: 0.85rem 0; margin-top: 0.25rem;
}
.ext-platform-label { font-size: 0.8rem; color: var(--text-light); }
.ext-platform-tag {
  padding: 0.2rem 0.6rem; border-radius: 100px;
  background: var(--primary-bg); color: var(--primary);
  font-size: 0.75rem; font-weight: 600;
}

/* ===== 竞品对比 ===== */
.compare-group { padding-top: 1rem; }
.compare-label {
  display: inline-block; padding: 0.3rem 0.75rem; border-radius: 100px;
  font-size: 0.8rem; font-weight: 600; margin-bottom: 0.75rem;
  background: var(--primary-bg); color: var(--primary);
}
.compare-label.competitor { background: var(--danger-bg); color: var(--danger); }
.compare-divider {
  text-align: center; padding: 0.75rem 0; font-size: 1.2rem;
  font-weight: 700; color: var(--text-light);
}

/* ===== 提交按钮 ===== */
.submit-btn {
  width: 100%; padding: 0.9rem;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: white; border: none; border-radius: var(--radius-sm);
  font-size: 1rem; font-weight: 600; cursor: pointer;
  transition: all 0.3s; font-family: inherit; margin-top: 1rem;
}
.submit-btn:hover { transform: translateY(-1px); box-shadow: 0 4px 15px rgba(108,92,231,0.4); }
.submit-btn:active { transform: translateY(0); }
.submit-btn:disabled { opacity: 0.7; cursor: not-allowed; transform: none; box-shadow: none; }
.spinner {
  display: inline-block; width: 16px; height: 16px;
  border: 2px solid rgba(255,255,255,0.3); border-top-color: white;
  border-radius: 50%; animation: spin 0.7s linear infinite; vertical-align: middle;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== 历史记录 ===== */
.history-section { border-top: 1px solid var(--border-light); }
.history-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.85rem 1.5rem; cursor: pointer; color: var(--text-secondary);
  font-size: 0.88rem; transition: background 0.2s;
}
.history-header:hover { background: var(--primary-bg); }
.history-arrow { font-size: 0.7rem; transition: transform 0.2s; }
.history-arrow.open { transform: rotate(90deg); }
.history-list { padding: 0 1.5rem 1rem; max-height: 300px; overflow-y: auto; }
.history-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.65rem 0.85rem; border-radius: var(--radius-sm);
  cursor: pointer; transition: background 0.15s; font-size: 0.85rem;
  border-bottom: 1px solid var(--border-light);
}
.history-item:hover { background: var(--primary-bg); }
.history-item:last-child { border-bottom: none; }
.history-item-info { flex: 1; min-width: 0; }
.history-item-name { font-weight: 600; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.history-item-meta { font-size: 0.75rem; color: var(--text-light); margin-top: 0.15rem; }
.history-item-score {
  display: flex; align-items: center; gap: 0.3rem; font-weight: 600; font-size: 0.85rem;
  padding: 0.2rem 0.5rem; border-radius: 100px; white-space: nowrap;
}
.score-good { color: var(--success); background: var(--success-bg); }
.score-mid { color: #e67e22; background: var(--warning-bg); }
.score-bad { color: var(--danger); background: var(--danger-bg); }
.history-delete {
  padding: 0.25rem 0.4rem; border: none; background: none; color: var(--text-light);
  cursor: pointer; font-size: 0.85rem; border-radius: 4px; margin-left: 0.5rem;
}
.history-delete:hover { color: var(--danger); background: var(--danger-bg); }

/* ===== 输出操作 ===== */
.output-actions { display: flex; gap: 0.5rem; }
.action-btn {
  padding: 0.4rem 0.75rem; border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  background: var(--bg-white); color: var(--text-secondary); font-size: 0.8rem;
  cursor: pointer; transition: all 0.2s; font-family: inherit;
}
.action-btn:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-bg); }

/* ===== 结果 Tab 导航 ===== */
.result-tabs {
  display: flex; border-bottom: 1px solid var(--border-light);
  overflow-x: auto; scrollbar-width: none;
}
.result-tabs::-webkit-scrollbar { display: none; }
.result-tab {
  flex-shrink: 0; padding: 0.75rem 1.15rem; border: none; background: none;
  font-size: 0.85rem; color: var(--text-secondary); cursor: pointer;
  transition: all 0.2s; font-family: inherit; white-space: nowrap;
  border-bottom: 2px solid transparent;
}
.result-tab:hover { color: var(--primary); background: var(--primary-bg); }
.result-tab.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; }

/* ===== 结果内容 ===== */
.result-content { padding: 1.5rem; }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ===== 空状态 ===== */
.empty-state {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: 400px; text-align: center; color: var(--text-light);
}
.empty-icon { font-size: 4rem; margin-bottom: 1rem; opacity: 0.5; }
.empty-state h3 { font-size: 1.1rem; color: var(--text-secondary); margin-bottom: 0.5rem; }
.empty-state p { font-size: 0.9rem; }

/* ===== 加载状态 ===== */
.loading-state {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: 400px; text-align: center;
}
.loading-animation { display: flex; gap: 6px; margin-bottom: 1.5rem; }
.loading-bar {
  width: 6px; height: 40px; border-radius: 3px; background: var(--primary-light);
  animation: loadPulse 1.2s ease-in-out infinite;
}
.loading-bar:nth-child(2) { animation-delay: 0.2s; }
.loading-bar:nth-child(3) { animation-delay: 0.4s; }
@keyframes loadPulse {
  0%, 100% { transform: scaleY(0.5); opacity: 0.4; }
  50% { transform: scaleY(1); opacity: 1; }
}
.loading-state h3 { font-size: 1.05rem; color: var(--text-primary); margin-bottom: 0.5rem; }
.loading-state p { font-size: 0.88rem; color: var(--text-secondary); }

/* ===== 总览面板 ===== */
.overview-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1.5rem;
}
.overview-card {
  padding: 1.25rem; border-radius: var(--radius-md);
  border: 1px solid var(--border-light); text-align: center;
}
.overview-card.score-card {
  grid-column: 1 / -1;
  background: linear-gradient(135deg, var(--primary-bg) 0%, #F8F7FF 100%);
  border-color: var(--primary-light);
}
.score-big { font-size: 3rem; font-weight: 800; color: var(--primary); line-height: 1; }
.score-label { font-size: 0.85rem; color: var(--text-secondary); margin-top: 0.35rem; }
.rate-item { margin-bottom: 0.35rem; }
.rate-label { font-size: 0.85rem; color: var(--text-secondary); }
.rate-value { font-size: 1.1rem; font-weight: 700; }
.rate-positive { color: var(--success); }
.rate-neutral { color: #e67e22; }
.rate-negative { color: var(--danger); }
.overview-summary {
  padding: 1rem; background: var(--info-bg); border-radius: var(--radius-sm);
  font-size: 0.92rem; color: var(--text-primary); line-height: 1.7;
}
.chart-container { position: relative; height: 220px; margin: 1rem 0; }

/* ===== 主题分析面板 ===== */
.topic-chart-container { position: relative; height: 280px; margin-bottom: 1.5rem; }
.topic-list { display: flex; flex-direction: column; gap: 0.75rem; }
.topic-item {
  padding: 0.85rem 1rem; border: 1px solid var(--border-light);
  border-radius: var(--radius-sm); transition: all 0.2s;
}
.topic-item:hover { border-color: var(--primary-light); box-shadow: var(--shadow-sm); }
.topic-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.5rem; }
.topic-name { font-weight: 600; font-size: 0.92rem; }
.topic-count { font-size: 0.8rem; color: var(--text-light); }
.topic-bar { display: flex; height: 8px; border-radius: 4px; overflow: hidden; background: var(--border-light); }
.topic-bar-positive { background: var(--success); }
.topic-bar-negative { background: var(--danger); }
.topic-keywords {
  display: flex; flex-wrap: wrap; gap: 0.35rem; margin-top: 0.5rem;
}
.keyword-tag {
  padding: 0.15rem 0.5rem; background: var(--primary-bg); color: var(--primary);
  border-radius: 100px; font-size: 0.75rem;
}

/* ===== 好评亮点面板 ===== */
.highlight-cards { display: flex; flex-direction: column; gap: 1rem; }
.highlight-card {
  padding: 1rem 1.15rem; border: 1px solid var(--border-light);
  border-radius: var(--radius-md); border-left: 4px solid var(--success);
  transition: all 0.2s;
}
.highlight-card:hover { box-shadow: var(--shadow-md); }
.highlight-point { font-size: 0.95rem; font-weight: 600; color: var(--text-primary); margin-bottom: 0.35rem; }
.highlight-freq { font-size: 0.8rem; color: var(--success); margin-bottom: 0.5rem; }
.highlight-copy {
  padding: 0.6rem 0.85rem; background: var(--success-bg);
  border-radius: var(--radius-sm); font-size: 0.85rem; color: var(--text-secondary);
  display: flex; align-items: center; justify-content: space-between;
}
.highlight-copy-text { flex: 1; }
.copy-btn {
  padding: 0.25rem 0.6rem; border: 1px solid var(--border);
  border-radius: 6px; background: white; color: var(--text-secondary);
  font-size: 0.75rem; cursor: pointer; font-family: inherit;
  transition: all 0.2s; flex-shrink: 0; margin-left: 0.5rem;
}
.copy-btn:hover { border-color: var(--primary); color: var(--primary); }

/* ===== 差评诊断面板 ===== */
.issue-cards { display: flex; flex-direction: column; gap: 1rem; }
.issue-card {
  padding: 1rem 1.15rem; border: 1px solid var(--border-light);
  border-radius: var(--radius-md); border-left: 4px solid var(--danger);
}
.issue-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.5rem; }
.issue-category { font-weight: 600; color: var(--danger); font-size: 0.95rem; }
.issue-stats { font-size: 0.8rem; color: var(--text-light); }
.issue-root { font-size: 0.85rem; color: var(--text-secondary); margin-bottom: 0.75rem; padding: 0.5rem; background: var(--danger-bg); border-radius: var(--radius-sm); }
.issue-examples { font-size: 0.85rem; }
.issue-examples-title { font-weight: 600; font-size: 0.8rem; color: var(--text-secondary); margin-bottom: 0.35rem; }
.issue-example {
  padding: 0.5rem 0.75rem; background: #f9f9f9; border-radius: var(--radius-sm);
  margin-bottom: 0.35rem; color: var(--text-secondary); font-size: 0.85rem;
  position: relative; padding-left: 1.5rem;
}
.issue-example::before { content: '"'; position: absolute; left: 0.5rem; color: var(--danger); font-size: 1.2rem; font-weight: bold; }
.reply-btn-inline {
  display: inline-flex; align-items: center; gap: 0.25rem;
  padding: 0.2rem 0.5rem; border: 1px solid var(--border); border-radius: 4px;
  background: white; color: var(--primary); font-size: 0.72rem;
  cursor: pointer; font-family: inherit; margin-left: 0.5rem;
  transition: all 0.15s;
}
.reply-btn-inline:hover { background: var(--primary-bg); border-color: var(--primary); }

/* ===== 改进建议面板 ===== */
.suggestion-list { display: flex; flex-direction: column; gap: 0.85rem; }
.suggestion-item {
  padding: 1rem 1.15rem; border: 1px solid var(--border-light);
  border-radius: var(--radius-md); display: flex; gap: 0.85rem;
}
.suggestion-priority {
  flex-shrink: 0; padding: 0.25rem 0.6rem; border-radius: 6px;
  font-size: 0.75rem; font-weight: 700; height: fit-content;
}
.priority-p0 { background: var(--danger-bg); color: var(--danger); }
.priority-p1 { background: var(--warning-bg); color: #e67e22; }
.priority-p2 { background: var(--info-bg); color: #0984e3; }
.suggestion-body { flex: 1; }
.suggestion-title { font-weight: 600; font-size: 0.92rem; margin-bottom: 0.25rem; }
.suggestion-detail { font-size: 0.85rem; color: var(--text-secondary); margin-bottom: 0.25rem; }
.suggestion-impact { font-size: 0.8rem; color: var(--primary); }

/* ===== 回复话术面板 ===== */
.reply-templates { display: flex; flex-direction: column; gap: 1rem; }
.reply-template {
  padding: 1rem 1.15rem; border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
}
.reply-template-header { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.65rem; }
.reply-category-tag {
  padding: 0.2rem 0.6rem; border-radius: 100px;
  font-size: 0.75rem; font-weight: 600;
  background: var(--primary-bg); color: var(--primary);
}
.reply-tone-tag {
  padding: 0.2rem 0.6rem; border-radius: 100px;
  font-size: 0.75rem; background: var(--info-bg); color: #0984e3;
}
.reply-template-text {
  font-size: 0.88rem; line-height: 1.7; color: var(--text-secondary);
  padding: 0.75rem; background: #f9f9f9; border-radius: var(--radius-sm);
  position: relative;
}
.reply-template-copy {
  display: flex; justify-content: flex-end; margin-top: 0.5rem;
}

/* ===== 竞品对比面板 ===== */
.compare-scores {
  display: grid; grid-template-columns: 1fr auto 1fr; gap: 1rem;
  align-items: center; margin-bottom: 1.5rem; text-align: center;
}
.compare-score-card { padding: 1.25rem; border-radius: var(--radius-md); }
.compare-score-card.my { background: var(--primary-bg); border: 1px solid var(--primary-light); }
.compare-score-card.comp { background: var(--danger-bg); border: 1px solid var(--danger); }
.compare-score-num { font-size: 2.5rem; font-weight: 800; line-height: 1; }
.compare-score-card.my .compare-score-num { color: var(--primary); }
.compare-score-card.comp .compare-score-num { color: var(--danger); }
.compare-score-label { font-size: 0.85rem; color: var(--text-secondary); margin-top: 0.25rem; }
.compare-vs { font-size: 1.5rem; font-weight: 800; color: var(--text-light); }
.compare-section { margin-bottom: 1.25rem; }
.compare-section-title {
  font-size: 0.92rem; font-weight: 600; margin-bottom: 0.65rem;
  padding-bottom: 0.35rem; border-bottom: 2px solid var(--primary-bg);
}
.compare-section-title.advantage { color: var(--success); border-color: var(--success-bg); }
.compare-section-title.threat { color: var(--danger); border-color: var(--danger-bg); }
.compare-section-title.opportunity { color: #0984e3; border-color: var(--info-bg); }
.compare-item {
  padding: 0.65rem 0.85rem; margin-bottom: 0.5rem;
  border-radius: var(--radius-sm); font-size: 0.88rem;
}
.compare-item.advantage-item { background: var(--success-bg); }
.compare-item.threat-item { background: var(--danger-bg); }
.compare-item.opportunity-item { background: var(--info-bg); }
.compare-item-point { font-weight: 600; margin-bottom: 0.15rem; }
.compare-item-detail { font-size: 0.82rem; color: var(--text-secondary); }
.compare-summary {
  padding: 1rem; background: var(--primary-bg); border-radius: var(--radius-sm);
  font-size: 0.92rem; color: var(--text-primary); line-height: 1.7; margin-top: 1rem;
}

/* ===== 营销素材面板 ===== */
.marketing-section { margin-bottom: 1.5rem; }
.marketing-section-title {
  font-size: 0.95rem; font-weight: 600; color: var(--primary);
  margin-bottom: 0.75rem; padding-bottom: 0.35rem;
  border-bottom: 2px solid var(--primary-bg);
}
.marketing-items { display: flex; flex-direction: column; gap: 0.5rem; }
.marketing-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.75rem 1rem; background: #f9f9f9; border-radius: var(--radius-sm);
  font-size: 0.88rem;
}
.marketing-item-text { flex: 1; color: var(--text-primary); }

/* ===== 弹窗 ===== */
.modal-overlay {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.4); display: flex; align-items: center; justify-content: center;
  z-index: 1000; backdrop-filter: blur(4px);
}
.modal {
  background: white; border-radius: var(--radius-lg); width: 90%; max-width: 520px;
  max-height: 85vh; overflow-y: auto; box-shadow: var(--shadow-lg);
}
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.25rem 1.5rem; border-bottom: 1px solid var(--border-light);
}
.modal-header h3 { font-size: 1.05rem; }
.modal-close {
  width: 32px; height: 32px; border: none; background: none;
  font-size: 1.5rem; color: var(--text-light); cursor: pointer;
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
}
.modal-close:hover { background: var(--danger-bg); color: var(--danger); }
.modal-body { padding: 1.5rem; }
.modal-gen-btn { margin-top: 0.5rem; }

.tone-selector { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.tone-btn {
  padding: 0.45rem 0.85rem; border: 1.5px solid var(--border); border-radius: 100px;
  background: var(--bg-white); color: var(--text-secondary); font-size: 0.8rem;
  cursor: pointer; transition: all 0.2s; font-family: inherit;
}
.tone-btn:hover { border-color: var(--primary-light); color: var(--primary); }
.tone-btn.active { border-color: var(--primary); background: var(--primary-bg); color: var(--primary); font-weight: 600; }

.reply-review-text {
  padding: 0.75rem; background: #f9f9f9; border-radius: var(--radius-sm);
  font-size: 0.88rem; color: var(--text-secondary); line-height: 1.6;
}
.reply-result { margin-top: 1rem; }
.reply-result label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 0.5rem; }
.reply-text {
  padding: 0.85rem; background: var(--success-bg); border-radius: var(--radius-sm);
  font-size: 0.88rem; line-height: 1.7; color: var(--text-primary);
}
.copy-reply-btn {
  margin-top: 0.5rem; padding: 0.4rem 0.85rem; border: 1.5px solid var(--success);
  border-radius: var(--radius-sm); background: white; color: var(--success);
  font-size: 0.82rem; cursor: pointer; font-family: inherit;
}
.copy-reply-btn:hover { background: var(--success-bg); }

/* ===== Toast 提示 ===== */
.toast {
  position: fixed; bottom: 2rem; left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--text-primary); color: white;
  padding: 0.75rem 1.5rem; border-radius: 100px; font-size: 0.9rem;
  box-shadow: var(--shadow-lg); transition: transform 0.3s ease;
  z-index: 2000; pointer-events: none;
}
.toast.show { transform: translateX(-50%) translateY(0); }

/* ===== 底部 ===== */
.footer { text-align: center; padding: 1.5rem; color: var(--text-light); font-size: 0.85rem; }
.footer a { color: var(--text-light); text-decoration: none; }
.footer a:hover { color: var(--primary); }
.footer-recommend { margin-bottom: 0.5rem; }
.footer-recommend span { color: var(--text-light); }
.footer-recommend a { color: var(--primary); margin: 0 0.5rem; font-size: 0.82rem; }

/* ===== 响应式 ===== */
@media (max-width: 768px) {
  .header { padding: 1.5rem 1rem; }
  .logo h1 { font-size: 1.35rem; }
  .main { padding: 0 1rem; margin: 1rem auto; gap: 1rem; }
  .input-body { padding: 0 1rem 1rem; }
  .result-content { padding: 1rem; }
  .overview-grid { grid-template-columns: 1fr; }
  .compare-scores { grid-template-columns: 1fr; }
  .compare-vs { padding: 0.5rem; }
}

/* ===== 滚动条美化 ===== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--text-light); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-secondary); }

/* ===== 动画 ===== */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
.fade-in { animation: fadeIn 0.35s ease both; }
