﻿/* ===== 鱼干：玻璃质感 + 侧栏滚动逻辑（仿 Firefly） ===== */

:root {
  --yg-glass-bg: rgba(255, 255, 255, 0.62);
  --yg-glass-bg-strong: rgba(255, 255, 255, 0.82);
  --yg-glass-card: rgba(255, 255, 255, 0.72);
  --yg-glass-border: rgba(255, 255, 255, 0.55);
  --yg-glass-hi: rgba(255, 255, 255, 0.2);
  --yg-glass-line: rgba(0, 0, 0, 0.06);
  --yg-blur: 20px;
  --yg-sat: 1.5;
  --yg-accent: #00998e;
  --yg-text: #1f2937;
  --yg-muted: #5b6773;
}

html[data-theme="dark"] {
  --yg-glass-bg: rgba(24, 26, 30, 0.55);
  --yg-glass-bg-strong: rgba(24, 26, 30, 0.75);
  --yg-glass-card: rgba(26, 27, 29, 0.55);
  --yg-glass-border: rgba(255, 255, 255, 0.10);
  --yg-glass-hi: rgba(255, 255, 255, 0.06);
  --yg-glass-line: rgba(255, 255, 255, 0.10);
  --yg-sat: 1.15;
  --yg-accent: #2fe0d0;
  --yg-text: #e6ebf2;
  --yg-muted: #93a4b1;
}

/* ---------- 状态栏：Firefly 同款玻璃 ---------- */
#nav {
  background: var(--yg-glass-bg) !important;
  -webkit-backdrop-filter: blur(var(--yg-blur)) saturate(var(--yg-sat));
  backdrop-filter: blur(var(--yg-blur)) saturate(var(--yg-sat));
  box-shadow: inset 0 1px 0 var(--yg-glass-hi), 0 1px 0 var(--yg-glass-line) !important;
  transition: background 0.25s ease, box-shadow 0.25s ease !important;
}
#page-header.nav-fixed #nav,
#nav.show {
  background: var(--yg-glass-bg-strong) !important;
}

/* ---------- 文章卡片 / 侧栏卡片 ---------- */
.recent-post-item,
#aside-content .card-widget,
#aside-content .card-widget:hover,
#left-rail .card-widget {
  background: var(--yg-glass-card) !important;
  -webkit-backdrop-filter: blur(var(--yg-blur)) saturate(var(--yg-sat));
  backdrop-filter: blur(var(--yg-blur)) saturate(var(--yg-sat));
  border: 1px solid var(--yg-glass-border) !important;
  box-shadow:
    inset 0 1px 0 var(--yg-glass-hi),
    0 10px 30px -18px rgba(0, 0, 0, 0.5) !important;
  border-radius: 10px;
}

html[data-theme="dark"] .recent-post-item,
html[data-theme="dark"] #aside-content .card-widget,
html[data-theme="dark"] #left-rail .card-widget {
  box-shadow:
    inset 0 1px 0 var(--yg-glass-hi),
    0 10px 30px -18px rgba(0, 0, 0, 0.8) !important;
}

/* 文章正文容器 */
#article-container,
.post {
  background: var(--yg-glass-card);
  -webkit-backdrop-filter: blur(var(--yg-blur)) saturate(var(--yg-sat));
  backdrop-filter: blur(var(--yg-blur)) saturate(var(--yg-sat));
  border-radius: 10px;
}

/* ---------- 侧栏：吸顶 / 跟随滚动 ---------- */
#aside-content {
  align-self: start;
}
#aside-content .card-toc {
  position: static;
  top: 84px;
  z-index: 6;
}
/* 其它卡片随页面滚动，不吸顶 */
#aside-content .card-info,
#aside-content .card-announcement,
#aside-content .card-recent-post,
#aside-content .card-categories,
#aside-content .card-tags,
#aside-content .card-music {
  position: static;
}

/* 目录卡片 */
#aside-content .card-toc .toc-content {
  max-height: 44vh;
  overflow-y: auto;
  scrollbar-width: thin;
}
#aside-content .card-toc .toc-content ol,
#aside-content .card-toc .toc-content ul {
  margin: 0;
  padding-left: 1.1em;
  list-style: none;
}
#aside-content .card-toc a {
  display: block;
  padding: 4px 6px;
  margin: 1px 0;
  font-size: 0.82rem;
  color: var(--yg-muted);
  text-decoration: none;
  border-left: 2px solid transparent;
  border-radius: 4px;
  transition: color 0.18s, background 0.18s, border-color 0.18s;
}
#aside-content .card-toc a:hover {
  color: var(--yg-text);
  background: rgba(128, 128, 128, 0.12);
}
#aside-content .card-toc a.active {
  color: var(--yg-accent);
  border-left-color: var(--yg-accent);
  background: rgba(0, 210, 190, 0.1);
}

/* ---------- 音乐卡片 ---------- */
.card-music .yg-music {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 0 2px;
}
.yg-music-cover {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--yg-accent), rgba(0, 210, 190, 0.25));
  display: grid;
  place-items: center;
  color: #fff;
  flex: none;
}
.yg-music-cover i { font-size: 18px; }
.yg-music-main { flex: 1; min-width: 0; }
.yg-music-title {
  font-size: 0.86rem;
  color: var(--yg-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.yg-music-sub {
  font-size: 0.72rem;
  color: var(--yg-muted);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.yg-music-btn {
  border: none;
  background: var(--yg-accent);
  color: #fff;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: grid;
  place-items: center;
  flex: none;
  transition: transform 0.15s ease, opacity 0.15s ease;
}
.yg-music-btn:hover { transform: scale(1.06); }
.yg-music-btn[disabled] { opacity: 0.45; cursor: not-allowed; }
.yg-music-bar {
  position: relative;
  height: 3px;
  border-radius: 2px;
  background: rgba(128, 128, 128, 0.22);
  margin-top: 10px;
  overflow: hidden;
}
.yg-music-bar > i {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0%;
  background: var(--yg-accent);
  border-radius: 2px;
  transition: width 0.2s linear;
}

@media (max-width: 1023px) {
  #aside-content .card-toc { position: static; }
}

/* ================= 左右栏布局（全百分比，跟随原站断点） ================= */

/* 2K 及以上：沿用他的 max-width: 70%，三栏按比例 */
@media (min-width: 2000px) {
  #content-inner.layout {
    max-width: 70% !important;
  }
  #left-rail {
    order: -1;
    flex: 0 0 15%;
    align-self: stretch;
  }
  .layout > div:first-child {
    flex: 1 1 auto;
    width: auto !important;
  }
  #aside-content {
    flex: 0 0 26%;
    width: 26% !important;
    padding-left: 15px !important;
  }
}

/* 1440 ~ 1999：容器 92%，仍按比例，不锁 px */
@media (min-width: 1440px) and (max-width: 1999px) {
  #content-inner.layout {
    max-width: 92% !important;
  }
  #left-rail {
    order: -1;
    flex: 0 0 16%;
    align-self: stretch;
  }
  .layout > div:first-child {
    flex: 1 1 auto;
    width: auto !important;
  }
  #aside-content {
    flex: 0 0 26%;
    width: 26% !important;
    padding-left: 15px !important;
  }
}

/* 1200 ~ 1439：隐藏左栏，回到他的 1200 / 74% / 26% */
@media (min-width: 1200px) and (max-width: 1439px) {
  #content-inner.layout {
    max-width: 1200px !important;
  }
  #left-rail { display: none; }
  .layout > div:first-child { width: 74% !important; }
  #aside-content {
    width: 26% !important;
    padding-left: 15px !important;
  }
}

/* 901 ~ 1199：他的原生 74/26 */
@media (min-width: 901px) and (max-width: 1199px) {
  #left-rail { display: none; }
}

/* 手机：他的单栏 */
@media (max-width: 900px) {
  #left-rail { display: none; }
}

/* 左栏吸顶组 */



/* 左栏卡片与右栏共用同一套内部样式（index.css 已把 #aside-content 规则复制给 #left-rail） */
#left-rail .card-widget {
  border-radius: 10px;
}


/* ===== 侧栏缩略图尺寸约束（修复右栏被封面撑爆） ===== */
#aside-content .aside-list > .aside-list-item .thumbnail,
#left-rail .aside-list > .aside-list-item .thumbnail {
  width: 4em !important;
  height: 4em !important;
  flex: none;
  overflow: hidden;
  border-radius: 6px;
}
#aside-content .aside-list > .aside-list-item .thumbnail img,
#left-rail .aside-list > .aside-list-item .thumbnail img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover;
  display: block;
}
#aside-content .aside-list > .aside-list-item .content,
#left-rail .aside-list > .aside-list-item .content {
  min-width: 0;
  flex: 1;
}

/* aside 自身不要 sticky，避免高度塌陷后子元素溢出 */
#aside-content {
  position: static !important;
  height: auto !important;
}

/* 目录卡单独吸顶 */
#aside-content .card-toc {
  position: static !important;
  top: 84px;
}
#aside-content .card-toc .toc-content {
  max-height: 44vh;
  overflow-y: auto;
}

