/* AI Mention Check 样式表 · 纯原生 CSS3 无任何外部依赖 */

:root {
  --bg-main: #0b0f19;
  --bg-surface: #111827;
  --bg-card: #1f2937;
  --bg-card-hover: #273549;
  --bg-input: #151d2a;
  --border-color: #374151;
  --border-subtle: #242f42;
  --border-focus: #3b82f6;
  --text-main: #f9fafb;
  --text-muted: #9ca3af;
  --text-dim: #6b7280;
  --primary: #3b82f6;
  --primary-hover: #2563eb;
  --primary-glow: rgba(59, 130, 246, 0.25);
  --success: #10b981;
  --success-bg: rgba(16, 185, 129, 0.15);
  --warning: #f59e0b;
  --warning-bg: rgba(245, 158, 11, 0.15);
  --danger: #ef4444;
  --danger-bg: rgba(239, 68, 68, 0.15);
  --info: #06b6d4;
  --info-bg: rgba(6, 182, 212, 0.15);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --font-stack: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --header-height: 64px;
  --max-width: 1200px;
}

/* 基础重置 */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-stack);
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
}

/* 整体布局 */
.app-layout {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* 顶部导航 */
.app-header {
  height: var(--header-height);
  background-color: rgba(17, 24, 39, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-container {
  max-width: var(--max-width);
  height: 100%;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #1e3a8a, #3b82f6);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 0 15px var(--primary-glow);
}

.brand-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.01em;
}

.brand-subtitle {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-lang {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background-color: var(--bg-input);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-lang:hover {
  border-color: var(--primary);
  color: #fff;
}

.lang-opt.active {
  color: var(--primary);
  font-weight: 700;
}

.lang-divider {
  color: var(--text-dim);
  font-size: 0.75rem;
}

/* 主内容容器 */
.app-main {
  flex: 1;
  max-width: var(--max-width);
  width: 100%;
  margin: 0 auto;
  padding: 24px 20px 48px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* 模式切换选项卡 */
.mode-selector-section {
  width: 100%;
}

.mode-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.mode-tab {
  background-color: var(--bg-surface);
  border: 2px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  cursor: pointer;
  text-align: left;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.mode-tab:hover {
  border-color: var(--border-color);
  background-color: #162032;
}

.mode-tab.active {
  border-color: var(--primary);
  background-color: #172554;
  box-shadow: 0 0 20px rgba(59, 130, 246, 0.2);
}

.tab-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  background-color: var(--success-bg);
  color: var(--success);
  margin-bottom: 6px;
}

.tab-badge.secondary {
  background-color: var(--info-bg);
  color: var(--info);
}

.tab-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 4px;
}

.tab-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* 通用卡片容器 */
.card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.step-badge {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), #1d4ed8);
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.header-title-group {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
}

.card-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
}

.card-subtitle {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-left: 8px;
}

.count-badge {
  font-size: 0.75rem;
  font-weight: 600;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--primary);
  padding: 2px 8px;
  border-radius: 999px;
}

.card-tag {
  font-size: 0.75rem;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  font-weight: 600;
}

.card-tag.info {
  background-color: var(--info-bg);
  color: var(--info);
  border: 1px solid rgba(6, 182, 212, 0.3);
}

.card-body {
  padding: 20px;
}

/* 表单布局 */
.form-row {
  display: flex;
  gap: 16px;
  margin-bottom: 16px;
}

.form-row:last-child {
  margin-bottom: 0;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.flex-1 { flex: 1; }
.flex-2 { flex: 2; }
.flex-3 { flex: 3; }

.form-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.form-label.required::after {
  content: " *";
  color: var(--danger);
}

.label-hint {
  font-size: 0.75rem;
  color: var(--text-dim);
  font-weight: normal;
}

.form-input, .form-select, .form-textarea {
  background-color: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.9rem;
  padding: 9px 12px;
  outline: none;
  transition: all 0.2s ease;
  width: 100%;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.password-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.password-wrapper .form-input {
  padding-right: 38px;
}

.btn-icon {
  position: absolute;
  right: 8px;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
}

.btn-icon:hover {
  color: #fff;
  background-color: var(--bg-card);
}

.radio-group {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 40px;
}

.radio-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  cursor: pointer;
  color: var(--text-muted);
}

.radio-label input[type="radio"] {
  cursor: pointer;
  accent-color: var(--primary);
}

.checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  cursor: pointer;
  color: var(--text-muted);
}

.checkbox-label input[type="checkbox"] {
  cursor: pointer;
  accent-color: var(--primary);
  width: 16px;
  height: 16px;
}

.key-options-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border-subtle);
  flex-wrap: wrap;
  gap: 12px;
}

