/* 首页 */
* {
  margin: 0;               /* 清除所有元素的默认外边距 */
  padding: 0;              /* 清除所有元素的默认内边距 */
  box-sizing: border-box;  /* 让元素的宽高计算包含 padding 和 border，更方便布局 */
  font-family: "Segoe UI", sans-serif; /* 设置全局字体，优先使用 Segoe UI，找不到就用系统无衬线字体 */
}

/* 中间内容撑开 */
html, body {
  height: 100%;
  margin: 0;
  padding: 0;
}

body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1; /* 背景置底 */
  background: linear-gradient(to bottom, #f0f9ff, #d0e8ff); /* 默认背景 */
  background-size: cover;
  background-repeat: no-repeat;
}
  
body {
  display: flex;
  flex-direction: column;
  color: #333;
  background-color: #f5f7fa;
  line-height: 1.6;
}

main {
  flex: 1; /* 主体自动撑开 */
  display: flex;
}

/* 顶部导航 */
nav {
  background: #00bcd4;
  color: white;
  padding: 5px 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

/* 导航链接样式 */
nav a {
  margin-left: 20px;
  text-decoration: none;
  color: white;
  font-weight: 500;
  transition: opacity 0.3s;
}

/* 导航链接悬停效果 */
nav a:hover {
  opacity: 0.8;
}

.nav-links {
  flex-wrap: wrap;
}

/* Logo 和链接部分 */
.nav-left, .nav-right {
  display: flex;
  align-items: center;
  flex-direction: row; /* 横向排列 */
  flex-wrap: nowrap;   /* 不允许换行 */
}

.nav-right a {
  white-space: nowrap; /* 防止文字换行 */
}

/* Logo样式 */
.logo {
  font-size: 22px;
  font-weight: bold;
  margin-right: 30px;
  color: white;
}


.docs-layout {
  display: flex;
  height: 100vh; /* 填满整个浏览器窗口 */
  overflow: hidden;
}
    
/* 默认 sidebar 显示 */
.sidebar {
  width: auto; /* 自动宽度，基于内容的长度 */
  min-width: max-content; /* 设置最小宽度 */
  transition: transform 0.3s ease;
  position: relative;
  padding: 20px;
  background-color: #f8f9fa; /* 给 sidebar 添加背景色 */
  box-sizing: border-box;
  overflow-y: auto;
  border-right: 1px solid #ddd;
}

.sidebar h3 {
  margin-bottom: 10px;
  font-size: 18px;
}

.sidebar ul {
  list-style: none;
  padding-left: 0;
}

.sidebar li {
  margin-bottom: 10px;
}

/* 设置侧边栏中的链接样式 */
.sidebar a {
  text-decoration: none;   /* 去掉链接默认的下划线 */
  color: #007bff;          /* 设置文字颜色为蓝色 (#007bff 是 Bootstrap 默认蓝) */
}

/* 鼠标悬停在链接上的样式 */
.sidebar a:hover {
  text-decoration: underline;  /* 悬停时显示下划线，增强交互提示 */
}

/* 设置侧边栏中处于“激活状态”的链接样式 */
.sidebar a.active {
  font-weight: bold;   /* 字体加粗，突出显示当前选中的链接 */
  color: #007bff;      /* 设置字体颜色为蓝色（和普通链接一致） */
}

    
/* 移动端 */
@media (max-width: 768px) {
  .sidebar {
    position: absolute; /* 使用绝对定位 */
    top: 0; /* 固定在父容器顶部 */
    left: 0; /* 固定在父容器左侧 */
    height: 100%; /* 高度填满父容器 */
    transform: translateX(0); /* 初始时显示菜单栏 */
    z-index: 1000;
    background: #fff;
    box-shadow: 2px 0 5px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
    width: auto;  /* 目录栏宽度自适应 */
  }
  
  .sidebar h3 {
    margin-bottom: 10px;
    font-size: 18px;
  }
  
  .sidebar ul {
    list-style: none;
    padding-left: 0;
  }
  
  .sidebar li {
    margin-bottom: 10px;
  }

  /* 设置侧边栏中的链接样式 */
  .sidebar a {
    text-decoration: none;   /* 去掉链接默认的下划线 */
    color: #007bff;          /* 设置文字颜色为蓝色 (#007bff 是 Bootstrap 默认蓝) */
  }
  
  /* 设置侧边栏中处于“激活状态”的链接样式 */
  .sidebar a.active {
    font-weight: bold;   /* 字体加粗，突出显示当前选中的链接 */
    color: #007bff;      /* 设置字体颜色为蓝色（和普通链接一致） */
    text-decoration: none;
  }
  
  .sidebar.closed {
    transform: translateX(-100%); /* 隐藏目录栏 */
  }

  .docs-layout {
    position: relative; 
    display: flex;
    flex-direction: column;
    height: 100vh; /* 使文档区域填满屏幕 */
    overflow: hidden;
  }
  
  .content-area {
    all: unset;                /* 清空默认样式 */
    width: 100%;
    height: 100%;
    display: block;          /* 恢复成块级元素，否则 unset 后可能是 inline */
    flex: 1;                 /* 在 flex 布局里占据剩余空间 */
    min-width: 0;            /* 避免内容撑破 flex 容器 */
    min-height: 0;           /* 避免内容撑破 flex 容器 */
    box-sizing: border-box;  /* 防止 padding/border 影响布局计算 */
    background-color: #fff;  /* 需要的话设置背景色 */
  }
  
   /* 当目录栏显示时，给内容区域添加左侧边距 */
  .sidebar:not(.closed) + .content-area {
    margin-left: 110px; /* 留出与目录栏等宽的空间 */
  }
}

.content-area {
    all: unset;                /* 清空默认样式 */
    width: 100%;
    height: 100%;
    display: block;          /* 恢复成块级元素，否则 unset 后可能是 inline */
    flex: 1;                 /* 在 flex 布局里占据剩余空间 */
    min-width: 0;            /* 避免内容撑破 flex 容器 */
    min-height: 0;           /* 避免内容撑破 flex 容器 */
    box-sizing: border-box;  /* 防止 padding/border 影响布局计算 */
    background-color: #fff;  /* 需要的话设置背景色 */
}


/* 新的样式名称：.document-item */
.document-item {
  background-color: #ffffff;
  padding: 20px 24px;
  margin: 12px 0;
  border-left: 4px solid #00796b;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  transition: box-shadow 0.3s ease;
}

.document-item:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.document-item h3 {
  background-color: #ffffff;
  font-size: 18px;
  margin: 0 0 10px;
  color: #00796b;
  font-weight: 600;
  text-align: left;
}

.document-item p {
  font-size: 14px;
  line-height: 1.6;
  color: #444;
  text-indent: 2em; /* 首行缩进 2 字符 */
}


#feature-list h2 {
  font-size: 1.2em;
  margin-top: 0;
  margin-bottom: 10px;
}
    
