
section {
  scroll-margin-top: 100px;
}
#nav-reference {
  transition: margin-top 0.3s ease;
}
#row {
  transition: padding-right 0.6s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.3s ease;
  padding-right: 200px;
  max-width: 1200px; /* 限定最大宽度，防止正文无限宽，保持页面美观 */
  margin: 100px auto 0 auto; /* 左右居中，上方100px间距（配合导航栏top） */
  box-sizing: border-box; /* 盒模型包含padding，防止尺寸计算异常 */
  min-height: 200vh;

}


#row.navbar-collapsed {
    padding-right: 10px;
}
body {
    overflow-x: hidden;/*隐藏水平滚动条*/
}
    #side-navbar {
      position: fixed;
      top: 120px; 
      right: 0;
      width: 200px;
      background-color: #D0DCEA;
      padding: 1rem;
      border-left: 1px solid #ccc;
      box-sizing: border-box; /* 同样保证盒模型尺寸准确 */
      box-shadow: -2px 0 5px rgba(0,0,0,0.1); /* 添加轻微阴影，突出导航栏层次感 */
      z-index: 999;
      transform: translateX(0); 
      transition: transform 0.3s ease; /*滑出动画效果（避免瞬移）*/
      border-radius: 8px;
    }
    #side-navbar .nav-link {
      display: block;
      margin-bottom: 0.8rem;
      color: #000;
      font-weight: 500;
      transition: all 0.2s ease;

    }
    #side-navbar .nav-link:hover {
      color: #476A94;
      transform: translateX(-4px);
      border-radius: 8px;
    
    }
    #side-navbar:hover {/*鼠标悬停触发滑出*/
    transform: translateX(0);
   }
   #side-navbar.expanded {
    transform: translateX(0);
  }
   #side-navbar::before {
    content: '≡';
    position: absolute;
    left: -20px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 60px;
    background-color: #476A94;
    color: white;
    text-align: center;
    line-height: 60px;
    font-size: 18px;
    border-top-left-radius: 5px;
    border-bottom-left-radius: 5px;
    cursor: pointer;
    user-select: none;
  }

  p[id^="ref"] {
    scroll-margin-top: 100px;
  }

/*文字框背景色*/

  .section-box {
    background-color: #F2F0F1;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05); 
  }

  .section-title{
    color:rgb(60,81,124);
    font-weight: 800; 
    font-size: 45px;
    margin-top: 0;
    margin-bottom: 15px;
    padding-left:30px;
  }

  /* 其他已有样式保持不变 */
  section {
    scroll-margin-top: 100px;
  }
  
  /* 其他样式... */


/*表格/表头背景色*/
  th {
    background-color: #DDE6FF;
  }




/*
#navbar-solution + .dropdown-menu {
  display: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease;
}*/

/* 鼠标悬停在按钮或者菜单时显示下拉菜单 */
/*
#navbar-solution:hover + .dropdown-menu,
#navbar-solution:focus + .dropdown-menu,
#navbar-solution + .dropdown-menu:hover {
  display: block;
  opacity: 1;
  visibility: visible;
}*/


  /* 表格自动布局 + 列宽提示 */
  .my-table {
    width: 100%;
    table-layout: auto;
  }
  .my-table th,
  .my-table td {
    vertical-align: top;
    padding: 0.5rem;
  }

    .img-text-block {
      display: flex;
      align-items: flex-start;   /* 图片顶部对齐文字顶端 */
      margin-bottom: 2rem;       /* 每组之间留点距离 */
    }

  .img-text-block img {
    width: 400px;              /* 或者你想要的固定宽度 */
    height: auto;
    margin-right: 1.5rem;      /* 图片和文字之间的间距 */
    flex-shrink: 0;            /* 防止图片被压缩 */
  }

  .img-text-block .text {
    flex: 1;                   /* 文本区域自动填满剩余空间 */
  }


  .toc-link {
  position: relative;
  display: block;
  padding-left: 10px;
  transition: all 0.3s ease;
  color: #333;
  text-decoration: none;
}

.toc-link::before {
  content: "";
  position: absolute;
  left: 0;
  top: 30%;
  width: 3px;
  height: 40%;
  background-color: transparent;
  transition: background-color 0.3s ease;
}

.toc-link.active {
  font-weight: bold;
  color: #476A94;
}

.toc-link.active::before {
  background-color: #476A94;
}

.toc-link.active::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to right,#007BFF1A, transparent);
  z-index: -1;
  border-radius: 8px;
}

  .figures-row {
    display: flex;
    flex-wrap: wrap;      /* 窗口太窄时自动换行 */
    gap: 1rem;            /* 图与图之间的间距 */
    justify-content: center; /* 居中对齐，可根据需要改为 flex-start */
  }
  .figures-row figure {
    flex: 1 1 45%;        /* 每张图占行宽的约 45%，视窗小可收缩到一行 */
    margin: 0;            /* 去掉默认的 figure margin */
    text-align: center;   /* 图注居中 */
  }
  .figures-row img {
    width: 100%;          /* 保证图片自适应其 figure 宽度 */
    height: auto;
  }
  .figures-row .caption {
    margin-top: 0.5rem;   /* 图注与图片的间距 */
    font-size: 0.9rem;
    color: #666;
  }

    .responsive-full {
      max-width: 500px;
      height: auto;
      object-fit: contain;
      display: block;
      margin: 0 auto;
    }

    .caption {
      display: block; /* Ensure proper block behavior */
      font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
      font-size: 0.9rem; /* Slightly smaller than body text */
      line-height: 1.5; /* Improved readability */
      color: #555; /* Subtle gray text */
      text-align: center; /* Center alignment */
      padding: 0.6em 1em; /* Vertical and horizontal padding */
      margin-top: -1px; /* Aligns border with image */
    }
 