.security-warning {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  color: var(--warning);
}

.form-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border-subtle);
}

/* 通用按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 9px 16px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s ease;
  text-decoration: none;
}

.btn-primary {
  background-color: var(--primary);
  color: #fff;
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  box-shadow: 0 0 15px var(--primary-glow);
}

.btn-secondary {
  background-color: var(--bg-card);
  border-color: var(--border-color);
  color: var(--text-main);
}

.btn-secondary:hover {
  background-color: var(--bg-card-hover);
  border-color: #4b5563;
}

.btn-ghost {
  background-color: transparent;
  color: var(--text-muted);
}

.btn-ghost:hover {
  color: #fff;
  background-color: var(--bg-card);
}

.btn-danger {
  background-color: var(--danger);
  color: #fff;
}

.btn-danger:hover {
  background-color: #dc2626;
}

.btn-sm {
  font-size: 0.8rem;
  padding: 5px 10px;
}

.btn-lg {
  font-size: 1rem;
  padding: 12px 24px;
  border-radius: var(--radius-md);
}

/* 提示说明框 */
.prompts-tip {
  background-color: var(--bg-card);
  border-left: 3px solid var(--primary);
  padding: 10px 14px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}

/* 提问列表 */
.prompts-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.prompt-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  transition: border-color 0.2s ease;
}

.prompt-item:hover {
  border-color: var(--border-color);
}

.prompt-num {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-dim);
  width: 24px;
  flex-shrink: 0;
}

.prompt-lang-tag {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  background-color: var(--bg-input);
  color: var(--text-muted);
  flex-shrink: 0;
}

.prompt-input-edit {
  flex: 1;
  background-color: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.9rem;
  padding: 6px 8px;
  outline: none;
}

.prompt-input-edit:focus {
  background-color: var(--bg-input);
  border-color: var(--border-focus);
}

