/* =========================================================
 * style.css — 1:1 复刻 Hexo Butterfly 5.5.4 视觉
 * 主色 #49b1f5；明暗双主题；移动端自适应
 * ========================================================= */

/* ---------- 主题变量 ---------- */
:root {
  --theme-color: #49b1f5;
  --theme-color-dark: #3a9eea;
  --body-bg: #eef5fd;
  --card-bg: #fff;
  --empty-bg: #fff;
  --text: #4c4948;
  --text-light: #858585;
  --border: #e3e3e3;
  --shadow: 0 4px 12px 0 rgba(0, 0, 0, 0.05);
  --shadow-hover: 0 8px 24px 0 rgba(0, 0, 0, 0.12);
  --nav-bg: rgba(255, 255, 255, 0.92);
  --nav-text: #4c4948;
  --header-mask: linear-gradient(180deg, rgba(0,0,0,.35), rgba(0,0,0,.45));
  --radius: 8px;
  --content-width: 1200px;
  --aside-width: 300px;
  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Lato, Roboto, "PingFang SC", "Microsoft YaHei", sans-serif;
  --code-font: consolas, Menlo, monospace, "PingFang SC", "Microsoft YaHei", sans-serif;
}
html[data-theme="dark"] {
  --body-bg: #0d1117;
  --card-bg: #1f1f1f;
  --empty-bg: #1f1f1f;
  --text: #dcdcdc;
  --text-light: #a0a0a0;
  --border: #2d2d2d;
  --shadow: 0 4px 12px 0 rgba(0, 0, 0, 0.3);
  --shadow-hover: 0 8px 24px 0 rgba(0, 0, 0, 0.5);
  --nav-bg: rgba(18, 18, 18, 0.92);
  --nav-text: #dcdcdc;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-family);
  background-color: var(--body-bg);
  color: var(--text);
  line-height: 1.7;
  font-size: 15px;
  transition: background-color .3s ease, color .3s ease;
  overflow-x: hidden;
}
a { color: var(--text); text-decoration: none; transition: color .2s; }
a:hover { color: var(--theme-color); }
img { max-width: 100%; display: block; }
.text-center { text-align: center; }

/* ---------- 顶部导航 ---------- */
#nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: 60px; display: flex; align-items: center; justify-content: center;
  padding: 0 24px; color: #fff; transition: all .3s ease;
}
#nav a, #nav .site-page { color: #fff; }
#blog-info { position: absolute; left: 24px; z-index: 2; }
#nav.nav-fixed {
  background: var(--nav-bg); backdrop-filter: blur(12px);
  box-shadow: 0 2px 10px rgba(0,0,0,.08); color: var(--nav-text);
}
#nav.nav-fixed a, #nav.nav-fixed .site-page { color: var(--nav-text); }
#blog-info .site-name { font-weight: 700; font-size: 1.15em; }
#menus { display: flex; align-items: center; gap: 4px; }
.menus_items { display: flex; align-items: center; }
.menus_item { position: relative; }
.menus_item > a {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 14px; border-radius: 6px; font-size: .95em;
}
.menus_item > a:hover { background: rgba(255,255,255,.15); }
#nav.nav-fixed .menus_item > a:hover { background: rgba(73,177,245,.12); color: var(--theme-color); }
#search-button { cursor: pointer; padding: 8px 14px; border-radius: 6px; font-size: .95em; }
#search-button:hover { background: rgba(255,255,255,.15); }
#nav.nav-fixed #search-button:hover { background: rgba(73,177,245,.12); color: var(--theme-color); }
#toggle-menu { display: none; cursor: pointer; padding: 8px 12px; font-size: 1.1em; }

/* ---------- 全屏头图 ---------- */
#page-header {
  position: relative; width: 100%; background-size: cover; background-position: center;
  background-repeat: no-repeat; display: flex; flex-direction: column;
}
#page-header.full_page { height: 100vh; }
#page-header.not-home-page { height: 340px; }
#page-header::before {
  content: ""; position: absolute; inset: 0; background: var(--header-mask);
}
#header-particles { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; pointer-events: none; }
#page-header > :not(#header-particles) { position: relative; z-index: 2; }

