/* ── 舆情热点日报系统 · 样式表 v2 ── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;600&display=swap');

:root {
  --bg:       #080c14;
  --bg2:      #0d1220;
  --bg3:      #111827;
  --surface:  rgba(255,255,255,0.042);
  --surface2: rgba(255,255,255,0.07);
  --border:   rgba(255,255,255,0.08);
  --border2:  rgba(255,255,255,0.14);
  --accent:   #3b82f6;
  --accent2:  #6366f1;
  --accent3:  #8b5cf6;
  --glow:     rgba(59,130,246,0.18);
  --text:     rgba(255,255,255,0.92);
  --text2:    rgba(255,255,255,0.52);
  --text3:    rgba(255,255,255,0.28);
  --text4:    rgba(255,255,255,0.14);
  --positive: #10b981;
  --positive-light: #34d399;
  --negative: #ef4444;
  --negative-light: #f87171;
  --warning:  #f59e0b;
  --warning-light: #fbbf24;
  --info:     #3b82f6;
  --info-light: #60a5fa;
  --radius:   10px;
  --radius2:  14px;
  --sidebar-w: 210px;
  --topbar-h:  52px;
  --shadow:   0 4px 24px rgba(0,0,0,0.4);
  --shadow2:  0 2px 8px rgba(0,0,0,0.3);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  overflow-x: hidden;  /* 防止横向溢出 */
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 13.5px;
  line-height: 1.55;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;  /* 防止横向溢出 */
  max-width: 100vw;
}

/* ─── 滚动条 ─── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.22); }

/* ─── 锁屏 ─── */
.lock-screen {
  position: fixed; inset: 0; z-index: 9999;
  background: radial-gradient(ellipse at 30% 30%, #0d1a3a 0%, var(--bg) 70%);
  display: flex; align-items: center; justify-content: center;
}
.lock-card {
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: 20px;
  padding: 48px 44px;
  width: 380px;
  text-align: center;
  box-shadow: 0 32px 64px rgba(0,0,0,0.5), 0 0 0 1px var(--border);
}
.lock-icon { font-size: 44px; margin-bottom: 16px; }
.lock-card h2 { font-size: 20px; font-weight: 700; margin-bottom: 4px; letter-spacing: -0.02em; }
.lock-sub { color: var(--text3); margin-bottom: 32px; font-size: 12.5px; }
.lock-card input {
  width: 100%; padding: 11px 16px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text); font-size: 14px;
  margin-bottom: 10px; outline: none;
  transition: border-color 0.2s;
  font-family: inherit;
}
.lock-card input:focus { border-color: var(--accent); background: rgba(59,130,246,0.06); }
.lock-err { color: var(--negative-light); font-size: 12px; min-height: 18px; margin-top: 6px; }

/* ─── 顶栏 ─── */
.topbar {
  position: sticky; top: 0; z-index: 200;
  height: var(--topbar-h);
  background: rgba(8,12,20,0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center;
  padding: 0 16px 0 20px; gap: 10px;
}
.topbar-left { display: flex; align-items: center; gap: 12px; min-width: var(--sidebar-w); }
.topbar-center { flex: 1; display: flex; justify-content: center; align-items: center; gap: 8px; }
.topbar-right { display: flex; gap: 8px; align-items: center; }
.logo {
  font-size: 14px; font-weight: 700;
  background: linear-gradient(135deg, var(--text) 0%, rgba(255,255,255,0.5) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  white-space: nowrap; letter-spacing: -0.02em;
}
.logo-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex-shrink: 0; box-shadow: 0 0 8px var(--accent); }
.topbar select, .topbar input[type=date] {
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text); padding: 5px 10px;
  font-size: 12.5px; outline: none; cursor: pointer;
  font-family: inherit;
  transition: border-color 0.2s, background 0.2s;
}
.topbar select:focus, .topbar input[type=date]:focus { border-color: var(--accent); background: rgba(59,130,246,0.06); }

/* ─── 布局 ─── */
.app { min-height: 100vh; }
.layout {
  display: flex;
  min-height: calc(100vh - var(--topbar-h));
}

