/* 基础样式 */
body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  height: 100vh;
  font-size: 14px;
}

/* 头部样式 */
.header {
  position: fixed;
  top: 72px;
  left: 0;
  width: 100%;
  height: 45px;
  background-color: #fff;
  color: black;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #e2e2e2;
  padding: 0 20px;
  font-size: 18px;
  z-index: 1002;
}

em {
  color: red;
}

.header-title{
  font-size: 1.125rem;
  font-weight: bold;
}

/* 主布局 */
.containers {
  display: flex;
  width: 100%;
  height: calc(100vh - 60px);
  /* 减去头部的高度 */
  /* padding-top: 120px; */
  /* 让出头部高度 */
}

/* 侧边栏 */
.sidebar {
  position: fixed;
  left: 0;
  top: 120px;
  width: 230px;
  height: calc(95vh - 70px);
  background-color: #fff;
  border-right: 1px solid #e2e2e2;
  /* 如果菜单过多，可以滚动 */
  z-index: 1000;
  overflow-y: auto;
}

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s ease;
  }

  .sidebar.open {
    transform: translateX(0);
  }
}

.sidebar ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar ul li {
  position: relative;
}

.sidebar ul li a {
  text-decoration: none;
  color: #333;
  display: flex;
  align-items: center;
  padding: 10px 20px;
}

.sidebar ul li a:hover {
  color: #4CAF50;
  background-color: #eff6ff;
  
}

.sidebar .dropdown-arrow {
  display: inline-block;
  width: 0;
  height: 0;
  /* border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  border-right: 5px solid #333; */
  margin-right: 5px;
  transition: transform 0.3s ease;
  position: absolute;
  right: 10px;
  font-size: 0.75rem;
}

.sidebar .dropdown.open .dropdown-arrow {
  transform: rotate(90deg);
  font-size: 0.75rem;
}

.sidebar .submenu {
  display: none;
  width: 100%;
  box-sizing: border-box;
}

.submenu li {
  padding-left: 20px;
}

.sidebar ul li a:hover,
.sidebar ul li a.active {
  /* color: #1331d8; */
  color: #2563eb;
}

/* 右侧内容区 */
.content {
  flex: 1;
  margin-left: 230px;
  /* 让出侧边栏的空间 */
  margin-right: 230px;
  /* 让出右侧目录的空间 */
  padding: 0 20px;
  height: calc(100vh - 60px);
  background: #fff;
  display: flex;
  flex-direction: column;
}

.breadcrumb-nav{
  height: 100%;
}
.breadcrumb{
  height: 100%;
  display: flex;
  align-items: center;
  /* gap: 5px; */
}

.breadcrumb-separator{
  margin: 0 0.5rem;
  color: #64748b;
}

.breadcrumb-container {
  /* 固定面包屑 */
  position: sticky;
  top: 60px;
  /* 距离顶部的距离，应与头部高度相同 */
  background-color: #fff;
  /* 设置背景颜色以覆盖内容 */
  z-index: 999;
  /* 确保在其他内容之上 */
  padding: 10px 20px;
  border-bottom: 1px solid #e2e2e2;
}

#page-content {
  /* 中心内容区域，允许垂直滚动 */
  flex-grow: 1;
  overflow-y: auto;
  padding: 20px;
  /*width: 1560px;*/
  scrollbar-width: none;
  /* 隐藏滚动条（仅适用于 Firefox） */
}

#page-content img {
  width: 100%;
}

/* 右侧目录 */
.right-sidebar {
  position: fixed;
  right: 0;
  /* 根据需要调整 */
  top: 120px;
  /* 与头部对齐 */
  width: 230px;
  /* 根据需要调整宽度 */
  height: 100vh;
  background-color: #fff;
  border-left: 0.1px solid #e2e2e2;
  overflow-y: auto;
  /* 如果目录项过多，可以滚动 */
  padding: 20px;
  z-index: 999;
}

@media (max-width: 768px) {
  .right-sidebar {
    transform: translateX(100%);
    transition: transform 0.3s ease;
  }

  .right-sidebar.open {
    transform: translateX(0);
  }

  img {
    width: 100%;
  }
}

