/* ============ 模板6：百度百科词条风（真实复刻）============ */

/* —— 全局 —— */
body.template-baike {
  background: #fff;
  color: #333;
  font-family: Arial,"Microsoft YaHei","微软雅黑",sans-serif;
  font-size: 14px;
  line-height: 1.6;
}
body.template-baike * { box-sizing: border-box; }
body.template-baike a { color: #2440b3; text-decoration: none; }
body.template-baike a:hover { text-decoration: underline; }

/* —— 顶部百科导航条（仿百度百科顶栏）—— */
body.template-baike .site-header {
  background: #fff;
  border-bottom: 1px solid #e5e5e5;
  box-shadow: none;
  padding: 0;
  height: 50px;
}
body.template-baike .header-inner {
  max-width: 1210px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  height: 50px;
  gap: 20px;
}
body.template-baike .logo {
  background: #2a67d0;
  color: #fff;
  font-size: 20px;
  font-weight: 700;
  padding: 6px 10px;
  border-radius: 2px;
  letter-spacing: 1px;
  font-family: Arial,"Microsoft YaHei",sans-serif;
  flex-shrink: 0;
  line-height: 1;
}
body.template-baike .logo em {
  font-style: normal;
  font-size: 11px;
  font-weight: 400;
  display: inline-block;
  margin-left: 4px;
  vertical-align: middle;
  opacity: .9;
}
body.template-baike .header-search {
  flex: 1;
  display: flex;
  max-width: 560px;
  height: 32px;
  border: 2px solid #2a67d0;
  border-radius: 0;
}
body.template-baike .header-search input {
  flex: 1;
  border: none;
  padding: 0 10px;
  font-size: 13px;
  outline: none;
  height: 100%;
  background: #fff;
  color: #333;
}
body.template-baike .header-search button {
  background: #2a67d0;
  color: #fff;
  border: none;
  width: 76px;
  font-size: 13px;
  cursor: pointer;
  height: 100%;
}
body.template-baike .header-search button:hover { background: #1e56b8; }
body.template-baike .header-tools {
  display: flex;
  gap: 14px;
  font-size: 13px;
  color: #333;
  flex-shrink: 0;
}
body.template-baike .header-tools a { color: #333; }

/* —— 主导航（百科页其实没有这条深色主导航；为兼容现有锚点我们做浅色条目版）—— */
body.template-baike .main-nav-wrap {
  background: #f5f5f5;
  border-bottom: 1px solid #e5e5e5;
  padding: 0;
}
body.template-baike .main-nav {
  max-width: 1210px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  height: 38px;
  align-items: center;
  overflow-x: auto;
}
body.template-baike .main-nav a {
  color: #555;
  font-size: 13px;
  padding: 0 14px;
  height: 38px;
  line-height: 38px;
  display: inline-block;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}
body.template-baike .main-nav a:hover { color: #2a67d0; text-decoration: none; background: transparent; }
body.template-baike .main-nav a.active {
  color: #2a67d0;
  border-bottom-color: #2a67d0;
  background: transparent;
  font-weight: normal;
}

/* —— 主体容器 —— */
body.template-baike .main-wrapper {
  max-width: 1210px;
  margin: 0 auto;
  padding: 0 20px;
  background: #fff;
}
body.template-baike .main-content {
  padding: 18px 0 50px 0;
  background: #fff;
}

/* —— Hero 区 → 百科词条头部 + 摘要信息卡 —— */
body.template-baike .hero {
  background: #fff;
  color: #333;
  padding: 0 0 10px 0;
  border: none;
  margin-bottom: 0;
  position: relative;
}
body.template-baike .hero-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  border-bottom: 1px solid #e5e5e5;
  padding-bottom: 8px;
  margin-bottom: 10px;
}
body.template-baike .hero-left { flex: 1; min-width: 0; }
body.template-baike .hero-tools {
  display: flex;
  gap: 14px;
  font-size: 12px;
  color: #999;
  margin-top: 12px;
  flex-shrink: 0;
}
body.template-baike .hero-tools span {
  cursor: pointer;
}
body.template-baike .hero-tools span:hover { color: #2a67d0; }
body.template-baike .hero-title {
  font-size: 30px;
  font-weight: 700;
  color: #222;
  line-height: 1.25;
  font-family: Arial,"Microsoft YaHei",sans-serif;
  margin: 18px 0 6px 0;
  border: none;
  padding: 0;
  letter-spacing: 0;
}
body.template-baike .hero-meta {
  font-size: 12px;
  color: #999;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
body.template-baike .hero-meta .tag {
  background: #eff3fb;
  color: #2a67d0;
  padding: 1px 6px;
  font-size: 12px;
  border-radius: 2px;
  display: inline-block;
}

/* Hero 不再是大图 banner——把 banner 图变成右侧「词条概述图」信息卡 */
body.template-baike .hero-body {
  display: flex;
  gap: 20px;
  padding: 8px 0 0 0;
  align-items: flex-start;
}
body.template-baike .hero-desc {
  flex: 1;
  font-size: 14px;
  color: #333;
  line-height: 1.7;
  margin: 0;
  padding: 0;
  text-indent: 2em;
  font-weight: 400;
}
body.template-baike .hero-btn { display: none; }
body.template-baike .hero-img-card {
  width: 240px;
  flex-shrink: 0;
  border: 1px solid #e5e5e5;
  background: #fbfbfb;
  padding: 4px;
  text-align: center;
}
body.template-baike .hero-img-card img {
  width: 100%;
  height: auto;
  display: block;
}
body.template-baike .hero-img-card .cap {
  font-size: 12px;
  color: #999;
  padding: 4px 0 2px 0;
}

/* 没有 hero 背景图 */
body.template-baike .hero {
  background-image: none !important;
}

/* —— 正文区（百科段落）—— */
body.template-baike .article-content {
  font-size: 14px;
  line-height: 1.7;
  color: #333;
  padding: 0;
  background: #fff;
}
body.template-baike .article-content > p,
body.template-baike .article-content .para {
  font-size: 14px;
  line-height: 1.7;
  color: #333;
  margin: 8px 0;
  text-indent: 2em;
}
body.template-baike .article-content strong { color: #222; font-weight: 700; }
body.template-baike .article-content em { font-style: italic; color: #333; }

/* —— H2：百科二级标题「背景设定 [编辑][播报]」风格 —— */
body.template-baike .article-content h2 {
  font-size: 22px;
  font-weight: 700;
  color: #222;
  margin: 25px 0 10px 0;
  padding: 0 0 6px 0;
  border: none;
  border-bottom: 1px solid #d9d9d9;
  font-family: Arial,"Microsoft YaHei",sans-serif;
  background: transparent;
  position: relative;
  line-height: 1.3;
  text-align: left;
}
body.template-baike .article-content h2:before { display: none; }
body.template-baike .article-content h2 .h2-tools {
  font-size: 12px;
  font-weight: 400;
  color: #999;
  margin-left: 10px;
  vertical-align: middle;
  display: inline-block;
}
body.template-baike .article-content h2 .h2-tools::before {
  content: " ";
  margin-right: 2px;
}
body.template-baike .article-content h2 .h2-tools a {
  color: #999;
  font-size: 12px;
  margin: 0 3px;
}
body.template-baike .article-content h2 .h2-tools a:first-child { margin-left: 4px; }
body.template-baike .article-content h2 .h2-tools a:hover { color: #2a67d0; text-decoration: none; }

/* —— H3：百科三级标题「职业/幻兽/武器装备」—— */
body.template-baike .article-content h3 {
  font-size: 16px;
  font-weight: 700;
  color: #222;
  margin: 18px 0 8px 0;
  padding: 0 0 0 10px;
  border: none;
  border-left: 4px solid #2a67d0;
  font-family: Arial,"Microsoft YaHei",sans-serif;
  line-height: 1.2;
  background: transparent;
  border-radius: 0;
}
body.template-baike .article-content h3:before { display: none; }

/* —— 目录（百科词条顶部「目录」卡片）—— */
body.template-baike .toc-section {
  border: 1px solid #e5e5e5;
  background: #fff;
  margin: 14px 0;
  padding: 0;
  border-radius: 0;
  box-shadow: none;
}
body.template-baike .toc-head {
  background: #f7f7f7;
  padding: 6px 14px;
  font-size: 15px;
  font-weight: 700;
  color: #222;
  border-bottom: 1px solid #e5e5e5;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
body.template-baike .toc-head .toggle {
  font-size: 12px;
  color: #2a67d0;
  cursor: pointer;
  font-weight: 400;
}
body.template-baike .toc-list {
  padding: 8px 14px 10px 14px;
  margin: 0;
  list-style: none;
  column-count: 2;
  column-gap: 30px;
}
body.template-baike .toc-list li {
  font-size: 14px;
  line-height: 1.9;
  padding-left: 0;
  break-inside: avoid;
}
body.template-baike .toc-list li:before {
  content: counter(toc) " ";
  counter-increment: toc;
  color: #2a67d0;
  font-family: Georgia,serif;
  margin-right: 6px;
  font-size: 13px;
}
body.template-baike .toc-list { counter-reset: toc; }
body.template-baike .toc-list li a { color: #2440b3; font-size: 14px; }

/* —— 引用块 —— */
body.template-baike .article-content blockquote {
  background: #f8f8f8;
  border-left: 3px solid #d9d9d9;
  margin: 10px 0;
  padding: 10px 14px;
  color: #666;
  font-size: 13px;
  border-radius: 0;
}
body.template-baike .article-content blockquote p { text-indent: 0; margin: 0; color: #666; }

/* —— 代码（百科几乎不用，简单处理）—— */
body.template-baike .article-content code {
  background: #f5f5f5;
  padding: 1px 4px;
  font-size: 13px;
  color: #c7254e;
  border-radius: 2px;
  font-family: Consolas,Monaco,monospace;
}
body.template-baike .article-content pre {
  background: #f5f5f5;
  padding: 10px;
  border: 1px solid #e5e5e5;
  overflow-x: auto;
  font-size: 13px;
  border-radius: 0;
}

/* —— 列表 —— */
body.template-baike .article-content ul,
body.template-baike .article-content ol {
  margin: 8px 0 8px 26px;
  padding: 0;
}
body.template-baike .article-content li {
  font-size: 14px;
  line-height: 1.8;
  margin-bottom: 2px;
}
body.template-baike .article-content li p { text-indent: 0; margin: 0; }

/* —— 表格：百科式浅灰边+斑马纹+表头灰底 —— */
body.template-baike .table-wrap { overflow-x: auto; margin: 10px 0; }
body.template-baike .article-content table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid #e5e5e5;
  background: #fff;
  margin: 8px 0;
  font-size: 13px;
  table-layout: auto;
}
body.template-baike .article-content th {
  background: #f5f5f5;
  color: #222;
  font-weight: 700;
  padding: 8px 10px;
  border: 1px solid #e5e5e5;
  text-align: left;
  font-size: 13px;
}
body.template-baike .article-content td {
  background: #fff;
  color: #333;
  padding: 7px 10px;
  border: 1px solid #e5e5e5;
  font-size: 13px;
  line-height: 1.7;
  vertical-align: top;
}
body.template-baike .article-content tr:nth-child(even) td { background: #fafafa; }
body.template-baike .article-content td:first-child,
body.template-baike .article-content th:first-child { font-weight: 700; color: #222; white-space: nowrap; width: 90px; }

/* —— 正文中的图片（百科里图片右浮动/居中，图下灰色小字说明）—— */
body.template-baike .content-img {
  margin: 8px 0 8px 16px;
  background: #fff;
  padding: 0;
  border: 1px solid #e5e5e5;
  border-radius: 0;
  box-shadow: none;
  width: 260px;
  float: right;
}
body.template-baike .content-img.img-left { float: left; margin: 8px 16px 8px 0; }
body.template-baike .content-img:nth-of-type(even) { float: left; margin: 8px 16px 8px 0; }
body.template-baike .content-img img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 0;
  margin: 0;
}
body.template-baike .content-img .caption {
  font-size: 12px;
  color: #999;
  text-align: center;
  padding: 4px 6px 6px 6px;
  line-height: 1.4;
  text-indent: 0;
}
body.template-baike .content-block {
  overflow: hidden; /* 清浮动 */
  margin-bottom: 10px;
}

/* —— 词条图册（图集区）—— */
body.template-baike .gallery-section {
  margin: 24px 0 10px 0;
  padding: 0;
  border-top: 1px solid #e5e5e5;
}
body.template-baike .gallery-section h2 {
  font-size: 22px;
  font-weight: 700;
  color: #222;
  border-bottom: 1px solid #d9d9d9;
  margin: 25px 0 10px 0;
  padding: 0 0 6px 0;
  background: transparent;
  text-align: left;
  position: static;
  transform: none;
  display: block;
}
body.template-baike .gallery-section h2:before { display: none; }
body.template-baike .gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  padding: 6px 0 0 0;
}
body.template-baike .gallery-item {
  border: 1px solid #e5e5e5;
  padding: 3px;
  background: #fbfbfb;
  border-radius: 0;
  box-shadow: none;
  transition: border-color .2s;
}
body.template-baike .gallery-item:hover { border-color: #2a67d0; transform: none; }
body.template-baike .gallery-item img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  display: block;
  border-radius: 0;
}
body.template-baike .gallery-item .caption {
  font-size: 12px;
  color: #999;
  text-align: center;
  padding: 4px 2px;
  line-height: 1.4;
  text-indent: 0;
}

/* —— FAQ 区块（百科「参考资料/TA说」风格）—— */
body.template-baike .faq-section {
  margin: 24px 0 10px 0;
  padding: 0;
  border-top: 1px solid #e5e5e5;
}
body.template-baike .faq-section h2 {
  font-size: 22px;
  font-weight: 700;
  color: #222;
  border-bottom: 1px solid #d9d9d9;
  margin: 25px 0 10px 0;
  padding: 0 0 6px 0;
  background: transparent;
  text-align: left;
  position: static;
  transform: none;
  display: block;
}
body.template-baike .faq-item {
  padding: 10px 0;
  border-bottom: 1px dashed #eee;
}
body.template-baike .faq-q {
  font-weight: 700;
  color: #222;
  font-size: 14px;
  margin-bottom: 4px;
}
body.template-baike .faq-q:before { content: "Q："; color: #2a67d0; font-weight: 700; }
body.template-baike .faq-a {
  font-size: 14px;
  color: #333;
  line-height: 1.7;
  padding-left: 24px;
  text-indent: 0;
}

/* —— 友链区块：百科页脚「相关词条/相关搜索」风格 —— */
body.template-baike .links-section {
  margin: 24px 0 0 0;
  padding: 14px 0;
  border-top: 1px solid #e5e5e5;
  border-bottom: 1px solid #e5e5e5;
}
body.template-baike .links-section h2 {
  font-size: 15px;
  font-weight: 700;
  color: #222;
  border: none;
  padding: 0;
  margin: 0 0 8px 0;
  background: transparent;
  text-align: left;
}
body.template-baike .links-section h2:before { display: none; }
body.template-baike .footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  border: none;
  padding: 0;
}
body.template-baike .footer-links a {
  color: #2440b3;
  font-size: 13px;
  padding: 0;
  border: none;
  background: transparent;
}

/* —— CTA 在百科模板隐藏（百科没有这个）—— */
body.template-baike .cta-section { display: none; }

/* —— 页脚：浅灰仿百度页脚 —— */
body.template-baike .site-footer {
  background: #f5f5f5;
  color: #999;
  padding: 20px 0;
  border-top: 1px solid #e5e5e5;
  font-size: 12px;
  margin-top: 20px;
}
body.template-baike .footer-inner {
  max-width: 1210px;
  margin: 0 auto;
  padding: 0 20px;
  text-align: center;
}
body.template-baike .footer-nav {
  font-size: 12px;
  color: #999;
  margin-bottom: 6px;
}
body.template-baike .footer-nav a { color: #999; margin: 0 8px; font-size: 12px; }
body.template-baike .footer-nav a:hover { color: #2a67d0; }

/* —— 分隔线 —— */
body.template-baike .article-content hr {
  border: none;
  border-top: 1px solid #e5e5e5;
  margin: 18px 0;
}

/* —— 锚点跳转留顶部空间 —— */
body.template-baike [id] { scroll-margin-top: 50px; }

/* —— 响应式 —— */
@media (max-width: 768px) {
  body.template-baike .header-inner { gap: 8px; padding: 0 12px; }
  body.template-baike .header-tools { display: none; }
  body.template-baike .header-search { max-width: none; }
  body.template-baike .logo { font-size: 16px; padding: 5px 8px; }
  body.template-baike .logo em { display: none; }
  body.template-baike .main-wrapper { padding: 0 12px; }
  body.template-baike .hero-top { flex-direction: column; }
  body.template-baike .hero-tools { margin-top: 6px; }
  body.template-baike .hero-title { font-size: 24px; }
  body.template-baike .hero-body { flex-direction: column-reverse; }
  body.template-baike .hero-img-card { width: 100%; margin-bottom: 10px; }
  body.template-baike .content-img,
  body.template-baike .content-img.img-left,
  body.template-baike .content-img:nth-of-type(even) { float: none; width: 100%; margin: 8px 0; }
  body.template-baike .gallery-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  body.template-baike .toc-list { column-count: 1; }
  body.template-baike .article-content table { font-size: 12px; }
  body.template-baike .article-content th,
  body.template-baike .article-content td { padding: 5px 6px; }
  body.template-baike .article-content td:first-child,
  body.template-baike .article-content th:first-child { width: auto; white-space: normal; }
  body.template-baike .article-content { font-size: 14px; }
  body.template-baike .article-content h2 { font-size: 18px; }
  body.template-baike .article-content h3 { font-size: 15px; }
}

/* ============ 多义词条切换条 ============ */
body.template-baike .poly-disambig {
    background:#f5f5f5; border-bottom:1px solid #e5e5e5; padding:8px 0;
    font-size:12px; color:#666; line-height:1.8;
}
body.template-baike .poly-disambig .container { display:flex; flex-wrap:wrap; gap:8px 12px; align-items:flex-start; max-width:1200px; }
body.template-baike .poly-label { color:#999; flex-shrink:0; padding-top:1px; }
body.template-baike .poly-list { display:flex; flex-wrap:wrap; gap:6px 14px; }
body.template-baike .poly-list a { color:#2440b3; text-decoration:none; }
body.template-baike .poly-list a:hover { text-decoration:underline; }
body.template-baike .poly-list a.active { color:#222; font-weight:700; }

/* ============ 词条头部：文字块+右侧栏（概述图+信息框） ============ */
/* 原 .hero-body 已是 flex 布局（display:flex; gap:20px; padding:8px 0 0; align-items:flex-start），
   这里只需把描述包一层 .hero-text 占满剩余空间，右侧 .hero-side 承载概述图+infobox */
body.template-baike .hero-text { flex:1; min-width:0; }
body.template-baike .hero-side { width:240px; flex-shrink:0; }
/* 概述图卡去掉原来写死的 width:240px/padding，由 .hero-side 控制宽度 */
body.template-baike .hero-img-card { width:100%; margin-bottom:10px; box-sizing:border-box; }
body.template-baike .hero-img-card img { width:100%; height:auto; }

/* ============ Infobox 信息框（右侧概述图下方） ============ */
body.template-baike .infobox-table {
    width:100%; border-collapse:collapse; border:1px solid #e5e5e5; font-size:12px; line-height:1.8; background:#fff;
}
body.template-baike .infobox-table th {
    background:#f5f5f5; text-align:right; font-weight:400; color:#555;
    padding:5px 8px; width:68px; border:1px solid #e5e5e5; vertical-align:top;
}
body.template-baike .infobox-table td {
    padding:5px 8px; border:1px solid #e5e5e5; color:#333; vertical-align:top;
}

/* ============ 正文参考资料角标 ============ */
body.template-baike .ref-mark { font-size:11px; vertical-align:super; line-height:1; margin:0 1px; }
body.template-baike .ref-mark a { color:#2a67d0; text-decoration:none; font-weight:400; }
body.template-baike .ref-mark a:hover { text-decoration:underline; }

/* ============ 文末参考资料列表 ============ */
body.template-baike .ref-section h2 { font-size:22px; font-weight:700; margin:30px 0 14px; padding-bottom:8px; border-bottom:1px solid #e5e5e5; }
body.template-baike .ref-list { list-style:none; padding:0; margin:0; counter-reset:refcnt; font-size:13px; line-height:1.8; }
body.template-baike .ref-list li { padding:5px 0; padding-left:36px; position:relative; color:#555; }
body.template-baike .ref-list .ref-index { position:absolute; left:0; top:5px; width:32px; text-align:right; color:#999; }
body.template-baike .ref-list a { color:#2440b3; text-decoration:none; }
body.template-baike .ref-list a:hover { text-decoration:underline; }
body.template-baike .ref-list .ref-site { color:#999; margin-left:4px; }
body.template-baike .ref-list .ref-back {
    display:inline-block; margin-left:6px; color:#999; font-size:12px; text-decoration:none;
    width:18px; height:18px; line-height:18px; text-align:center; border:1px solid #ddd; border-radius:3px;
}
body.template-baike .ref-list .ref-back:hover { background:#2440b3; color:#fff; border-color:#2440b3; }

/* ============ 小屏自适应：信息框下移，图片宽度变100% ============ */
@media (max-width:768px) {
    body.template-baike .hero-body { flex-direction:column; padding:10px; }
    body.template-baike .hero-side { width:100%; order:-1; margin-bottom:12px; }
    body.template-baike .hero-img-card img { width:100%; height:auto; max-height:360px; }
    body.template-baike .infobox-table th { width:80px; }
}
