/* ===================== 基础重置 & 全局布局 ===================== */
* {
  margin: 0 !important;
  padding: 0 !important;
  box-sizing: border-box !important;
  font-family: "Microsoft YaHei", sans-serif !important;
}

/* PC端：body固定高度，禁止整体滚动 */
html,
body {
  height: 100vh !important;
  width: 100% !important;
  background: #f0f5f2 !important;
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  overflow: hidden !important;
}

/* 主容器：固定宽度，填满视口高度 */
.ye {
  display: flex !important;
  width: 1200px !important;
  max-width: 1200px !important;
  height: 100vh !important;
  margin: 0 auto !important;
  background: #fff !important;
  box-shadow: 0 0 15px rgba(44, 94, 78, 0.1) !important;
  overflow: hidden !important;
}

/* 左侧导航栏：固定宽度，垂直布局 */
.zuo {
  width: 280px !important;
  flex-shrink: 0 !important;
  height: 100% !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
  border-right: 1px solid #000 !important;
  background: #fff !important;
}

/* 右侧内容区：填满剩余宽度，垂直布局 */
.you {
  flex: 1 !important;
  display: flex !important;
  flex-direction: column !important;
  height: 100% !important;
  overflow: hidden !important;
  background: #fff !important;
}

/* ===================== 左侧导航栏子模块 ===================== */
.zuo1 {
  height: 50px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 28px !important;
  font-weight: bold !important;
  border-bottom: 1px solid #000 !important;
  background: #4A7D6A !important;
  color: #fff !important;
  flex-shrink: 0 !important;
}

.logo {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 10px !important;
}

.logo-tubiao {
  width: 40px !important;
  height: 40px !important;
  background: #F0F5F2 !important;
  border-radius: 8px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: #4A7D6A !important;
}

.logo-biaoti {
  font-size: 28px !important;
  letter-spacing: 2px !important;
}

.logo-biaoti a {
  text-decoration: none !important;
  color: #F0F5F2 !important;
}

/* 导航列表区：填满中间空间，内部滚动 */
.zuo2 {
  flex: 1 !important;
  overflow-y: auto !important;
  padding: 15px 0 !important;
  background: #f0f5f2 !important;
  height: 100% !important;
  min-height: 0 !important; /* 修复flex最小高度溢出 */
}

.fenlei {
  margin-bottom: 8px !important;
  position: relative !important;
}

.fenlei-mingcheng {
  display: flex !important;
  align-items: center !important;
  padding: 8px 15px !important; /* 导航项左内边距，让圆点整体右移 */
  cursor: pointer !important;
  border-radius: 4px !important;
  margin-bottom: 3px !important;
  font-weight: 600 !important;
  color: #2c5e4e !important;
  user-select: none !important;
  transition: all 0.2s ease !important;
}

.fenlei-mingcheng:hover {
  background: #e0ebe6 !important;
}

/* 圆点样式：精准对齐竖线中心 */
.fenlei-bullet {
  width: 6px !important;
  height: 6px !important;
  background: #8d7d6b !important;
  border-radius: 50% !important;
  margin-right: 10px !important;
  flex-shrink: 0 !important;
}

.fenlei-text {
  flex: 1 !important;
  font-size: 16px !important;
}

.fenlei-toggle {
  width: 18px !important;
  height: 18px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: #c2d1c9 !important;
  border-radius: 3px !important;
  font-size: 12px !important;
  color: #2c5e4e !important;
  cursor: pointer !important;
  border: none !important;
  outline: none !important;
  margin-left: 5px !important;
  padding: 0 !important;
}

.fenlei-toggle:hover {
  background: #b0c0b8 !important;
}

/* ===================== 导航子列表折叠动画 ===================== */
.wenzhang-liebiao {
  list-style: none !important;
  padding-left: 12px !important; /* 子列表内缩进，保证文字和竖线间距 */
  border-left: 1px solid #c2d1c9 !important; /* 竖线保留 */
  margin-left: 18px !important; /* 关键：增大左外边距，让竖线远离左侧边框且居中圆点 */
  max-height: 0 !important;
  opacity: 0 !important;
  visibility: hidden !important;
  overflow: hidden !important;
  transition: all 0.3s ease !important;
}

.wenzhang-liebiao.active {
  max-height: 2000px !important;
  opacity: 1 !important;
  visibility: visible !important;
}

.zuo2:not(.js-enabled) .wenzhang-liebiao {
  transition: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
  max-height: 0 !important;
}

/* 子列表项样式：恢复间距+悬浮块大小 */
.wenzhang-liebiao li {
  padding: 0 !important;
  margin-bottom: 3px !important; /* 恢复原有间距 */
  color: #2c5e4e !important;
  cursor: pointer !important;
  border-radius: 4px !important;
  transition: all 0.2s ease !important;
  font-size: 15px !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  position: relative !important;
}