.btn-del-prompt {
  background: none;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  padding: 6px;
  border-radius: 4px;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.btn-del-prompt:hover {
  color: var(--danger);
  background-color: var(--danger-bg);
}

/* 模式 B 自动运行控制台 */
.mode-b-run-panel {
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 20px;
}

.mode-b-run-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.panel-subtitle {
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 2px;
}

.panel-subtext {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.run-btn-group {
  display: flex;
  gap: 8px;
}

.query-progress-container {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border-subtle);
}

.progress-bar-bg {
  width: 100%;
  height: 8px;
  background-color: var(--bg-input);
  border-radius: 999px;
  overflow: hidden;
  position: relative;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #3b82f6, #60a5fa);
  transition: width 0.3s ease;
  border-radius: 999px;
}

.progress-bar-fill.primary {
  background: linear-gradient(90deg, #3b82f6, #60a5fa);
}

.progress-bar-fill.success {
  background: linear-gradient(90deg, #10b981, #34d399);
}

.progress-bar-fill.warning {
  background: linear-gradient(90deg, #f59e0b, #fbbf24);
}

.progress-status-row {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.alert-banner {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  margin-top: 12px;
  font-size: 0.85rem;
}

.alert-error {
  background-color: var(--danger-bg);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #fca5a5;
}

/* 回答卡片列表 */
.answers-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.answer-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.answer-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.answer-prompt-text {
  font-size: 0.95rem;
  font-weight: 600;
  color: #fff;
  flex: 1;
}

.outbound-links-group {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.link-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 4px;
  text-decoration: none;
  background-color: var(--bg-input);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  transition: all 0.2s ease;
}

.link-btn:hover {
  border-color: var(--primary);
  color: #fff;
  background-color: #1e293b;
}

.answer-card-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

.platform-select {
  width: 140px;
  font-size: 0.8rem;
  padding: 6px 8px;
}

.answer-textarea {
  min-height: 100px;
  resize: vertical;
  font-size: 0.85rem;
  line-height: 1.45;
}

.answer-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-dim);
}

.execute-actions {
  display: flex;
  justify-content: center;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border-subtle);
}

/* 报告区样式 */
.report-section {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.source-info-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 10px 16px;
  font-size: 0.85rem;
  flex-wrap: wrap;
  gap: 8px;
}

.source-label {
  color: var(--text-muted);
}

.source-value {
  color: var(--primary);
  font-weight: 700;
}

.source-notice {
  color: var(--text-dim);
  font-size: 0.75rem;
}

.history-delta-bar {
  background-color: var(--bg-surface);
  border: 1px dashed var(--border-color);
  border-radius: var(--radius-sm);
  padding: 8px 16px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--success);
}

.report-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 20px;
}

.report-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px;
}

.score-card .score-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.score-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.score-grade-badge {
  font-size: 1.1rem;
  font-weight: 800;
  padding: 2px 10px;
  border-radius: 6px;
  background-color: var(--primary-glow);
  color: var(--primary);
  border: 1px solid var(--primary);
}

.score-grade-badge.grade-s {
  background-color: rgba(16, 185, 129, 0.2);
  color: #10b981;
  border-color: #10b981;
}

.score-grade-badge.grade-a {
  background-color: rgba(59, 130, 246, 0.2);
  color: #3b82f6;
  border-color: #3b82f6;
}

.score-grade-badge.grade-b {
  background-color: rgba(245, 158, 11, 0.2);
  color: #f59e0b;
  border-color: #f59e0b;
}

.score-grade-badge.grade-c {
  background-color: rgba(239, 68, 68, 0.2);
  color: #ef4444;
  border-color: #ef4444;
}

.score-circle-wrapper {
  text-align: center;
  padding: 16px 0;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 14px;
}

.score-number-display {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 4px;
}

.score-num {
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1;
  color: #fff;
  letter-spacing: -0.02em;
}

.score-max {
  font-size: 1.1rem;
  color: var(--text-dim);
}

.score-level-text {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-top: 6px;
}

.score-formula-box {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.75rem;
}

.formula-title {
  color: var(--text-dim);
  font-weight: 600;
  margin-bottom: 4px;
}

.formula-row {
  display: flex;
  justify-content: space-between;
  color: var(--text-muted);
}

.formula-item-val {
  font-weight: 600;
  color: #fff;
}

.formula-calc-row {
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px dashed var(--border-subtle);
}

.formula-calc-row code {
  font-family: monospace;
  color: var(--primary);
  font-size: 0.75rem;
}

/* 核心指标可视化卡片 */
.metric-card-title {
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 16px;
}

.metrics-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.metric-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.metric-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
}

.metric-label {
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
}

.metric-value-highlight {
  font-weight: 700;
  color: #fff;
}

.tag-rough {
  font-size: 0.65rem;
  background-color: var(--bg-input);
  color: var(--text-dim);
  padding: 1px 4px;
  border-radius: 3px;
  border: 1px solid var(--border-color);
}

.sentiment-stacked-bar {
  display: flex;
  height: 8px;
  border-radius: 999px;
  overflow: hidden;
  background-color: var(--bg-input);
}

.sent-bar.positive {
  background-color: var(--success);
}

