/* ==========================================================
   博客园主题 · Aurora Dual（深色高级感 · 日夜双主题）
   ----------------------------------------------------------
   使用前提：
     1. 博客皮肤 = Custom
     2. 勾选【禁用模板默认CSS】（不勾此主题只生效一半）
   代码区样式：完全交给博客园后台「代码高亮」，本文件不做任何覆盖
   ========================================================== */

/* ==========================================================
   一、主题变量 · 夜间（默认）
   ========================================================== */
:root {
  --bg: #0b0f17;
  --bg-soft: #111827;
  --card: rgba(23, 30, 44, 0.72);
  --card-solid: #171e2c;
  --border: rgba(148, 163, 184, 0.14);
  --text: #e6edf3;
  --text-sub: #94a3b8;
  --accent: #8b5cf6;
  --accent-2: #22d3ee;
  --accent-3: #f472b6;
  --gradient: linear-gradient(135deg, #8b5cf6 0%, #22d3ee 100%);
  --radius: 14px;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.45);

  --nav-bg: rgba(13, 17, 26, 0.82);
  --nav-hover-text: #ffffff;
  --chip: rgba(139, 92, 246, 0.12);
  --hover-ring: rgba(139, 92, 246, 0.45);
  --hover-glow: 0 12px 40px rgba(139, 92, 246, 0.18);
  --btn-glow: 0 6px 20px rgba(139, 92, 246, 0.45);

  --blob-1: #8b5cf6;
  --blob-2: #06b6d4;
  --blob-opacity: 0.2;

  --body-text: #d7dee7;
  --strong: #fbbf24;
  --link-underline: rgba(34, 211, 238, 0.5);
  --quote-bg: rgba(139, 92, 246, 0.08);
  --quote-border: rgba(139, 92, 246, 0.25);
  --quote-text: #c4cbd6;
  --th-bg: linear-gradient(135deg, rgba(139, 92, 246, 0.25), rgba(34, 211, 238, 0.15));
  --th-color: #ffffff;
  --row-odd: rgba(148, 163, 184, 0.06);
  --row-hover: rgba(139, 92, 246, 0.1);

  --scroll-1: #8b5cf6;
  --scroll-2: #22d3ee;
  --scroll-1h: #a78bfa;
  --scroll-2h: #67e8f9;
  --selection-bg: rgba(139, 92, 246, 0.45);
  --selection-text: #ffffff;
  --other-month: #475569;
  --avatar-ring: rgba(139, 92, 246, 0.75);
  --avatar-glow: 0 0 22px rgba(139, 92, 246, 0.45);
}

/* ==========================================================
   二、主题变量 · 白天（白底 + 蓝 / 粉辅色）
   切换方式：<html data-theme="light">
   ========================================================== */
html[data-theme="light"] {
  --bg: #f5f7fb;
  --bg-soft: #ffffff;
  --card: rgba(255, 255, 255, 0.88);
  --card-solid: #ffffff;
  --border: rgba(37, 76, 156, 0.12);
  --text: #17243c;
  --text-sub: #64738d;
  --accent: #3b82f6;
  --accent-2: #ec4899;
  --accent-3: #8b5cf6;
  --gradient: linear-gradient(135deg, #3b82f6 0%, #ec4899 100%);
  --shadow: 0 8px 26px rgba(59, 130, 246, 0.13);

  --nav-bg: rgba(255, 255, 255, 0.88);
  --nav-hover-text: #1d4ed8;
  --chip: rgba(59, 130, 246, 0.1);
  --hover-ring: rgba(59, 130, 246, 0.45);
  --hover-glow: 0 12px 36px rgba(236, 72, 153, 0.16);
  --btn-glow: 0 6px 20px rgba(59, 130, 246, 0.35);

  --blob-1: #93c5fd;
  --blob-2: #f9a8d4;
  --blob-opacity: 0.5;

  --body-text: #33415c;
  --strong: #db2777;
  --link-underline: rgba(236, 72, 153, 0.45);
  --quote-bg: rgba(59, 130, 246, 0.06);
  --quote-border: rgba(59, 130, 246, 0.22);
  --quote-text: #46566f;
  --th-bg: linear-gradient(135deg, rgba(59, 130, 246, 0.16), rgba(236, 72, 153, 0.13));
  --th-color: #17243c;
  --row-odd: rgba(59, 130, 246, 0.04);
  --row-hover: rgba(236, 72, 153, 0.07);

  --scroll-1: #93c5fd;
  --scroll-2: #f9a8d4;
  --scroll-1h: #3b82f6;
  --scroll-2h: #ec4899;
  --selection-bg: rgba(236, 72, 153, 0.28);
  --selection-text: #17243c;
  --other-month: #b6c1d4;
  --avatar-ring: rgba(59, 130, 246, 0.75);
  --avatar-glow: 0 0 22px rgba(59, 130, 246, 0.4);
}

/* ==========================================================
   三、基础重置
   ========================================================== */
* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "HarmonyOS Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 15px;
  line-height: 1.8;
  overflow-x: hidden;
  transition: background 0.4s ease, color 0.4s ease;
}