.right-sidebar ul li {
  /* 取消前面的黑点标记 */
  margin-bottom: 10px;
  cursor: pointer;
  /* 超出内容隐藏 */
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.footer {
  /* 底部区域 */
  width: 100%;
  padding: 30px 20px;
  /* text-align: center; */
  border-top: 1px solid #f3f4f6;
  display: flex;
  justify-content: space-between;
  cursor: pointer;
}

/* 手机端样式调整 */
@media (max-width: 768px) {
  .header input[type="text"] {
    width: 150px;
    box-sizing: border-box;
  }

  .content {
    margin-left: 0;
    margin-right: 0;
    height: auto
  }

  .breadcrumb-container {
    padding: 10px;
  }

  #page-content {
    flex-grow: 1;
    overflow-y: auto;
    padding: 20px;
    width: 100%;
  }

  #page-content img {
    width: 100%;
  }

  .footer {
    padding: 20px 10px;
  }

  .sidebar {
    width: 100%;
  }

  .right-sidebar {
    width: 100%;
  }

  /* 搜索框和搜索历史记录在手机端自适应 */
  .search-wrapper {
    /* width: 50%; */
  }

  .inputs {
    width: 100%;
    transition: width 0.3s ease;
  }

  .search-history {
    width: 100%;
  }

  .inputs.focused {
    width: 100%;
  }

  .search-history.expanded {
    width: 100%;
    max-height: 300px;
  }
}

/* 菜单按钮样式 */
.menu-button {
  display: none;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
}

@media (max-width: 768px) {
  .menu-button {
    display: block;
  }
}

/* 搜索相关样式 */
.search-wrapper {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  position: relative;
}


#search-box {
  position: relative;
  display: inline-flex;
  align-items: center;
  border: 1px solid #ccc;
  border-radius: 6px;
  padding: 5px 10px;
  background: #fff;
}

#search-box input {
  border: none;
  outline: none;
  flex: 1;
}

.search-input-wrapper {
  position: relative;
}

.search-drawer-header {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #f3f4f6;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.search-input {
  width: 100%;
  padding: 0.5rem 2.5rem;
  border-radius: 0.5rem;
  border: 1px solid #e5e7eb;
  outline: none;
  transition: all 0.2s;
}

.search-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: #64748b;
}

.search-input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.3);
}

#search-box .search-icon {
  cursor: pointer;
  margin-left: 5px;
  color: #888;
}

#search-box .search-icon:hover {
  color: #333;
}


.inputs {
  /* width: 200px; */
  /* transition: width 0.3s ease; */
  padding-right: 30px;
  /* 为清空按钮留出空间 */
}

.search-history {
  position: absolute;
  top: calc(100% + 5px);
  left: 0;
  background-color: #fff;
  border: 1px solid #ccc;
  padding: 10px;
  width: 200px;
  display: none;
  max-height: 300px;
  overflow-y: auto;
  transition: width 0.3s ease, max-height 0.3s ease;
  z-index: 1;
}

.search-history ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.search-history ul li {
  cursor: pointer;
  padding: 5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: black;
  /* 默认黑色文字 */
  font-size: 14px;
}

.search-history ul li a {
  /* 将a标签 样式取消掉*/
  text-decoration: none;
  color: black;
}

.help-breadcrumb-item {
  /* 限制文本显示宽度（根据实际布局调整） */
  max-width: 180px;
  /* 强制文本在一行显示 */
  white-space: nowrap;
  /* 超出部分隐藏 */
  overflow: hidden;
  /* 超出部分显示省略号 */
  text-overflow: ellipsis;
  /* 确保元素为块级或行内块级，使宽度限制生效 */
  display: inline-block;
  vertical-align: middle;
  margin-right: 5px;
  /* 垂直居中对齐 */
}

.help-breadcrumb-item a {
  max-width: 160px;
  text-decoration: none;
  /* 强制文本在一行显示 */
  white-space: nowrap;
  /* 超出部分隐藏 */
  overflow: hidden;
  /* 超出部分显示省略号 */
  text-overflow: ellipsis;
  /* 确保元素为块级或行内块级，使宽度限制生效 */
  display: inline-block;
  vertical-align: middle;
  margin-right: 5px;
}

