/* FunASR 官网前端 — 科技蓝主题（深蓝 #0369a1 / 亮蓝 #89b4fa） */
:root {
  --blue-deep: #0369a1;
  --blue: #0ea5e9;
  --blue-light: #89b4fa;
  --blue-50: #eff6ff;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --bg: #ffffff;
  --radius: 16px;
  --shadow: 0 10px 30px rgba(3, 105, 161, 0.10);
  --shadow-lg: 0 20px 50px rgba(3, 105, 161, 0.18);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 20px; }
.doc { max-width: 1160px; margin: 0 auto; padding: 28px 20px 10px; }

/* ===== 面包屑（全站统一）=====
   目标：无论面包屑写在内容容器外（下载页/产品页）还是容器内（文档页/专题页），
   左边界都与 1160px 内容区对齐，不再出现"贴浏览器左边"的错位。 */
.crumb { max-width: 1160px; margin: 0 auto; padding: 28px 20px 0; color: var(--muted); font-size: 14px; }
.crumb a { color: var(--muted); }
.crumb a:hover { color: var(--blue-deep); text-decoration: underline; }
/* 容器内的面包屑：容器已提供 1160px 宽度与左右内边距，此处清零避免二次缩进 */
.wrap .crumb, .doc .crumb { max-width: none; margin: 0; padding: 0 0 6px; }

/* ===== 顶部导航 ===== */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,0.85);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 19px; letter-spacing: .5px; }
.logo .dot {
  width: 30px; height: 30px; border-radius: 9px;
  background: linear-gradient(135deg, var(--blue-deep), var(--blue-light));
  display: grid; place-items: center; color: #fff; font-size: 16px; font-weight: 900;
}
.nav-right { display: flex; align-items: center; gap: 14px; }
.nav-links { display: flex; gap: 22px; color: var(--muted); font-size: 15px; }
.nav-links a:hover { color: var(--blue-deep); }

/* ===== 顶部导航「产品 ▾」下拉（全站共用）=====
   原先这段样式只写在 index.html 内联 <style> 里，其余 18 个页面虽然有相同的
   .nav-drop-menu 结构与脚本，却拿不到样式，点击后会弹出无边框无定位的裸 div 撑破导航栏。
   现收敛到 style.css 作为唯一样式来源。 */