/* 全局去掉链接默认下划线（禁用模板CSS后浏览器默认蓝下划线会漏出来） */
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }

/* 主题切换瞬间的平滑过渡 */
.theme-switching,
.theme-switching * {
  transition: background 0.4s ease, color 0.4s ease, border-color 0.4s ease,
              box-shadow 0.4s ease !important;
}

/* 选中文字 */
::selection { background: var(--selection-bg); color: var(--selection-text); }

/* 滚动条 */
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--scroll-1), var(--scroll-2));
  border-radius: 8px;
}
::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, var(--scroll-1h), var(--scroll-2h));
}

/* ==========================================================
   四、极光流动背景（纯 CSS，随主题换色）
   ========================================================== */
body::before,
body::after {
  content: "";
  position: fixed;
  z-index: -2;
  width: 46vw;
  height: 46vw;
  border-radius: 50%;
  filter: blur(90px);
  opacity: var(--blob-opacity);
  pointer-events: none;
}
body::before {
  background: var(--blob-1);
  top: -12vw;
  left: -10vw;
  animation: blobFloat1 22s ease-in-out infinite;
}
body::after {
  background: var(--blob-2);
  bottom: -14vw;
  right: -12vw;
  animation: blobFloat2 26s ease-in-out infinite;
}
@keyframes blobFloat1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50%      { transform: translate(6vw, 5vw) scale(1.15); }
}
@keyframes blobFloat2 {
  0%, 100% { transform: translate(0, 0) scale(1.1); }
  50%      { transform: translate(-7vw, -4vw) scale(0.95); }
}

/* 顶部彩虹流光线（元素在【页首HTML代码】里） */
#topGlowLine {
  position: fixed;
  top: 0; left: 0;
  z-index: 9999;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg,
    var(--accent-3), var(--accent), var(--accent-2), var(--accent-3));
  background-size: 300% 100%;
  animation: glowLineMove 9s linear infinite;
}
@keyframes glowLineMove { to { background-position: 300% 0; } }

/* ==========================================================
   五、整体布局
   ========================================================== */
#home { max-width: 1180px; margin: 0 auto; padding: 0 24px; }

/* 主题切换 / 返回顶部按钮（HTML 在【页脚HTML代码】里） */
#myThemeBtn, #myBackTop {
  position: fixed;
  right: 26px;
  z-index: 9998;
  width: 46px; height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  cursor: pointer;
  background: var(--card-solid);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  color: var(--accent-2);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1),
              box-shadow 0.35s ease, color 0.35s ease, border-color 0.35s ease;
}
#myThemeBtn { bottom: 26px; }
#myBackTop { bottom: 84px; display: none; }
#myThemeBtn:hover, #myBackTop:hover {
  transform: translateY(-4px) rotate(-8deg);
  box-shadow: var(--btn-glow);
  border-color: var(--accent-2);
}
#myThemeBtn svg { width: 20px; height: 20px; }
#myThemeBtn .icon-sun { display: none; }
#myThemeBtn .icon-moon { display: block; }
html[data-theme="light"] #myThemeBtn .icon-sun { display: block; }
html[data-theme="light"] #myThemeBtn .icon-moon { display: none; }

/* ==========================================================
   六、博客标题
   ========================================================== */
#blogTitle {
  position: relative;
  text-align: center;
  padding: 54px 0 30px;
}
#blogTitle h1 {
  margin: 0;
  font-size: 2.9rem;
  font-weight: 800;
  letter-spacing: 3px;
  line-height: 1.35;
}
#blogTitle h1 a {
  background: var(--gradient);
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: titleFlow 9s ease infinite;
}
@keyframes titleFlow {
  0%, 100% { background-position: 0 0; }
  50%      { background-position: 100% 0; }
}
#blogTitle h2 {
  margin: 10px 0 0;
  font-size: 0.95rem;
  font-weight: 400;
  letter-spacing: 2px;
  color: var(--text-sub);
}