/* ===== 侧栏"最新文章"列表：强制 flex 行 + 4em 缩略图 ===== */
#aside-content .aside-list,
#left-rail .aside-list {
  display: flex;
  flex-direction: column;
}
#aside-content .aside-list > .aside-list-item,
#left-rail .aside-list > .aside-list-item {
  display: flex !important;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
}
#aside-content .aside-list > .aside-list-item > .thumbnail,
#left-rail .aside-list > .aside-list-item > .thumbnail {
  display: block !important;
  flex: 0 0 4em !important;
  width: 4em !important;
  height: 4em !important;
  overflow: hidden;
  border-radius: 6px;
}
#aside-content .aside-list > .aside-list-item > .thumbnail > img,
#left-rail .aside-list > .aside-list-item > .thumbnail > img {
  display: block;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover;
  margin: 0 !important;
}
#aside-content .aside-list > .aside-list-item > .content,
#left-rail .aside-list > .aside-list-item > .content {
  flex: 1 1 auto !important;
  min-width: 0;
  padding-left: 0 !important;
}

/* aside 不能是滚动容器，否则 sticky 子元素会重叠/被裁剪 */
#aside-content {
  overflow: visible !important;
  height: auto !important;
  max-height: none !important;
}
#aside-content .card-toc {
  position: static !important;
  top: 84px;
  z-index: 5;
}

/* ===== 卡片间距 + 可读性修正 ===== */
#aside-content .card-widget,
#left-rail .card-widget {
  margin-bottom: 20px !important;
}

/* 亮色：玻璃稍实一点，卡片之间能看出层次 */
html:not([data-theme="dark"]) #aside-content .card-widget,
html:not([data-theme="dark"]) #left-rail .card-widget,
html:not([data-theme="dark"]) .recent-post-item {
  background: rgba(255, 255, 255, 0.86) !important;
}

/* 目录文字颜色 */
#aside-content .card-toc a {
  color: #475569;
}
#aside-content .card-toc a:hover,
#aside-content .card-toc a.active {
  color: var(--yg-accent);
}
html[data-theme="dark"] #aside-content .card-toc a {
  color: #cbd5e1;
}

/* ===== 右栏"最新文章"严格约束 ===== */
#aside-content .card-widget {
  overflow: hidden !important;
}
#aside-content .card-recent-post .item-headline,
#aside-content .card-toc .item-headline {
  position: relative;
  z-index: 2;
}
#aside-content .card-recent-post .aside-list {
  display: block !important;
}
#aside-content .card-recent-post .aside-list-item {
  display: flex !important;
  align-items: center !important;
  gap: 8px;
  width: 100%;
  overflow: hidden;
  padding: 6px 0 !important;
}
#aside-content .card-recent-post .aside-list-item .thumbnail {
  flex: 0 0 48px !important;
  width: 48px !important;
  height: 48px !important;
  overflow: hidden;
  border-radius: 6px;
}
#aside-content .card-recent-post .aside-list-item .thumbnail img {
  width: 48px !important;
  height: 48px !important;
  object-fit: cover;
  display: block;
}
#aside-content .card-recent-post .aside-list-item .content {
  flex: 1 1 auto !important;
  min-width: 0 !important;
  overflow: hidden;
}
#aside-content .card-recent-post .aside-list-item .content .title {
  display: block;
  max-width: 100%;
  font-size: 0.84rem;
  line-height: 1.4;
  color: var(--yg-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
#aside-content .card-recent-post .aside-list-item .content .date {
  display: block;
  font-size: 0.72rem;
  color: #94a3b8;
}

#left-rail .sticky_layout { position: static; top: 20px; }

/* ============ Firefly 风格侧栏（左/右统一） ============ */

:root {
  --yg-radius: 18px;           /* 与文章卡片一致 */
  --yg-gap: 26px;
}

/* 左右栏与正文的间隔 */
#left-rail {
  padding-right: var(--yg-gap) !important;
  box-sizing: border-box;
}
#aside-content {
  padding-left: 15px !important;
}

/* 统一圆角：文章卡 / 侧栏卡 / 正文容器 */
.recent-post-item,
#aside-content .card-widget,
#left-rail .card-widget,
#article-container,
#post {
  border-radius: var(--yg-radius) !important;
}

/* 左栏资料卡：Firefly 那种圆形头像 + 渐变描边 */
#left-rail .card-info {
  text-align: center;
  padding: 26px 20px 20px !important;
}
#left-rail .card-info .avatar-img img {
  width: 88px !important;
  height: 88px !important;
  border-radius: 50% !important;
  object-fit: cover;
  padding: 3px;
  background: linear-gradient(135deg, var(--yg-accent), rgba(0, 210, 190,.15));
  box-shadow: 0 6px 18px -8px rgba(0,0,0,.45);
}
#left-rail .author-info-name {
  margin-top: 10px;
  font-size: 1.05rem !important;
  font-weight: 700;
  color: var(--yg-text);
}
#left-rail .author-info-description {
  margin-top: 2px !important;
  font-size: .76rem;
  color: var(--yg-muted);
}
#left-rail .card-info-social-icons {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 14px;
}
#left-rail .card-info-social-icons .social-icon {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: rgba(128,128,128,.12);
  color: var(--yg-muted);
  text-decoration: none;
  transition: background .2s, color .2s, transform .2s;
}
#left-rail .card-info-social-icons .social-icon:hover {
  background: var(--yg-accent);
  color: #fff;
  transform: translateY(-2px);
}

/* 分类 / 标签列表：Firefly 的行式布局 */
#left-rail .card-category-list,
#left-rail .card-archive-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
#left-rail .card-category-list-item,
#left-rail .card-archive-list-item {
  margin: 0;
}
#left-rail .card-category-list-item > a,
#left-rail .card-archive-list-item > a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 6px;
  border-radius: 6px;
  color: var(--yg-text);
  font-size: .86rem;
  text-decoration: none;
  transition: background .18s, color .18s;
}
#left-rail .card-category-list-item > a:hover,
#left-rail .card-archive-list-item > a:hover {
  background: rgba(128,128,128,.14);
  color: var(--yg-accent);
}
#left-rail .card-category-list-item > a > span,
#left-rail .card-archive-list-item > a > span {
  color: var(--yg-muted);
  font-size: .78rem;
}

/* 侧栏卡片标题统一（Firefly 的细横线 + 强调条） */
#left-rail .item-headline,
#aside-content .item-headline {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .92rem !important;
  padding-bottom: 10px !important;
  margin-bottom: 6px;
  border-bottom: 1px dashed var(--yg-glass-line);
}
#left-rail .item-headline::before,
#aside-content .item-headline::before {
  content: "";
  width: 3px;
  height: 14px;
  border-radius: 2px;
  background: var(--yg-accent);
}
#left-rail .item-headline i,
#aside-content .item-headline i {
  display: none;
}

/* ============ 右栏列表改成左栏分类那种行式 + 两栏等宽 ============ */

/* 1) 左右栏等宽（各 16%），正文自然变宽 */
@media (min-width: 2000px) {
  #left-rail { flex: 0 0 16% !important; }
  #aside-content { flex: 0 0 16% !important; width: 16% !important; }
}
@media (min-width: 1440px) and (max-width: 1999px) {
  #left-rail { flex: 0 0 16% !important; }
  #aside-content { flex: 0 0 16% !important; width: 16% !important; }
}

/* 2) 卡片底色更实，左右一致（避免右侧被壁纸染成青色） */
html:not([data-theme="dark"]) #aside-content .card-widget,
html:not([data-theme="dark"]) #left-rail .card-widget {
  background: rgba(255, 255, 255, 0.92) !important;
}
html[data-theme="dark"] #aside-content .card-widget,
html[data-theme="dark"] #left-rail .card-widget {
  background: rgba(24, 26, 30, 0.88) !important;
}

/* 3) 右栏"最新文章"：去掉缩略图，改成 左标题 / 右日期 的行 */
#aside-content .card-recent-post .aside-list-item {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 6px !important;
  border-radius: 6px;
  transition: background .18s;
}
#aside-content .card-recent-post .aside-list-item:hover {
  background: rgba(128, 128, 128, 0.14);
}
#aside-content .card-recent-post .aside-list-item .thumbnail {
  display: none !important;
}
#aside-content .card-recent-post .aside-list-item .content {
  display: flex !important;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  min-width: 0;
  padding-left: 0 !important;
}
#aside-content .card-recent-post .aside-list-item .content .title {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 0.86rem;
  color: var(--yg-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
#aside-content .card-recent-post .aside-list-item .content .date {
  flex: 0 0 auto;
  font-size: 0.76rem;
  color: var(--yg-muted);
  white-space: nowrap;
}

/* 4) 左栏头像改成同圆角的圆角矩形 */
#left-rail .card-info .avatar-img img {
  width: 84px !important;
  height: 84px !important;
  border-radius: var(--yg-radius) !important;
  padding: 0 !important;
  background: transparent !important;
  border: 3px solid rgba(0, 210, 190, 0.28);
  object-fit: cover;
  box-shadow: 0 8px 20px -10px rgba(0, 0, 0, 0.5);
}

