/* ===== 文章详情 ===== */
.post-article { padding: 32px 0; }
.post-layout { display: grid; grid-template-columns: 1fr 280px; gap: 48px; }
.post-main { min-width: 0; }

/* 文章头部 */
.post-header { margin-bottom: 32px; }
.post-category-badge {
  display: inline-block; padding: 6px 16px; border-radius: 16px;
  font-size: 13px; border: 1px solid; font-weight: 500; margin-bottom: 16px;
}
.post-title { font-size: 2.2em; font-weight: 800; line-height: 1.3; margin-bottom: 16px; }
.post-meta { display: flex; gap: 20px; color: #64748b; font-size: 14px; flex-wrap: wrap; margin-bottom: 16px; }
.post-tags { display: flex; gap: 8px; flex-wrap: wrap; }
.post-tag {
  padding: 4px 12px; border-radius: 12px; font-size: 12px;
  background: rgba(139, 92, 246, 0.1); color: #8b5cf6; transition: all 0.2s;
}
.post-tag:hover { background: rgba(139, 92, 246, 0.2); }

/* 封面图 */
.post-cover { margin-bottom: 32px; border-radius: 16px; overflow: hidden; }
.post-cover img { width: 100%; object-fit: cover; }

/* 侧栏 */
.post-sidebar { position: sticky; top: 100px; align-self: start; }

/* TOC */
.toc {
  background: #1e293b; border-radius: 12px; padding: 20px;
  border: 1px solid #334155; margin-bottom: 24px;
}
.toc-title { font-size: 14px; font-weight: 700; margin-bottom: 12px; color: #f8fafc; }
.toc-nav { display: flex; flex-direction: column; gap: 4px; }
.toc-link {
  display: block; padding: 6px 12px; border-radius: 6px; font-size: 13px;
  color: #64748b; transition: all 0.15s; border-left: 2px solid transparent;
}
.toc-link:hover { color: #8b5cf6; background: rgba(139, 92, 246, 0.08); }
.toc-link.active { color: #8b5cf6; border-left-color: #8b5cf6; background: rgba(139, 92, 246, 0.1); }

/* 分享 */
.share-box {
  background: #1e293b; border-radius: 12px; padding: 20px;
  border: 1px solid #334155;
}
.share-title { font-size: 14px; font-weight: 700; margin-bottom: 12px; color: #f8fafc; }
.share-btn {
  width: 100%; padding: 10px; border: 1px solid #334155; border-radius: 8px;
  background: transparent; color: #94a3b8; font-size: 13px; cursor: pointer;
  transition: all 0.2s; font-family: inherit;
}
.share-btn:hover { border-color: #8b5cf6; color: #8b5cf6; }

/* 上一篇/下一篇 */
.post-nav {
  display: grid; grid-template-columns: 1fr 1fr; gap: 24px;
  margin-top: 48px; padding-top: 32px; border-top: 1px solid #1e293b;
}
.post-nav-item {
  padding: 20px; background: #1e293b; border-radius: 12px;
  border: 1px solid #334155; transition: all 0.2s;
}
.post-nav-item:hover { border-color: #8b5cf6; }
.post-nav-item.next { text-align: right; }
.nav-label { display: block; font-size: 12px; color: #64748b; margin-bottom: 8px; }
.nav-title { font-size: 15px; font-weight: 600; color: #f8fafc; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }

/* 相关文章 */
.related-posts { padding: 48px 0; }
.related-posts .container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }

/* 响应式 */
@media (max-width: 1024px) {
  .post-layout { grid-template-columns: 1fr 240px; gap: 32px; }
  .related-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .post-layout { grid-template-columns: 1fr; }
  .post-sidebar { display: none; }
  .post-title { font-size: 1.6em; }
  .post-nav { grid-template-columns: 1fr; }
  .post-nav-item.next { text-align: left; }
  .related-grid { grid-template-columns: 1fr; }
}