#site-info {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; color: #fff; padding: 0 20px;
}
#site-title { font-size: 2.6em; font-weight: 700; letter-spacing: 2px; text-shadow: 0 2px 12px rgba(0,0,0,.35); }
#site-subtitle { font-size: 1.15em; margin-top: 12px; min-height: 1.6em; text-shadow: 0 1px 8px rgba(0,0,0,.4); }
#site-subtitle .typed-cursor { opacity: 1; animation: blink 1s infinite; }
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0} }
#site-info .social-icon { display: inline-flex; margin-top: 18px; font-size: 1.5em; color: #fff !important; transition: transform .3s; }
#site-info .social-icon:hover { transform: translateY(-4px) scale(1.1); color: var(--theme-color) !important; }
#scroll-down {
  text-align: center; padding-bottom: 28px; color: #fff; font-size: 1.6em; cursor: pointer;
}
#scroll-down .scroll-down-effects { animation: scrollDown 1.6s ease-in-out infinite; display: inline-block; }
@keyframes scrollDown { 0%,100%{transform: translateY(0); opacity:.7} 50%{transform: translateY(10px); opacity:1} }

/* 文章详情页头图信息 */
#post-info-block {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; color: #fff; padding: 0 20px; text-shadow: 0 2px 10px rgba(0,0,0,.4);
}
#post-title { font-size: 2em; font-weight: 700; }
#post-info-second { margin-top: 12px; font-size: .95em; opacity: .95; }
#post-info-second a { color: #fff; }

/* ---------- 主体布局 ---------- */
.layout {
  max-width: var(--content-width); margin: 0 auto; padding: 20px;
  display: flex; gap: 24px; align-items: flex-start;
}
#recent-posts {
  flex: 1; min-width: 0;
}
.aside-content { width: var(--aside-width); flex-shrink: 0; }

/* ---------- 文章卡片流 ---------- */
.empty-posts {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 14px; padding: 70px 20px; color: var(--text-light); text-align: center;
  background: var(--empty-bg);
  border-radius: var(--radius); box-shadow: var(--shadow);
  min-height: 55vh;
}
.empty-posts i { font-size: 3em; color: var(--theme-color); opacity: .55; animation: floatIcon 3s ease-in-out infinite; }
.empty-posts p { margin: 0; font-size: 1.05em; }
@keyframes floatIcon { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-8px)} }