/* 侧栏卡片用近乎实底，避免被壁纸染成青绿色，左右一致 */
html[data-theme="dark"] #aside-content .card-widget,
html[data-theme="dark"] #left-rail .card-widget {
  background: rgba(22, 24, 28, 0.96) !important;
}
html:not([data-theme="dark"]) #aside-content .card-widget,
html:not([data-theme="dark"]) #left-rail .card-widget {
  background: #ffffff !important;
}

/* 彻底去掉右栏卡片里的图片背景（缩略图已不需要） */
#aside-content .card-recent-post img {
  display: none !important;
}
#aside-content .card-recent-post,
#aside-content .card-recent-post .aside-list,
#aside-content .card-recent-post .aside-list-item,
#aside-content .card-recent-post .content {
  background-image: none !important;
}

/* 自建"最新文章"列表：与左栏分类同一套行式设计 */
#aside-content .yg-recent {
  list-style: none;
  margin: 0;
  padding: 0;
}
#aside-content .yg-recent li { margin: 0; }
#aside-content .yg-recent a {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 6px;
  border-radius: 6px;
  text-decoration: none;
  transition: background .18s, color .18s;
}
#aside-content .yg-recent a:hover { background: rgba(128,128,128,.14); }
#aside-content .yg-recent .t {
  flex: 1 1 auto;
  min-width: 0;
  font-size: .86rem;
  color: var(--yg-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
#aside-content .yg-recent .d {
  flex: 0 0 auto;
  font-size: .76rem;
  color: var(--yg-muted);
  white-space: nowrap;
}

/* 左右栏容器本身不要背景色（原站在 aside 上设了青色底） */
#aside-content,
#left-rail {
  background: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
  border: none !important;
}

/* ================= Firefly 结构侧栏（自建组件） ================= */
:root {
  --yg-card-bg: #ffffff;
  --yg-card-border: rgba(0, 0, 0, 0.06);
  --yg-card-shadow: 0 2px 10px -4px rgba(0, 0, 0, 0.12);
  --yg-hair: rgba(0, 0, 0, 0.08);
}
html[data-theme="dark"] {
  --yg-card-bg: rgba(24, 26, 30, 0.92);
  --yg-card-border: rgba(255, 255, 255, 0.08);
  --yg-card-shadow: 0 2px 14px -6px rgba(0, 0, 0, 0.7);
  --yg-hair: rgba(255, 255, 255, 0.10);
}

/* 壁纸未加载时的中性占位色（去掉青色） */
#web_bg, #page-header {
  background-color: #0f1419 !important;
}
html:not([data-theme="dark"]) #web_bg,
html:not([data-theme="dark"]) #page-header {
  background-color: #dfe6e9 !important;
}

.yg-card {
  background: var(--yg-card-bg);
  border: 1px solid var(--yg-card-border);
  border-radius: var(--yg-radius);
  box-shadow: var(--yg-card-shadow);
  padding: 18px 20px;
  margin-bottom: 20px;
}
.yg-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--yg-text);
  padding-bottom: 10px;
  margin-bottom: 6px;
  border-bottom: 1px dashed var(--yg-hair);
}
.yg-head i {
  width: 3px; height: 14px;
  background: var(--yg-accent);
  border-radius: 2px;
  font-size: 0;
}

/* 资料卡 */
.yg-profile { text-align: center; padding: 22px 20px 18px; }
.yg-avatar {
  width: 84px; height: 84px;
  border-radius: var(--yg-radius);
  object-fit: cover;
  border: 3px solid rgba(0, 210, 190, 0.28);
  display: block;
  margin: 0 auto;
}
.yg-name { margin-top: 10px; font-weight: 700; font-size: 1.02rem; color: var(--yg-text); }
.yg-bio { margin-top: 2px; font-size: 0.76rem; color: var(--yg-muted); }
.yg-social { display: flex; justify-content: center; gap: 10px; margin-top: 14px; }
.yg-social a {
  width: 32px; height: 32px; border-radius: 8px;
  display: grid; place-items: center;
  background: rgba(128, 128, 128, 0.12);
  color: var(--yg-muted);
  text-decoration: none;
  transition: background .2s, color .2s, transform .2s;
}
.yg-social a:hover { background: var(--yg-accent); color: #fff; transform: translateY(-2px); }

/* 文本与行列表 */
.yg-text { margin: 2px 0 0; font-size: 0.86rem; color: var(--yg-muted); line-height: 1.7; }
.yg-rows { list-style: none; margin: 0; padding: 0; }
.yg-rows li { margin: 0; }
.yg-rows li a, .yg-row {
  display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
  padding: 7px 6px; border-radius: 6px;
  font-size: 0.85rem; color: var(--yg-text); text-decoration: none;
  transition: background .18s, color .18s;
}
.yg-rows li a:hover { background: rgba(128, 128, 128, 0.14); color: var(--yg-accent); }
.yg-row-name { flex: 1 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.yg-row-val { flex: 0 0 auto; font-size: 0.76rem; color: var(--yg-muted); white-space: nowrap; }

/* 标签 */
.yg-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.yg-tags a {
  font-size: 0.76rem; padding: 3px 10px; border-radius: 999px;
  background: rgba(128, 128, 128, 0.12);
  border: 1px solid var(--yg-hair);
  color: var(--yg-text); text-decoration: none;
  transition: background .18s, color .18s;
}
.yg-tags a:hover { background: rgba(128, 128, 128, 0.22); color: var(--yg-accent); }

/* 吸顶组 */
.yg-sticky { position: static; top: 84px; }

/* 目录 */
.yg-toc-list { list-style: none; margin: 0; padding: 0; max-height: 46vh; overflow-y: auto; }
.yg-toc-list li { margin: 0; }
.yg-toc-list a {
  display: block; padding: 5px 8px; margin: 1px 0; border-radius: 6px;
  font-size: 0.82rem; color: var(--yg-muted); text-decoration: none;
  border-left: 2px solid transparent;
  transition: color .18s, background .18s, border-color .18s;
}
.yg-toc-list a:hover { background: rgba(128, 128, 128, 0.12); color: var(--yg-text); }
.yg-toc-list a.active { color: var(--yg-accent); border-left-color: var(--yg-accent); background: rgba(0, 210, 190, 0.10); }

/* 音乐 */
.yg-music { display: flex; align-items: center; gap: 12px; padding-top: 4px; }
.yg-music-cover {
  width: 46px; height: 46px; border-radius: 8px; flex: none;
  display: grid; place-items: center; color: #fff;
  background: linear-gradient(135deg, var(--yg-accent), rgba(0, 210, 190, 0.25));
}
.yg-music-info { flex: 1; min-width: 0; }
.yg-music-title { font-size: 0.86rem; color: var(--yg-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.yg-music-sub { font-size: 0.72rem; color: var(--yg-muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.yg-music-btn {
  flex: none; width: 30px; height: 30px; border-radius: 50%;
  border: none; background: var(--yg-accent); color: #fff;
  display: grid; place-items: center; cursor: pointer;
}
.yg-music-btn[disabled] { opacity: .45; cursor: not-allowed; }
.yg-music-bar { height: 3px; border-radius: 2px; background: rgba(128, 128, 128, 0.22); margin-top: 10px; overflow: hidden; }
.yg-music-bar > i { display: block; width: 0; height: 100%; background: var(--yg-accent); }

/* ===== 统一卡片背景：全部跟文章卡片一致 ===== */
:root {
  --yg-article-bg: rgba(255, 255, 255, 0.86);
  --yg-article-border: rgba(255, 255, 255, 0.55);
}
html[data-theme="dark"] {
  --yg-article-bg: rgba(26, 27, 29, 0.55);
  --yg-article-border: rgba(255, 255, 255, 0.08);
}

.recent-post-item,
#post,
#article-container,
.yg-card,
#left-rail .rail-card,
#aside-content .card-widget,
#left-rail .card-widget {
  background: var(--yg-article-bg) !important;
  -webkit-backdrop-filter: blur(20px) saturate(1.5);
  backdrop-filter: blur(20px) saturate(1.5);
  border: 1px solid var(--yg-article-border) !important;
}

/* ===== 加宽容器与两栏，正文不缩水；字号整体上调 ===== */

/* 2K 及以上：容器 80%，左右栏各 17%，正文约 66% */
@media (min-width: 2000px) {
  #content-inner.layout { max-width: 80% !important; }
  #left-rail { flex: 0 0 17% !important; }
  #aside-content { flex: 0 0 17% !important; width: 17% !important; }
  .layout > div:first-child { width: auto !important; flex: 1 1 auto !important; }
}

/* 1440 ~ 1999：容器 94% */
@media (min-width: 1440px) and (max-width: 1999px) {
  #content-inner.layout { max-width: 94% !important; }
  #left-rail { flex: 0 0 17% !important; }
  #aside-content { flex: 0 0 17% !important; width: 17% !important; }
  .layout > div:first-child { width: auto !important; flex: 1 1 auto !important; }
}

/* 正文最小阅读宽度，避免被两栏挤窄 */
.layout > div:first-child {
  min-width: 900px;
}

/* 字号上调 */
#article-container {
  font-size: 1.03rem;
}
#article-container p,
#article-container li {
  font-size: 1.02rem;
  line-height: 1.95;
}
#article-container h2 { font-size: 1.4rem; }
#article-container h3 { font-size: 1.18rem; }
#recent-posts .article-title { font-size: 1.62em !important; }
#recent-posts .content { font-size: 0.94rem !important; }

/* 侧栏文字同步放大一点 */
.yg-name { font-size: 1.08rem; }
.yg-bio { font-size: 0.8rem; }
.yg-text { font-size: 0.9rem; }
.yg-head { font-size: 0.95rem; }
.yg-rows li a, .yg-row { font-size: 0.9rem; }
.yg-row-val { font-size: 0.8rem; }
.yg-tags a { font-size: 0.8rem; }
.yg-toc-list a { font-size: 0.86rem; }

/* ===== 加载遮罩：图片加载前黑底，加载完渐显 ===== */
html { background: #000; }
body { background: transparent; }

#yg-preload {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: #000;
  opacity: 1;
  transition: opacity 0.7s ease;
  pointer-events: none;
}
#yg-preload.hide { opacity: 0; }

/* 顶图渐显（由遮罩淡出实现，避免 JS 失败时内容被隐藏） */

/* ===== 文章详情页组件适配 ===== */
#post-info .post-title {
  font-size: clamp(1.6rem, 2.4vw, 2.2rem) !important;
  font-weight: 700;
  line-height: 1.35;
}
#post-info .post-meta,
#post-info .meta-firstline,
#post-info .meta-secondline {
  color: rgba(255, 255, 255, 0.78) !important;
  font-size: 0.86rem;
}
/* 版权卡 */
#article-container .post-copyright {
  background: var(--yg-article-bg) !important;
  border: 1px solid var(--yg-article-border) !important;
  border-radius: var(--yg-radius) !important;
  box-shadow: none !important;
  padding: 16px 18px !important;
  margin: 28px 0 0 !important;
  font-size: 0.84rem;
}
#article-container .post-copyright__title { font-weight: 600; }
#article-container .post-copyright a { color: var(--yg-accent); }
/* 标签 */
.post-tags a,
#article-container .post-tags a,
.tag_share a {
  display: inline-block;
  padding: 3px 12px !important;
  margin: 0 6px 6px 0 !important;
  border-radius: 999px !important;
  background: rgba(0, 210, 190, 0.12) !important;
  border: 1px solid rgba(0, 210, 190, 0.28) !important;
  color: var(--yg-accent) !important;
  font-size: 0.78rem !important;
  text-decoration: none;
  transition: background .18s, color .18s;
}
.post-tags a:hover,
#article-container .post-tags a:hover {
  background: var(--yg-accent) !important;
  color: #fff !important;
}
/* 分享区 */
.post-share,
#article-container .post-share {
  margin: 22px 0 0 !important;
  padding-top: 16px;
  border-top: 1px dashed var(--yg-hair);
}
.post-share .social-share { opacity: 0.85; }
/* 相关文章 / 上下篇 */
#pagination.pagination-post,
.relatedPosts,
.recommend-post {
  background: var(--yg-article-bg) !important;
  border: 1px solid var(--yg-article-border) !important;
  border-radius: var(--yg-radius) !important;
  box-shadow: none !important;
  margin-top: 20px !important;
  overflow: hidden;
}
#pagination.pagination-post .pagination-related,
.relatedPosts .relatedPosts-list > div {
  border-radius: 8px;
}
#pagination.pagination-post .pagination-related:hover,
.relatedPosts .relatedPosts-list > div:hover {
  background: rgba(128, 128, 128, 0.10);
}
.pagination-related .info .info-1,
.pagination-related .info .info-2 { font-size: 0.86rem; }
/* 文章页目录高亮 */
#aside-content .yg-toc-list a.active { font-weight: 600; }