/* 子列表横线：精准对齐竖线 */
.wenzhang-liebiao li:not(:last-child)::after {
  content: "" !important;
  position: absolute !important;
  left: -12px !important; /* 横线左端点对准竖线 */
  top: calc(100% + 3px) !important;
  width: 12px !important; /* 横线长度匹配缩进 */
  height: 1px !important;
  background: #c2d1c9 !important;
}

/* 子列表项hover：恢复悬浮块大小，和分类名称一致 */
.wenzhang-liebiao li:hover {
  background: #e0ebe6 !important;
  color: #1f4a3b !important;
  padding-left: 0 !important;
}

.wenzhang-liebiao li.active {
  background: #4a7d6a !important;
  color: #fff !important;
  font-weight: 500 !important;
}

/* 导航链接样式：彻底解决蓝色超链接+恢复悬浮块大小 */
.fenlei-mingcheng a, 
.wenzhang-liebiao li a {
  color: #2c5e4e !important; /* 还原主题色，替代浏览器默认蓝色 */
  text-decoration: none !important; /* 去掉下划线 */
  display: block !important; /* 占满父元素，悬浮块和分类名称一样大 */
  width: 100% !important;
  height: 100% !important;
  padding: 7px 10px !important; /* 恢复原有内边距 */
}

/* 链接hover文字色 */
.fenlei-mingcheng a:hover, 
.wenzhang-liebiao li a:hover {
  color: #1f4a3b !important;
}

/* ===================== 左侧二维码 & 版权栏 ===================== */
.zuo3 {
  padding: 5px !important;
  border-top: 1px solid #000 !important;
  background: #e0ebe6 !important;
  flex-shrink: 0 !important;
}

.erweima {
  text-align: center !important;
}

.erweima img {
  width: 200px !important;
  height: 200px !important;
  margin-bottom: 3px !important;
  border: 2px solid #c2d1c9 !important;
  border-radius: 8px !important;
}

.zuo4 {
  padding: 5px 15px !important;
  text-align: center !important;
  font-size: 12px !important;
  color: #8cc7ac !important;
  border-top: 1px solid #000 !important;
  background: #4A7D6A !important;
  flex-shrink: 0 !important;
  width: 100% !important;
}

.zuo4 a {
  text-decoration: none !important;
  color: inherit !important;
}

/* ===================== 右侧内容区 ===================== */
/* you1：标题栏 */
.you1 {
  height: 50px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 28px !important;
  font-weight: bold !important;
  border-bottom: 1px solid #000 !important;
  background: #4A7D6A !important;
  color: #F0F5F2 !important;
  text-align: center !important;
  padding: 0 20px !important;
  flex-shrink: 0 !important;
}

/* you2/you3容器：填满剩余空间 */
.you2 {
  flex: 1 !important;
  display: flex !important;
  flex-direction: column !important;
  padding: 30px !important;
  line-height: 1.8 !important;
  font-size: 16px !important;
  color: #2c5e4e !important;
  background: #fff !important;
  min-height: 0 !important;
  padding-bottom: 80px !important; /* 给回到顶部按钮留空间 */
  height: 0 !important; /* 防止flex无限扩展 */
}

/* 文章内容通用样式 */
.you2-content, .wenzhang-neirong {
  color: #2c5e4e !important;
  font-size: 16px !important;
  line-height: 1.8 !important;
}

.you2-content h3, .wenzhang-neirong h3 {
  color: #4a7d6a !important;
  margin: 20px 0 10px 0 !important;
}

.you2-content hr, .wenzhang-neirong hr {
  border: none !important;
  border-top: 1px solid #c2d1c9 !important;
  margin: 20px 0 !important;
}

.you2-content pre, .wenzhang-neirong pre {
  background: #f0f5f2 !important;
  padding: 15px !important;
  border-radius: 6px !important;
  border-left: 4px solid #8d7d6b !important;
  margin: 15px 0 !important;
  overflow-x: auto !important;
  font-size: 14px !important;
}

.you2-content code, .wenzhang-neirong code {
  color: #2c5e4e !important;
}

/* 列表缩进 */
.you2-content ul, .you2-content ol, .wenzhang-neirong ul, .wenzhang-neirong ol {
  list-style-position: outside !important;
  padding-left: 2em !important;
  margin: 0.5em 0 !important;
}

.you2-content ol, .wenzhang-neirong ol {
  list-style-type: decimal !important;
}

/* ===================== 滚动条样式 ===================== */
/* 导航区/正文区滚动条 */
.zuo2::-webkit-scrollbar, .you3-container::-webkit-scrollbar {
  width: 6px !important;
}