.sent-bar.neutral {
  background-color: #6b7280;
}

.sent-bar.negative {
  background-color: var(--danger);
}

/* 竞品份额条形图 */
.competitors-share-card {
  display: flex;
  flex-direction: column;
}

.competitor-share-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}

.comp-bar-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.comp-bar-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
}

.comp-bar-name {
  font-weight: 600;
  color: var(--text-main);
}

.comp-bar-name.brand {
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 4px;
}

.comp-bar-val {
  color: var(--text-muted);
}

.comp-bar-track {
  width: 100%;
  height: 6px;
  background-color: var(--bg-input);
  border-radius: 999px;
  overflow: hidden;
}

.comp-bar-fill {
  height: 100%;
  border-radius: 999px;
}

.comp-bar-fill.brand {
  background: linear-gradient(90deg, #3b82f6, #60a5fa);
}

.comp-bar-fill.comp {
  background: linear-gradient(90deg, #9ca3af, #d1d5db);
}

/* 表格卡片 */
.table-card {
  width: 100%;
  overflow: hidden;
}

.table-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 12px;
}

.table-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
}

.report-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.85rem;
}

.report-table th, .report-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-subtle);
  vertical-align: middle;
}

.report-table th {
  background-color: var(--bg-card);
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.8rem;
  white-space: nowrap;
}

.report-table tr:hover td {
  background-color: rgba(31, 41, 55, 0.4);
}

.badge {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}

.badge-yes {
  background-color: var(--success-bg);
  color: var(--success);
}

.badge-no {
  background-color: var(--danger-bg);
  color: var(--danger);
}

.badge-rank-1 {
  background-color: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border: 1px solid #10b981;
}

.badge-rank-2 {
  background-color: rgba(59, 130, 246, 0.2);
  color: #60a5fa;
}

.badge-rank-3 {
  background-color: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
}

.badge-rank-none {
  color: var(--text-dim);
}

.badge-sent-pos {
  color: var(--success);
}

.badge-sent-neu {
  color: var(--text-dim);
}

.badge-sent-neg {
  color: var(--danger);
}

/* 模态弹窗 */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.modal-box {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  max-width: 600px;
  width: 100%;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.modal-box.modal-lg {
  max-width: 800px;
}

.modal-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
}

.modal-body {
  padding: 20px;
  overflow-y: auto;
  flex: 1;
}

.modal-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.history-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.history-item {
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.history-meta-left {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.history-brand {
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
}

.history-time {
  font-size: 0.75rem;
  color: var(--text-dim);
}

.history-meta-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.history-score {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--primary);
}

.raw-answer-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-subtle);
}

.raw-answer-content {
  background-color: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 14px;
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.85rem;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 50vh;
  overflow-y: auto;
}

/* 页脚 */
.app-footer {
  background-color: var(--bg-surface);
  border-top: 1px solid var(--border-subtle);
  padding: 24px 20px;
  margin-top: auto;
}

.footer-container {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.disclaimer-box {
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px 16px;
}

.disclaimer-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.disclaimer-text {
  font-size: 0.75rem;
  color: var(--text-dim);
  line-height: 1.6;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  color: var(--text-dim);
  flex-wrap: wrap;
  gap: 8px;
}

/* Toast 提示 */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  color: #fff;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
  z-index: 2000;
  animation: toastFadeIn 0.2s ease;
}

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

/* 响应式适配 */
@media (max-width: 992px) {
  .report-grid {
    grid-template-columns: 1fr;
  }

  .mode-tabs {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .form-row {
    flex-direction: column;
  }

  .header-container {
    padding: 0 16px;
  }

  .app-main {
    padding: 16px 12px 32px;
    gap: 16px;
  }

  .card-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .header-tools {
    width: 100%;
    display: flex;
    justify-content: flex-end;
    margin-top: 8px;
  }

  .answer-card-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .outbound-links-group {
    width: 100%;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }
}
