/* ============================================================
   智鉴 · AIGC 论文检测平台 — 共享样式
   原创设计，不模仿任何现有品牌
   ============================================================ */
:root {
  --brand-900: #12304e;
  --brand-800: #173f68;
  --brand-700: #1d4f86;
  --brand-600: #2462a3;
  --brand-500: #2a78d6;
  --accent-600: #139a6c;
  --accent-500: #1baf7a;
  --accent-100: #e3f7ef;

  --ink-900: #0f1b2d;
  --ink-700: #2d3a4d;
  --ink-600: #4a5568;
  --ink-400: #8a94a6;
  --ink-200: #c3c9d4;

  --bg: #f5f7fa;
  --surface: #ffffff;
  --surface-alt: #f8fafc;
  --border: #e3e8ef;
  --border-strong: #cdd5e0;

  --good: #0ca30c;
  --warning: #b8860b;
  --serious: #e0683a;
  --critical: #d03b3b;

  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(16, 27, 45, .05), 0 8px 24px rgba(16, 27, 45, .07);
  --shadow-lg: 0 12px 40px rgba(16, 27, 45, .12);
  --font: system-ui, -apple-system, "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  color: var(--ink-900);
  background: var(--bg);
  line-height: 1.6;
  font-size: 16px;
}
a { color: var(--brand-600); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }

.container { max-width: 1120px; margin: 0 auto; padding: 0 22px; }

/* ---------- 顶部导航 ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 66px; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand img { width: 34px; height: 34px; }
.brand-name { font-size: 19px; font-weight: 700; color: var(--ink-900); letter-spacing: .5px; }
.brand-name small { font-weight: 400; color: var(--ink-400); font-size: 13px; margin-left: 4px; }
.nav-links { display: flex; align-items: center; gap: 26px; }
.nav-links a { color: var(--ink-600); font-size: 15px; }
.nav-links a:hover, .nav-links a.active { color: var(--brand-700); text-decoration: none; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 22px; border-radius: 10px; font-size: 15px; font-weight: 600;
  cursor: pointer; border: 1px solid transparent; transition: .15s; font-family: inherit;
}
.btn-primary { background: var(--brand-600); color: #fff; }
.btn-primary:hover { background: var(--brand-700); }
.btn-accent { background: var(--accent-500); color: #fff; }
.btn-accent:hover { background: var(--accent-600); }
.btn-ghost { background: transparent; color: var(--ink-700); border-color: var(--border-strong); }
.btn-ghost:hover { background: var(--surface-alt); border-color: var(--ink-400); }
.btn-lg { padding: 14px 30px; font-size: 16px; }

/* ---------- 首页 hero ---------- */
.hero {
  background: linear-gradient(135deg, var(--brand-900) 0%, var(--brand-700) 55%, var(--brand-600) 100%);
  color: #fff; padding: 88px 0 96px; position: relative; overflow: hidden;
}
.hero::after {
  content: ""; position: absolute; right: -140px; top: -120px; width: 460px; height: 460px;
  background: radial-gradient(circle, rgba(27,175,122,.35), transparent 65%);
  border-radius: 50%;
}
.hero .container { position: relative; z-index: 1; }
.hero h1 { font-size: 44px; line-height: 1.25; font-weight: 800; letter-spacing: .5px; max-width: 640px; }
.hero h1 em { font-style: normal; color: #7fd8b8; }
.hero p { margin: 20px 0 30px; font-size: 18px; color: rgba(255,255,255,.82); max-width: 560px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 40px; margin-top: 52px; flex-wrap: wrap; }
.hero-stats .s { }
.hero-stats .s b { font-size: 28px; display: block; color: #fff; }
.hero-stats .s span { font-size: 14px; color: rgba(255,255,255,.7); }

/* ---------- 区块标题 ---------- */
.section { padding: 72px 0; }
.section-title { text-align: center; margin-bottom: 46px; }
.section-title h2 { font-size: 30px; font-weight: 800; color: var(--ink-900); }
.section-title p { color: var(--ink-600); margin-top: 10px; max-width: 560px; margin-left: auto; margin-right: auto; }

/* ---------- 卡片网格 ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 22px; }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 28px; box-shadow: var(--shadow); transition: .18s;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.card .ic {
  width: 46px; height: 46px; border-radius: 12px; display: flex; align-items: center; justify-content: center;
  font-size: 22px; margin-bottom: 16px;
}
.card h3 { font-size: 18px; margin-bottom: 8px; color: var(--ink-900); }
.card p { color: var(--ink-600); font-size: 14.5px; }

/* ---------- 流程步骤 ---------- */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 26px; counter-reset: step; }
.step { text-align: center; padding: 10px 8px; position: relative; }
.step::before {
  counter-increment: step; content: counter(step);
  width: 44px; height: 44px; border-radius: 50%; margin: 0 auto 16px;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent-100); color: var(--accent-600);
  font-weight: 800; font-size: 19px;
}
.step h4 { margin-bottom: 6px; color: var(--ink-900); }
.step p { font-size: 14px; color: var(--ink-600); }