.zuo2::-webkit-scrollbar-track, .you3-container::-webkit-scrollbar-track {
  background: #f0f5f2 !important;
  border-radius: 3px !important;
}

.zuo2::-webkit-scrollbar-thumb, .you3-container::-webkit-scrollbar-thumb {
  background: #8d7d6b !important;
  border-radius: 3px !important;
}

/* ===================== 回到顶部按钮 ===================== */
.back-to-top {
  position: fixed !important;
  bottom: 20px !important;
  right: calc((100% - 1200px)/2 + 20px) !important;
  width: 40px !important;
  height: 40px !important;
  background-color: #4a7d6a !important;
  color: white !important;
  border: none !important;
  border-radius: 50% !important;
  cursor: pointer !important;
  font-size: 18px !important;
  display: none !important;
  justify-content: center !important;
  align-items: center !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2) !important;
  z-index: 100 !important;
}

.back-to-top.show {
  display: flex !important;
}

/* ===================== 移动端菜单按钮 ===================== */
.caidan-anniu {
  display: none !important;
  position: fixed !important;
  top: 5px !important;
  left: 10px !important;
  z-index: 1000 !important;
  width: 40px !important;
  height: 40px !important;
  background: #2c5e4e !important;
  color: #fff !important;
  border: none !important;
  border-radius: 5px !important;
  cursor: pointer !important;
  font-size: 20px !important;
}

/* ===================== 加密区域样式 ===================== */
.encrypted-mask {
  padding: 40px 20px !important;
  background: #F0F5F2 !important;
  border-radius: 8px !important;
  text-align: center !important;
  margin: 20px 0 !important;
  border: 1px dashed #f00 !important;
}

.article-password-input {
  width: 300px !important;
  padding: 10px 15px !important;
  margin: 15px 0 !important;
  border: 1px solid #f00 !important;
  border-radius: 6px !important;
  font-size: 16px !important;
}

.article-password-btn {
  padding: 10px 20px !important;
  background: #4A7D6A !important;
  color: #fff !important;
  border: none !important;
  border-radius: 6px !important;
  cursor: pointer !important;
  font-size: 16px !important;
}

.article-password-btn:hover {
  background: #3a6858 !important;
}

.article-password-error {
  color: #ff4444 !important;
  margin-top: 10px !important;
  font-size: 14px !important;
  display: none !important;
}

/* ===================== 响应式适配（768px以下） ===================== */
@media (max-width: 768px) {
  html,
  body {
    display: block !important;
    height: 100% !important;
    min-height: 100vh !important;
    overflow: auto !important;
    position: relative !important;
  }

  .ye {
    flex-direction: column !important;
    width: 100% !important;
    max-width: 100% !important;
    height: 100% !important;
    min-height: 100vh !important;
    margin: 0 !important;
    box-shadow: none !important;
  }

  .zuo {
    position: fixed !important;
    left: 0 !important;
    top: 0 !important;
    transform: translateX(-100%) !important;
    z-index: 999 !important;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1) !important;
    width: 85% !important;
    max-width: 280px !important;
    min-width: 200px !important;
    height: 100vh !important;
  }

  .zuo.xianshi {
    transform: translateX(0) !important;
  }

  .zuo .zuo3 {
    display: none !important;
  }

  .you {
    width: 100% !important;
    height: 100% !important;
    min-height: 100vh !important;
  }

  .you1 {
    height: 80px !important;
    font-size: 22px !important;
  }

  .logo-biaoti {
    font-size: 22px !important;
  }

  .you .erweima-yidong {
    display: flex !important;
    justify-content: space-around !important;
    padding: 10px 50px !important;
    background: #e0ebe6 !important;
    border-bottom: 1px solid #c2d1c9 !important;
    gap: 5px !important;
    flex-shrink: 0 !important;
  }

  .you .erweima-yidong img {
    width: 120px !important;
    height: 120px !important;
    border: 2px solid #c2d1c9 !important;
    border-radius: 6px !important;
  }

  .you2 {
    flex: 1 !important;
    height: 0 !important;
    min-height: calc(100vh - 80px - 140px) !important;
    padding: 15px !important;
  }

  .caidan-anniu {
    display: block !important;
  }

  .back-to-top {
    right: 20px !important;
    width: 36px !important;
    height: 36px !important;
    font-size: 16px !important;
  }

  /* 小屏导航文字缩小 */
  .zuo2 .fenlei-text {
    font-size: 14px !important;
  }

  .wenzhang-liebiao li {
    font-size: 13px !important;
  }

  /* 移动端密码输入框适配 */
  .article-password-input {
    width: 80% !important;
  }
}

/* 769px以上隐藏移动端二维码 */
@media (min-width: 769px) {
  .you .erweima-yidong {
    display: none !important;
  }
}