/* ==========================================================
   七、导航栏
   ========================================================== */
#navigator {
  position: sticky;
  top: 0;
  z-index: 500;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 26px;
  padding: 13px 22px;
  margin-bottom: 26px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--nav-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: var(--shadow);
}
#navList {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}
#navList li { list-style: none; }
#navList li a {
  position: relative;
  display: inline-block;
  padding: 6px 11px;
  font-size: 14px;
  color: var(--text-sub) !important;
  border-radius: 8px;
  transition: color 0.3s ease, background 0.3s ease;
}
#navList li a::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 0;
  height: 2px;
  border-radius: 2px;
  background: var(--gradient);
  transform: translateX(-50%);
  transition: width 0.32s ease;
}
#navList li a:hover {
  color: var(--nav-hover-text) !important;
  background: var(--chip);
}
#navList li a:hover::after { width: 62%; }

/* 导航栏内的统计行（随笔 - 1 文章 - 0 …） */
.blogStats, #blog_stats_place_holder, .blogStats * {
  font-size: 12.5px;
  color: var(--text-sub) !important;
  letter-spacing: 0.5px;
  text-align: center;
}
.blogStats { margin: 0; }

/* ==========================================================
   八、主区域：随笔在右，侧边栏在左
   博客园 DOM 固定为 mainContent 在前、sideBar 在后，
   所以用 flex + order 重排，不改 HTML
   ========================================================== */
#main {
  display: flex;
  align-items: flex-start;
  gap: 24px;
  padding-bottom: 48px;
}
#sideBar {
  order: 1;
  flex: 0 0 262px;
  width: 262px;
  font-size: 13.5px;
  color: var(--text-sub);
}
#mainContent {
  order: 2;
  flex: 1 1 auto;
  min-width: 0;
  width: auto;
}
#sideBar blockquote { border: none; margin: 0; padding: 0; background: none; }

/* ==========================================================
   九、随笔列表卡片
   ========================================================== */
.day, .post {
  position: relative;
  margin-bottom: 22px;
  padding: 24px 26px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
  transition: transform 0.4s cubic-bezier(0.22, 0.61, 0.36, 1),
              box-shadow 0.4s ease, border-color 0.4s ease;
}
.day:hover, .post:hover {
  transform: translateY(-5px);
  box-shadow: var(--hover-glow);
  border-color: var(--hover-ring);
}

/* 日期行 */
.dayTitle {
  margin-bottom: 10px;
  font-size: 12.5px;
  letter-spacing: 1px;
  color: var(--text-sub);
}
.dayTitle a { color: var(--text-sub) !important; }

/* 文章标题 */
.postTitle, .day .postTitle {
  margin: 0 0 10px;
  padding: 0;
  border: none;
  font-size: 1.32rem;
  line-height: 1.55;
}
.postTitle a, .day .postTitle a,
a.postTitle2, .postTitle2 {
  display: inline;
  padding-bottom: 3px;
  font-weight: 700;
  color: var(--text) !important;
  background-image: var(--gradient);
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 0 2px;
  transition: color 0.3s ease, background-size 0.4s ease;
}
.postTitle a:hover, .day .postTitle a:hover,
a.postTitle2:hover, .postTitle2:hover {
  color: var(--accent-2) !important;
  background-size: 100% 2px;
}

/* 摘要 / 描述行 */
.postCon, .postDesc, .c_b_p_desc {
  color: var(--text-sub);
  font-size: 14px;
  line-height: 1.9;
  word-break: break-word;
}
.postCon { margin: 8px 0 4px; }
.postDesc {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--border);
  font-size: 12.5px;
}
.postDesc a, .c_b_p_desc_readmore a { color: var(--accent-2) !important; }
.c_b_p_desc_readmore { margin-left: 4px; }

/* ==========================================================
   十、侧边栏卡片（公告 / 分类 / 搜索 / 标签 / 归档 / 日历）
   ========================================================== */