.search-history ul li a:hover {
  background-color: #f4f4f4;
  color: blue;
  /* 鼠标滑过蓝色高亮 */
}

/* 输入框聚焦时的样式 */
.inputs.focused {
  width: 350px;
}

/* 输入框聚焦时搜索历史记录的样式 */
.search-history.expanded {
  width: 350px;
  max-height: 300px;
}

/* 清空输入框按钮 */
.clear-input {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  display: none;
  font-size: 16px;
}

.right-sidebar a {
  color: #000000;
  text-decoration: none;
}

.content_line {
  margin-top: 10px;
}

.content_line a {
  text-decoration: none;
}

.right-sidebar a:hover {
  color: #3939ba;
}

.sidebar .dropdown-arrow:before {
  /* content: ""; */
  position: absolute;
  top: -8px;
  /* 扩大上方点击区域，可调整 */
  right: -20px;
  /* 扩大右侧点击区域，可调整 */
  bottom: -20px;
  /* 扩大下方点击区域，可调整 */
  left: -20px;
  /* 扩大左侧点击区域，可调整 */
  z-index: 0;
  /* 伪元素在三角下层 */
}

.dropdown a{
  border-radius: 0.5rem;
}

.search-result-drawer {
  position: fixed;
  right: -500px;
  /* 初始位置在屏幕外 */
  top: 60px;
  width: 500px;
  /* height: calc(100vh - 60px); */
  height: 100vh;
  background-color: #fff;
  /* border-left: 1px solid #ccc; */
  /* 左侧阴影 */
  box-shadow: -2px 0 5px rgba(0, 0, 0, 0.1);
  /* overflow-y: auto; */
  z-index: 1003;
  transition: right 0.3s ease;
}

.search-result-drawer.open {
  right: 0;
  /* 滑入屏幕内 */
}

/* .drawer-header {
  padding: 10px;
  display: flex;
  align-items: center;
  position: sticky;
  top: 0;

  background-color: #fff;
  z-index: 1;
} */

/* .drawer-search-input {
  flex: 1;
  padding: 5px;
  border: 1px solid #ccc;
} */

.search-drawer-content {
  padding: 1rem;
  flex: 1;
  /* 占满剩余高度 */
  display: flex;
  flex-direction: column;
  gap: 1rem;
  /* 搜索框与结果区间距 */
}

#search-input {
  border: none;
  outline: none;
  background: transparent;
  width: 0;
  transition: width .3s;
}
#search-input.focused {
  width: 200px; /* 点击后展开 */
}


.drawer-content {
  padding: 10px;
  overflow-y: auto;
  /* 使内容区域可滚动 */
  height: calc(100vh - 172px);
  /* 根据抽屉头部高度调整，这里假设抽屉头部高度为 70px，你可以根据实际情况修改 */
}

.drawer-content a {
  color: black;
  text-decoration: none;
}

.drawer-content a:hover {
  color: #3939ba;
}

.search-result-item {
  padding: 10px;
  /* border: 1px solid #ccc; */
  margin-bottom: 10px;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s;
}

.search-result-item:hover {
  background-color: #f0f0f0;
}

/* 手机端样式调整 */
@media (max-width: 768px) {

  /* .inputs {
    width: 100%;
    padding: 5px;
    border: 1px solid #ccc;
  } */

  /* 抽屉样式调整，使其在手机端更好显示 */
  .search-result-drawer {
    width: 100%;
    right: -100%;
  }

  .search-result-drawer.open {
    right: 0;
  }
}

.drawer-clear-button {
  margin-left: 5px;
  font-size: 16px;
  color: #999;
}

/* 图片放大预览模态框样式 */
.image-modal {
  display: none;
  position: fixed;
  z-index: 1004;
  padding-top: 300px;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow-x: auto;
  background-color: rgba(0, 0, 0, 0.9);
}

.image-modal img.modal-content {
  margin: auto;
  display: block;
  width: 80%;
  max-width: 700px;
}

