:root {
  color-scheme: light;
  --bg: #f4f7fb;
  --bg-2: #ffffff;
  --bg-3: #f8fafc;
  --bg-4: #eef3f9;
  --line: #e2e8f0;
  --line-2: #cbd5e1;
  --text: #0f172a;
  --text-2: #334155;
  --muted: #64748b;
  --muted-2: #94a3b8;
  --accent: #2563eb;
  --accent-glow: rgba(37, 99, 235, 0.12);
  --accent-2: #0ea5e9;
  --good: #16a34a;
  --warn: #d97706;
  --bad: #dc2626;
  --neutral: #64748b;
  --good-bg: #dcfce7;
  --warn-bg: #fef3c7;
  --bad-bg: #fee2e2;
  --neutral-bg: #f1f5f9;
  --shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  --shadow-soft: 0 4px 12px rgba(15, 23, 42, 0.05);
  --radius: 12px;
  --radius-sm: 8px;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

button, input {
  font: inherit;
}

button {
  cursor: pointer;
}

::selection {
  background: var(--accent-glow);
  color: var(--accent);
}

/* ===== 背景层（简化） ===== */
.bg-grid, .bg-glow {
  display: none;
}

/* ===== 通用文字 ===== */
.eyebrow {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1, h2, h3, h4 {
  margin: 0;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

h1 { font-size: 22px; font-weight: 800; }
h2 { font-size: 18px; }
h3 { font-size: 17px; }
h4 { font-size: 13px; font-weight: 700; color: var(--text-2); }

.subtitle {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
}

/* ===== 主壳 ===== */
.app-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  position: relative;
  background: var(--bg-2);
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
  box-shadow: 0 0 40px rgba(15, 23, 42, 0.04);
}

/* 两侧广告位预留 */
.ad-slot {
  position: fixed;
  top: 90px;
  width: calc((100vw - 1100px) / 2 - 24px);
  max-width: 180px;
  display: none;
  z-index: 5;
  pointer-events: none;
}
.ad-slot.left { left: 12px; }
.ad-slot.right { right: 12px; }
@media (min-width: 1400px) {
  .ad-slot { display: block; }
}

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 24px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-2);
  position: sticky;
  top: 0;
  z-index: 20;
}

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

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

.brand-mark svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.header-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg-3);
  color: var(--text-2);
  font-size: 13px;
  font-weight: 500;
}

.header-status.error {
  color: var(--bad);
  border-color: var(--bad-bg);
  background: var(--bad-bg);
}

.header-status.busy {
  color: var(--accent);
  border-color: var(--accent-glow);
  background: var(--accent-glow);
}

.status-dot {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: var(--good);
}

.header-status.error .status-dot { background: var(--bad); }
.header-status.busy .status-dot { background: var(--accent); animation: blink 1s ease-in-out infinite; }

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* ===== 工作区栅格 ===== */
.workspace {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  flex: 1;
  min-height: 0;
}

.input-panel {
  position: sticky;
  top: 73px;
  align-self: start;
  max-height: calc(100vh - 73px);
  overflow-y: auto;
  padding: 20px;
  background: var(--bg-3);
  border-right: 1px solid var(--line);
}

.result-panel {
  min-width: 0;
  padding: 20px 24px;
}

.section-header,
.result-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

/* ===== 输入面板 ===== */
.ip-form {
  margin-top: 12px;
}

.ip-list {
  display: grid;
  gap: 8px;
}

.ip-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 32px;
  gap: 8px;
  align-items: center;
}

.ip-input {
  width: 100%;
  height: 40px;
  padding: 0 12px;
  color: var(--text);
  background: var(--bg-2);
  border: 1px solid var(--line-2);
  border-radius: var(--radius-sm);
  outline: none;
  font-size: 14px;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.ip-input::placeholder {
  color: var(--muted-2);
}

.ip-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.icon-button,
.primary-button,
.ghost-button {
  height: 38px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-2);
  background: var(--bg-2);
  color: var(--text-2);
  transition: all 0.15s ease;
}

.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  flex: 0 0 auto;
}

.icon-button svg,
.primary-button svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-button:hover,
.ghost-button:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.icon-button.subtle {
  color: var(--muted);
  width: 32px;
  height: 40px;
}

.form-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.primary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 16px;
  font-weight: 600;
  font-size: 14px;
}

.primary-button {
  flex: 1;
  border-color: transparent;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

.primary-button:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.3);
}

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

.primary-button:disabled,
.ghost-button:disabled,
.icon-button:disabled,
.ip-input:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.input-hints {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 14px;
}