/* ===== 导航滚动联动 + 主题按钮 ===== */






/* ===== 文章详情：正文透明，只有顶栏有遮罩（和原站一致） ===== */
#post,
#article-container {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}
#article-container {
  border-radius: 0 !important;
}
/* 透明背景下的文字可读性 */
#article-container,
#article-container p,
#article-container li {
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.06);
}
html[data-theme="dark"] #article-container,
html[data-theme="dark"] #article-container p,
html[data-theme="dark"] #article-container li {
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

/* ===== 状态栏：顶部透明融进顶图，滚动后与遮罩同色 ===== */
#page-header:not(.nav-fixed) #nav {
  background: transparent !important;
  -webkit-box-shadow: none !important;
  box-shadow: none !important;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
#page-header:not(.nav-fixed) #nav .site-page,
#page-header:not(.nav-fixed) #nav .site-name,
#page-header:not(.nav-fixed) #nav .search,
#page-header:not(.nav-fixed) #nav i {
  color: var(--yg-nav-fg) !important;
  text-shadow: var(--yg-nav-text-shadow) !important;
}

#page-header.nav-fixed #nav {
  background: var(--yg-nav-bg) !important;
  -webkit-backdrop-filter: blur(12px) saturate(1.3);
  backdrop-filter: blur(12px) saturate(1.3);
  -webkit-box-shadow: 0 6px 18px -12px rgba(0, 0, 0, 0.6) !important;
  box-shadow: 0 6px 18px -12px rgba(0, 0, 0, 0.6) !important;
}
html[data-theme="dark"] #page-header.nav-fixed #nav {
  background: var(--yg-nav-bg-strong) !important;
}
#page-header.nav-fixed #nav .site-page,
#page-header.nav-fixed #nav .site-name,
#page-header.nav-fixed #nav .search,
#page-header.nav-fixed #nav i {
  color: var(--yg-nav-fg) !important;
  text-shadow: var(--yg-nav-text-shadow) !important;
}

/* ===== 常驻播放器 + 导航栏音乐按钮 ===== */
#yg-player-dock {
  position: fixed;
  left: -9999px;
  top: 0;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.yg-nav-music {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  margin-right: 10px;
  border: none;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  cursor: pointer;
  transition: background .2s, transform .2s;
}
.yg-nav-music:hover { background: rgba(255, 255, 255, 0.3); transform: translateY(-1px); }
.yg-nav-music.playing { background: var(--yg-accent); }
.yg-nav-music.playing i { animation: yg-pulse 1.2s ease-in-out infinite; }
@keyframes yg-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.18); }
}

/* 左栏音乐卡：三个按钮排布 */
.yg-music { flex-wrap: wrap; }
.yg-music .yg-music-btn {
  width: 28px;
  height: 28px;
  font-size: 0.72rem;
}
.yg-music .yg-music-btn:not([disabled]):hover { background: var(--yg-accent); color: #fff; }



/* ================= 音乐组件（卡片 + 悬浮面板） ================= */
.yg-music-bar {
  position: relative;
  height: 6px;
  margin-top: 14px;
  border-radius: 3px;
  background: rgba(128, 128, 128, 0.28);
  overflow: visible;
  cursor: pointer;
}
.yg-music-bar > i {
  position: relative;
  display: block;
  width: 0;
  height: 100%;
  background: var(--yg-accent);
  border-radius: 3px;
  transition: width .2s linear;
}
.yg-music-bar > i::after {
  content: "";
  position: absolute;
  right: -4px;
  top: 50%;
  width: 10px;
  height: 10px;
  margin-top: -5px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--yg-accent);
  box-shadow: 0 1px 4px rgba(0, 0, 0, .25);
}