/* ---------- 页脚 ---------- */
.footer { background: var(--brand-900); color: rgba(255,255,255,.75); padding: 40px 0 30px; margin-top: 30px; }
.footer .container { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 20px; }
.footer .f-brand { display: flex; align-items: center; gap: 10px; }
.footer .f-brand img { width: 28px; height: 28px; }
.footer .f-brand b { color: #fff; }
.footer .f-links a { color: rgba(255,255,255,.65); margin-left: 18px; font-size: 14px; }
.footer .f-note { margin-top: 22px; font-size: 13px; color: rgba(255,255,255,.5); }

/* ---------- 页面头部 ---------- */
.page-head { background: var(--surface); border-bottom: 1px solid var(--border); padding: 34px 0; }
.page-head h1 { font-size: 26px; font-weight: 800; }
.page-head p { color: var(--ink-600); margin-top: 6px; font-size: 15px; }

/* ---------- 提交表单 ---------- */
.form-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 30px; box-shadow: var(--shadow); }
.field { margin-bottom: 22px; }
.field label { display: block; font-weight: 600; color: var(--ink-700); margin-bottom: 8px; font-size: 15px; }
.field .hint { color: var(--ink-400); font-size: 13px; margin-top: 6px; }
.field input[type="text"], .field textarea, .field select {
  width: 100%; padding: 12px 14px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  font-size: 15px; font-family: inherit; background: var(--surface); color: var(--ink-900);
}
.field input:focus, .field textarea:focus, .field select:focus { outline: 2px solid var(--brand-500); outline-offset: 1px; border-color: var(--brand-500); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 22px; }
.radio-row { display: flex; gap: 14px; flex-wrap: wrap; }
.radio-row label {
  flex: 1; min-width: 140px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  padding: 12px 14px; cursor: pointer; display: flex; gap: 10px; align-items: center; font-size: 14.5px; color: var(--ink-700);
}
.radio-row input { accent-color: var(--brand-600); }
.radio-row label:has(input:checked) { border-color: var(--brand-500); background: #eef5fd; }

/* ---------- 上传区 ---------- */
.dropzone {
  border: 2px dashed var(--border-strong); border-radius: var(--radius); padding: 44px 20px;
  text-align: center; cursor: pointer; transition: .15s; background: var(--surface-alt);
}
.dropzone:hover, .dropzone.drag { border-color: var(--brand-500); background: #eef5fd; }
.dropzone .dz-ic { font-size: 40px; }
.dropzone p { color: var(--ink-600); margin-top: 8px; }
.dropzone p b { color: var(--brand-700); }
.file-chip {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px 16px;
  background: var(--surface); margin-top: 14px;
}
.file-chip .fc-info { display: flex; align-items: center; gap: 12px; }
.file-chip .fc-name { font-weight: 600; color: var(--ink-900); }
.file-chip .fc-size { color: var(--ink-400); font-size: 13px; }
.file-chip button { background: none; border: none; color: var(--critical); cursor: pointer; font-size: 14px; }

/* ---------- 进度 ---------- */
.progress-overlay {
  position: fixed; inset: 0; background: rgba(15,27,45,.55); z-index: 100;
  display: flex; align-items: center; justify-content: center; backdrop-filter: blur(3px);
}
.progress-box {
  background: var(--surface); border-radius: var(--radius); padding: 34px 40px; width: 420px; max-width: 92%;
  box-shadow: var(--shadow-lg);
}
.progress-box h3 { text-align: center; margin-bottom: 22px; color: var(--ink-900); }
.progress-steps { margin-bottom: 20px; }
.pstep { display: flex; align-items: center; gap: 12px; padding: 8px 0; color: var(--ink-400); font-size: 14.5px; }
.pstep .dot { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--border-strong); flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 11px; }
.pstep.done { color: var(--ink-700); }
.pstep.done .dot { background: var(--accent-500); border-color: var(--accent-500); color: #fff; }
.pstep.active { color: var(--brand-700); font-weight: 600; }
.pstep.active .dot { border-color: var(--brand-500); animation: pulse 1s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 5px rgba(42,120,214,.18); } }
.progress-track { height: 8px; background: var(--border); border-radius: 4px; overflow: hidden; }
.progress-track i { display: block; height: 100%; width: 0%; background: linear-gradient(90deg, var(--brand-500), var(--accent-500)); border-radius: 4px; transition: width .4s; }
.progress-pct { text-align: center; margin-top: 10px; font-weight: 700; color: var(--brand-700); font-size: 17px; }

/* ---------- 报告页 ---------- */
.report-head { display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 16px; }
.report-meta { color: var(--ink-600); font-size: 14px; }
.report-meta b { color: var(--ink-900); }
.report-actions { display: flex; gap: 10px; }
.score-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; margin: 24px 0; }
.score-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.score-top { display: flex; align-items: baseline; justify-content: space-between; }
.score-num { font-size: 52px; font-weight: 800; letter-spacing: -1px; line-height: 1; }
.score-num small { font-size: 20px; font-weight: 600; color: var(--ink-400); }
.score-title { font-size: 15px; color: var(--ink-600); margin-bottom: 4px; }
.score-desc { font-size: 13.5px; color: var(--ink-400); margin-top: 8px; }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px; font-size: 13px; font-weight: 700; }
.badge::before { content: "●"; font-size: 9px; }
.badge-low { background: #e6f6e6; color: var(--good); }
.badge-mid { background: #fdf3d9; color: var(--warning); }
.badge-high { background: #fde9e2; color: var(--serious); }
.badge-critical { background: #fbe3e3; color: var(--critical); }

.score-bar { height: 10px; background: var(--border); border-radius: 5px; margin-top: 18px; overflow: hidden; }
.score-bar i { display: block; height: 100%; border-radius: 5px; }

/* 章节柱状 */
.viz-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); margin-bottom: 20px; }
.viz-card h3 { font-size: 18px; margin-bottom: 4px; }
.viz-card .sub { color: var(--ink-400); font-size: 13.5px; margin-bottom: 18px; }
.bar-row { display: grid; grid-template-columns: 150px 1fr 52px; align-items: center; gap: 14px; padding: 9px 0; }
.bar-row .lbl { font-size: 14px; color: var(--ink-700); text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-row .track { height: 14px; background: var(--bg); border-radius: 7px; overflow: hidden; }
.bar-row .track i { display: block; height: 100%; border-radius: 7px; transition: width .6s ease; }
.bar-row .val { font-variant-numeric: tabular-nums; font-size: 14px; font-weight: 700; color: var(--ink-900); }

/* 环形图 */
.donut-wrap { display: flex; align-items: center; gap: 30px; flex-wrap: wrap; }
.donut { position: relative; width: 190px; height: 190px; border-radius: 50%; flex-shrink: 0; }
.donut::after { content: ""; position: absolute; inset: 34px; background: var(--surface); border-radius: 50%; }
.donut-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; z-index: 1; }
.donut-center b { font-size: 30px; font-weight: 800; color: var(--ink-900); }
.donut-center span { font-size: 12px; color: var(--ink-400); }
.legend { flex: 1; min-width: 200px; display: grid; gap: 10px; }
.legend .lg { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--ink-700); }
.legend .sw { width: 12px; height: 12px; border-radius: 4px; flex-shrink: 0; }
.legend .sw.pattern { background: repeating-linear-gradient(45deg, #fff 0 3px, #c9c9c9 3px 6px); }
.legend .lg b { margin-left: auto; font-variant-numeric: tabular-nums; }

/* 风险句 */
.risk-item { border: 1px solid var(--border); border-left: 4px solid var(--critical); border-radius: var(--radius-sm); padding: 14px 16px; margin-bottom: 12px; background: var(--surface); }
.risk-item.mid { border-left-color: var(--warning); }
.risk-item .sent { color: var(--ink-700); font-size: 14.5px; }
.risk-item .meta { display: flex; justify-content: space-between; margin-top: 8px; font-size: 13px; color: var(--ink-400); }
.risk-item .meta b { color: var(--serious); font-variant-numeric: tabular-nums; }

/* ---------- 全文检测标注报告 ---------- */
.ft-legend { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
.ft-legend > span {
  display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--ink-600);
  border: 1px solid var(--border); border-radius: 999px; padding: 4px 12px; background: var(--surface-alt);
}
.ft-legend > span::before { content: ""; width: 12px; height: 12px; border-radius: 3px; flex-shrink: 0; }
.lg-sim-high::before { background: #e5533f; }
.lg-sim-mid::before { background: #f2a03c; }
.lg-sim-low::before { background: #f5cf6b; }
.lg-ai-high::before { background: #235a9f; }
.lg-ai-mid::before { background: #5b8fd4; }
.lg-ori::before { background: #e6ebf1; }

.ft-stats { font-size: 13.5px; color: var(--ink-600); margin-bottom: 14px; }
.ft-stats b { color: var(--ink-900); font-variant-numeric: tabular-nums; }
.ft-stats .st-red { color: var(--critical); }
.ft-stats .st-blue { color: #2f6fc8; }

.ft-text {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 26px 30px; line-height: 2.15; font-size: 15.5px; letter-spacing: .2px;
  box-shadow: var(--shadow);
}
.ft-text .seg {
  display: inline; padding: 1.5px 3px; border-radius: 3px; cursor: default;
  -webkit-print-color-adjust: exact; print-color-adjust: exact;
}
.ft-text .seg.sim-high { background: #ffd9d6; text-decoration: underline; text-decoration-color: #e5533f; text-decoration-thickness: 2px; }
.ft-text .seg.sim-mid { background: #ffe8cd; }
.ft-text .seg.sim-low { background: #fff5dc; }
.ft-text .seg.ai-high { border-bottom: 3px solid #235a9f; background: rgba(35,90,159,.16); }
.ft-text .seg.ai-mid { border-bottom: 3px solid #5b8fd4; background: rgba(47,111,200,.10); }
.ft-text .seg.sim-high.ai-high, .ft-text .seg.sim-high.ai-mid { box-shadow: inset 0 -3px 0 #2f6fc8; }
.ft-text .seg:hover { box-shadow: 0 0 0 2px rgba(42,120,214,.35); border-radius: 3px; }

/* ---------- 通用工具 ---------- */
.muted { color: var(--ink-400); }
.mt8 { margin-top: 8px; } .mt16 { margin-top: 16px; } .mt24 { margin-top: 24px; } .mt40 { margin-top: 40px; }
.center { text-align: center; }
.hidden { display: none !important; }

/* ---------- 打印 ---------- */
@media print {
  .nav, .footer, .report-actions, .dropzone, .progress-overlay, .no-print { display: none !important; }
  body { background: #fff; }
  .card, .score-card, .viz-card { box-shadow: none; border-color: #ccc; }
  .section { padding: 20px 0; }
}

/* ---------- 响应式 ---------- */
@media (max-width: 720px) {
  .hero h1 { font-size: 32px; }
  .form-grid { grid-template-columns: 1fr; }
  .bar-row { grid-template-columns: 92px 1fr 44px; gap: 8px; }
  .nav-links { gap: 14px; }
  .footer .f-links a { margin-left: 0; margin-right: 16px; }
}