.hint-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg-2);
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
}

.hint-chip i {
  width: 4px;
  height: 4px;
  border-radius: 999px;
  background: var(--accent);
}

/* ===== 图例 ===== */
.legend {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.legend-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 5px;
  border: 1px solid transparent;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.tag.good { color: var(--good); background: var(--good-bg); border-color: var(--good-bg); }
.tag.warn { color: var(--warn); background: var(--warn-bg); border-color: var(--warn-bg); }
.tag.bad { color: var(--bad); background: var(--bad-bg); border-color: var(--bad-bg); }
.tag.neutral { color: var(--neutral); background: var(--neutral-bg); }

/* ===== WebRTC 泄露检测卡 ===== */
.webrtc-card {
  margin-top: 18px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg-2);
}

.webrtc-status {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  font-size: 13px;
  color: var(--text-2);
}

.webrtc-dot {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: var(--muted);
}

.webrtc-card.ok .webrtc-dot { background: var(--good); }
.webrtc-card.warn .webrtc-dot { background: var(--warn); }
.webrtc-card.bad .webrtc-dot { background: var(--bad); }

.webrtc-card.ok .webrtc-text { color: var(--good); }
.webrtc-card.warn .webrtc-text { color: var(--warn); }
.webrtc-card.bad .webrtc-text { color: var(--bad); }

.webrtc-detail {
  margin-top: 8px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.7;
  word-break: break-all;
}

.webrtc-detail strong {
  color: var(--text-2);
  font-weight: 500;
}

.webrtc-btn {
  margin-top: 8px;
  width: 100%;
  height: 30px;
  font-size: 12px;
}

/* ===== 扩展指标 ===== */
.detail-ext {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.ext-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg-3);
}

.ext-row .ext-label {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.ext-row .ext-value {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.ext-row .ext-value.good { color: var(--good); }
.ext-row .ext-value.warn { color: var(--warn); }
.ext-row .ext-value.bad { color: var(--bad); }
.ext-row .ext-value.neutral { color: var(--neutral); }

.scenario-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.scenario-list .tag { font-size: 11px; padding: 2px 6px; }

.cf-coeff-bar {
  position: relative;
  height: 5px;
  margin-top: 4px;
  border-radius: 999px;
  background: var(--bg-4);
  overflow: hidden;
}

.cf-coeff-bar > i {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--good), var(--warn) 50%, var(--bad));
}

/* ===== 摘要条 ===== */
.summary-strip {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.summary-chip {
  min-width: 70px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg-2);
  text-align: right;
}

.summary-chip strong {
  display: block;
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
  color: var(--text);
}

.summary-chip span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.summary-chip.strong strong { color: var(--good); }
.summary-chip.risk strong { color: var(--bad); }

/* ===== 结果布局 ===== */
.results-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  margin-top: 16px;
  align-items: start;
}

.results-main {
  min-width: 0;
}

.rank-cards {
  display: grid;
  gap: 8px;
}

.result-empty,
.rank-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-2);
  position: relative;
  overflow: hidden;
}

.result-empty {
  display: grid;
  min-height: 100px;
  place-items: center;
  padding: 20px;
  color: var(--muted);
  text-align: center;
  border-style: dashed;
}

.result-empty strong {
  display: block;
  color: var(--text-2);
  font-size: 14px;
  font-weight: 700;
}

.result-empty span {
  display: block;
  margin-top: 4px;
  font-size: 12px;
}

.rank-card {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) minmax(180px, 240px);
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.rank-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--accent);
  opacity: 0;
  transition: opacity 0.15s;
}

.rank-card:hover,
.rank-card.selected {
  border-color: var(--accent);
  box-shadow: var(--shadow-soft);
}

.rank-card.selected::before {
  opacity: 1;
}

.rank-score {
  display: grid;
  place-items: center;
  gap: 2px;
  text-align: center;
}

.rank-score span {
  font-size: 11px;
  color: var(--muted);
  font-weight: 600;
}

.rank-main {
  min-width: 0;
}

.rank-title {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 4px;
}

.rank-title strong {
  font-size: 14px;
  color: var(--text);
  font-family: ui-monospace, "SF Mono", Menlo, Monaco, Consolas, monospace;
}

.rank-title span {
  font-size: 11px;
  color: var(--muted);
}