/* ---------- 侧边栏卡片（公告 / 分类 / 搜索 / 标签 / 归档 / 日历）
   注意两点：
   1. #blog-news 是 #sidebar_news 的内部容器，不能也当卡片；
   2. 「合集」等由 loadBlogSideColumn() 注入的模块是多层嵌套：
      #blog-sidecolumn > #sidebar_categories > .catList.sidebar-block，
      只让最内层真正带内容的 .catList / .sidebar-block 当卡片，
      外层容器（#blog-sidecolumn、#sidebar_categories 等）保持透明，
      否则会出现边框套边框的多层嵌套 ---------- */
#sidebar_news,
.catList, .sidebar-block,
.catListComment, .catListTag, .catListLink,
.catListNote, .catListEssay, .catListArchive, #blog-calendar {
  margin-bottom: 18px;
  padding: 18px 18px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
  transition: border-color 0.35s ease, box-shadow 0.35s ease;
}
#sidebar_news:hover, .catList:hover, .sidebar-block:hover,
#blog-calendar:hover {
  border-color: var(--hover-ring);
}

/* 合集等模块的外层纯容器：全部还原为透明，不占卡片样式 */
#blog-sidecolumn,
#sidebar_categories,
#sidebar_toptags,
#sidebar_archive,
#leftcontentcontainer > div {
  margin: 0;
  padding: 0;
  border: none;
  background: none;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  transition: none;
}

/* 公告区里博客园自动生成的内容（博客信息：昵称/园龄/粉丝/关注等） */
#blog-news {
  font-size: 12.5px;
  line-height: 2;
  color: var(--text-sub);
  word-break: break-all;
}
#blog-news a { color: var(--accent-2) !important; }
#blog-news br { display: none; }        /* 博客园用 br 硬换行，改成自然流 */
#blog-news::after {
  content: "";
  display: block;
  margin-top: 12px;
  border-top: 1px dashed var(--border);
}

/* 区块标题（"分类""标签"…） */
.catListTitle, #sidebar_news h3, .catList h3 {
  position: relative;
  margin: 0 0 12px;
  padding-left: 12px;
  font-size: 14.5px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 1px;
}
.catListTitle::before, .catList h3::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 4px;
  height: 15px;
  margin-top: -7.5px;
  border-radius: 3px;
  background: var(--gradient);
}

/* 侧边栏内的列表项 */
.catList ul, #sidebar_categories ul, #sidebar_toptags ul,
.catListTag ul, .catListArchive ul, #sidebar_archive ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
.catList li, #sidebar_categories li, .catListTag li,
.catListArchive li, #sidebar_archive li { margin-bottom: 2px; }

.catList li a, #sidebar_categories li a, .catListTag li a,
.catListArchive li a, #sidebar_archive li a,
#sidebar_toptags li a, .catListLink li a, .catListComment li a {
  display: block;
  padding: 6px 10px;
  border-radius: 9px;
  font-size: 13px;
  color: var(--text-sub) !important;
  border-left: 2px solid transparent;
  transition: all 0.3s ease;
}
.catList li a:hover, #sidebar_categories li a:hover, .catListTag li a:hover,
.catListArchive li a:hover, #sidebar_archive li a:hover,
#sidebar_toptags li a:hover, .catListLink li a:hover {
  padding-left: 14px;
  color: var(--text) !important;
  background: var(--chip);
  border-left-color: var(--accent-2);
  transform: translateX(2px);
}

/* 分类后的数字徽章 */
.catList li a .count, #sidebar_categories li span,
.catListTag li a span, .catListArchive li a span {
  float: right;
  min-width: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--chip);
  color: var(--accent-2);
  font-size: 11.5px;
  text-align: center;
}

/* 博客园自带日历 */
#blog-calendar table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
#blog-calendar td, #blog-calendar th {
  padding: 5px 0;
  text-align: center;
  border: none;
  color: var(--text-sub);
}
#blog-calendar a {
  display: inline-block;
  width: 24px; height: 24px;
  line-height: 24px;
  border-radius: 50%;
  color: var(--accent-2) !important;
  background: var(--chip);
  transition: all 0.3s ease;
}
#blog-calendar a:hover { background: var(--accent); color: #fff !important; }
#blog-calendar .CalOtherMonthDay, #blog-calendar .CalOtherMonthDay a {
  color: var(--other-month) !important;
  background: transparent;
}

/* ---------- 归档页日期分组：同一日期的多篇随笔包在一个组里，
     组内是独立卡片，日期标题只出现一次 ---------- */
