/* 隐藏文章页面的日期（footline 区域） */
.footline {
    display: none;
}

/* 仅针对 children 短代码生成的列表缩进 */
.children-list {
    margin-left: 2rem !important;   /* 或者 padding-left: 2rem，根据实际效果调整 */
    padding-left: 0;                /* 避免双重缩进 */
}

/* 强制覆盖所有标题字体 */
/* #R-body-inner h1, */
/* #R-body-inner h2, */
/* #R-body-inner h3, */
/* #R-body-inner h4, */
/* article h1, */
/* .default h1, */
/* body h1 { */
/*     font-family: "SimHei", Arial, sans-serif !important; */
/* } */

/* 电脑端：5列网格 */
 #R-body-inner .children-list {
     display: grid !important;
     grid-template-columns: repeat(4, 1fr) !important;
     gap: 1rem !important;
     list-style: none !important;
     padding-left: 0 !important;
}

/* 手机端：双列 Grid 布局 */
@media (max-width: 768px) {
    #R-body-inner .children-list {
        display: grid !important;               /* 改为 grid */
        grid-template-columns: repeat(2, 1fr) !important;  /* 双列 */
        gap: 0.8rem !important;                /* 列间距 */
        padding-left: 0 !important;            /* 可选：去掉左侧内边距 */
    }
    #R-body-inner .children-list li {
        margin-bottom: 0.5rem !important;
        /* 如果需要去掉列表项前的圆点，可以加 list-style: none; */
    }
}

/* Grid 布局下用伪元素模拟圆点 */
.children-list li {
    position: relative;
    list-style: none;  /* 去掉原生圆点 */
    padding-left: 0.6rem;
    line-height: 1;
}
.children-list li::before {
    content: "•";
    position: absolute;
    left: 0;
    top: 30%;
    font-size: 30px;    /* 固定大小，不随字体缩放 */
    margin-top: -7px;    /* 使用 margin-top 微调垂直位置，基于当前字体大小 */
    color: #000;  /* 圆点颜色，可改 */
}


/* 仅侧边栏直接子元素增大，不穿透到 footer */
#R-sidebar {
    font-size: 1.2rem !important;
}
#R-sidebar > * {
    font-size: 1.2rem !important;
}
/* 标题字号，并用 !important 覆盖通配符 */
#R-logo .logo-title {
    font-size: 1.8rem !important;
    line-height: 1.8;          /* 增加行高，让标题本身更透气 */
}
@media (max-width: 768px) {
    #R-logo .logo-title {
        font-size: 1.5rem !important;
    }
}

/* 调整标签区域的下边距和左侧空白 */
.R-taxonomy.taxonomy-tags {
    margin-bottom: -10px !important;  /* 减小与正文的距离，原值可能较大 */
    padding-left: 0 !important;        /* 去除左侧空白 */
}
/* 如果内部 ul 也有左侧空白，一并去除 */
.R-taxonomy.taxonomy-tags ul {
    padding-left: 0 !important;
    margin-left: 0 !important;
}

/* 返回搜搜结果按钮 */
.back-to-search-btn {
  position: fixed;
  bottom: 30px;
  right: 80px;
  z-index: 999;
  padding: 0.6rem 1.2rem;
  background: #1c90f3;       /* 可按需换色 */
  color: #fff;
  border-radius: 30px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  font-size: 0.95rem;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: background 0.2s, transform 0.2s;
}
.back-to-search-btn:hover {
  background: #0e7ad9;
  transform: translateY(-2px);
  text-decoration: none;
  color: #fff;
}

/* 返回顶部按钮 */
#back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 999;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #1c90f3;
  color: #fff;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  transition: opacity 0.3s;
}
#back-to-top:hover {
  background: #0e7ad9;
}


/* 隐藏搜索结果缩略图占位符 */
.pagefind-ui__result-thumb {
  display: none !important;
}
/* 搜索结果列表项增加左侧缩进 */
.pagefind-ui__result {
  padding-left: 1.5rem !important;  /* 可根据喜好调整数值 */
  margin-left: 0 !important;
}