.nav-drop { position: relative; }
.nav-drop-menu { display: none; position: absolute; top: 36px; left: 0; min-width: 220px; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg); padding: 8px; z-index: 60; }
.nav-drop-menu a { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 10px; color: var(--ink); font-weight: 600; }
.nav-drop-menu a:hover { background: var(--blue-50); color: var(--blue-deep); }
.nav-drop-menu .coming { margin-left: auto; font-size: 12px; color: #b45309; background: #fef3c7; padding: 2px 8px; border-radius: 999px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 20px; border-radius: 999px; font-weight: 700; font-size: 15px;
  cursor: pointer; border: 1px solid transparent; transition: .18s ease;
}
.btn-primary { background: linear-gradient(135deg, var(--blue-deep), var(--blue)); color: #fff; box-shadow: var(--shadow); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.btn-ghost { background: #fff; border-color: var(--line); color: var(--blue-deep); }
.btn-ghost:hover { border-color: var(--blue); background: var(--blue-50); }
.btn-lg { padding: 15px 30px; font-size: 17px; }

/* ===== Hero ===== */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(1200px 500px at 80% -10%, rgba(137,180,250,.35), transparent),
    radial-gradient(900px 500px at -10% 10%, rgba(14,165,233,.18), transparent),
    linear-gradient(180deg, #f8fbff, #ffffff);
  padding: 78px 0 64px;
}
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 40px; align-items: center; }
.badge {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px;
  background: var(--blue-50); color: var(--blue-deep); font-size: 13px; font-weight: 700; margin-bottom: 18px;
}
.badge .pulse { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 0 rgba(34,197,94,.6); animation: pulse 1.8s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 8px rgba(34,197,94,0); } 100% { box-shadow: 0 0 0 0 rgba(34,197,94,0); } }
.hero h1 { font-size: 46px; line-height: 1.2; margin: 0 0 18px; letter-spacing: -.5px; }
.hero h1 .hl { background: linear-gradient(135deg, var(--blue-deep), var(--blue)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p.sub { font-size: 18px; color: var(--muted); margin: 0 0 30px; max-width: 540px; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 28px; margin-top: 38px; }
.hero-stats .s-num { font-size: 26px; font-weight: 800; color: var(--blue-deep); }
.hero-stats .s-lbl { font-size: 13px; color: var(--muted); }
/* hero 右侧装饰卡 */
.hero-card {
  background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 22px;
  box-shadow: var(--shadow-lg);
}
.hero-card .row { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.hero-card .row:last-child { border-bottom: 0; }
.hero-card .ic { width: 38px; height: 38px; border-radius: 10px; background: var(--blue-50); display: grid; place-items: center; font-size: 18px; }
.hero-card .t { font-weight: 700; }
.hero-card .d { font-size: 13px; color: var(--muted); }

/* ===== 区块标题 ===== */
.section { padding: 70px 0; }
.section.alt { background: linear-gradient(180deg, #f8fbff, #ffffff); }
.sec-head { text-align: center; max-width: 720px; margin: 0 auto 44px; }
.sec-head h2 { font-size: 34px; margin: 0 0 12px; letter-spacing: -.5px; }
.sec-head p { color: var(--muted); font-size: 17px; margin: 0; }

/* ===== 功能卡片 ===== */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 26px;
  transition: .2s ease; position: relative; overflow: hidden;
  height: 100%; display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--blue-light); }
.card .ic { width: 50px; height: 50px; border-radius: 14px; background: linear-gradient(135deg, var(--blue-deep), var(--blue-light)); display: grid; place-items: center; font-size: 24px; margin-bottom: 16px; }
.card h3 { margin: 0 0 8px; font-size: 19px; }
.card p { margin: 0; color: var(--muted); font-size: 15px; min-height: 0; display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* ===== 优势条 ===== */
.features-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.feat { text-align: center; padding: 24px 16px; border-radius: var(--radius); background: #fff; border: 1px solid var(--line); }
.feat .big { font-size: 30px; margin-bottom: 8px; }
.feat .t { font-weight: 700; }
.feat .d { font-size: 13px; color: var(--muted); }

/* ===== CTA 下载 ===== */
.cta {
  background: linear-gradient(135deg, var(--blue-deep), var(--blue));
  border-radius: 24px; padding: 54px 40px; text-align: center; color: #fff;
  box-shadow: var(--shadow-lg);
}
.cta h2 { font-size: 32px; margin: 0 0 12px; }
.cta p { font-size: 17px; opacity: .92; margin: 0 0 26px; }
.cta .btn-white { background: #fff; color: var(--blue-deep); }
.cta .btn-white:hover { transform: translateY(-2px); }

/* ===== 页脚 ===== */
.footer { background: #0b1f33; color: #cbd5e1; padding: 40px 0; font-size: 14px; }
.footer a { color: #93c5fd; }
.footer .cols { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 20px; }
.footer .copy { margin-top: 24px; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.1); color: #94a3b8; }
/* 友链横排（§20.121 构建期静态注入，爬虫可见）；链接间用 gap 自然分隔 */
.footer .friend-links-bar { margin-top: 20px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; font-size: 13px; color: #94a3b8; }
.footer .friend-links-bar .fl-label { font-weight: 700; color: #cbd5e1; }
.footer .friend-links-bar a { color: #93c5fd; }
.footer .friend-links-bar a:hover { text-decoration: underline; }

/* ===== 下载页 ===== */
.dl-hero { padding: 64px 0 30px; text-align: center; }
.dl-hero h1 { font-size: 40px; margin: 0 0 12px; }
.dl-hero p { color: var(--muted); font-size: 17px; margin: 0; }
.dl-card {
  max-width: 760px; margin: 30px auto 0; background: #fff; border: 1px solid var(--line);
  border-radius: 20px; padding: 36px; box-shadow: var(--shadow); text-align: center;
}
.dl-card .name { font-size: 26px; font-weight: 800; margin: 0 0 10px; }
.dl-card .desc { color: var(--muted); margin: 0 0 26px; min-height: 24px; }
.dl-card .note { color: var(--muted); font-size: 15px; }
.dl-meta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-top: 18px; color: var(--muted); font-size: 13px; }
.spinner { width: 34px; height: 34px; border: 4px solid var(--line); border-top-color: var(--blue); border-radius: 50%; animation: spin 1s linear infinite; margin: 20px auto; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== 通用占位页 ===== */
.placeholder { max-width: 560px; margin: 90px auto; text-align: center; padding: 40px; }
.placeholder .em { font-size: 54px; }
.placeholder h1 { font-size: 28px; margin: 14px 0 8px; }
.placeholder p { color: var(--muted); }

/* ===== 响应式 ===== */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 36px; }
  .cards, .features-row { grid-template-columns: repeat(2, 1fr); }
  .nav-links { display: none; }
}
@media (max-width: 560px) {
  .cards, .features-row { grid-template-columns: 1fr; }
  .hero-stats { flex-wrap: wrap; gap: 18px; }
  .hero h1 { font-size: 30px; }
  .sec-head h2, .cta h2, .dl-hero h1 { font-size: 26px; }
}

/* ===== 专题目录 / 专题卡片（/topics 与 /topics/{slug} 共用） ===== */
.tpc-hero {
  background: var(--blue-50);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 28px;
  margin: 8px 0 24px;
}
.tpc-hero-pill {
  display: inline-block;
  background: var(--blue-deep);
  color: #fff;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 10px;
}
.tpc-hero h1 { margin: 0 0 6px; font-size: 26px; color: var(--ink); }
.tpc-hero p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.7; }
.tpc-hero--detail { display: flex; align-items: center; gap: 14px; padding: 22px 26px; }
.tpc-hero--detail h1 { margin: 0; }
.tpc-hero-icon { width: 46px; height: 46px; border-radius: 14px; flex: none; }

.tpc-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 24px 0 8px; }
.tpc-card {
  display: flex; gap: 14px; align-items: flex-start;
  border: 1px solid var(--line); border-radius: 16px; padding: 18px 20px;
  text-decoration: none; color: var(--ink); background: #fff;
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.tpc-card:hover { border-color: var(--blue-light); box-shadow: 0 6px 20px rgba(15,23,42,.08); transform: translateY(-2px); }
.tpc-icon {
  width: 40px; height: 40px; border-radius: 12px; flex: none;
  background: var(--blue-50); color: var(--blue-deep);
  display: grid; place-items: center;
}
.tpc-card-body { display: flex; flex-direction: column; min-width: 0; }
.tpc-card-title { font-size: 17px; font-weight: 800; margin-bottom: 6px; color: var(--ink); }
.tpc-card-desc { color: var(--muted); font-size: 14px; line-height: 1.7; }
.tpc-card-more { margin-top: 10px; color: var(--blue-deep); font-weight: 700; font-size: 14px; }
.tpc-article { margin-top: 8px; }
.tpc-article p { color: #2b3340; line-height: 1.85; margin: 10px 0; }
.tpc-article ul, .tpc-article ol { padding-left: 22px; line-height: 1.9; color: #2b3340; }
.tpc-article li { margin: 4px 0; }
.tpc-article h2 { font-size: 22px; margin: 34px 0 14px; padding-left: 12px; border-left: 4px solid var(--blue-deep); }
.tpc-article h3 { font-size: 17px; margin: 20px 0 10px; color: var(--ink); }
@media (max-width: 900px) { .tpc-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .tpc-grid { grid-template-columns: 1fr; } }

/* ===== 后台专题管理表单（/admin 专题管理页） ===== */
.t-form { background:#fff; border:1px solid var(--line); border-radius:14px; padding:18px 20px; margin:14px 0 6px; max-width:760px; }
.t-row { display:flex; flex-direction:column; gap:6px; margin-bottom:14px; }
.t-row label { font-weight:700; font-size:14px; color:var(--ink); }
.t-input { width:100%; padding:10px 12px; border:1px solid var(--line); border-radius:10px; font-size:14px; font-family:inherit; color:var(--ink); background:#fff; }
.t-input:focus { outline:none; border-color:var(--blue-light); box-shadow:0 0 0 3px rgba(137,180,250,.18); }
textarea.t-input { resize:vertical; line-height:1.6; }

/* ===== 后台专题管理表单（/admin 专题管理页） ===== */
.t-form { background:#fff; border:1px solid var(--line); border-radius:14px; padding:18px 20px; margin:14px 0 6px; max-width:760px; }
.t-row { display:flex; flex-direction:column; gap:6px; margin-bottom:14px; }
.t-row label { font-weight:700; font-size:14px; color:var(--ink); }
.t-input { width:100%; padding:10px 12px; border:1px solid var(--line); border-radius:10px; font-size:14px; font-family:inherit; color:var(--ink); background:#fff; }
.t-input:focus { outline:none; border-color:var(--blue-light); box-shadow:0 0 0 3px rgba(137,180,250,.18); }
textarea.t-input { resize:vertical; line-height:1.6; }

.friend-links-list { list-style: none; padding-left: 0; margin: 0; }
/* footer 专题列：始终只显示前 4 个精选 + “更多专题”，超出的文章链接自动隐藏（防回退） */
.footer .topics-col > div:nth-child(n+6):not(.topic-more) { display: none; }

/* ===== 直播剧本库（/scripts /scripts/tag/{tag} /scripts/{slug}） ===== */
.script-para {
  display: flex;
  gap: 10px;
  padding: 10px 14px;
  background: #fafafa;
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-bottom: 10px;
  transition: background 0.15s ease;
}
.script-para:hover {
  background: var(--blue-50);
  border-color: var(--blue-light);
}
.script-transcript-toolbar {
  margin: 4px 0 14px;
}
.script-toolbar-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  background: var(--blue);
  border: 1px solid var(--blue);
  border-radius: 8px;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.15s ease;
}
.script-toolbar-btn:hover {
  background: var(--blue-deep);
  border-color: var(--blue-deep);
}
.script-para-body {
  flex: 1;
  line-height: 1.8;
  color: #2b3340;
  word-break: break-word;
}
.script-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0 20px;
}
.script-tag-chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  font-size: 13px;
  color: var(--blue-deep);
  background: var(--blue-50);
  border: 1px solid var(--blue-light);
  border-radius: 999px;
  text-decoration: none;
  transition: all 0.15s ease;
}
.script-tag-chip:hover {
  background: var(--blue-deep);
  color: #fff;
  border-color: var(--blue-deep);
}
.script-card {
  display: block;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px 20px;
  background: #fff;
  text-decoration: none;
  color: var(--ink);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
.script-card:hover {
  border-color: var(--blue-light);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.1);
  transform: translateY(-3px);
}
.script-card h3 {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 800;
  color: var(--ink);
}
.script-card-summary {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.script-card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
}
.script-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.mini-tag {
  display: inline-block;
  padding: 2px 8px;
  font-size: 11px;
  color: var(--blue-deep);
  background: var(--blue-50);
  border: 1px solid var(--blue-light);
  border-radius: 999px;
}
.script-card-stats {
  white-space: nowrap;
}
.scripts-searchbar {
  margin: 16px 0 20px;
}
.scripts-searchbar input {
  width: 100%;
  max-width: 500px;
  padding: 12px 16px;
  font-size: 15px;
  border: 2px solid var(--line);
  border-radius: 10px;
  color: var(--ink);
  background: #fff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.scripts-searchbar input:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(137, 180, 250, 0.18);
}
.scripts-tagcloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}
.tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  font-size: 13px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  text-decoration: none;
  transition: all 0.15s ease;
}
.tag-chip:hover {
  border-color: var(--blue);
  background: var(--blue-50);
  color: var(--blue-deep);
}
.tag-chip.active {
  border-color: var(--blue-deep);
  background: var(--blue-deep);
  color: #fff;
}
.tag-chip .n {
  font-size: 11px;
  opacity: 0.7;
}
/* 剧本详情页结构化分节（§20.97 混放治理 + 详情页结构化） */
.script-structured {
  margin: 18px 0 8px;
}
.script-sec {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px 20px;
  margin-bottom: 14px;
}
.script-sec-title {
  margin: 0 0 10px;
  font-size: 16px;
  font-weight: 800;
  color: var(--blue-deep);
  display: flex;
  align-items: center;
  gap: 8px;
}
.script-sec-title::before {
  content: "";
  width: 4px;
  height: 16px;
  background: var(--blue);
  border-radius: 2px;
}
.script-sec-body {
  line-height: 1.85;
  color: #2b3340;
  white-space: pre-wrap;
  word-break: break-word;
}
.script-transcript {
  background: #fafbfc;
}
.script-transcript .script-paras {
  margin-top: 4px;
}
.scripts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}
@media (max-width: 700px) {
  .scripts-grid { grid-template-columns: 1fr; }
}