.my-day-items-group { margin-bottom: 4px; }
.my-day-items-group > .dayTitle {
  margin: 0 0 10px 4px;
  font-size: 12.5px;
  letter-spacing: 1px;
  color: var(--text-sub);
  padding-left: 10px;
  border-left: 3px solid var(--accent);
}
.my-day-items-group > .dayTitle a { color: var(--text-sub) !important; }
.my-day-items-group > .day:last-child { margin-bottom: 22px; }

/* ==========================================================
   十一、文章详情页正文排版
   ========================================================== */
#cnblogs_post_body {
  color: var(--body-text);
  font-size: 15.5px;
  line-height: 2;
  word-break: break-word;
}
#cnblogs_post_body h1, #cnblogs_post_body h2,
#cnblogs_post_body h3, #cnblogs_post_body h4 {
  color: var(--text);
  font-weight: 700;
  margin: 1.6em 0 0.7em;
  padding-left: 12px;
  border-left: 4px solid;
  border-image: var(--gradient) 1;
}
#cnblogs_post_body a {
  color: var(--accent-2);
  text-decoration: none;
  border-bottom: 1px dashed var(--link-underline);
  transition: all 0.25s ease;
}
#cnblogs_post_body a:hover {
  color: var(--accent);
  border-bottom: 1px solid var(--accent);
}
#cnblogs_post_body strong { color: var(--strong); }
#cnblogs_post_body img { border-radius: 10px; }
#cnblogs_post_body blockquote {
  margin: 1.2em 0;
  padding: 14px 20px;
  background: var(--quote-bg);
  border: 1px solid var(--quote-border);
  border-left: 4px solid var(--accent);
  border-radius: 10px;
  color: var(--quote-text);
}
#cnblogs_post_body table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.2em 0;
  border-radius: 10px;
  overflow: hidden;
}
#cnblogs_post_body th { background: var(--th-bg); color: var(--th-color); }
#cnblogs_post_body th, #cnblogs_post_body td {
  padding: 10px 14px;
  border: 1px solid var(--border);
  color: var(--body-text);
}
#cnblogs_post_body tr:nth-child(even) td { background: var(--row-odd); }
#cnblogs_post_body tr:hover td { background: var(--row-hover); }

/* ---------- 列表页「展开全文」后的正文排版 ----------
   与上面 #cnblogs_post_body 一一对应，
   保证展开出来的正文和详情页完全一致。
   容器样式与展开动画在【页脚HTML代码】里 */
.my-expand-body h1, .my-expand-body h2,
.my-expand-body h3, .my-expand-body h4 {
  color: var(--text);
  font-weight: 700;
  margin: 1.6em 0 0.7em;
  padding-left: 12px;
  border-left: 4px solid;
  border-image: var(--gradient) 1;
}
.my-expand-body a {
  color: var(--accent-2);
  text-decoration: none;
  border-bottom: 1px dashed var(--link-underline);
  transition: all 0.25s ease;
}
.my-expand-body a:hover { color: var(--accent); border-bottom: 1px solid var(--accent); }
.my-expand-body strong { color: var(--strong); }
.my-expand-body img { max-width: 100%; height: auto; border-radius: 10px; }
.my-expand-body blockquote {
  margin: 1.2em 0;
  padding: 14px 20px;
  background: var(--quote-bg);
  border: 1px solid var(--quote-border);
  border-left: 4px solid var(--accent);
  border-radius: 10px;
  color: var(--quote-text);
}
.my-expand-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.2em 0;
  border-radius: 10px;
  overflow: hidden;
}
.my-expand-body th { background: var(--th-bg); color: var(--th-color); }
.my-expand-body th, .my-expand-body td {
  padding: 10px 14px;
  border: 1px solid var(--border);
  color: var(--body-text);
}
.my-expand-body tr:nth-child(even) td { background: var(--row-odd); }
.my-expand-body tr:hover td { background: var(--row-hover); }

/* 详情页底部「推荐 / 反对」按钮（博客园内置 #div_digg，默认绿色白底）
   适配成主题风格：圆角胶囊 + 半透明底 + 悬停发光 */