.yg-music-ctrl {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 12px;
}
.yg-music-ctrl .yg-music-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: none;
  display: grid;
  place-items: center;
  font-size: 0.72rem;
  background: rgba(128, 128, 128, 0.16);
  color: var(--yg-text);
  cursor: pointer;
  transition: background .18s, color .18s, transform .18s;
}
.yg-music-ctrl .yg-music-btn:hover { background: var(--yg-accent); color: #fff; transform: translateY(-1px); }
.yg-music-ctrl .yg-music-play {
  width: 38px;
  height: 38px;
  font-size: 0.9rem;
  background: var(--yg-accent);
  color: #fff;
}

/* 左栏歌单 */
.yg-music-list {
  list-style: none;
  margin: 12px -6px 0;
  padding: 0;
  max-height: 168px;
  overflow-y: auto;
  border-top: 1px dashed var(--yg-hair);
  padding-top: 6px;
}
.yg-music-list .yg-track,
.yg-pop-list .yg-track {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 6px 8px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--yg-text);
  font-size: 0.8rem;
  text-align: left;
  cursor: pointer;
}
.yg-music-list .yg-track:hover,
.yg-pop-list .yg-track:hover { background: rgba(128, 128, 128, 0.14); }
.yg-track.active { color: var(--yg-accent); }
.yg-track.active .yg-track-t { font-weight: 600; }
.yg-track-i { width: 16px; flex: none; opacity: .55; font-variant-numeric: tabular-nums; }
.yg-track-t { flex: 1 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.yg-track-a { flex: 0 0 auto; max-width: 45%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; opacity: .6; font-size: .74rem; }

/* 导航栏悬浮面板 */
.yg-player-pop {
  position: fixed;
  top: 72px;
  right: 20px;
  z-index: 1200;
  width: 320px;
  max-height: 72vh;
  padding: 16px;
  border-radius: 18px;
  background: var(--yg-article-bg);
  border: 1px solid var(--yg-article-border);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  backdrop-filter: blur(20px) saturate(1.4);
  box-shadow: 0 24px 60px -30px rgba(0, 0, 0, 0.55);
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
  overflow: hidden;
}
.yg-player-pop.open { opacity: 1; transform: translateY(0); pointer-events: auto; }

.yg-pop-head { display: flex; align-items: center; gap: 12px; }
.yg-pop-cover {
  width: 52px; height: 52px; flex: none;
  border-radius: 10px;
  display: grid; place-items: center;
  color: #fff;
  background: linear-gradient(135deg, var(--yg-accent), rgba(0, 210, 190, 0.3));
}
.yg-pop-meta { min-width: 0; }
.yg-pop-title { font-weight: 600; font-size: 0.92rem; color: var(--yg-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.yg-pop-artist { font-size: 0.76rem; color: var(--yg-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.yg-pop-progress { margin-top: 16px; cursor: pointer; }
.yg-pop-bar {
  display: block; height: 4px; border-radius: 2px;
  background: rgba(128, 128, 128, 0.22);
  overflow: hidden;
}
.yg-pop-bar > i { display: block; width: 0; height: 100%; background: var(--yg-accent); }
.yg-pop-times { display: flex; justify-content: space-between; margin-top: 6px; font-size: 0.72rem; color: var(--yg-muted); font-variant-numeric: tabular-nums; }

.yg-pop-ctrl { display: flex; align-items: center; justify-content: center; gap: 18px; margin-top: 12px; }
.yg-pop-ctrl button {
  border: none; background: transparent; color: var(--yg-text);
  width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center; cursor: pointer; font-size: 0.92rem;
  transition: background .18s, color .18s;
}
.yg-pop-ctrl button:hover { background: rgba(128, 128, 128, 0.16); color: var(--yg-accent); }
.yg-pop-ctrl .yg-pop-play { width: 44px; height: 44px; background: var(--yg-accent); color: #fff; font-size: 1rem; }
.yg-pop-ctrl .yg-pop-play:hover { background: var(--yg-accent); color: #fff; filter: brightness(1.08); }

.yg-pop-list { list-style: none; margin: 14px -6px 0; padding: 8px 0 0; border-top: 1px dashed var(--yg-hair); max-height: 190px; overflow-y: auto; }

@media (max-width: 900px) {
  .yg-player-pop { right: 10px; left: 10px; width: auto; }
}


/* 左栏进度条最终样式（覆盖旧规则） */
.yg-music-bar {
  position: relative;
  height: 6px;
  margin-top: 14px;
  border-radius: 3px;
  background: rgba(128, 128, 128, 0.28);
  overflow: visible;
  cursor: pointer;
}
.yg-music-bar > i {
  position: relative;
  display: block;
  width: 0;
  height: 100%;
  background: var(--yg-accent);
  border-radius: 3px;
  transition: width .2s linear;
}
.yg-music-bar > i::after {
  content: "";
  position: absolute;
  right: -5px;
  top: 50%;
  width: 10px;
  height: 10px;
  margin-top: -5px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--yg-accent);
  box-shadow: 0 1px 4px rgba(0, 0, 0, .25);
}


/* ===== Petronas 配色（块面亮青 / 文字深青） ===== */
:root {
  --yg-accent: #00c9ba;        /* 填充、条、按钮 */
  --yg-accent-ink: #007c73;    /* 浅色底上的文字/链接 */
  --yg-accent-soft: rgba(0, 210, 190, 0.16);
}
html[data-theme="dark"] {
  --yg-accent: #00d2be;
  --yg-accent-ink: #3ae6d6;
  --yg-accent-soft: rgba(0, 210, 190, 0.18);
}

/* 文字类使用深青，保证可读性 */
.yg-rows li a:hover,
.yg-tags a:hover,
.yg-toc-list a.active,
.yg-track.active,
#article-container .post-copyright a,
.yg-pop-ctrl button:hover,
.yg-toc-list a.active {
  color: var(--yg-accent-ink) !important;
}
.yg-toc-list a.active { border-left-color: var(--yg-accent); background: var(--yg-accent-soft); }

/* 填充类保持亮青 */
.yg-head i,
.yg-music-bar > i,
.yg-pop-bar > i,
.yg-music-ctrl .yg-music-play,
.yg-pop-ctrl .yg-pop-play,
.yg-nav-music.playing,
.yg-music-ctrl .yg-music-btn:hover,
.yg-social a:hover {
  background: var(--yg-accent);
}
.yg-music-bar > i::after {
  border-color: var(--yg-accent);
}

/* ===== 左栏音乐卡：封面独立成方块，宽度与进度条一致 ===== */
.yg-music-cover {
  width: 100%;
  aspect-ratio: 1 / 1;
  height: auto;
  border-radius: var(--yg-radius);
  margin-bottom: 12px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background-color: rgba(0, 210, 190, 0.12);
  background-image: linear-gradient(135deg, var(--yg-accent), rgba(0, 210, 190, 0.25));
  background-size: cover;
  background-position: center;
  color: #fff;
  font-size: 1.6rem;
}
.yg-music-cover > i { opacity: .85; }
.yg-music {
  display: block;
  padding: 0;
}
.yg-music-info {
  width: 100%;
  min-width: 0;
}
.yg-music-title {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--yg-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.yg-music-sub {
  margin-top: 2px;
  font-size: 0.76rem;
  color: var(--yg-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 左栏进度条下方：当前时间 / 总时长 */
.yg-music-times {
  display: flex;
  justify-content: space-between;
  margin-top: 5px;
  font-size: 0.7rem;
  color: var(--yg-muted);
  font-variant-numeric: tabular-nums;
}

/* ===== 原生滚动：保留视觉布局，移除所有跟随、吸顶和收展 ===== */
#left-rail {
  position: static !important;
  align-self: stretch !important;
  max-height: none !important;
  overflow: visible !important;
  padding-right: 0 !important;
}

.yg-sticky {
  position: static !important;
  max-height: none !important;
  overflow: visible !important;
  padding-right: 0 !important;
}
.yg-sticky .yg-card { margin-bottom: 16px; }

#aside-content {
  position: static !important;
  top: auto !important;
  align-self: flex-start !important;
  max-height: none !important;
  overflow: visible !important;
  animation: none !important;
  -webkit-animation: none !important;
  padding-right: 2px;
}
#aside-content .yg-card {
  animation: none !important;
  transition: background .2s ease, border-color .2s ease;
}

/* 顶栏保留原有悬浮外观，但随文档自然滚动，不再固定或收展 */
#page-header #nav {
  position: absolute !important;
  top: 12px !important;
  left: var(--yg-nav-x, 50%) !important;
  right: auto !important;
  width: var(--yg-nav-w, min(1400px, calc(100% - 48px))) !important;
  height: 62px !important;
  padding: 0 20px !important;
  border-radius: 18px !important;
  background: var(--yg-nav-bg);
  border: 1px solid rgba(255, 255, 255, 0.16) !important;
  -webkit-backdrop-filter: blur(18px) saturate(1.5);
  backdrop-filter: blur(18px) saturate(1.5);
  box-shadow: 0 14px 36px -22px rgba(0, 0, 0, 0.75);
  transform: none !important;
  translate: none !important;
  transition: background .2s ease, border-color .2s ease, box-shadow .2s ease !important;
  will-change: auto;
  z-index: 999;
}
#page-header #nav .site-page,
#page-header #nav .site-name,
#page-header #nav .search,
#page-header #nav i {
  color: var(--yg-nav-fg) !important;
  text-shadow: none !important;
}

@media (max-width: 900px) {
  #page-header #nav {
    width: calc(100% - 20px) !important;
    top: 8px !important;
    border-radius: 14px !important;
  }
}

/* ===== 三栏统一 20px 间隔（最终覆盖） ===== */
#content-inner.layout {
  gap: 20px !important;
}
#left-rail {
  padding-right: 0 !important;
}
#aside-content {
  padding-left: 0 !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

/* ===== 状态栏播放器：封面 + 三键 + 列表 ===== */
.yg-nav-music {
  display: flex !important;
  align-items: center;
  gap: 4px;
  margin-right: 10px;
  padding: 3px 5px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.10);
  width: auto !important;
  height: auto !important;
  transform: none !important;
}
.yg-nav-music .yg-nav-cover {
  width: 30px;
  height: 30px;
  flex: none;
  padding: 0;
  border: none;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.16);
}
.yg-nav-music .yg-nav-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.yg-nav-music .yg-nav-btn {
  width: 26px;
  height: 26px;
  flex: none;
  border: none;
  border-radius: 7px;
  background: transparent;
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 0.66rem;
  cursor: pointer;
  transition: background .18s, color .18s;
}
.yg-nav-music .yg-nav-btn:hover { background: rgba(255, 255, 255, 0.22); }
.yg-nav-music.playing .yg-nav-toggle { background: var(--yg-accent); color: #fff; }
.yg-nav-music[aria-expanded="true"] .yg-nav-list { background: rgba(255, 255, 255, 0.24); }

/* 面板位置由 JS 计算，交给它跟随图标 */
.yg-player-pop {
  top: auto;
  left: auto;
  right: auto;
}

/* ================= 状态栏音乐控件（沿用 #yg-nav-player 结构） ================= */
.yg-nav-player {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-right: 12px;
  padding: 4px 8px;
  height: 38px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.10);
  border: 1px solid rgba(255, 255, 255, 0.14);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  transition: background .2s ease, border-color .2s ease;
}
.yg-nav-player:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.22);
}
.yg-nav-player .yg-nav-cover {
  width: 30px;
  height: 30px;
  flex: none;
  padding: 0;
  border: none;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.16);
}
.yg-nav-player .yg-nav-cover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.yg-nav-player .yg-nav-btn {
  width: 24px;
  height: 24px;
  flex: none;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 0.64rem;
  cursor: pointer;
  transition: background .18s ease, color .18s ease;
}
.yg-nav-player .yg-nav-btn:hover {
  background: rgba(255, 255, 255, 0.22);
}
.yg-nav-player .yg-nav-toggle {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--yg-accent);
  color: #fff;
}
.yg-nav-player .yg-nav-toggle:hover {
  background: var(--yg-accent);
  filter: brightness(1.08);
}
.yg-nav-player .yg-nav-progress {
  width: 46px;
  height: 3px;
  flex: none;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.25);
  overflow: hidden;
  cursor: pointer;
}
.yg-nav-player .yg-nav-progress > i {
  display: block;
  width: 0;
  height: 100%;
  background: var(--yg-accent);
  border-radius: 2px;
}
.yg-nav-player .yg-nav-list {
  margin-left: 2px;
  padding-left: 6px;
  width: 28px;
  border-left: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 0 6px 6px 0;
}