.profile-line {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.profile-primary,
.profile-status {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: 4px;
  border: 1px solid transparent;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.profile-primary.good, .profile-status.good { color: var(--good); background: var(--good-bg); }
.profile-primary.warn, .profile-status.warn { color: var(--warn); background: var(--warn-bg); }
.profile-primary.bad, .profile-status.bad { color: var(--bad); background: var(--bad-bg); }
.profile-primary.neutral, .profile-status.neutral { color: var(--neutral); background: var(--neutral-bg); }

.rank-meta {
  display: flex;
  flex-direction: column;
  gap: 3px;
  text-align: right;
}

.rank-meta span {
  font-size: 11px;
  color: var(--muted);
}

.rank-card p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ===== 评分环 ===== */
.score-ring {
  position: relative;
  display: grid;
  place-items: center;
}

.score-ring svg {
  transform: rotate(-90deg);
}

.score-ring .track {
  fill: none;
  stroke: var(--line);
  stroke-width: 3;
}

.score-ring .fill {
  fill: none;
  stroke-width: 3;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.8s cubic-bezier(0.2, 0.7, 0.3, 1);
}

.score-ring span {
  position: absolute;
  font-weight: 700;
  font-size: 14px;
  color: var(--text);
}

/* ===== 表格 ===== */
.table-wrap {
  margin-top: 14px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-2);
  max-height: 440px;
}

.score-table {
  width: 100%;
  min-width: 880px;
  border-collapse: collapse;
  table-layout: fixed;
}

.score-table th,
.score-table td {
  height: 40px;
  padding: 6px 10px;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: left;
  font-size: 13px;
}

.score-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--bg-3);
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.score-table tbody tr {
  background: transparent;
  cursor: pointer;
  transition: background 0.1s;
}

.score-table tbody tr:hover,
.score-table tbody tr.selected {
  background: var(--accent-glow);
}

.score-table tbody tr.selected {
  box-shadow: inset 3px 0 0 var(--accent);
}

.score-table tbody tr:last-child td {
  border-bottom: 0;
}

.score-table .rank-col {
  width: 44px;
  color: var(--muted);
  font-weight: 700;
}

.score-cell,
.dim-cell {
  text-align: center;
  font-weight: 600;
}

/* 4 档评级 */
.lvl-good { color: var(--good); }
.lvl-ok { color: #22c55e; }
.lvl-warn { color: var(--warn); }
.lvl-bad { color: var(--bad); }

.score-cell {
  font-weight: 700;
  font-size: 15px;
}

.dim-cell {
  font-size: 13px;
}

.dim-cell .dim-max {
  color: var(--muted-2);
  font-weight: 400;
  font-size: 11px;
}

.table-profile {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.table-profile strong,
.table-profile span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.table-profile strong { font-size: 13px; color: var(--text); }
.table-profile span { color: var(--muted); font-size: 11px; }

.empty-row td {
  height: 100px;
  color: var(--muted);
  text-align: center;
}

/* ===== 详情面板 ===== */
.detail-panel {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-2);
  padding: 18px;
}

.detail-empty {
  display: grid;
  min-height: 240px;
  place-items: center;
  padding: 24px;
  color: var(--muted);
  text-align: center;
}

.detail-empty-glyph {
  width: 48px;
  height: 48px;
  opacity: 0.3;
  margin-bottom: 8px;
}

.detail-empty-glyph svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: var(--muted);
  stroke-width: 1.5;
}

.detail-empty p {
  margin: 0;
  color: var(--text-2);
  font-weight: 600;
}

.detail-empty span {
  display: block;
  margin-top: 4px;
  font-size: 12px;
}

.detail-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.detail-title h3 {
  font-family: ui-monospace, "SF Mono", Menlo, Monaco, Consolas, monospace;
  font-size: 16px;
}

.detail-score {
  position: relative;
  display: grid;
  place-items: center;
}

.detail-score span {
  position: absolute;
  font-weight: 700;
  font-size: 16px;
  color: var(--text);
}

.detail-profile {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.detail-profile .profile-primary,
.detail-profile .profile-status {
  padding: 3px 9px;
  font-size: 12px;
}

.detail-summary {
  margin: 0 0 14px;
  color: var(--text-2);
  font-size: 13px;
  line-height: 1.6;
}

/* ===== 雷达图 ===== */
.radar-wrap {
  margin: 0 0 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg-3);
}

.radar-wrap h4 {
  margin: 0 0 6px;
}

.radar-svg {
  display: block;
  margin: 0 auto;
  width: 100%;
  max-width: 240px;
  height: auto;
}

.radar-svg .grid {
  fill: none;
  stroke: var(--line-2);
  stroke-width: 0.8;
  opacity: 0.4;
}

.radar-svg .axis {
  stroke: var(--line-2);
  stroke-width: 0.8;
  opacity: 0.3;
}

