/* ============================================================
   CV-Insight 顶会热词统计平台 — 应用样式
   ============================================================ */
:root {
  --primary: #4f46e5; --primary-light: #eef2ff; --accent: #06b6d4;
  --danger: #ef4444; --success: #10b981; --warn: #f59e0b;
  --text: #1e293b; --text-light: #64748b; --bg: #f8fafc;
  --card: #fff; --border: #e2e8f0; --radius: 12px;
  --shadow: 0 1px 3px rgba(0,0,0,.06), 0 4px 14px rgba(0,0,0,.05);
}
* { margin:0; padding:0; box-sizing:border-box; }
body { font-family:"PingFang SC","Microsoft YaHei",system-ui,-apple-system,sans-serif; background:var(--bg); color:var(--text); font-size:14px; }
a { text-decoration:none; color:inherit; }
button { font-family:inherit; }

.navbar { position:sticky; top:0; z-index:100; display:flex; align-items:center; gap:28px; height:60px; padding:0 32px; background:#fff; border-bottom:1px solid var(--border); }
.logo { display:flex; align-items:center; gap:10px; font-weight:700; font-size:17px; color:var(--primary); }
.logo .mark { width:32px;height:32px;border-radius:9px; background:linear-gradient(135deg,var(--primary),var(--accent)); color:#fff;display:flex;align-items:center;justify-content:center;font-size:15px; }
.nav-links { display:flex; gap:6px; flex:1; }
.nav-links a { padding:8px 14px; border-radius:8px; color:var(--text-light); font-weight:500; }
.nav-links a:hover { background:var(--primary-light); color:var(--primary); }
.nav-links a.active { background:var(--primary-light); color:var(--primary); font-weight:600; }

.container { max-width:1180px; margin:0 auto; padding:24px 24px 40px; }
.card { background:var(--card); border:1px solid var(--border); border-radius:var(--radius); box-shadow:var(--shadow); padding:20px; margin-bottom:18px; }
.card h3 { font-size:15px; margin-bottom:14px; display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.card h3 .dot { width:8px;height:8px;border-radius:50%;background:var(--primary); flex:none; }
.grid-2 { display:grid; grid-template-columns:1fr 1fr; gap:18px; }
.grid-3 { display:grid; grid-template-columns:repeat(3,1fr); gap:18px; }
@media (max-width:960px){ .grid-2,.grid-3{grid-template-columns:1fr} .navbar{padding:0 16px;gap:10px} .nav-links a{padding:8px 6px} }
.muted { color:var(--text-light); }
.tag { display:inline-block; padding:2px 10px; border-radius:20px; font-size:12px; background:var(--primary-light); color:var(--primary); }
.btn { display:inline-block; padding:8px 18px; border-radius:8px; border:none; cursor:pointer; font-size:13px; font-weight:600; transition:.15s; }
.btn-primary { background:var(--primary); color:#fff; }
.btn-primary:hover { background:#4338ca; }
.btn-primary:disabled { background:#a5b4fc; cursor:not-allowed; }
.btn-ghost { background:#fff; border:1px solid var(--border); color:var(--text); }
.btn-ghost:hover { border-color:var(--primary); color:var(--primary); }
.btn-sm { padding:4px 10px; font-size:12px; border-radius:6px; }
.btn-danger { background:#fee2e2; color:var(--danger); }
.btn-success { background:#d1fae5; color:#059669; }

.page-title { font-size:20px; font-weight:700; margin:6px 0 4px; }
.page-desc { color:var(--text-light); margin-bottom:18px; }

.hero { background:linear-gradient(120deg,#312e81 0%,#4f46e5 55%,#0891b2 100%); border-radius:16px; color:#fff; padding:38px 36px; margin-bottom:20px; }
.hero h1 { font-size:26px; margin-bottom:8px; }
.hero p { opacity:.85; margin-bottom:6px; max-width:680px; line-height:1.7; }
.hero .stats { display:flex; gap:36px; margin-top:22px; flex-wrap:wrap; }
.hero .stats b { font-size:24px; display:block; }
.hero .stats span { font-size:12px; opacity:.75; }

.chart-box { width:100%; height:360px; }
.chart-box.tall { height:440px; }
.chart-box.small { height:300px; }

label { display:block; font-size:13px; font-weight:600; margin:14px 0 6px; }
input[type=text], textarea, select { width:100%; padding:9px 12px; border:1px solid var(--border); border-radius:8px; font-size:13px; font-family:inherit; outline:none; background:#fff; color:var(--text); }
input:focus, textarea:focus { border-color:var(--primary); box-shadow:0 0 0 3px rgba(79,70,229,.12); }
textarea { resize:vertical; min-height:110px; }

table { width:100%; border-collapse:collapse; }
th { text-align:left; padding:10px 12px; font-size:12px; color:var(--text-light); border-bottom:1px solid var(--border); background:#f8fafc; }
td { padding:10px 12px; border-bottom:1px solid #f1f5f9; font-size:13px; vertical-align:top; }
tr:hover td { background:#fafbff; }
.src-link { color:var(--primary); }          /* 原文链接：颜色收口，避免在 HTML 里写内联样式 */
.src-link:hover { text-decoration:underline; }
.title-link { color:var(--primary); font-weight:600; cursor:pointer; }
.title-link:hover { text-decoration:underline; }

.pagination { display:flex; justify-content:space-between; margin-top:14px; align-items:center; flex-wrap:wrap; gap:10px; }
.pagination .pages { display:flex; gap:6px; align-items:center; flex-wrap:wrap; }

.modal-mask { position:fixed; inset:0; background:rgba(15,23,42,.45); z-index:200; display:none; align-items:center; justify-content:center; }
.modal-mask.show { display:flex; }
.modal { background:#fff; border-radius:14px; width:min(680px, 92vw); max-height:82vh; overflow:auto; padding:24px; }
.modal h4 { font-size:16px; margin-bottom:12px; }
.modal .actions { text-align:right; margin-top:16px; }

.toast { position:fixed; top:76px; left:50%; transform:translateX(-50%) translateY(-20px); background:#1e293b; color:#fff; padding:10px 22px; border-radius:10px; font-size:13px; opacity:0; pointer-events:none; transition:.3s; z-index:300; box-shadow:var(--shadow); }
.toast.show { opacity:1; transform:translateX(-50%) translateY(0); }

.loading-box { text-align:center; padding:80px 0; color:var(--text-light); }
.spinner { width:42px;height:42px;border:4px solid var(--primary-light);border-top-color:var(--primary);border-radius:50%;margin:0 auto 16px;animation:spin 1s linear infinite; }
@keyframes spin { to { transform:rotate(360deg); } }

.legend { display:flex; gap:18px; margin-bottom:12px; flex-wrap:wrap; }
.legend .item { display:flex; align-items:center; gap:6px; font-size:12px; color:var(--text-light); }
.legend .sw { width:18px; height:4px; border-radius:2px; }
.player { display:flex; align-items:center; gap:14px; margin-top:6px; }
.play-btn { width:38px;height:38px;border-radius:50%;background:var(--primary);color:#fff;display:flex;align-items:center;justify-content:center;cursor:pointer;border:none;font-size:15px; flex:none; }
.play-btn:hover { background:#4338ca; }
.player .track { flex:1; height:6px; background:#e2e8f0; border-radius:3px; position:relative; cursor:pointer; }
.player .progress { position:absolute; left:0; top:0; height:100%; background:var(--primary); border-radius:3px; }
.player .year { font-weight:700; color:var(--primary); width:52px; text-align:center; }

.kw-panel { display:none; }
.kw-panel.show { display:block; }
.paper-item { padding:10px 0; border-bottom:1px dashed var(--border); }
.paper-item:last-child { border-bottom:none; }
.paper-item b { font-size:13px; }
.paper-item .meta { font-size:12px; color:var(--text-light); margin-top:3px; }

.footer { text-align:center; color:var(--text-light); font-size:12px; padding:30px 0 20px; }
.footer a { color:var(--primary); }

.progress-row { display:flex; align-items:center; gap:12px; margin-bottom:10px; }
.progress-row .name { width:170px; font-size:12px; }
.progress-row .bar-wrap { flex:1; height:14px; background:#f1f5f9; border-radius:7px; overflow:hidden; }
.progress-row .bar { height:100%; border-radius:7px; background:var(--primary); transition:width .4s; }
.progress-row .val { width:60px; text-align:right; font-size:12px; color:var(--text-light); }

.chip-select { display:flex; gap:8px; flex-wrap:wrap; }
.chip-select .chip { padding:6px 14px; border-radius:20px; border:1px solid var(--border); font-size:12px; cursor:pointer; user-select:none; background:#fff; }
.chip-select .chip.on { background:var(--primary); color:#fff; border-color:var(--primary); }
