/*
 * 修正 Stellar 1.38 glass 模式默认的高饱和滤镜
 */

/* 左栏背景：保留模糊，取消400%饱和 */
.l_left .sidebg {
  filter: blur(16px) opacity(0.78) !important;
}

/* 左栏整体玻璃遮罩 */
.l_left .leftbar-container::before {
  backdrop-filter: blur(10px) !important;
  -webkit-backdrop-filter: blur(10px) !important;
}

/* 搜索框、菜单和组件的玻璃效果 */
.l_left .blur {
  backdrop-filter: blur(10px) !important;
  -webkit-backdrop-filter: blur(10px) !important;
}


/* 恢复 Stellar 1.42 升级前的三栏布局 */
@media screen and (min-width: 1441px) {
  .l_body {
    /* 恢复原来的 64px 栏间距 */
    --gap-page: 64px !important;

    /* 取消新版右栏额外增加的宽度 */
    --rightbar-width-extra: 0px !important;
  }
}
/* 
桌面端：让左右侧栏向中间靠近 */

@media screen and (min-width: 1441px) {
  .l_body > .l_left {
    justify-self: end !important;
  }

  .l_body > .l_right {
    justify-self: start !important;
  }
}

@media screen and (min-width: 1441px) {
  .l_body > aside.l_left {
    justify-self: end !important;
    margin-left: auto !important;
    margin-right: 0 !important;
    transform: translateX(70px) !important;
  }

  .l_body > aside.l_right {  
    justify-self: start !important;
    margin-left: 0 !important;
    margin-right: auto !important;
    transform: translateX(-70px) !important;
  }
}
/* 左右侧栏文字略微放大 */
.l_left,
.l_right {
  font-size: 17.5px;
}

/* 文章摘要提高可读性 */
.l_main .excerpt {
  font-size: 1rem;
  line-height: 1.75;
}

/* 两级分类索引：复刻文件夹式目录，同时保持移动端可读性 */
#cats {
  padding: 1rem 1.25rem;
}

#cats .cat {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 2.6rem;
  padding: 0.4rem 0.5rem;
  color: var(--text-p1);
  border-radius: 8px;
}

#cats a.cat:hover {
  color: var(--theme);
  background: var(--block-hover);
}

#cats .cat:not(.child) {
  font-size: 1.1rem;
  font-weight: 700;
}

#cats .cat.child {
  width: calc(100% - 1.75rem);
  margin-left: 1.75rem;
  color: var(--text-p2);
}

#cats .name {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  gap: 0.7rem;
}

#cats .name svg {
  width: 1.25rem;
  height: 1.25rem;
  flex: none;
  color: var(--text-p3);
}

#cats .badge {
  flex: none;
  color: var(--text-p3);
  font-variant-numeric: tabular-nums;
}

#cats .taxonomy-empty {
  box-sizing: border-box;
  opacity: 0.55;
  cursor: default;
}

@media screen and (max-width: 500px) {
  #cats {
    padding: 0.75rem;
  }

  #cats .cat.child {
    width: calc(100% - 1rem);
    margin-left: 1rem;
  }
}

/* Twikoo 输入提示：仅在当前聚焦的字段上显示 */
#comments .twikoo .tk-meta-input {
  overflow: visible;
}

#comments .twikoo .tk-meta-input > .el-input {
  position: relative;
}

#comments .twikoo .tk-meta-input > .el-input:nth-child(1)::before {
  content: '输入 QQ 号会自动获取昵称和头像 🐧';
}

#comments .twikoo .tk-meta-input > .el-input:nth-child(2)::before {
  content: '收到回复后将发送邮件提醒 📧';
}

#comments .twikoo .tk-meta-input > .el-input:nth-child(3)::before {
  content: '填写后可通过昵称访问你的网站 🔗';
}

#comments .twikoo .tk-meta-input > .el-input::before,
#comments .twikoo .tk-meta-input > .el-input::after {
  position: absolute;
  z-index: 20;
  left: 50%;
  display: block;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
}

#comments .twikoo .tk-meta-input > .el-input::before {
  bottom: calc(100% + 0.75rem);
  max-width: min(22rem, calc(100vw - 2rem));
  padding: 0.65rem 0.85rem;
  color: var(--card);
  font-size: 0.82rem;
  line-height: 1.45;
  text-align: center;
  white-space: nowrap;
  background: var(--text-p1);
  border: 1px solid var(--block-border);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(31, 45, 61, 0.16);
  transform: translate(-50%, 0.35rem);
}

#comments .twikoo .tk-meta-input > .el-input::after {
  content: '';
  bottom: calc(100% + 0.28rem);
  width: 0;
  height: 0;
  border: 0.48rem solid transparent;
  border-top-color: var(--text-p1);
  transform: translate(-50%, 0.35rem);
}

#comments .twikoo .tk-meta-input > .el-input:focus-within {
  z-index: 21;
}

#comments .twikoo .tk-meta-input > .el-input:focus-within::before,
#comments .twikoo .tk-meta-input > .el-input:focus-within::after {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}

/* 评论者昵称链接沿用本站主题色，并保留清晰的悬停反馈 */
#comments .twikoo .tk-nick.tk-nick-link {
  color: var(--theme) !important;
  font-weight: 600;
}

#comments .twikoo .tk-nick.tk-nick-link:hover {
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

@media screen and (max-width: 640px) {
  #comments .twikoo .tk-meta-input > .el-input::before {
    width: max-content;
    max-width: min(17rem, calc(100vw - 2rem));
    white-space: normal;
  }
}

@media (prefers-reduced-motion: reduce) {
  #comments .twikoo .tk-meta-input > .el-input::before,
  #comments .twikoo .tk-meta-input > .el-input::after {
    transition: none;
  }
}

.md-text .caveat-title {
  display: block;
  width: fit-content;
  margin: 24px auto;
  padding: 0 10px 3px;

  font-family: "Caveat", cursive !important;
  font-size: 30px !important;
  font-weight: 600 !important;
  line-height: 1.4 !important;
  color: #7979EC !important;
  text-align: center;
}
.caveat-title1 {
  font-family: "Caveat", cursive !important;
  font-size: 17px !important;
  font-weight: 600 !important;
  line-height: 1.4 !important;
  color: #efbdefe4 !important;
  text-align: center;
}
.widget-signature{
  font-family: "Caveat", cursive !important;
  font-size: 17px !important;
  font-weight: 600 !important;
  line-height: 1.4 !important;
  color: #5862d7e4 !important;
  text-align: center;
}

/* 图片文章卡片：缩小封面左下角的标题和摘要 */
.post-list .post-card.post.photo .cover-info .headline {
  font-size: 1.45rem;
  line-height: 1.25;
}

.post-list .post-card.post.photo .cover-info .caption {
  font-size: 0.9rem;
  line-height: 1.45;
}

@media screen and (max-width: 640px) {
  .post-list .post-card.post.photo .cover-info .headline {
    font-size: 1.2rem;
  }

  .post-list .post-card.post.photo .cover-info .caption {
    font-size: 0.82rem;
  }
}