.recent-post-item {
  display: flex; gap: 18px; background: var(--card-bg); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden; transition: box-shadow .3s, transform .3s;
  min-height: 220px;
}
.recent-post-item:hover { box-shadow: var(--shadow-hover); transform: translateY(-3px); }
.recent-post-item:nth-child(even) { flex-direction: row-reverse; }
.post_cover { flex: 0 0 44%; max-width: 44%; overflow: hidden; }
.post_cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.recent-post-item:hover .post_cover img { transform: scale(1.05); }
.recent-post-info { flex: 1; padding: 22px 24px 18px; display: flex; flex-direction: column; min-width: 0; }
.article-title {
  font-size: 1.35em; font-weight: 700; line-height: 1.4; color: var(--text);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.article-title:hover { color: var(--theme-color); }
.article-meta-wrap { margin: 8px 0 12px; font-size: .85em; color: var(--text-light); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.article-meta-label { margin: 0 2px; }
.article-meta-separator { margin: 0 6px; opacity: .5; }
.article-meta__categories { color: var(--theme-color); }
.recent-post-info .content {
  color: var(--text-light); font-size: .95em; line-height: 1.7;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}

/* 增加的：分类筛选条 */
.filter-bar { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 20px; }
.filter-chip {
  padding: 6px 16px; border-radius: 20px; background: var(--card-bg); color: var(--text);
  border: 1px solid var(--border); font-size: .88em; cursor: pointer; transition: all .25s;
  box-shadow: var(--shadow);
}
.filter-chip:hover { border-color: var(--theme-color); color: var(--theme-color); }
.filter-chip.active { background: var(--theme-color); color: #fff; border-color: var(--theme-color); }

/* ---------- 分页 ---------- */
#pagination { margin-top: 30px; }
.pagination { display: flex; justify-content: center; align-items: center; gap: 8px; flex-wrap: wrap; }
.pagination .page-number, .pagination .extend {
  display: inline-flex; align-items: center; justify-content: center; min-width: 34px; height: 34px;
  padding: 0 10px; border-radius: 6px; background: var(--card-bg); color: var(--text);
  box-shadow: var(--shadow); transition: all .25s; font-size: .9em;
}
.pagination .page-number:hover, .pagination .extend:hover { color: #fff; background: var(--theme-color); }
.pagination .page-number.current { background: var(--theme-color); color: #fff; }
.pagination .space { padding: 0 4px; color: var(--text-light); }

/* ---------- 项目页（project.html） ---------- */
.project-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.project-card {
  display: flex; flex-direction: column;
  background: var(--card-bg); border-radius: var(--radius); box-shadow: var(--shadow);
  overflow: hidden; transition: box-shadow .3s, transform .3s;
}
.project-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-4px); }
.project-cover { height: 160px; overflow: hidden; background: var(--body-bg); }
.project-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.project-card:hover .project-cover img { transform: scale(1.05); }
.project-body { flex: 1; display: flex; flex-direction: column; padding: 18px; min-width: 0; }
.project-title-row { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.project-name { font-size: 1.18em; font-weight: 700; color: var(--text); margin: 0; }
.project-status { font-size: .72em; padding: 2px 8px; border-radius: 12px; background: rgba(73,177,245,.12); color: var(--theme-color); white-space: nowrap; }
.project-desc { flex: 1; font-size: .92em; color: var(--text-light); line-height: 1.65; margin: 0 0 14px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.project-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.project-tag { font-size: .78em; padding: 3px 10px; border-radius: 12px; background: var(--body-bg); color: var(--text-light); }
.project-foot { display: flex; align-items: center; justify-content: space-between; margin-top: auto; font-size: .85em; color: var(--text-light); }
.project-link { color: var(--theme-color); font-weight: 600; }
.project-link:hover { color: var(--theme-color-dark); }
.project-empty { min-height: 55vh; }

@media (max-width: 768px) {
  .project-grid { grid-template-columns: 1fr; }
  .project-empty { min-height: 45vh; }
}

/* ---------- 侧边栏卡片 ---------- */
.card-widget {
  background: var(--card-bg); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 20px; margin-bottom: 20px; transition: background-color .3s;
}
.card-widget .item-headline {
  display: flex; align-items: center; gap: 8px; font-size: 1.05em; font-weight: 700;
  margin-bottom: 14px; color: var(--text);
}
.card-widget .item-headline i { color: var(--theme-color); }
.card-more-btn { margin-left: auto; color: var(--text-light); }

/* 资料卡 */
.card-info .avatar-img { width: 110px; height: 110px; margin: 0 auto 14px; border-radius: 50%; overflow: hidden; border: 3px solid #fff; box-shadow: 0 0 0 4px var(--theme-color); transition: transform .4s; }
.card-info .avatar-img:hover { transform: rotate(360deg); }
.card-info .avatar-img img { width: 100%; height: 100%; object-fit: cover; }
.author-info-name { font-size: 1.25em; font-weight: 700; color: var(--text); }
.author-info-description { font-size: .85em; color: var(--text-light); margin: 6px 0 14px; }
.site-data { display: flex; justify-content: space-around; margin-bottom: 14px; }
.site-data .headline { font-size: .8em; color: var(--text-light); }
.site-data .length-num { font-size: 1.4em; font-weight: 700; color: var(--theme-color); }
#card-info-btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 22px; border-radius: 20px;
  background: var(--theme-color); color: #fff !important; font-weight: 600; transition: all .3s;
}
#card-info-btn:hover { background: var(--theme-color-dark); transform: translateY(-2px); box-shadow: 0 6px 16px rgba(73,177,245,.4); }
.card-info-social-icons { margin-top: 12px; }
.card-info-social-icons .social-icon { font-size: 1.3em; color: var(--text) !important; }
.card-info-social-icons .social-icon:hover { color: var(--theme-color) !important; }

/* 公告 */
.announcement_content { font-size: .9em; color: var(--text-light); line-height: 1.7; }

/* 最新文章 */
.aside-list { display: flex; flex-direction: column; gap: 12px; }
.aside-list-item { display: flex; gap: 10px; align-items: center; }
.aside-list-item .thumbnail { flex: 0 0 70px; width: 70px; height: 56px; border-radius: 6px; overflow: hidden; }
.aside-list-item .thumbnail img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.aside-list-item:hover .thumbnail img { transform: scale(1.1); }
.aside-list-item .content { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.aside-list-item .title {
  font-size: .88em; color: var(--text); line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.aside-list-item .title:hover { color: var(--theme-color); }
.aside-list-item time { font-size: .75em; color: var(--text-light); margin-top: 4px; }

/* 分类 */
.card-category-list { list-style: none; }
.card-category-list-item { margin-bottom: 8px; }
.card-category-list-link { display: flex; justify-content: space-between; align-items: center; padding: 6px 10px; border-radius: 6px; transition: all .25s; }
.card-category-list-link:hover { background: rgba(73,177,245,.1); color: var(--theme-color); padding-left: 16px; }
.card-category-list-name { font-size: .9em; }
.card-category-list-count { font-size: .8em; color: var(--text-light); background: var(--body-bg); padding: 1px 8px; border-radius: 10px; }

/* 标签云 */
.card-tag-cloud { line-height: 2; }
.card-tag-cloud a { display: inline-block; margin: 0 4px; transition: all .25s; }
.card-tag-cloud a:hover { color: var(--theme-color) !important; transform: scale(1.08); }

/* 归档 */
.card-archive-list { list-style: none; }
.card-archive-list-item { margin-bottom: 8px; }
.card-archive-list-link { display: flex; justify-content: space-between; padding: 6px 10px; border-radius: 6px; transition: all .25s; }
.card-archive-list-link:hover { background: rgba(73,177,245,.1); color: var(--theme-color); padding-left: 16px; }
.card-archive-list-date { font-size: .9em; }
.card-archive-list-count { font-size: .8em; color: var(--text-light); }

/* 网站信息 */
.webinfo-item { display: flex; justify-content: space-between; font-size: .85em; padding: 6px 0; border-bottom: 1px dashed var(--border); }
.webinfo-item:last-child { border-bottom: none; }
.webinfo .item-name { color: var(--text-light); }
.webinfo .item-count { color: var(--text); font-weight: 600; }

/* ---------- 文章详情 ---------- */
.post { background: var(--card-bg); border-radius: var(--radius); box-shadow: var(--shadow); padding: 30px; }
.post-content { font-size: 1em; line-height: 1.9; color: var(--text); }
.post-content h2 { font-size: 1.5em; margin: 28px 0 14px; padding-left: 12px; border-left: 4px solid var(--theme-color); }
.post-content h3 { font-size: 1.25em; margin: 22px 0 12px; }
.post-content p { margin: 14px 0; }
.post-content strong { color: var(--theme-color); }
.post-content a { color: var(--theme-color); border-bottom: 1px solid; }
.post-content ul, .post-content ol { padding-left: 26px; margin: 12px 0; }
.post-content li { margin: 6px 0; }
.post-content table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: .92em; }
.post-content th, .post-content td { border: 1px solid var(--border); padding: 8px 12px; text-align: left; }
.post-content th { background: var(--body-bg); font-weight: 700; }
.post-content pre { background: #2d2d2d; color: #f8f8f2; padding: 16px; border-radius: 6px; overflow-x: auto; margin: 16px 0; font-family: var(--code-font); font-size: .88em; line-height: 1.6; }
.post-content code { font-family: var(--code-font); background: rgba(73,177,245,.12); color: #d63384; padding: 2px 6px; border-radius: 4px; font-size: .9em; }
.post-content pre code { background: none; color: inherit; padding: 0; }
.post-nav { display: flex; justify-content: space-between; gap: 16px; margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--border); }
.post-nav a { flex: 1; padding: 12px 16px; border-radius: 6px; background: var(--body-bg); transition: all .25s; font-size: .92em; }
.post-nav a:hover { color: #fff; background: var(--theme-color); }
.post-nav .next { text-align: right; }
.post-nav .label { display: block; font-size: .78em; color: var(--text-light); }
.post-nav a:hover .label { color: rgba(255,255,255,.85); }

/* ---------- 页脚 ---------- */
#footer {
  background: var(--header-mask), url(../img/background.jpeg); background-size: cover; background-position: center;
  color: #fff; text-align: center; padding: 30px 20px; margin-top: 20px;
}
.footer-copyright { font-size: .9em; text-shadow: 0 1px 6px rgba(0,0,0,.4); }
.footer-copyright a { color: #fff; border-bottom: 1px solid rgba(255,255,255,.5); }
.footer-beian { margin-top: 10px; font-size: .82em; display: flex; justify-content: center; gap: 18px; flex-wrap: wrap; }
.footer-beian a { color: rgba(255,255,255,.85); text-shadow: 0 1px 6px rgba(0,0,0,.4); display: inline-flex; align-items: center; }
.footer-beian a:hover { color: #fff; }
.beian-icon { width: 13px; height: 13px; margin-right: 4px; }

/* ---------- 右下角浮动按钮 ---------- */
#rightside {
  position: fixed; right: 24px; bottom: 40px; z-index: 200; display: flex; flex-direction: column; gap: 10px;
  opacity: 0; transform: translateX(20px); transition: opacity .3s, transform .3s; pointer-events: none;
}
#rightside.show { opacity: 1; transform: translateX(0); pointer-events: auto; }
#rightside button {
  width: 42px; height: 42px; border: none; border-radius: 8px; background: var(--card-bg); color: var(--theme-color);
  box-shadow: var(--shadow); cursor: pointer; font-size: 1.05em; transition: all .25s; position: relative;
}
#rightside button:hover { background: var(--theme-color); color: #fff; transform: translateY(-3px); }
#go-up .scroll-percent { position: absolute; inset: 0; display: none; align-items: center; justify-content: center; font-size: .7em; font-weight: 700; }
#go-up.scrolled .scroll-percent { display: flex; }
#go-up.scrolled i { display: none; }

/* ---------- 移动端抽屉 ---------- */
#sidebar { position: fixed; top: 0; left: 0; bottom: 0; z-index: 300; width: 260px; transform: translateX(-100%); transition: transform .3s; }
#sidebar.open { transform: translateX(0); }
#menu-mask { position: fixed; inset: 0; background: rgba(0,0,0,.5); opacity: 0; visibility: hidden; transition: all .3s; z-index: -1; }
#sidebar.open #menu-mask { opacity: 1; visibility: visible; }
#sidebar-menus { background: var(--card-bg); height: 100%; padding: 40px 20px; overflow-y: auto; box-shadow: 4px 0 20px rgba(0,0,0,.15); }
#sidebar .avatar-img { width: 90px; height: 90px; margin: 0 auto 16px; border-radius: 50%; overflow: hidden; border: 3px solid #fff; box-shadow: 0 0 0 4px var(--theme-color); }
#sidebar .avatar-img img { width: 100%; height: 100%; object-fit: cover; }
#sidebar .site-data { display: flex; justify-content: space-around; margin: 16px 0; }
#sidebar .site-data .headline { font-size: .78em; color: var(--text-light); }
#sidebar .site-data .length-num { font-size: 1.2em; font-weight: 700; color: var(--theme-color); }
#sidebar .menus_items { flex-direction: column; gap: 4px; margin-top: 10px; }
#sidebar .menus_item > a { padding: 10px 14px; border-radius: 6px; }

/* ---------- 搜索弹窗 ---------- */
#search-mask { position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 400; opacity: 0; visibility: hidden; transition: all .3s; }
#search-mask.open { opacity: 1; visibility: visible; }
#local-search { position: fixed; top: 12%; left: 50%; transform: translateX(-50%) scale(.96); width: min(90vw, 560px); max-height: 76vh; background: var(--card-bg); border-radius: 12px; box-shadow: 0 20px 60px rgba(0,0,0,.3); z-index: 401; opacity: 0; visibility: hidden; transition: all .3s; display: flex; flex-direction: column; overflow: hidden; }
#local-search.open { opacity: 1; visibility: visible; transform: translateX(-50%) scale(1); }
.search-dialog { display: flex; flex-direction: column; height: 100%; }
.search-dialog-header { display: flex; align-items: center; gap: 10px; padding: 16px 18px; border-bottom: 1px solid var(--border); }
.search-input-wrap { flex: 1; display: flex; align-items: center; gap: 10px; background: var(--body-bg); border-radius: 8px; padding: 10px 14px; }
.search-input-wrap i { color: var(--text-light); }
#local-search-input { flex: 1; border: none; background: none; outline: none; font-size: 1em; color: var(--text); font-family: var(--font-family); }
#search-close { cursor: pointer; font-size: 1.2em; color: var(--text-light); padding: 6px; }
#search-close:hover { color: var(--theme-color); }
#local-search-stats { padding: 10px 18px; font-size: .82em; color: var(--text-light); border-bottom: 1px solid var(--border); }
#local-search-results { overflow-y: auto; padding: 10px 18px 18px; }
.search-result-item { padding: 12px 0; border-bottom: 1px dashed var(--border); cursor: pointer; }
.search-result-item:hover .search-result-title { color: var(--theme-color); }
.search-result-title { font-weight: 700; font-size: 1.02em; }
.search-result-preview { font-size: .85em; color: var(--text-light); margin-top: 4px; line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.search-result-item mark { background: #fff3a3; color: #d63384; padding: 0 2px; border-radius: 2px; }
.search-empty { padding: 30px; text-align: center; color: var(--text-light); }

/* ---------- 滚动渐显（增加的动效，仅透明度避免与悬停冲突） ---------- */
.reveal { opacity: 0; transition: opacity .6s ease; }
.reveal.in { opacity: 1; }

/* 单/双栏切换（增加的动效） */
body.hide-aside #aside-content { display: none; }
body.hide-aside .layout { max-width: 100%; padding: 40px 5%; }
body.hide-aside #recent-posts { width: 100%; max-width: 100%; }

/* ---------- 响应式 ---------- */
@media (max-width: 1024px) {
  .layout { flex-direction: column; }
  .aside-content { width: 100%; }
  .sticky_layout { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
  .sticky_layout .card-webinfo, .sticky_layout .card-announcement { grid-column: 1 / -1; }
}
@media (max-width: 768px) {
  #nav { justify-content: space-between; }
  #blog-info { position: static; }
  #menus .menus_items, #menus #search-button { display: none; }
  #toggle-menu { display: block; }
  #page-header.full_page { height: 70vh; }
  #site-title { font-size: 2em; }
  .recent-post-item, .recent-post-item:nth-child(even) { flex-direction: column; }
  .post_cover { flex: none; max-width: 100%; width: 100%; height: 180px; }
  .sticky_layout { grid-template-columns: 1fr; }
  #rightside { right: 14px; bottom: 24px; }
}
@media (max-width: 480px) {
  .layout { padding: 24px 14px; }
  #nav { padding: 0 14px; }
}

/* ---------- 微信二维码弹窗 ---------- */
#wechat-modal-mask {
  position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 1100;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden; transition: all .3s ease;
}
#wechat-modal-mask.open { opacity: 1; visibility: visible; }
#wechat-modal {
  position: relative; background: var(--card-bg); border-radius: 16px;
  padding: 22px; box-shadow: 0 20px 60px rgba(0,0,0,.35);
  max-width: min(90vw, 360px); text-align: center; transform: scale(.92);
  transition: transform .3s ease;
}
#wechat-modal-mask.open #wechat-modal { transform: scale(1); }
#wechat-modal .wm-close {
  position: absolute; top: 10px; right: 14px; font-size: 1.5em;
  color: var(--text-light); cursor: pointer; line-height: 1;
}
#wechat-modal .wm-close:hover { color: var(--theme-color); }
#wechat-modal img {
  width: 100%; max-width: 300px; border-radius: 10px;
  border: 1px solid var(--border);
}
#wechat-modal .wm-tip {
  margin-top: 12px; font-size: .95em; color: var(--text-light);
}