@media (max-width: 1100px) {
  .yg-nav-player .yg-nav-progress { display: none; }
}

/* 导航菜单改成一行：播放器 + 菜单项并排 */
#nav {
  align-items: center !important;
}
#menus {
  display: flex !important;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  flex: 0 1 auto;
  min-width: 0;
}
#menus > * {
  flex: 0 0 auto;
}
.yg-nav-player {
  flex: 0 0 auto !important;
  width: auto !important;
}

/* ===== 状态栏迷你播放器：去掉独立框，融入导航栏 ===== */
.yg-nav-player {
  background: transparent !important;
  border: none !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
  padding: 0 !important;
  height: auto !important;
  gap: 8px !important;
  margin-right: 18px !important;
}
.yg-nav-player .yg-nav-cover {
  width: 38px !important;
  height: 38px !important;
  border-radius: 10px !important;
}
.yg-nav-player .yg-nav-btn {
  width: 30px !important;
  height: 30px !important;
  font-size: 0.78rem !important;
  border-radius: 8px !important;
}
.yg-nav-player .yg-nav-toggle {
  width: 36px !important;
  height: 36px !important;
  font-size: 0.9rem !important;
}
.yg-nav-player .yg-nav-progress {
  width: 64px !important;
  height: 4px !important;
}
.yg-nav-player .yg-nav-list {
  width: 32px !important;
  height: 30px !important;
  margin-left: 2px !important;
  padding-left: 0 !important;
  border-left: none !important;
  border-radius: 8px !important;
}

/* ================= Firefly 式侧栏吸顶（右栏从最新文章/目录开始） ================= */
#aside-content {
  position: static !important;
  align-self: stretch !important;
  max-height: none !important;
  overflow: visible !important;
  animation: none !important;
  -webkit-animation: none !important;
}
.yg-side-sticky {
  position: sticky;
  top: var(--yg-nav-top);
  transition: top .2s ease-out;
  max-height: calc(100vh - 96px);
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 2px;
  will-change: top;
}
.yg-sticky {
  top: var(--yg-nav-top) !important;
  transition: top .2s ease-out !important;
  max-height: calc(100vh - 96px);
  overflow-y: auto;
  will-change: top;
}

/* 滚动性能：卡片不做实时毛玻璃，只保留导航这一小块 */
.yg-card,
.recent-post-item,
#post,
#article-container,
#aside-content .card-widget,
.yg-player-pop {
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}
:root { --yg-article-bg: rgba(255, 255, 255, 0.92); }
html[data-theme="dark"] { --yg-article-bg: rgba(20, 22, 26, 0.86); }

html, body { scroll-behavior: auto !important; }
#page-header #nav { position: fixed !important; }

/* ===== Firefly-style sticky sidebars (wide layout) ===== */
:root { --yg-nav-top: 88px; }
body.yg-nav-hidden { --yg-nav-top: 16px; }

#aside-content {
  position: static !important;
  align-self: stretch !important;
  max-height: none !important;
  overflow: visible !important;
}

.yg-sticky,
.yg-side-sticky {
  position: sticky !important;
  top: var(--yg-nav-top) !important;
  transition: top .2s ease-out !important;
  max-height: calc(100vh - 104px);
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 3px;
  will-change: top;
  scrollbar-width: thin;
}
.yg-sticky::-webkit-scrollbar,
.yg-side-sticky::-webkit-scrollbar { width: 4px; }
.yg-sticky::-webkit-scrollbar-thumb,
.yg-side-sticky::-webkit-scrollbar-thumb { background: rgba(128,128,128,.35); border-radius: 2px; }

#page-header #nav {
  position: fixed !important;
  transform: none !important;
  translate: 0 0;
  transition: translate .2s ease-out, background .2s ease !important;
  will-change: translate;
}
#page-header.navbar-hidden #nav {
  translate: 0 -150% !important;
}
#page-header #nav.navbar-sticky-shadow {
  background: var(--yg-nav-bg-strong);
}

/* 侧栏吸顶组高度受视口限制，超出内部滚动（小屏适配） */
.yg-sticky,
.yg-side-sticky {
  max-height: calc(100vh - 104px) !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  scrollbar-width: thin;
  overscroll-behavior: contain;
}

/* ===== 统一玻璃渲染：所有卡片沿用状态栏的毛玻璃配方 ===== */
:root {
  --yg-glass-bg: rgba(255, 255, 255, 0.55);
  --yg-glass-line: rgba(0, 0, 0, 0.06);
}
html[data-theme="dark"] {
  --yg-glass-bg: rgba(20, 22, 26, 0.55);
  --yg-glass-line: rgba(255, 255, 255, 0.10);
}

#page-header #nav {
  -webkit-backdrop-filter: blur(20px) saturate(1.5) !important;
  backdrop-filter: blur(20px) saturate(1.5) !important;
}

.yg-card,
.recent-post-item,
#post,
#article-container,
#aside-content .card-widget,
.yg-player-pop {
  background: var(--yg-glass-bg) !important;
  -webkit-backdrop-filter: blur(20px) saturate(1.5) !important;
  backdrop-filter: blur(20px) saturate(1.5) !important;
  border: 1px solid var(--yg-glass-line) !important;
  box-shadow: 0 14px 36px -26px rgba(0, 0, 0, 0.55);
}

/* 文章正文区保持无边框内衬 */
#article-container { border: none !important; }

/* 状态栏主题切换按钮 */
.yg-nav-action {
  width: 30px;
  height: 30px;
  flex: none;
  margin-right: 6px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 0.8rem;
  cursor: pointer;
  transition: background .18s ease, color .18s ease;
}
.yg-nav-action:hover { background: rgba(255, 255, 255, 0.22); }

/* 玻璃底色略微提高不透明度，保证宽屏大图背景下可读 */
:root { --yg-glass-bg: rgba(255, 255, 255, 0.78); }
html[data-theme="dark"] { --yg-glass-bg: rgba(20, 22, 26, 0.66); }

/* 主题切换按钮更明显 + 全站切换过渡 */
#yg-theme-toggle {
  width: 32px !important;
  height: 32px !important;
  border-radius: 50% !important;
  background: var(--yg-nav-chip) !important;
  border: 1px solid var(--yg-nav-line) !important;
  color: var(--yg-nav-fg) !important;
}
#yg-theme-toggle:hover { background: var(--yg-nav-chip-hover) !important; }
#yg-theme-toggle:active { transform: scale(0.92); }

html, body, .yg-card, .recent-post-item, #nav, #aside-content .yg-card {
  transition: background-color .25s ease, color .25s ease, border-color .25s ease;
}

/* ===== 音量控件 ===== */
.yg-music-card,
.yg-music-ctrl,
#yg-nav-player { position: relative; }