/* 搜索结果层级 */
.result-breadcrumb {
  color: #888;
  margin: -0.1rem 0 0.2rem 0;  /* 稍微上移，更贴近标题 */
  font-weight: normal;
  font-size: inherit;           /* 与周围文本一致 */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}


/* 搜索模式选择卡片 */
.search-mode-selector {
  display: flex;
  gap: 0.6rem;
  margin-bottom: 1.2rem;
  align-items: flex-start;      /* 修复高度不统一 */
}

.mode-card {
  flex: 1 1 0;
  min-width: 0;
  padding: 0.4rem 1rem;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 2px solid #ddd;
  background: #f9f9f9;
  color: #555;
  overflow: visible !important; 
  box-sizing: border-box;
}

.mode-card.active {
  background: #1c90f3;
  border-color: #1c90f3;
  color: #fff;
}

.mode-card.active h3,
.mode-card.active p {
  color: #fff;
}

.mode-card h3 {
  margin: 0;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  white-space: nowrap;
  line-height: 1.1; /* 新增/调小行高，压缩标题高度 */
  overflow: visible !important; 
}

.mode-card .mode-arrow {
  font-size: 1.7rem;
  transition: transform 0.2s;
  cursor: pointer;
  flex-shrink: 0;
}

.mode-card.expanded .mode-arrow {
  transform: rotate(180deg);
}

.mode-card p {
  margin: 0.3rem 0 0 0;
  font-size: 0.72rem;
  line-height: 1.3;
  display: none;
}

.mode-card.expanded p {
  display: block;
}

.mode-card:hover:not(.active) {
  border-color: #1c90f3;
  background: #eef6ff;
}





/* 精准搜索容器 */
#precise-search-container {
  margin-top: 1rem;
}

/* 搜索框整体 */
.precise-search-box {
  display: flex;
  align-items: center;
  border: 2px solid #ddd;
  border-radius: 8px;
  padding: 0.3rem 0.6rem;
  margin-bottom: 1rem;
  transition: border-color 0.2s;
}
.precise-search-box:focus-within {
  border-color: #1c90f3;
}

/* 放大镜图标（CSS绘制，纯色） */
.precise-search-icon {
  width: 18px;
  height: 18px;
  margin-right: 0.5rem;
  flex-shrink: 0;
  position: relative;
}
.precise-search-icon::before {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 10px;
  height: 10px;
  border: 2px solid #888;
  border-radius: 50%;
}
.precise-search-icon::after {
  content: "";
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 6px;
  height: 2px;
  background: #888;
  transform: rotate(45deg);
  transform-origin: right center;
}

/* 精准搜索输入框 - 清除浏览器默认轮廓和阴影 */
.precise-search-input {
  flex: 1;
  line-height: 1.2;
  padding-top: 0.5rem !important;
  padding-bottom: 0.3rem !important;
  padding-left: 0.3rem !important;
  padding-right: 0.3rem !important;
  margin: 0 !important;
  width: auto !important;
  border: none !important;
  outline: none !important;
  background: transparent !important;
  font-size: 1rem;
  font-weight: bold;   /* 新增这一行 */
}


/* 清除按钮 */
.precise-search-clear {
  background: none;
  border: none;
  font-size: 1.2rem;
  color: #888;
  cursor: pointer;
  padding: 0 0.3rem;
  display: none; /* 默认隐藏，有内容时显示 */
}
.precise-search-clear:hover {
  color: #333;
}

/* 统计栏 */
.precise-search-stats {
  background: #f0f0f0;
  color: #555;
  padding: 0.5rem 0.8rem;
  border-radius: 4px;
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

/* 结果列表 */
.precise-search-results {
  padding-left: 1em;
  padding-right: 1em;
}
/* 精准搜索结果链接改为黑色 */
.precise-search-results a {
  color: #000 !important;
}
.precise-search-results a:hover {
  color: #1c90f3 !important;
}