/* ===== 留白AI 预览站自定义样式 ===== */

/* 首页顶部：横幅整图完整显示（contain），绝不放大裁切书法 */
#page-header.full_page {
  height: 400px !important;
  background-size: contain !important;
  background-position: center calc(50% + 30px) !important;  /* 导航 60px 压在图上，视觉中心下移 30px 才真正居中 */
  background-repeat: no-repeat !important;
  background-attachment: scroll !important;   /* 主题默认 fixed 会按视口尺寸缩放，导致只露出字的底部 */
  background-color: #f3f3f3 !important;
}
#page-header.full_page #site-info {
  top: 50% !important;
  transform: translateY(-50%);
  padding: 0 20px;
}
#page-header.full_page #site-title {
  font-size: 2.6rem;
  letter-spacing: 2px;
}
#page-header.full_page #site-subtitle {
  font-size: 1rem;
  opacity: .9;
  margin-top: 6px;
}

@media screen and (max-width: 768px) {
  #page-header.full_page {
    height: 230px !important;
  }
  #page-header.full_page #site-title {
    font-size: 1.9rem;
  }
}

/* 首页卡片：封面不裁切，竖图居中 */
.recent-post-item .post_cover {
  overflow: hidden;
  background: linear-gradient(160deg, #f5f7fa 0%, #e9edf3 100%);
}
/* 首页文章标题：参照正文粗体标题效果（2026-11-06 定稿） */
.recent-post-item > .article-title {
  font-size: 1.2em !important;
  font-weight: 600 !important;
  letter-spacing: .2px;
}
.recent-post-item .post_cover img.post-bg {
  object-fit: cover !important;
  width: 100% !important;
  height: 100% !important;
}
.recent-post-item {
  border-radius: 10px;
  box-shadow: 0 2px 12px rgba(17, 24, 39, .06);
  transition: box-shadow .25s ease, transform .25s ease;
}
.recent-post-item:hover {
  box-shadow: 0 8px 28px rgba(17, 24, 39, .12);
  transform: translateY(-2px);
}
.recent-post-info .article-meta-wrap {
  color: #8a94a6;
}

/* 文章页内嵌封面：与正文图片同宽显示，尺寸风格统一 */
.lb-cover {
  margin: 0 0 26px;
}
.lb-cover img {
  max-width: 100%;
  width: auto;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 8px 26px rgba(17, 24, 39, .10);
}

/* 正文图片自适应，禁止横向溢出 */
#article-container img {
  max-width: 100%;
  height: auto;
}
#article-container {
  font-size: 16px;
  line-height: 1.85;
  color: #2c3441;
  word-break: break-word;
}

/* 文末返回导航 */
.lb-post-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 34px 0 10px;
  padding-top: 20px;
  border-top: 1px dashed #e3e8ef;
}
.lb-post-nav a {
  display: inline-block;
  padding: 8px 20px;
  border-radius: 999px;
  background: #1e80ff;
  color: #fff !important;
  font-size: 14px;
  line-height: 1.4;
  text-decoration: none;
  transition: opacity .2s ease;
}
.lb-post-nav a:last-child {
  background: #64748b;
}
.lb-post-nav a:hover {
  opacity: .85;
}

/* 暗色模式 */
[data-theme="dark"] .recent-post-item .post_cover {
  background: linear-gradient(160deg, #1c2430 0%, #141a23 100%);
}
[data-theme="dark"] #article-container {
  color: #c9d1d9;
}
[data-theme="dark"] .lb-post-nav {
  border-top-color: #2b3543;
}
[data-theme="dark"] .recent-post-item {
  box-shadow: 0 2px 12px rgba(0, 0, 0, .35);
}

/* 移动端防溢出 */
.recent-post-item > * {
  min-width: 0;
  max-width: 100%;
}
.recent-post-info .article-title,
.recent-post-info .content {
  overflow-wrap: anywhere;
  word-break: break-word;
  max-width: 100%;
}
@media screen and (max-width: 768px) {
  .recent-post-item {
    width: 100% !important;
    max-width: 100% !important;
    overflow: hidden;
    flex-direction: column;
  }
  .recent-post-item .post_cover {
    width: 100% !important;
    height: auto !important;
    max-height: 320px;
  }
}

/* ===== 黑白灰基调（2026-11-06） ===== */

/* 首页顶部：书法「留白」即品牌，隐藏文字标题避免压字 */
#page-header.full_page #site-info {
  display: none;
}
#page-header.full_page {
  background-color: #f3f3f3;
}

/* 导航 LOGO（书法「留白」），替代文字站名 */
#page-header #nav .nav-site-title img.site-icon,
#nav .nav-site-title img.site-icon {
  height: 30px !important;
  width: auto !important;
  max-width: none !important;
  margin-right: 0;
  vertical-align: middle;
  border-radius: 0;
}
#page-header #nav .nav-site-title {
  display: inline-flex;
  align-items: center;
  height: 100%;
}
@media screen and (max-width: 768px) {
  #page-header #nav .nav-site-title img.site-icon,
  #nav .nav-site-title img.site-icon {
    height: 24px !important;
  }
}

/* 导航栏：白底黑字（高优先级，压过 Butterfly 的 #page-header.full_page 白字规则） */
#page-header #nav,
#page-header.nav-fixed > #nav,
#page-header.nav-visible > #nav {
  background: #ffffff !important;
  box-shadow: 0 1px 6px rgba(0, 0, 0, .08);
}
#page-header #nav .site-name,
#page-header #nav a.site-page,
#page-header #nav .menus_item a,
#page-header #nav #search-button,
#page-header #nav #search-button .site-page,
#page-header #nav #toggle-menu,
#page-header #nav #toggle-menu .site-page,
#page-header #nav .toggle-menu,
#page-header #nav #toggle-sidebar {
  color: #1f2328 !important;
}
#page-header #nav .menus_item a:hover,
#page-header #nav a.site-page:hover {
  color: #000 !important;
}
[data-theme="dark"] #page-header #nav,
[data-theme="dark"] #page-header.nav-fixed > #nav,
[data-theme="dark"] #page-header.nav-visible > #nav {
  background: #16181d !important;
}
[data-theme="dark"] #page-header #nav .site-name,
[data-theme="dark"] #page-header #nav a.site-page,
[data-theme="dark"] #page-header #nav #search-button,
[data-theme="dark"] #page-header #nav #toggle-menu {
  color: #e5e7eb !important;
}

/* 页脚：黑白灰 */
#footer,
#footer-wrap,
#footer .footer-other-links {
  background: #1f2328 !important;
  color: #d1d5db !important;
}
#footer a,
#footer-wrap a {
  color: #d1d5db !important;
}
#footer a:hover {
  color: #ffffff !important;
}
[data-theme="dark"] #footer {
  background: #16181d !important;
}

/* 侧栏「公众号」按钮：蓝改深灰 */
#card-info-btn {
  background: #1f2328 !important;
  color: #ffffff !important;
  box-shadow: none !important;
}
#card-info-btn:hover {
  background: #000000 !important;
}

/* 文末导航胶囊：深灰 */
.lb-post-nav a {
  background: #1f2328;
}
.lb-post-nav a:last-child {
  background: #9ca3af;
}

/* 首页缩略图底色改纯浅灰（配合黑白灰） */
.recent-post-item .post_cover {
  background: #f3f4f6;
}
[data-theme="dark"] .recent-post-item .post_cover {
  background: #1c2430;
}