.close-modal {
  position: absolute;
  top: 15px;
  right: 35px;
  color: #f1f1f1;
  font-size: 40px;
  font-weight: bold;
  transition: 0.3s;
  cursor: pointer;
}

.close-modal:hover,
.close-modal:focus {
  color: #bbb;
  text-decoration: none;
  cursor: pointer;
}

.apiDoc_container {
  flex-grow: 1;
  overflow-y: scroll;
  /* 保持可滚动 */
  padding: 20px;
  width: 100%;
  scrollbar-width: none;
  /* Firefox 隐藏滚动条 */
  -ms-overflow-style: none;
  /* IE/Edge 隐藏滚动条 */
}

.apiDoc_container::-webkit-scrollbar {
  display: none;
  /* WebKit 隐藏滚动条 */
}

.apiDoc_h2 {
  margin-top: 15px;
}

.apiDoc_table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 20px;
}

.apiDoc_th,
.apiDoc_td {
  border: 1px solid #ddd;
  padding: 8px;
  text-align: left;
}

.apiDoc_th {
  background-color: #f2f2f2;
}

.apiDoc_codeBlock {
  background-color: #2d2d2d;
  color: white;
  padding: 20px 10px;
  /* white-space: pre-wrap; */
  overflow-x: auto;
  /*border-radius: 5px;*/
  border-radius: 0 0 3px 3px;
  line-height: 1.5;
}

.apiDoc_codeBlock pre{
  margin-top: 0rem;
  margin-bottom: 0rem;
}

.apiDoc_codeBlock pre code{
  color: white;
}
.apiDoc_button {
  display: inline-block;
  padding: 7px 20px;
  background-color: green;
  color: white;
  text-decoration: none;
  border-radius: 5px;
  margin-right: 10px;
}

.GET {
  background-color: green;
}

.POST {
  background-color: orange;
}

.PUT {
  background-color: blue;
}

.DELETE {
  background-color: red;
}

.apiDoc_responseCode {
  width: 100%;
  background-color: #f8f9fa;
  background-color: #e6ffe6;
  padding-top: 10px;
  display: flex;
  flex-flow: column;
  justify-content: space-between;

}

.apiDoc_responseCode span {
  color: green;
}


.tooltip-wrapper {
  position: relative;
  display: inline-block;
}

.tooltip {
  position: absolute;
  top: -35px;
  left: 50%;
  transform: translateX(-50%);
  background-color: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 5px 10px;
  border-radius: 4px;
  font-size: 14px;
  display: none;
  white-space: nowrap;
  z-index: 100;
}

.tooltip::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border-width: 5px;
  border-style: solid;
  border-color: rgba(0, 0, 0, 0.8) transparent transparent transparent;
}

.neisubmenu {
  max-width: 180px;
}

.tooltip-container {
  position: relative;
  display: inline-block;
  max-width: 180px;
}

.sidebar ul li {
  position: relative;
  /* 关键：让 tooltip 相对于 li 定位 */
}

.custom-tooltip {
  display: none;
  position: absolute;
  bottom: 100%;
  margin-bottom: 5px;
  padding: 5px 10px;
  background-color: #333;
  color: white;
  border-radius: 4px;
  /* white-space: wrap; */
  white-space: normal;
  overflow-wrap: break-word;
  font-size: 14px;
  max-width: 180px;
  min-height: 30px;
  word-wrap: break-word;
  margin-left: 15px;
}

.custom-tooltip::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -5px;
  border-width: 5px;
  border-style: solid;
  border-color: #333 transparent transparent transparent;
  z-index: 9999;
}


/* 溢出文本容器样式 */
.overflow-text {
  /* 限制文本显示宽度（根据实际布局调整） */
  max-width: 180px;
  /* 强制文本在一行显示 */
  white-space: nowrap;
  /* 超出部分隐藏 */
  overflow: hidden;
  /* 超出部分显示省略号 */
  text-overflow: ellipsis;
  /* 确保元素为块级或行内块级，使宽度限制生效 */
  display: inline-block;
  vertical-align: middle;
  /* 垂直居中对齐 */
}

/* 溢出文本容器样式 */
.ass {
  max-width: 180px;
  white-space: nowrap;
  display: inline-block;
  vertical-align: middle;

}