.radar-svg .area {
  fill: var(--accent);
  fill-opacity: 0.15;
  stroke: var(--accent);
  stroke-width: 1.6;
  stroke-linejoin: round;
}

.radar-svg .label {
  fill: var(--text-2);
  font-size: 9px;
  font-weight: 600;
  text-anchor: middle;
}

.radar-svg .value {
  fill: var(--accent);
  font-size: 10px;
  font-weight: 700;
  text-anchor: middle;
}

/* ===== 维度条 ===== */
.dim-bars {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
}

.dim-bar {
  display: grid;
  grid-template-columns: 60px minmax(0, 1fr) 50px;
  gap: 10px;
  align-items: center;
}

.dim-name {
  font-size: 11px;
  color: var(--muted);
  font-weight: 600;
  letter-spacing: 0.04em;
}

.dim-track {
  height: 6px;
  border-radius: 999px;
  background: var(--bg-4);
  overflow: hidden;
  position: relative;
}

.dim-bar .dim-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.8s cubic-bezier(0.2, 0.7, 0.3, 1);
}

.dim-bar .dim-fill.lvl-good { background: var(--good); }
.dim-bar .dim-fill.lvl-ok { background: #22c55e; }
.dim-bar .dim-fill.lvl-warn { background: var(--warn); }
.dim-bar .dim-fill.lvl-bad { background: var(--bad); }

.dim-bar .dim-val {
  font-size: 11px;
  color: var(--muted);
  text-align: right;
  font-weight: 500;
}

/* ===== 详情网格 ===== */
.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}

.metric {
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg-3);
}

.metric span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.02em;
}

.metric strong {
  display: block;
  margin-top: 3px;
  overflow-wrap: anywhere;
  font-size: 13px;
  color: var(--text);
}

.detail-section {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.reason-list {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 6px;
}

.reason-tag {
  display: inline-flex;
  padding: 3px 8px;
  border-radius: 5px;
  font-size: 12px;
  font-weight: 500;
  border: 1px solid transparent;
}

.reason-tag.neutral {
  color: var(--neutral);
  background: var(--neutral-bg);
}

.reason-tag.warn {
  color: var(--warn);
  background: var(--warn-bg);
}

/* ===== 扫描中 ===== */
.scanning-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-2);
}

.scanner {
  width: 32px;
  height: 32px;
  border: 2px solid var(--line-2);
  border-top-color: var(--accent);
  border-radius: 999px;
  animation: spin-slow 1s linear infinite;
}

@keyframes spin-slow {
  to { transform: rotate(360deg); }
}

.scan-text strong {
  display: block;
  font-size: 14px;
  color: var(--text);
}

.scan-text span {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  color: var(--muted);
}

.scan-progress {
  margin-top: 8px;
  height: 3px;
  border-radius: 999px;
  background: var(--bg-4);
  overflow: hidden;
  position: relative;
}

.scan-progress::after {
  content: "";
  position: absolute;
  left: -40%;
  top: 0;
  bottom: 0;
  width: 40%;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  animation: scan-sweep 1.6s ease-in-out infinite;
}

@keyframes scan-sweep {
  0% { left: -40%; }
  100% { left: 100%; }
}

/* ===== 页脚 ===== */
.app-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 24px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}

.footer-meta {
  text-align: right;
}

/* ===== 响应式 ===== */
@media (max-width: 1280px) {
  .detail-ext {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 980px) {
  .app-header,
  .workspace {
    display: block;
  }
  .app-header {
    position: static;
  }
  .header-status {
    margin-top: 10px;
  }
  .input-panel {
    position: static;
    max-height: none;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .rank-card {
    grid-template-columns: 48px minmax(0, 1fr);
  }
  .rank-meta,
  .rank-card p {
    grid-column: 1 / 3;
  }
}

@media (max-width: 620px) {
  .app-header,
  .input-panel,
  .result-panel {
    padding: 14px;
  }
  h1 { font-size: 20px; }
  .summary-strip {
    justify-content: flex-start;
    margin-top: 10px;
  }
  .result-header,
  .section-header {
    display: block;
  }
  .section-header .icon-button {
    margin-top: 10px;
  }
  .detail-grid {
    grid-template-columns: 1fr;
  }
  .app-footer {
    flex-direction: column;
    align-items: flex-start;
  }
  .footer-meta {
    text-align: left;
  }
}

/* 滚动条 */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-3);
}
::-webkit-scrollbar-thumb {
  background: var(--line-2);
  border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--muted-2);
}
