@import url("../../../assets/css/column-header.css?v=20260843");
:root{--pc-container-width:100%;--pc-container-padding:16px;--pc-reading-width:100%;--pc-grid-gap:20px;}@media (min-width:1200px){:root{--pc-container-width:1000px;--pc-reading-width:780px;}}html{background:#f4f6fb;}
/* ===== 个人博客 · 简约风格 ===== */
* { box-sizing: border-box; }
body {
  margin: 0 auto;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  color: #1f2d3d;
  background: #f7f8fa;
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  max-width: var(--pc-container-width);
}
/* 主体撑满剩余高度，使页脚始终贴页面底部 */
main { flex: 1 0 auto; width: 100%; }
.container { max-width: var(--pc-container-width); margin: 0 auto; padding: 0 var(--pc-container-padding); }
a { color: #2563eb; text-decoration: none; }
a:hover { color: #1d4ed8; }

/* 顶部导航 / 空状态 见 ../../assets/css/column-header.css（@import 引入，各栏目共享） */
/* 列表 */
.blog-main { padding: 28px var(--pc-container-padding) 40px; }
/* 列表：宽屏 3 列，中等宽度 2 列，移动端 1 列 */
.blog-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
@media (max-width: 1000px) { .blog-list { grid-template-columns: repeat(2, 1fr); } }

/* 单列紧凑文章列表（标题行 + 日期/分类行） */
.blog-list-simple { list-style: none; margin: 0; padding: 0; }
.blog-list-item {
  display: block;
  padding: 11px 0;
  border-bottom: 1px solid #eceef2;
}
.blog-list-item:last-child { border-bottom: none; }
/* 第一行：标题 + 置顶标记 */
.blog-list-head {
  display: flex;
  align-items: center;
  gap: 6px;
}
.blog-list-title {
  font-size: 15px;
  font-weight: 600;
  color: #1a202c;
  text-decoration: none;
  line-height: 1.5;
}
.blog-list-title:hover { color: #2563eb; text-decoration: underline; }
/* 第二行：日期 + 分类 */
.blog-list-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 5px;
  font-size: 12.5px;
  color: #9aa3b2;
}
.blog-list-date {
  font-size: 12.5px;
  color: #9aa3b2;
  white-space: nowrap;
  flex-shrink: 0;
}
.blog-list-tags { display: inline-flex; gap: 4px; flex-shrink: 0; align-items: center; }
/* 分类胶囊 .blog-tag 的样式统一见下方「分类标签」区，避免重复定义冲突 */

/* 置顶标记 */
.blog-list-top {
  flex-shrink: 0;
  font-size: 11px;
  line-height: 1;
  color: #c0392b;
  background: #fdecea;
  border: 1px solid #f5c6c0;
  padding: 3px 6px;
  border-radius: 4px;
  font-weight: 600;
}

/* 每页条数切换（位于翻页按钮右侧） */
.blog-per {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #667085;
  margin: 0 0 0 14px;
}
@media (max-width: 520px) {
  .blog-per { margin-left: 0; }
}
.blog-per a,
.blog-per .blog-per-active {
  min-width: 26px;
  text-align: center;
  padding: 3px 8px;
  border-radius: 6px;
  text-decoration: none;
  color: #2563eb;
  background: #fff;
  border: 1px solid #eceef2;
}
.blog-per .blog-per-active {
  color: #fff;
  background: #2563eb;
  border-color: #2563eb;
  font-weight: 600;
}

/* 分页导航（« ‹ 页码 › »） */
.blog-pager-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 26px 0 4px;
  flex-wrap: wrap;
}
.blog-pager-nav .pg-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 34px;
  padding: 0 10px;
  font-size: 16px;
  line-height: 1;
  text-decoration: none;
  color: #334155;
  background: #fff;
  border: 1px solid #e3e8ef;
  border-radius: 8px;
  transition: all .15s ease;
}
.blog-pager-nav .pg-btn:hover { border-color: #2563eb; color: #2563eb; }
.blog-pager-nav .pg-btn.disabled {
  color: #c2c9d6;
  background: #f7f8fa;
  border-color: #eef0f4;
  cursor: default;
  pointer-events: none;
}
.blog-pager-nav .pg-info {
  font-size: 13px;
  color: #667085;
  padding: 0 6px;
  white-space: nowrap;
}
.blog-card {
  background: #fff;
  border: 1px solid #eceef2;
  border-radius: 12px;
  overflow: hidden;
  transition: box-shadow .15s ease, transform .15s ease;
}
.blog-card:hover { box-shadow: 0 8px 24px rgba(31,45,61,.08); transform: translateY(-2px); }
.blog-card-cover { display: block; height: 160px; overflow: hidden; background: #eef1f6; }
.blog-card-cover img { width: 100%; height: 100%; object-fit: cover; }
.blog-card-body { padding: 14px 16px 18px; }
.blog-card-title { font-size: 17px; margin: 0 0 6px; line-height: 1.4; }
.blog-card-title a { color: #1f2d3d; }
.blog-card-title a:hover { color: #2563eb; }
.blog-card-meta { font-size: 12px; color: #9aa3b2; margin: 0 0 8px; }
.blog-card-sum { font-size: 14px; color: #5b6675; margin: 0 0 10px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.blog-card-more { font-size: 13px; }

/* 详情：正文容器统一 1200px，内边距与字号同步放大 */
.blog-post { background: #fff; border: 1px solid #eceef2; border-radius: 12px; padding: 36px 44px; max-width: var(--pc-reading-width); margin: 0 auto; }
.blog-post-title { font-size: 28px; margin: 0 0 10px; line-height: 1.35; }
.blog-post-meta { font-size: 14px; color: #9aa3b2; margin: 0 0 20px; }
.blog-post-cover { width: 100%; height: auto; max-height: 420px; object-fit: cover; border-radius: 10px; margin-bottom: 20px; display: block; }
.blog-content { font-size: 16.5px; line-height: 1.85; color: #2b3a4d; word-break: break-word; }
.blog-content img { max-width: 100%; height: auto; border-radius: 8px; margin: 8px 0; display: block; }
.blog-content a { text-decoration: underline; }
.blog-content h1, .blog-content h2, .blog-content h3 { line-height: 1.4; margin: 22px 0 10px; }
.blog-content blockquote { margin: 14px 0; padding: 8px 16px; border-left: 4px solid #2563eb; background: #f1f5fd; color: #475569; border-radius: 0 8px 8px 0; }
.blog-content pre { background: #0f172a; color: #e2e8f0; padding: 14px 16px; border-radius: 8px; overflow: auto; }
.blog-content code { background: #eef1f6; padding: 2px 6px; border-radius: 4px; font-size: 14px; }
.blog-content pre code { background: transparent; padding: 0; }
.blog-back { margin-top: 24px; }

/* 底部 */
.blog-footer { width: 100%; max-width: var(--pc-container-width); margin: 36px auto 0; background: #1f2d3d; color: #c4ccd8; font-size: 13px; padding: 18px 0; text-align: center; flex-shrink: 0; }
.blog-footer a { color: #c4ccd8; }
.blog-footer a:hover { color: #fff; }

/* 上一篇 / 下一篇 文章导航（正文下方） */
.blog-pager { display: flex; justify-content: space-between; gap: 16px; margin: 28px 0 0; padding: 0; }
.blog-pager .pager-prev, .blog-pager .pager-next { flex: 1 1 0; min-width: 0; }
.blog-pager .pager-next { text-align: right; }
.blog-pager a { display: inline-block; max-width: 100%; color: #2563eb; font-size: 14px; font-weight: 500; text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: top; }
.blog-pager a:hover { text-decoration: underline; }
.blog-pager .pager-disabled { color: #9aa3b2; font-size: 13px; }

/* 分类标签 */
.blog-cats { display: flex; gap: 10px; flex-wrap: wrap; margin: 0 0 20px; }
.blog-cats a { font-size: 13px; color: #667085; padding: 5px 14px; background: #fff; border: 1px solid #eceef2; border-radius: 999px; transition: all .15s ease; }
.blog-cats a.active, .blog-cats a:hover { background: #2563eb; color: #fff; border-color: #2563eb; }
.blog-card-cats, .blog-post-cats { display: flex; gap: 6px; flex-wrap: wrap; }
.blog-card-cats { margin: 10px 0 0; }
.blog-tag { font-size: 12px; color: #2563eb; background: #eef3ff; padding: 2px 10px; border-radius: 999px; }
.blog-tag:hover { background: #2563eb; color: #fff; }
.blog-post-cats { font-size: 13px; margin: 6px 0 16px; }

/* 评论区 */
.blog-comments { margin-top: 30px; border-top: 1px solid #eceef2; padding-top: 22px; }
.blog-comments-title { font-size: 18px; margin: 0 0 16px; }
.blog-comments-title .count { color: #9aa3b2; font-weight: 400; }
.comment-list { margin-bottom: 24px; }
.comment-item { padding: 13px 0; border-bottom: 1px dashed #eef1f6; }
.comment-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.comment-nick { font-weight: 600; color: #1f2d3d; font-size: 14px; }
.comment-time { font-size: 12px; color: #9aa3b2; }
.comment-body { margin: 0; font-size: 15px; color: #2b3a4d; white-space: pre-wrap; word-break: break-word; }
.blog-comment-empty { color: #9aa3b2; font-size: 14px; padding: 6px 0 14px; }

/* 评论管理（仅管理员 / 授权用户可见的操作区） */
.comment-actions { display: flex; gap: 8px; margin-top: 8px; }
.cact { font-size: 12px; padding: 3px 12px; border: 1px solid #d6dce6; background: #f7f9fc; color: #51607a; border-radius: 6px; cursor: pointer; }
.cact:hover { background: #eef2f8; }
.cact-del { color: #c0392b; border-color: #f0c9c4; background: #fdf3f2; }
.cact-del:hover { background: #fbe6e3; }
.reply-form { margin-top: 10px; }
/* 防御：确保 hidden 属性始终生效（避免任何全局 form{} 规则覆盖） */
.reply-form[hidden] { display: none !important; }
.reply-form textarea { width: 100%; box-sizing: border-box; min-height: 70px; padding: 9px 12px; border: 1px solid #dcdcdc; border-radius: 8px; font-size: 14px; resize: vertical; font-family: inherit; }
.reply-actions { margin-top: 8px; display: flex; gap: 10px; }
.comment-reply { margin-top: 10px; padding: 10px 12px; background: #f3f8ff; border: 1px solid #d8e6fb; border-radius: 8px; font-size: 14px; color: #2b3a4d; }
.comment-reply-label { color: #2563eb; font-weight: 600; margin-right: 4px; }
.comment-reply-body { white-space: pre-wrap; word-break: break-word; }

.comment-form-title { font-size: 15px; margin: 0 0 10px; color: #334; }
.comment-fields { margin-bottom: 8px; }
.cf-nick { width: 240px; max-width: 100%; box-sizing: border-box; padding: 9px 12px; border: 1px solid #dcdcdc; border-radius: 8px; font-size: 14px; }
.cf-content { width: 100%; box-sizing: border-box; min-height: 92px; padding: 10px 12px; border: 1px solid #dcdcdc; border-radius: 8px; font-size: 14px; resize: vertical; font-family: inherit; }
.cf-actions { margin-top: 10px; display: flex; align-items: center; gap: 14px; }
.cf-submit { padding: 9px 22px; background: #2563eb; color: #fff; border: 0; border-radius: 8px; font-size: 14px; cursor: pointer; }
.cf-submit:hover { background: #1d4ed8; }
.cf-msg { font-size: 13px; }

/* 响应式：移动端单列 */
@media (max-width: 720px) {
  .blog-list { grid-template-columns: 1fr; }
  .blog-post { padding: 20px 18px; }
  .blog-post-title { font-size: 22px; }
  .cf-nick { width: 100%; }
}

/* ===== PC 端：容器统一 1000px =====
   阅读宽度由 --pc-reading-width 收窄至 780px，正文内边距与封面高度同步收缩，
   使正文在 1000px 容器内保持协调留白（不随容器一起挤到边缘）。 */
@media (min-width: 1200px) {
  .blog-post { padding: 32px 40px; }
  .blog-post-title { font-size: 26px; }
  .blog-post-cover { max-height: 380px; }
  .blog-comments { margin-top: 26px; }
}

/* ===== 返回顶部按钮（仅博客文章页，固定贴右下角，滚动超阈值后显示） ===== */
.blog-totop {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 60;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: rgba(31, 45, 61, .72);
  color: #fff;
  font-size: 18px;
  line-height: 40px;
  text-align: center;
  padding: 0;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(31, 45, 61, .25);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity .25s ease, transform .25s ease, background .15s ease;
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}
.blog-totop:hover { background: rgba(31, 45, 61, .92); }
.blog-totop:active { transform: translateY(0) scale(.94); }
.blog-totop.show { opacity: 1; visibility: visible; transform: translateY(0); }
@media (max-width: 520px) {
  .blog-totop { right: 12px; bottom: 12px; width: 36px; height: 36px; font-size: 16px; line-height: 36px; }
}