#div_digg {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 26px;
  padding: 0;
}
#div_digg .diggit,
#div_digg .buryit {
  min-width: 72px;
  padding: 10px 18px 8px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--chip);
  color: var(--text-sub);
  font-size: 13px;
  text-align: center;
  cursor: pointer;
  transition: transform 0.3s ease, border-color 0.3s ease,
              box-shadow 0.3s ease, color 0.3s ease;
}
#div_digg .diggit:hover,
#div_digg .buryit:hover {
  transform: translateY(-3px);
  border-color: var(--accent-2);
  box-shadow: var(--btn-glow);
  color: var(--accent-2);
}
#div_digg .diggit.digg_on { border-color: var(--accent); color: var(--accent); }
#div_digg .buryit.bury_on { border-color: #f87171; color: #f87171; }
#div_digg .diggit span,
#div_digg .buryit span {
  display: block;
  margin-top: 2px;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}
/* 列表页元信息行通用兜底（合集页适配后也会打上 postDesc 类） */
.day .postDesc a, .post .postDesc a { color: var(--accent-2) !important; }
.day .postDesc a:hover, .post .postDesc a:hover { color: var(--accent) !important; }

/* ==========================================================
   十二、评论区 / 页脚
   ========================================================== */
#comment_form_container, #blog-comments-placeholder,
.commentform { color: var(--body-text); }
#tbCommentBody, .comment_textarea {
  border: 1px solid var(--border) !important;
  border-radius: 10px;
  background: var(--card-solid) !important;
  color: var(--text) !important;
  font-family: inherit;
}

#footer {
  margin-top: 20px;
  padding: 26px 0 40px;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 12.5px;
  color: var(--text-sub);
}
#footer a { color: var(--text-sub) !important; transition: color 0.3s ease; }
#footer a:hover { color: var(--accent-2) !important; }
#footer img { vertical-align: middle; }

/* ==========================================================
   十三、响应式 —— 手机端
   ========================================================== */
@media (max-width: 900px) {
  #home { padding: 0 16px; }
  #blogTitle { padding: 38px 0 22px; }
  #blogTitle h1 { font-size: 2.1rem; letter-spacing: 2px; }
  #blogTitle h2 { font-size: 0.85rem; }
  #myThemeBtn, #myBackTop { right: 16px; }
}

@media (max-width: 768px) {
  /* 单列：侧边栏移到正文下方 */
  #main { flex-direction: column; gap: 18px; padding-bottom: 32px; }
  #sideBar {
    order: 2;
    flex: 1 1 auto;
    width: 100%;
    max-width: 100%;
  }
  #mainContent { order: 1; width: 100%; }

  /* 导航不吸顶、竖排，避免占满小屏 */
  #navigator {
    position: static;
    flex-direction: column;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 12px;
  }
  #navList { width: 100%; justify-content: center; gap: 2px; }
  #navList li a { padding: 6px 9px; font-size: 13px; }

  /* 卡片：加大触控区域，取消悬停位移 */
  .day, .post { padding: 20px 18px; margin-bottom: 16px; border-radius: 12px; }
  .day:hover, .post:hover { transform: none; }
  .postTitle, .day .postTitle { font-size: 1.16rem; }
  .postCon, .postDesc { font-size: 13.5px; }

  /* 悬浮按钮缩小靠边 */
  #myThemeBtn, #myBackTop { width: 42px; height: 42px; right: 14px; }
  #myThemeBtn { bottom: 18px; }
  #myBackTop { bottom: 70px; }

  /* 正文 */
  #cnblogs_post_body { font-size: 15px; line-height: 1.95; }
  #cnblogs_post_body table { display: block; overflow-x: auto; }

  .my-expand-body { padding: 4px 14px 16px; }

  /* 侧边栏卡片在手机上更紧凑 */
  #sidebar_news, .catList, .sidebar-block, #blog-calendar { padding: 15px 14px 13px; }
}

/* 空的搜索占位块（loadBlogSideColumn 注入但无内容），避免渲染出一个空卡片。
   它内部有空白文本节点，:empty 不生效，用 :has 判「无任何子元素」 */
#sidebar_search:not(:has(*)) { display: none; }

/* 隐藏随笔详情页顶部的博客园内置「合集」白色导航卡片
   （div.current-collection 由 blog-common.js 注入，白底不跟主题，且侧栏已有合集入口） */
.current-collection { display: none !important; }

@media (max-width: 420px) {
  #blogTitle h1 { font-size: 1.85rem; }
  #navList li a { padding: 6px 7px; font-size: 12.5px; letter-spacing: 0; }
  .day, .post { padding: 16px 14px; }
}

/* 尊重系统「减少动态效果」偏好 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}