.yg-music-ctrl .yg-vol-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: none;
  background: rgba(128, 128, 128, 0.16);
  color: var(--yg-text);
  display: grid;
  place-items: center;
  font-size: 0.7rem;
  cursor: pointer;
  transition: background .18s, color .18s;
}
.yg-music-ctrl .yg-vol-btn:hover { background: var(--yg-accent); color: #fff; }

.yg-vol-pop {
  position: absolute;
  z-index: 80;
  display: none;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--yg-glass-bg);
  border: 1px solid var(--yg-glass-line);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  backdrop-filter: blur(18px) saturate(1.4);
  box-shadow: 0 18px 44px -28px rgba(0, 0, 0, .6);
}
.yg-vol-pop.open { display: block; }
.yg-vol-pop-card { right: 0; bottom: calc(100% + 10px); }
.yg-vol-pop-nav { right: 0; top: calc(100% + 10px); }

.yg-vol-range {
  -webkit-appearance: none;
  appearance: none;
  width: 120px;
  height: 4px;
  border-radius: 2px;
  background: rgba(128, 128, 128, .3);
  outline: none;
  cursor: pointer;
}
.yg-vol-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--yg-accent);
  border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .3);
}
.yg-vol-range::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--yg-accent);
}

/* 音量条：禁止文本选择 / 拖拽手势优化 */
.yg-vol-pop,
.yg-vol-pop *,
.yg-music-ctrl,
#yg-nav-player {
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.yg-vol-range {
  touch-action: none;
  cursor: pointer;
}
html.yg-vol-dragging,
html.yg-vol-dragging * {
  -webkit-user-select: none !important;
  user-select: none !important;
  cursor: grabbing !important;
}

/* ===== 音量浮层（自绘 OSS 风格滑块） ===== */
#yg-vol-float {
  position: fixed;
  z-index: 1300;
  display: none;
  width: 190px;
  padding: 14px 16px;
  border-radius: 14px;
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 20px 50px -30px rgba(0, 0, 0, 0.6);
}
html[data-theme="dark"] #yg-vol-float {
  background: #171d21;
  border-color: rgba(255, 255, 255, 0.12);
}
#yg-vol-float.open { display: block; }

.yg-vol-track {
  position: relative;
  height: 28px;
  display: flex;
  align-items: center;
  cursor: pointer;
  touch-action: none;
  outline: none;
  user-select: none;
}
.yg-vol-track::before {
  content: "";
  position: absolute;
  left: 0; right: 0;
  height: 6px;
  border-radius: 3px;
  background: rgba(128, 128, 128, 0.28);
}
.yg-vol-fill {
  position: absolute;
  left: 0;
  height: 6px;
  width: var(--p, 80%);
  border-radius: 3px;
  background: var(--yg-accent);
  transition: width .06s linear;
}
.yg-vol-thumb {
  position: absolute;
  left: var(--p, 80%);
  width: 14px;
  height: 14px;
  margin-left: -7px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--yg-accent);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.28);
  transition: transform .15s ease;
}
.yg-vol-track:hover .yg-vol-thumb { transform: scale(1.15); }
.yg-vol-track:focus-visible .yg-vol-thumb {
  box-shadow: 0 0 0 5px rgba(0, 201, 186, 0.25);
}
html.yg-vol-dragging,
html.yg-vol-dragging * {
  -webkit-user-select: none !important;
  user-select: none !important;
}

/* 左栏音量按钮：放在歌名/歌手两行最右端 */
.yg-music {
  display: flex !important;
  align-items: center;
  gap: 10px;
}
.yg-music .yg-music-info {
  flex: 1 1 auto;
  min-width: 0;
}
.yg-music > .yg-vol-btn {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: rgba(128, 128, 128, 0.16);
  color: var(--yg-text);
  display: grid;
  place-items: center;
  font-size: 0.68rem;
  cursor: pointer;
  transition: background .18s, color .18s;
}
.yg-music > .yg-vol-btn:hover {
  background: var(--yg-accent);
  color: #fff;
}

/* 音量浮层：从图标右侧滑出 */
#yg-vol-float {
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity .16s ease, transform .16s ease;
}
#yg-vol-float.open {
  opacity: 1;
  transform: translateX(0);
}

/* 歌名行：音量按钮必须在同一行最右侧，不能换行 */
.yg-music {
  display: flex !important;
  flex-wrap: nowrap !important;
  align-items: center;
  gap: 10px;
}
.yg-music .yg-music-info {
  flex: 1 1 auto;
  min-width: 0;
}
.yg-music > .yg-vol-btn {
  flex: 0 0 auto;
}

/* 音量浮层：从图标正上方淡入上浮 */
#yg-vol-float {
  transform: translateY(6px);
}
#yg-vol-float.open {
  transform: translateY(0);
}

/* 导航栏左侧只显示站名，不显示图片 */
#nav .site-icon,
#nav .nav-site-title img {
  display: none !important;
}

/* 导航栏：浅色模式也用深色玻璃，比白色卡片深 */
html:not([data-theme="dark"]) #page-header #nav,
#page-header #nav {
  background: var(--yg-nav-bg);
  border-color: rgba(255, 255, 255, 0.16) !important;
}
#page-header:not(.nav-fixed) #nav {
  background: var(--yg-nav-bg);
}

/* ===== 顶图遮罩：上深下浅的渐变，和内容区不再割裂 ===== */
#page-header:not(.not-top-img):before {
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.58) 0%,
    rgba(0, 0, 0, 0.42) 35%,
    rgba(0, 0, 0, 0.18) 70%,
    rgba(0, 0, 0, 0.02) 92%,
    rgba(0, 0, 0, 0) 100%
  ) !important;
}
html:not([data-theme="dark"]) #page-header:not(.not-top-img):before {
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.30) 0%,
    rgba(0, 0, 0, 0.20) 40%,
    rgba(0, 0, 0, 0.07) 72%,
    rgba(0, 0, 0, 0) 100%
  ) !important;
}

/* 每日一言打字机 */
#subtitle.yg-typing::after {
  content: "|";
  margin-left: 2px;
  color: #fff;
  animation: yg-caret 1s step-end infinite;
}
@keyframes yg-caret {
  50% { opacity: 0; }
}

/* 顶图不再自己画一张图，直接透出全站固定壁纸，消除与内容区的接缝 */
#page-header,
#page-header.full_page {
  background-image: none !important;
  background-color: transparent !important;
}

/* 极光/彩带 canvas 提升可见度，并让页顶遮罩更透，顶部也能看到 */
body > canvas:not(.fireworks) {
  filter: brightness(1.7) saturate(1.5);
}
#page-header:not(.not-top-img):before {
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.40) 0%,
    rgba(0, 0, 0, 0.28) 40%,
    rgba(0, 0, 0, 0.12) 72%,
    rgba(0, 0, 0, 0.02) 94%,
    rgba(0, 0, 0, 0) 100%
  ) !important;
}
html:not([data-theme="dark"]) #page-header:not(.not-top-img):before {
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.22) 0%,
    rgba(0, 0, 0, 0.16) 45%,
    rgba(0, 0, 0, 0.05) 75%,
    rgba(0, 0, 0, 0) 100%
  ) !important;
}

/* 彩带亮度回调，避免顶部太抢眼 */
body > canvas:not(.fireworks) {
  filter: brightness(1.22) saturate(1.25) !important;
}

/* 进度条拖拽手势与滑块 */
.yg-music-bar,
.yg-pop-progress {
  touch-action: none;
  cursor: pointer;
}
.yg-seeking { cursor: grabbing; }
.yg-pop-bar { position: relative; overflow: visible; }
.yg-pop-bar > i { position: relative; }
.yg-pop-bar > i::after {
  content: "";
  position: absolute;
  right: -5px;
  top: 50%;
  width: 10px;
  height: 10px;
  margin-top: -5px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--yg-accent);
  box-shadow: 0 1px 4px rgba(0, 0, 0, .25);
}
html.yg-seeking-body,
html.yg-seeking-body * {
  -webkit-user-select: none !important;
  user-select: none !important;
}

/* ===== 浅色模式修正：页顶不再铺灰底，卡片降低白度 ===== */
html:not([data-theme="dark"]) #page-header,
html:not([data-theme="dark"]) #page-header.full_page,
#page-header.full_page {
  background-color: transparent !important;
}
html:not([data-theme="dark"]) #web_bg {
  background-color: #dfe6e9 !important;
}

html:not([data-theme="dark"]) .yg-card,
html:not([data-theme="dark"]) .recent-post-item,
html:not([data-theme="dark"]) #post,
html:not([data-theme="dark"]) #article-container {
  background: rgba(255, 255, 255, 0.66) !important;
  -webkit-backdrop-filter: blur(16px) saturate(1.15) !important;
  backdrop-filter: blur(16px) saturate(1.15) !important;
}

/* 浅色页顶标题区域稍微压暗，白字不糊 */
html:not([data-theme="dark"]) #page-header:not(.not-top-img):before {
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.38) 0%,
    rgba(0, 0, 0, 0.24) 45%,
    rgba(0, 0, 0, 0.08) 75%,
    rgba(0, 0, 0, 0) 100%
  ) !important;
}