/* ─── 侧边栏 ─── */
.sidebar {
  width: var(--sidebar-w); flex-shrink: 0;
  background: var(--bg2);
  border-right: 1px solid var(--border);
  padding: 14px 0 20px;
  overflow-y: auto;
  position: sticky; top: var(--topbar-h);
  height: calc(100vh - var(--topbar-h));
}
.nav-group { margin-bottom: 4px; }
.nav-label {
  padding: 10px 16px 4px;
  font-size: 10.5px; color: var(--text4);
  text-transform: uppercase; letter-spacing: 0.8px;
  font-weight: 600;
}
.nav-item {
  padding: 8px 16px;
  cursor: pointer; color: var(--text2);
  transition: all 0.15s;
  display: flex; align-items: center; gap: 9px;
  font-size: 13px; font-weight: 500;
  margin: 1px 8px; border-radius: 8px;
}
.nav-item:hover { background: var(--surface2); color: var(--text); }
.nav-item.active {
  background: rgba(59,130,246,0.14);
  color: #93c5fd;
}
.nav-item.active .nav-icon { opacity: 1; }
.nav-icon { font-size: 15px; width: 20px; text-align: center; }

/* ─── 内容区 ─── */
.content {
  flex: 1; padding: 22px 24px;
  overflow-y: auto; min-width: 0;
  max-width: 100%;
}
.view { display: none; }
.view.active { display: block; animation: fadeUp 0.22s ease; }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ─── 通用按钮 ─── */
.btn-primary {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--accent);
  color: #fff; border: none; border-radius: 8px;
  padding: 8px 16px; font-size: 12.5px; font-weight: 600;
  cursor: pointer; transition: all 0.18s; font-family: inherit;
  white-space: nowrap;
}
.btn-primary:hover { background: #2563eb; transform: translateY(-1px); box-shadow: 0 4px 14px rgba(59,130,246,0.35); }
.btn-primary:active { transform: translateY(0); }
.btn-outline {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--surface);
  color: var(--text2); border: 1px solid var(--border);
  border-radius: 8px; padding: 7px 13px;
  font-size: 12.5px; font-weight: 500; cursor: pointer;
  transition: all 0.15s; font-family: inherit;
}
.btn-outline:hover { background: var(--surface2); color: var(--text); border-color: var(--border2); }
.btn-ghost {
  background: transparent; color: var(--text3);
  border: 1px solid var(--border); border-radius: 6px;
  padding: 5px 10px; font-size: 12px; cursor: pointer;
  transition: all 0.15s; font-family: inherit;
}
.btn-ghost:hover { background: var(--surface2); color: var(--text2); }
.btn-sm { padding: 4px 9px; font-size: 11.5px; }
.btn-tab {
  background: var(--surface); color: var(--text3);
  border: 1px solid var(--border); border-radius: 7px;
  padding: 5px 12px; font-size: 12px; cursor: pointer;
  transition: all 0.15s; font-family: inherit;
}
.btn-tab.active { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ─── 卡片 ─── */
.section-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius2);
  padding: 18px 20px;
  margin-bottom: 16px;
}
.section-title {
  font-size: 13px; font-weight: 700;
  color: rgba(255,255,255,0.82);
  margin-bottom: 14px;
  display: flex; align-items: center; gap: 7px;
}
.page-title { font-size: 17px; margin-bottom: 20px; letter-spacing: -0.02em; }
.two-col {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 16px; margin-bottom: 16px;
}

/* ─── 评分栏 ─── */
.score-bar {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr 1fr;
  gap: 12px; margin-bottom: 18px;
}
.score-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius2);
  padding: 16px 18px;
  position: relative; overflow: hidden;
  transition: border-color 0.2s;
}
.score-card::before {
  content: ''; position: absolute;
  top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent2), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}
