/* ===== 详情页（上下滑动浏览） ===== */
.detail-page { padding-top: 100px; }
.detail-wrap { max-width: 860px; }
.detail-back { display: inline-block; font-size: 13px; color: var(--text); margin-bottom: 26px; transition: color .25s; }
.detail-back:hover { color: var(--title); }
.detail-head { padding: 6px 0 26px; border-bottom: 1px solid var(--line); }
.detail-head h1 { font-size: 28px; letter-spacing: .12em; line-height: 1.5; }
.detail-lead { margin-top: 14px; font-size: 15px; color: var(--text); }
.detail-date { display: inline-block; margin-top: 14px; font-size: 12px; opacity: .55; letter-spacing: .1em; }
.detail-cover { margin-top: 36px; border-radius: 8px; overflow: hidden; background: var(--card); }
.detail-cover img { width: 100%; }
.detail-content { margin-top: 34px; font-size: 15px; line-height: 2.1; }
.detail-content p { margin-bottom: 18px; }

.gallery-title { margin: 50px 0 22px; display: flex; align-items: baseline; gap: 14px; font-size: 13px; }
.gallery-title span { font-size: 18px; color: var(--title); letter-spacing: .2em; }
.detail-gallery { display: flex; flex-direction: column; gap: 26px; }
.gallery-item { border-radius: 8px; overflow: hidden; background: var(--card); }
.gallery-item img { width: 100%; }

.detail-end { margin: 56px 0 34px; text-align: center; }
.detail-end span { font-size: 12px; letter-spacing: .4em; opacity: .4; }
.detail-back-bottom { margin-bottom: 20px; }

/* ===== 详情页分类标签 ===== */
.detail-cat-tag {
  display: inline-block;
  margin-bottom: 12px;
  padding: 3px 12px;
  font-size: 12px;
  letter-spacing: .15em;
  color: var(--orange);
  border: 1px solid rgba(192, 99, 47, .6);
  border-radius: 3px;
  background: rgba(192, 99, 47, .08);
}

/* ===== 富文本正文（与编辑器输出对应） ===== */
.detail-content h2 {
  font-size: 20px;
  margin: 34px 0 14px;
  padding-left: 12px;
  border-left: 3px solid var(--orange);
  letter-spacing: .1em;
}
.detail-content h3 { font-size: 17px; margin: 26px 0 12px; letter-spacing: .08em; }
.detail-content ul,
.detail-content ol { margin: 0 0 18px; padding-left: 1.8em; }
.detail-content li { margin-bottom: 8px; }
.detail-content ul li::marker { color: var(--orange); }
.detail-content ol li::marker { color: var(--orange); }
.detail-content img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 24px 0;
  background: var(--card);
}
.detail-content strong { color: var(--title); font-weight: 600; }
.detail-content em { color: var(--orange-lt); }
.detail-content a { color: var(--orange-lt); border-bottom: 1px solid rgba(192, 99, 47, .5); }
.detail-content h1 { font-size: 23px; margin: 32px 0 14px; letter-spacing: .1em; }
.detail-content h4 { font-size: 16px; margin: 24px 0 10px; letter-spacing: .06em; }
.detail-content h5 { font-size: 15px; margin: 22px 0 10px; letter-spacing: .05em; }
.detail-content u { text-underline-offset: 3px; }
.detail-content blockquote {
  margin: 24px 0;
  padding: 10px 20px;
  border-left: 3px solid var(--blue);
  background: rgba(58, 90, 140, .12);
  color: var(--text);
}
.detail-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 20px;
  font-size: 14px;
  display: block;
  overflow-x: auto;
}
.detail-content th, .detail-content td { border: 1px solid var(--line); padding: 8px 12px; white-space: nowrap; }
.detail-content th { background: rgba(192, 99, 47, .1); color: var(--title); font-weight: 600; }
.detail-content hr { border: 0; height: 1px; background: var(--line); margin: 30px 0; }
.detail-content code { background: rgba(58, 90, 140, .12); padding: 2px 6px; border-radius: 3px; font-size: 13px; font-family: Consolas, Menlo, monospace; }
.detail-content pre { background: rgba(58, 90, 140, .08); border: 1px solid var(--line); border-radius: 6px; padding: 14px 16px; overflow-x: auto; margin: 0 0 18px; }
.detail-content pre code { background: none; padding: 0; font-size: 13px; }

/* ===== 相关推荐 ===== */
.detail-related { margin-top: 60px; }
.related-title {
  font-size: 18px;
  letter-spacing: .2em;
  margin-bottom: 22px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.related-title::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.related-card {
  background: var(--card);
  border-radius: 6px;
  overflow: hidden;
  transition: transform .3s ease, box-shadow .3s ease;
}
.related-card:hover { transform: translateY(-4px); box-shadow: 0 10px 24px rgba(0, 0, 0, .3); }
.related-cover { aspect-ratio: 4/3; overflow: hidden; background: #171310; }
.related-cover img { width: 100%; height: 100%; object-fit: cover; }
.related-cover.cover-fallback { display: flex; align-items: center; justify-content: center; }
.related-cover.cover-fallback span { font-size: 32px; color: var(--orange); opacity: .45; }
.related-info { padding: 12px 14px 16px; }
.related-info h4 {
  font-size: 14px;
  letter-spacing: .05em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.related-info p {
  margin-top: 5px;
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ===== 上一篇 / 下一篇 ===== */
.prev-next {
  margin-top: 44px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  border-top: 1px solid var(--line);
  padding-top: 26px;
}
.pn-link {
  display: flex;
  flex-direction: column;
  gap: 5px;
  max-width: 48%;
  font-size: 13px;
  color: var(--text);
  transition: color .25s;
}
.pn-link b {
  font-size: 14px;
  font-weight: 400;
  color: var(--title);
  letter-spacing: .05em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pn-link:hover { color: var(--orange); }
.pn-link:hover b { color: var(--orange-lt); }
.pn-next { text-align: right; margin-left: auto; }
.pn-empty { visibility: hidden; }

@media (max-width: 600px) {
  .detail-page { padding-top: 86px; }
  .detail-head h1 { font-size: 22px; }
  .detail-content { font-size: 14px; }
  .detail-gallery { gap: 16px; }
  .detail-cover, .gallery-item { border-radius: 6px; }
  .related-grid { grid-template-columns: 1fr; gap: 14px; }
  .prev-next { flex-direction: column; gap: 14px; }
  .pn-link { max-width: 100%; }
  .pn-next { text-align: left; margin-left: 0; }
}