/* 浅色卡片：偏冷的浅灰绿，降低纯白刺眼感和壁纸透色 */
html:not([data-theme="dark"]) .yg-card,
html:not([data-theme="dark"]) .recent-post-item,
html:not([data-theme="dark"]) #post,
html:not([data-theme="dark"]) #article-container {
  background: rgba(240, 245, 244, 0.88) !important;
  -webkit-backdrop-filter: blur(14px) saturate(1.05) !important;
  backdrop-filter: blur(14px) saturate(1.05) !important;
}
html:not([data-theme="dark"]) #page-header #site-title,
html:not([data-theme="dark"]) #page-header #site-subtitle,
html:not([data-theme="dark"]) #page-header .post-meta {
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.55);
}
html:not([data-theme="dark"]) #page-header:not(.not-top-img):before {
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.48) 0%,
    rgba(0, 0, 0, 0.32) 45%,
    rgba(0, 0, 0, 0.10) 78%,
    rgba(0, 0, 0, 0) 100%
  ) !important;
}

/* 浅色正文文字加深，长文阅读更稳 */
html:not([data-theme="dark"]) #article-container,
html:not([data-theme="dark"]) #article-container p,
html:not([data-theme="dark"]) #article-container li,
html:not([data-theme="dark"]) #article-container blockquote p {
  color: #2c3333 !important;
}
html:not([data-theme="dark"]) #article-container h2,
html:not([data-theme="dark"]) #article-container h3 {
  color: #1f2a2a !important;
}

/* 去掉 #post 外层重复的白色层，只保留内层一块底色 */
html body #post {
  background: transparent !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
  border: none !important;
  box-shadow: none !important;
}
html:not([data-theme="dark"]) body #article-container {
  background: rgba(232, 239, 238, 0.94) !important;
  -webkit-backdrop-filter: blur(10px) saturate(1.02) !important;
  backdrop-filter: blur(10px) saturate(1.02) !important;
}

/* 右栏统一正体，字体和左栏一致 */
#aside-content,
#aside-content * {
  font-style: normal !important;
}
#aside-content .yg-rows li a,
#aside-content .yg-rows .yg-row,
#aside-content .yg-tags a,
#aside-content .yg-recent a,
#aside-content .yg-toc-list a {
  font-family: inherit !important;
  font-weight: 400 !important;
  letter-spacing: 0 !important;
}
#aside-content .yg-rows .yg-row-val {
  font-weight: 500 !important;
}

/* 导航固定到 body 后仍然吸顶 */
#nav {
  position: fixed !important;
  top: 8px !important;
  left: var(--yg-nav-x, 50%) !important;
  right: auto !important;
  width: var(--yg-nav-w, min(1400px, calc(100% - 48px))) !important;
  z-index: 90 !important;
}
body.yg-nav-hidden #nav {
  translate: 0 -150% !important;
}
#nav, #nav a, #nav span, #nav i, #nav button {
  color: var(--yg-nav-fg) !important;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.45);
}

/* 深浅切换：无外框，最右侧 */
#yg-theme-toggle {
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
  outline: none !important;
  padding: 6px 8px !important;
  margin-left: 2px !important;
  color: var(--yg-nav-fg) !important;
}
#yg-theme-toggle:hover {
  background: transparent !important;
  color: var(--yg-accent) !important;
}

/* 导航移到 body 后补齐悬浮胶囊样式与滑出动画 */
#nav {
  height: 62px !important;
  min-height: 62px !important;
  padding: 0 20px !important;
  border-radius: 18px !important;
  border: 1px solid rgba(255, 255, 255, 0.16) !important;
  background: var(--yg-nav-bg);
  -webkit-backdrop-filter: blur(18px) saturate(1.5) !important;
  backdrop-filter: blur(18px) saturate(1.5) !important;
  box-shadow: 0 14px 36px -22px rgba(0, 0, 0, 0.75) !important;
  translate: 0 0;
  transition: translate .2s ease-out, background .2s ease, box-shadow .2s ease !important;
  will-change: translate;
}
body.yg-nav-hidden #nav {
  translate: 0 -150% !important;
}
#nav.show,
#nav.navbar-sticky-shadow {
  background: var(--yg-nav-bg-strong);
}

/* 深色文章详情：正文恢复成卡片，并留出左右内边距 */
html[data-theme="dark"] #post {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
  padding: 0 !important;
}
html[data-theme="dark"] #article-container {
  background: rgba(20, 22, 26, 0.72) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 18px !important;
  padding: 30px 34px !important;
  -webkit-backdrop-filter: blur(16px) saturate(1.1) !important;
  backdrop-filter: blur(16px) saturate(1.1) !important;
  box-shadow: 0 14px 34px -24px rgba(0, 0, 0, 0.8) !important;
}
@media (max-width: 768px) {
  html[data-theme="dark"] #article-container { padding: 20px 18px !important; }
}


/* 封面图抬到卡片底色之上，避免被玻璃底压灰 */
#recent-posts .recent-post-item { overflow: hidden; }
#recent-posts .recent-post-item .post_cover {
  position: relative;
  z-index: 1;
  border-radius: 18px 0 0 18px;
}
#recent-posts .recent-post-item .post_cover .post-bg { z-index: 0; }
@media screen and (max-width: 768px) {
  #recent-posts .recent-post-item .post_cover { border-radius: 18px 18px 0 0; }
}


/* ===== 顶栏配色统一：浅色=白玻璃深色字（和卡片一致），深色=深玻璃浅色字 ===== */
:root {
  --yg-nav-bg: rgba(255, 255, 255, 0.78);
  --yg-nav-bg-strong: rgba(255, 255, 255, 0.90);
  --yg-nav-fg: #24343f;
  --yg-nav-line: rgba(0, 0, 0, 0.06);
  --yg-nav-shadow: 0 14px 36px -24px rgba(31, 45, 61, 0.45);
  --yg-nav-text-shadow: none;
  --yg-nav-chip: rgba(15, 23, 30, 0.06);
  --yg-nav-chip-hover: rgba(15, 23, 30, 0.11);
}
html[data-theme="dark"] {
  --yg-nav-bg: rgba(16, 20, 25, 0.72);
  --yg-nav-bg-strong: rgba(16, 20, 25, 0.88);
  --yg-nav-fg: #f3f6f8;
  --yg-nav-line: rgba(255, 255, 255, 0.14);
  --yg-nav-shadow: 0 14px 36px -24px rgba(0, 0, 0, 0.78);
  --yg-nav-text-shadow: 0 1px 4px rgba(0, 0, 0, 0.45);
  --yg-nav-chip: rgba(255, 255, 255, 0.14);
  --yg-nav-chip-hover: rgba(255, 255, 255, 0.24);
}

html body #page-header #nav,
html body #page-header:not(.nav-fixed) #nav,
html body #nav {
  background: var(--yg-nav-bg) !important;
  border-color: var(--yg-nav-line) !important;
  box-shadow: var(--yg-nav-shadow) !important;
}
html body #page-header #nav.show,
html body #page-header #nav.navbar-sticky-shadow {
  background: var(--yg-nav-bg-strong) !important;
}
html body #nav,
html body #nav a,
html body #nav span,
html body #nav i,
html body #nav button,
html body #nav .site-page,
html body #nav .site-name,
html body #nav .search,
html body #yg-theme-toggle {
  color: var(--yg-nav-fg) !important;
  text-shadow: none !important;
}
html body #nav a:hover,
html body #nav button:hover,
html body #nav .site-page:hover,
html body #yg-theme-toggle:hover {
  color: var(--yg-accent) !important;
}

/* 浅色顶栏里的迷你播放器：把"白字白底"换成深色，避免看不见 */
html:not([data-theme="dark"]) #nav .yg-nav-music,
html:not([data-theme="dark"]) #nav .yg-nav-music .yg-nav-btn,
html:not([data-theme="dark"]) #nav .yg-nav-action {
  background: rgba(15, 23, 30, 0.06) !important;
  color: var(--yg-nav-fg) !important;
}
html:not([data-theme="dark"]) #nav .yg-nav-music:hover,
html:not([data-theme="dark"]) #nav .yg-nav-music .yg-nav-btn:hover,
html:not([data-theme="dark"]) #nav .yg-nav-action:hover {
  background: rgba(15, 23, 30, 0.11) !important;
}
html:not([data-theme="dark"]) #nav .yg-nav-music.playing,
html:not([data-theme="dark"]) #nav .yg-nav-music.playing .yg-nav-toggle {
  background: var(--yg-accent) !important;
  color: #fff !important;
}
html:not([data-theme="dark"]) #nav .yg-nav-progress {
  background: rgba(15, 23, 30, 0.14) !important;
}
html:not([data-theme="dark"]) #nav .yg-nav-progress > i {
  background: var(--yg-accent) !important;
}
html:not([data-theme="dark"]) #nav .yg-nav-music[aria-expanded="true"] .yg-nav-list {
  background: rgba(15, 23, 30, 0.08) !important;
}

/* 首页卡片简介：保留正文开头两行，避免不同长度把卡片撑得高矮不一 */
#recent-posts .recent-post-item .recent-post-info .content {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