.score-card:hover::before { opacity: 1; }
.score-card.score-main { border-color: rgba(99,102,241,0.3); background: rgba(99,102,241,0.06); }
.score-card.score-main::before { opacity: 1; }
.score-label { font-size: 11px; color: var(--text3); margin-bottom: 8px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.5px; }
.score-number {
  font-size: 34px; font-weight: 800;
  background: linear-gradient(135deg, #a5b4fc 0%, #c084fc 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  line-height: 1; letter-spacing: -0.02em;
  font-family: 'JetBrains Mono', monospace;
}
.score-number.sm { font-size: 26px; }
.score-number.positive {
  background: linear-gradient(135deg, #34d399, #10b981);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.score-number.negative {
  background: linear-gradient(135deg, #f87171, #ef4444);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.score-sub { font-size: 11px; color: var(--text3); margin-top: 5px; }
.risk-color-low    { background: linear-gradient(135deg, #34d399, #10b981); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.risk-color-medium { background: linear-gradient(135deg, #fbbf24, #f59e0b); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.risk-color-high   { background: linear-gradient(135deg, #fb923c, #ef4444); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.risk-color-critical{ background: linear-gradient(135deg, #f87171, #e11d48); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }

/* ─── 情感分布条 ─── */
.sentiment-bar {
  height: 22px; border-radius: 11px; overflow: hidden;
  display: flex; margin-bottom: 12px;
  background: rgba(255,255,255,0.04);
}
.sent-seg { height: 100%; transition: width 0.6s cubic-bezier(.4,0,.2,1); cursor: default; }
.sentiment-legend { display: flex; gap: 14px; flex-wrap: wrap; }
.sent-legend-item { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--text2); }
.sent-dot { width: 8px; height: 8px; border-radius: 50%; }

/* ─── 洞察列表 ─── */
.insight-list { list-style: none; }
.insight-list li {
  padding: 9px 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  color: var(--text2); font-size: 13px; line-height: 1.55;
  display: flex; gap: 8px; align-items: flex-start;
}
.insight-list li::before { content: '›'; color: var(--accent2); font-size: 14px; flex-shrink: 0; margin-top: 1px; }
.insight-list li:last-child { border-bottom: none; }

/* ─── 数据来源 ─── */
.source-item {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px; background: rgba(255,255,255,0.025);
  border-radius: 8px; margin-bottom: 5px; font-size: 12.5px;
  transition: background 0.15s;
}
.source-item:hover { background: rgba(255,255,255,0.05); }
.source-badge {
  padding: 2px 8px; border-radius: 20px;
  font-size: 10.5px; font-weight: 700; white-space: nowrap;
}
.badge-feeds   { background: rgba(99,102,241,0.2); color: #a5b4fc; }
.badge-video   { background: rgba(239,68,68,0.2); color: #fca5a5; }
.badge-iwiki   { background: rgba(16,185,129,0.2); color: #6ee7b7; }
.badge-reply   { background: rgba(245,158,11,0.2); color: #fde68a; }
.badge-other   { background: rgba(156,163,175,0.15); color: #d1d5db; }
.badge-manual  { background: rgba(139,92,246,0.2); color: #d8b4fe; }

/* ─── 话题卡片 ─── */
.topic-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius2);
  padding: 14px 18px; margin-bottom: 10px;
  transition: border-color 0.2s, background 0.2s;
}
.topic-card:hover { border-color: var(--border2); background: var(--surface2); }
.topic-header { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.topic-rank {
  width: 28px; height: 28px; border-radius: 7px;
  background: linear-gradient(135deg, var(--accent2), var(--accent3));
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 800; flex-shrink: 0;
  font-family: 'JetBrains Mono', monospace;
}
.topic-rank.rank-1 { background: linear-gradient(135deg, #f59e0b, #ef4444); }
.topic-rank.rank-2 { background: linear-gradient(135deg, #6366f1, #8b5cf6); }
.topic-rank.rank-3 { background: linear-gradient(135deg, #10b981, #3b82f6); }
.topic-title { font-weight: 600; font-size: 14px; flex: 1; }
.topic-count {
  font-size: 11.5px; color: var(--text3);
  background: var(--surface2); padding: 3px 9px; border-radius: 20px;
}
.topic-heat { font-size: 12px; color: var(--warning-light); }
.topic-sentiment-bar { height: 3px; border-radius: 2px; margin-top: 8px; opacity: 0.7; }

/* ─── 平台数据 ─── */
.platform-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 12px; margin-bottom: 20px;
}
.platform-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius2); padding: 16px; text-align: center;
  transition: all 0.2s;
}
.platform-card:hover { border-color: var(--border2); transform: translateY(-2px); }
.platform-name { font-size: 12px; color: var(--text2); margin-bottom: 8px; font-weight: 500; }
.platform-count { font-size: 26px; font-weight: 800; color: #93c5fd; font-family: 'JetBrains Mono', monospace; }
.platform-engage { font-size: 11px; color: var(--text3); margin-top: 4px; }
.platform-sent { font-size: 11px; color: var(--text3); margin-top: 3px; }

/* ─── 数据表格 ─── */
.filters-bar {
  display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px;
}
.filters-bar select, .filters-bar input {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 8px; color: var(--text); padding: 7px 11px;
  font-size: 12.5px; outline: none; font-family: inherit;
  transition: border-color 0.2s;
}
.filters-bar select:focus, .filters-bar input:focus { border-color: var(--accent); }
.filters-bar input { flex: 1; min-width: 160px; }
.data-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.data-table th {
  padding: 9px 12px; text-align: left; color: var(--text3);
  border-bottom: 1px solid var(--border); font-weight: 600;
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px;
  white-space: nowrap; background: rgba(255,255,255,0.018);
}
.data-table td {
  padding: 10px 12px; border-bottom: 1px solid rgba(255,255,255,0.04);
  color: var(--text2); vertical-align: top;
}
.data-table tr:hover td { background: rgba(255,255,255,0.025); }
.content-cell { max-width: 300px; }
.content-orig { color: var(--text); line-height: 1.45; }
.content-trans { font-size: 11.5px; color: var(--text3); margin-top: 3px; }
.sent-badge {
  display: inline-flex; align-items: center;
  padding: 2px 8px; border-radius: 20px;
  font-size: 10.5px; font-weight: 700; white-space: nowrap;
}
.sent-very_positive { background: rgba(16,185,129,0.18); color: #6ee7b7; }
.sent-positive      { background: rgba(59,130,246,0.18); color: #93c5fd; }
.sent-neutral       { background: rgba(156,163,175,0.15); color: #9ca3af; }
.sent-negative      { background: rgba(245,158,11,0.18); color: #fde68a; }
.sent-very_negative { background: rgba(239,68,68,0.18); color: #fca5a5; }
.platform-tag {
  display: inline-flex; align-items: center;
  padding: 2px 7px; border-radius: 5px;
  font-size: 10.5px; background: rgba(99,102,241,0.14); color: #a5b4fc;
  font-weight: 600;
}

/* ─── 历史日报 ─── */
.history-row {
  display: grid;
  grid-template-columns: 110px 80px 100px 1fr 1fr 80px;
  align-items: center; gap: 12px;
  padding: 12px 16px; border-radius: var(--radius);
  margin-bottom: 6px; background: var(--surface);
  border: 1px solid var(--border); cursor: pointer;
  transition: all 0.15s;
}
.history-row:hover { border-color: rgba(59,130,246,0.35); background: rgba(59,130,246,0.06); }
.history-date { font-weight: 700; font-size: 13px; font-family: 'JetBrains Mono', monospace; }
.history-score {
  font-size: 20px; font-weight: 800;
  background: linear-gradient(135deg, #a5b4fc, #c084fc);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  font-family: 'JetBrains Mono', monospace;
}
.risk-badge {
  display: inline-flex; align-items: center;
  padding: 3px 9px; border-radius: 20px; font-size: 11px; font-weight: 600;
}
.risk-low      { background: rgba(16,185,129,0.15); color: #6ee7b7; }
.risk-medium   { background: rgba(245,158,11,0.15); color: #fde68a; }
.risk-high     { background: rgba(251,146,60,0.15); color: #fdba74; }
.risk-critical { background: rgba(239,68,68,0.15); color: #fca5a5; }

/* ─── 趋势图 ─── */
.trend-controls { display: flex; gap: 8px; margin-bottom: 18px; }
#trend-canvas, #trend-sent-canvas {
  width: 100%; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius2);
  display: block; margin-bottom: 16px;
}

/* ─── 管理端 ─── */
.manage-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.form-group { margin-bottom: 13px; }
.form-group label {
  display: block; font-size: 11.5px; color: var(--text2);
  margin-bottom: 5px; font-weight: 600;
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%; background: rgba(255,255,255,0.04);
  border: 1px solid var(--border); border-radius: 8px;
  color: var(--text); padding: 8px 11px;
  font-size: 13px; outline: none; font-family: inherit;
  transition: border-color 0.2s, background 0.2s;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--accent); background: rgba(59,130,246,0.05);
}
.form-group textarea { resize: vertical; min-height: 72px; line-height: 1.55; }
.tip { font-size: 11.5px; color: var(--text3); margin-bottom: 12px; line-height: 1.55; }
.tip-inline { font-size: 11px; color: var(--text3); font-weight: 400; }

/* ─── 上传区 ─── */
.upload-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius2); padding: 28px;
  text-align: center; cursor: pointer; transition: all 0.2s;
  margin-bottom: 14px; background: rgba(255,255,255,0.015);
}
.upload-zone:hover, .upload-zone.drag {
  border-color: var(--accent); background: rgba(59,130,246,0.05);
}
.upload-icon { font-size: 32px; display: block; margin-bottom: 8px; }
.upload-zone p { color: var(--text2); font-size: 13px; line-height: 1.6; }
.upload-zone u { color: var(--info-light); }

/* ─── 预览弹窗 ─── */
.modal { position: fixed; inset: 0; z-index: 500; display: flex; align-items: center; justify-content: center; }
.modal-overlay { position: absolute; inset: 0; background: rgba(0,0,0,0.65); backdrop-filter: blur(4px); }
.modal-box {
  position: relative; z-index: 1;
  background: var(--bg2); border: 1px solid var(--border2);
  border-radius: var(--radius2); padding: 26px 28px;
  width: 780px; max-width: 95vw; max-height: 82vh;
  overflow-y: auto; box-shadow: var(--shadow);
}
.modal-title { font-size: 15px; font-weight: 700; margin-bottom: 18px; letter-spacing: -0.02em; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px; }

/* ─── Toast ─── */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: var(--bg3); border: 1px solid var(--border2);
  border-radius: 10px; padding: 9px 20px;
  font-size: 13px; z-index: 9999;
  box-shadow: var(--shadow); white-space: nowrap;
  transition: opacity 0.3s;
}
.toast.hidden { display: none !important; }

/* ─── 批次管理 ─── */
.batch-item {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 11px; background: rgba(255,255,255,0.025);
  border-radius: 8px; margin-bottom: 5px; font-size: 12.5px;
  border: 1px solid transparent;
  transition: border-color 0.15s, background 0.15s;
}
.batch-item:hover { background: rgba(255,255,255,0.04); border-color: var(--border); }
.batch-del {
  margin-left: auto; cursor: pointer; color: var(--text3);
  font-size: 14px; padding: 2px 5px; border-radius: 4px;
  transition: all 0.15s;
}
.batch-del:hover { background: rgba(239,68,68,0.15); color: var(--negative-light); }

/* ─── 数据批次卡片（总览） ─── */
.batch-overview { display: flex; flex-direction: column; gap: 5px; }

/* ─── 空状态 ─── */
.empty-state { text-align: center; padding: 60px 20px; }
.empty-icon { font-size: 52px; margin-bottom: 16px; filter: grayscale(30%); }
.empty-state p { color: var(--text2); margin-bottom: 20px; font-size: 14px; }

/* ─── 分页 ─── */
.pagination { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 14px; justify-content: center; }
.pagination button {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 6px; color: var(--text2); padding: 5px 10px;
  font-size: 12px; cursor: pointer; transition: all 0.15s; font-family: inherit;
}
.pagination button.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.pagination button:hover:not(.active) { background: var(--surface2); }

/* ─── 结论编辑器 ─── */
.adj-collapse-wrap {
  margin-top: 12px; border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
}
.adj-collapse-hd {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px; background: rgba(255,255,255,0.03);
  cursor: pointer; font-size: 13px; font-weight: 600; color: var(--text2);
  user-select: none; transition: background 0.15s;
}
.adj-collapse-hd:hover { background: rgba(255,255,255,0.06); color: var(--text); }
.adj-arrow { font-size: 11px; color: var(--text3); }
.adj-collapse-bd { padding: 14px 14px 10px; border-top: 1px solid var(--border); }
.edit-list { display: flex; flex-direction: column; gap: 6px; }
.edit-list-row { display: flex; align-items: center; gap: 6px; }
.edit-list-row input {
  flex: 1; background: rgba(255,255,255,0.04);
  border: 1px solid var(--border); border-radius: 7px;
  color: var(--text); padding: 7px 10px; font-size: 12.5px; outline: none;
  transition: border-color 0.2s;
}
.edit-list-row input:focus { border-color: var(--accent); }
.btn-del {
  flex-shrink: 0; width: 26px; height: 26px; padding: 0;
  display: flex; align-items: center; justify-content: center;
  color: var(--negative-light); border-color: rgba(239,68,68,0.25) !important;
  opacity: 0.7; border-radius: 6px;
}
.btn-del:hover { opacity: 1; background: rgba(239,68,68,0.12) !important; }

/* ─── 项目管理 ─── */
.project-manage-item {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px; border-radius: 8px;
  border: 1px solid var(--border); background: var(--surface);
  margin-bottom: 6px;
}

/* ─── 分割线 ─── */
.divider { border: none; border-top: 1px solid var(--border); margin: 16px 0; }

/* ─── 统计标签 ─── */
.stat-pill {
  display: inline-flex; align-items: center; gap: 5px;
  background: rgba(255,255,255,0.05); border: 1px solid var(--border);
  border-radius: 20px; padding: 3px 10px;
  font-size: 11.5px; color: var(--text2);
}
.stat-pill b { color: var(--text); font-weight: 700; }

/* ─── iWiki导入结果 ─── */
.wiki-parsed-result {
  background: rgba(16,185,129,0.06); border: 1px solid rgba(16,185,129,0.2);
  border-radius: 8px; padding: 12px 14px; font-size: 12.5px;
}
.wiki-parsed-result .wpr-row {
  display: flex; align-items: center; gap: 6px;
  padding: 3px 0; color: var(--text2);
}
.wiki-parsed-result .wpr-label { color: var(--text3); min-width: 80px; }

/* ─── 响应式 ─── */
@media (max-width: 960px) {
  .score-bar { grid-template-columns: 1fr 1fr 1fr; }
  .two-col { grid-template-columns: 1fr; }
  .manage-layout { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
  .sidebar { width: 180px; }
  --sidebar-w: 180px;
  .score-bar { grid-template-columns: 1fr 1fr; }
  .content { padding: 14px; }
}
@media (max-width: 560px) {
  .sidebar { display: none; }
  .score-bar { grid-template-columns: 1fr 1fr; }
  .history-row { grid-template-columns: 90px 70px 1fr; }
  .history-row > *:nth-child(n+4) { display: none; }
}

/* ─── 内嵌话题列表 ─── */
.inline-topics-list {
  display: flex; flex-direction: column; gap: 4px;
}
.inline-topics-group-label {
  display: flex; align-items: center;
  padding: 8px 4px 4px;
  margin-top: 4px;
}
.inline-topics-group-label:first-child { margin-top: 0; }
.inline-topic-item {
  border-radius: 8px;
  background: rgba(255,255,255,0.025);
  border: 1px solid transparent;
  overflow: hidden;
  transition: border-color 0.15s;
}
.inline-topic-item.has-detail { cursor: pointer; }
.inline-topic-item:hover { border-color: var(--border); }
.inline-topic-item.expanded { border-color: var(--primary); background: rgba(99,102,241,0.06); }
.inline-topic-row {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px;
}
.topic-toggle-arrow {
  font-size: 11px; color: var(--text3);
  transition: transform 0.2s; flex-shrink: 0;
}
.inline-topic-item.expanded .topic-toggle-arrow { transform: rotate(90deg); }
.inline-topic-detail {
  display: none;
  padding: 0 10px 10px 44px;
  border-top: 1px solid var(--border);
  margin-top: 0;
}
.inline-topic-item.expanded .inline-topic-detail { display: block; }
.topic-detail-insight {
  font-size: 12px; color: var(--text2);
  line-height: 1.6; padding-top: 8px;
}
.topic-detail-desc {
  font-size: 12px; color: var(--text3);
  line-height: 1.7; padding-top: 6px;
}

/* ─── 平台详情面板 ─── */
.platform-card { transition: all 0.15s; cursor: pointer; }
.platform-card.active {
  border-color: var(--primary) !important;
  background: rgba(99,102,241,0.12) !important;
}
.platform-detail-panel {
  margin-top: 12px;
  border-radius: 10px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  padding: 14px 16px;
  min-height: 80px;
}
.platform-detail-header {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.platform-detail-icon { font-size: 18px; }
.platform-detail-name {
  font-size: 14px; font-weight: 700; color: var(--text1);
}
.platform-detail-meta {
  display: flex; gap: 12px; margin-left: auto;
  font-size: 12px; color: var(--text3);
}
.platform-detail-body { display: flex; gap: 24px; flex-wrap: wrap; }
.platform-detail-section { flex: 1; min-width: 160px; }
.platform-detail-section-title {
  font-size: 11.5px; font-weight: 600; color: var(--text2);
  margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.5px;
}
/* ── 新版平台详情竖向布局 ── */
.pd-body { display: flex; flex-direction: column; gap: 16px; }
.pd-section {}
.pd-section-title {
  font-size: 11.5px; font-weight: 700; color: var(--text2);
  margin-bottom: 8px; letter-spacing: 0.5px;
}
/* 话题分组 */
.pd-topic-group { margin-bottom: 6px; }
.pd-topic-group-label {
  display: flex; align-items: center; padding: 2px 0 4px;
}
.pd-topic-item {
  display: flex; align-items: center; gap: 7px;
  padding: 5px 8px; border-radius: 6px;
  background: rgba(255,255,255,0.025);
  margin-bottom: 3px;
}
.pd-topic-dot {
  width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0;
}
.pd-topic-text {
  flex: 1; font-size: 12.5px; color: var(--text); line-height: 1.5;
}
.pd-topic-count {
  font-size: 11px; color: var(--text3);
  background: rgba(255,255,255,0.06); border-radius: 10px;
  padding: 1px 8px; white-space: nowrap; flex-shrink: 0;
}
/* 账号 */
.pd-accounts { display: flex; flex-direction: column; gap: 8px; }
.pd-account-item {
  background: rgba(255,255,255,0.025);
  border-radius: 6px; padding: 8px 10px;
}
.pd-account-row {
  display: flex; align-items: center; gap: 6px; margin-bottom: 2px;
}
.pd-account-name { font-size: 13px; font-weight: 600; color: var(--text1); }
.pd-account-followers {
  font-size: 11px; color: var(--text3);
  background: rgba(255,255,255,0.06); border-radius: 4px; padding: 1px 5px;
}
.pd-account-role { font-size: 12px; color: var(--text2); line-height: 1.5; }
.platform-detail-topics {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: 4px;
}
.platform-detail-topics li {
  font-size: 12.5px; color: var(--text2); line-height: 1.5;
  padding-left: 10px; position: relative;
}
.platform-detail-topics li::before {
  content: '·'; position: absolute; left: 0; color: var(--primary);
}
.platform-detail-accounts { display: flex; flex-direction: column; gap: 6px; }
.platform-account-item {
  display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap;
}
.platform-account-name {
  font-size: 12.5px; font-weight: 600; color: var(--text1);
}
.platform-account-followers {
  font-size: 11px; color: var(--text3);
  background: rgba(255,255,255,0.05); border-radius: 4px; padding: 1px 5px;
}
.platform-account-role {
  font-size: 12px; color: var(--text2); flex-basis: 100%;
}

/* ─── topic-card 展开 ─── */
.topic-card.has-detail { cursor: pointer; }
.topic-card.has-detail:hover .topic-toggle-arrow { color: var(--primary); }
.topic-card.expanded { border-color: var(--primary) !important; }
.topic-card .inline-topic-detail { display: none; padding: 0 12px 12px 44px; }
.topic-card.expanded .inline-topic-detail { display: block; }
.topic-card.expanded .topic-toggle-arrow { transform: rotate(90deg); }

/* ─── 工具类 ─── */
.hidden { display: none !important; }
.mt4 { margin-top: 4px; }
.mt8 { margin-top: 8px; }
.mt12 { margin-top: 12px; }
.fw600 { font-weight: 600; }
.text2 { color: var(--text2); }
.text3 { color: var(--text3); }
.flex { display: flex; }
.flex-center { display: flex; align-items: center; }
.gap6 { gap: 6px; }
.gap8 { gap: 8px; }

/* ─── 关键洞察分类 ─── */
#insights-list { list-style: none; padding: 0; margin: 0; }
.insight-group { margin-bottom: 2px; }
.insight-group-label { font-size: 11px; font-weight: 700; letter-spacing: 0.6px; padding: 4px 0 4px 2px; display: flex; align-items: center; }
.insight-item { list-style: none; border-radius: 6px; padding: 8px 12px; background: rgba(255,255,255,0.03); border-left: 3px solid transparent; margin-bottom: 4px; }
.insight-item.insight-positive { border-left-color: rgba(16,185,129,0.35); background: rgba(16,185,129,0.04); }
.insight-item.insight-negative { border-left-color: rgba(239,68,68,0.35); background: rgba(239,68,68,0.04); }
.insight-item.insight-neutral  { border-left-color: rgba(107,114,128,0.3); background: rgba(107,114,128,0.03); }
.insight-main { display: flex; align-items: flex-start; gap: 10px; justify-content: space-between; }
.insight-text { flex: 1; font-size: 13px; line-height: 1.6; color: var(--text); }
.insight-count { flex-shrink: 0; font-size: 11px; color: var(--text3); background: rgba(255,255,255,0.06); border-radius: 10px; padding: 2px 8px; white-space: nowrap; margin-top: 2px; }
/* ─── 语言原文展示 ─── */
.pd-orig-list { display: flex; flex-direction: column; gap: 8px; }
.pd-orig-item {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 8px; padding: 10px 12px;
}
.pd-orig-meta {
  display: flex; align-items: center; gap: 6px; margin-bottom: 6px;
}
.pd-orig-text {
  font-size: 13px; color: var(--text); line-height: 1.65;
  word-break: break-word; white-space: pre-wrap;
  font-family: inherit;
}


/* ════════════════════════════════════════
   移动端适配  (≤ 768px)
   ════════════════════════════════════════ */

.bottom-nav { display: none; }

@media (max-width: 768px) {
  :root {
    --topbar-h: 48px;
    --bottom-nav-h: 56px;
  }

  /* ── 防溢出基础 ── */
  *, *::before, *::after { max-width: 100%; }
  html, body { overflow-x: hidden; width: 100%; }

  /* ── 侧边栏隐藏 ── */
  .sidebar { display: none !important; }

  /* ── 顶栏 ── */
  .topbar { padding: 0 12px; gap: 6px; }
  .topbar-left { min-width: unset; gap: 8px; }
  .logo { font-size: 13px; }
  .logo-dot { width: 6px; height: 6px; }
  .topbar select, .topbar input[type=date] {
    font-size: 12px; padding: 4px 8px; max-width: 120px;
  }
  .topbar-right .btn-outline { display: none; }

  /* ── 布局 ── */
  .app { overflow-x: hidden; }
  .layout {
    flex-direction: column;
    min-height: calc(100vh - var(--topbar-h));
    overflow-x: hidden;
  }

  /* ── 内容区 ── */
  .content {
    padding: 12px 12px;
    padding-bottom: calc(var(--bottom-nav-h) + 16px + env(safe-area-inset-bottom, 0px));
    overflow-x: hidden;
    width: 100%;
    box-sizing: border-box;
  }

  /* ── 评分卡 ── */
  .score-bar { grid-template-columns: 1fr 1fr; gap: 8px; }
  .score-card { padding: 12px 14px; }
  .score-number { font-size: 28px; }
  .score-number.sm { font-size: 22px; }
  .score-card:last-child { grid-column: 1 / -1; }

  /* ── 卡片 ── */
  .section-card { padding: 14px 14px; }
  .two-col { grid-template-columns: 1fr; }
  .manage-layout { grid-template-columns: 1fr; gap: 0; }

  /* ── 历史行 ── */
  .history-row {
    grid-template-columns: 90px 60px 80px 1fr;
    gap: 8px; padding: 10px 12px;
  }
  .history-row > *:nth-child(n+5) { display: none; }

  /* ── 平台格 ── */
  .platform-grid {
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 8px;
  }
  .platform-count { font-size: 22px; }

  /* ── 数据表格 ── */
  .data-table th:nth-child(1), .data-table td:nth-child(1) { display: none; }
  .data-table th:nth-child(6), .data-table td:nth-child(6) { display: none; }
  .content-cell { max-width: 180px; }
  .filters-bar { gap: 6px; }
  .filters-bar select { max-width: 110px; }

  /* ── 弹窗 ── */
  .modal-box {
    padding: 18px 16px;
    max-height: 90vh;
    width: 95vw;
    max-width: 95vw;
  }

  /* ── 底部固定导航栏 ── */
  .bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    width: 100%;
    height: var(--bottom-nav-h);
    background: rgba(8,12,20,0.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--border);
    z-index: 300;
    align-items: stretch;
    /* 支持 iPhone 底部安全区 */
    padding-bottom: env(safe-area-inset-bottom, 0px);
    /* 确保真正固定 */
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
  }

  .bottom-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    cursor: pointer;
    color: var(--text3);
    font-size: 10px;
    font-weight: 500;
    transition: color 0.15s, background 0.15s;
    padding: 6px 2px;
    position: relative;
    /* 增大点击区域 */
    -webkit-tap-highlight-color: transparent;
    user-select: none;
  }
  .bottom-nav-item:active { background: rgba(255,255,255,0.06); }
  .bottom-nav-item.active { color: #93c5fd; }
  .bottom-nav-item.active::before {
    content: "";
    position: absolute;
    top: 0; left: 20%; right: 20%;
    height: 2px;
    background: var(--accent);
    border-radius: 0 0 2px 2px;
  }
  .bottom-nav-icon { font-size: 20px; line-height: 1; }
  .bottom-nav-label { font-size: 10px; white-space: nowrap; }

  /* ── Toast 位置上移 ── */
  .toast {
    bottom: calc(var(--bottom-nav-h) + 12px + env(safe-area-inset-bottom, 0px));
  }

  /* ── 防止各种宽度溢出 ── */
  .lock-card { width: 90vw; padding: 32px 24px; }
  img, video, iframe, table { max-width: 100%; }
  pre { overflow-x: auto; max-width: 100%; }
}

/* iPhone 安全区高度修正 */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  @media (max-width: 768px) {
    .bottom-nav {
      height: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom));
    }
    .content {
      padding-bottom: calc(var(--bottom-nav-h) + 20px + env(safe-area-inset-bottom));
    }
    .toast {
      bottom: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom) + 12px);
    }
  }
}

/* ── 平台 chip 条（移动端横向滚动） ── */
.platform-chips {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding-bottom: 4px;
  /* 隐藏滚动条但保留滚动功能 */
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.platform-chips::-webkit-scrollbar { display: none; }

.platform-chip {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px 10px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 20px;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all 0.15s;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}
.platform-chip:active { opacity: 0.7; }
.platform-chip.active {
  background: rgba(59,130,246,0.15);
  border-color: rgba(59,130,246,0.5);
}

.pc-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}
.pc-icon { font-size: 13px; line-height: 1; }
.pc-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--text2);
  text-transform: capitalize;
}
.platform-chip.active .pc-name { color: #93c5fd; }
.pc-count {
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  background: rgba(255,255,255,0.07);
  padding: 1px 6px;
  border-radius: 10px;
}

/* ── 综合评分旁风险灯 (v20260609a) ── */
.score-main-row {
  display: flex;
  align-items: center;
  gap: 8px;
  line-height: 1;
}
.risk-dot {
  font-size: 14px;
  line-height: 1;
  flex-shrink: 0;
  transition: color 0.3s;
  -webkit-text-fill-color: initial;
  filter: drop-shadow(0 0 4px currentColor);
}
