/* 文档页面通用样式 */
.documentation-main {
  min-height: calc(100vh - 200px);
}

/* 页面头部样式 */
.page-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 60px 0;
  text-align: center;
}

.page-header h1 {
  font-size: 2.8rem;
  font-weight: 700;
  margin-bottom: 15px;
}

.page-header p {
  font-size: 1.2rem;
  opacity: 0.9;
  max-width: 700px;
  margin: 0 auto;
}

/* 文档内容区域布局 */
.documentation-content {
  padding: 40px 0;
  background-color: #dddddd;
}

.doc-layout {
  display: flex;
  gap: 30px;
}

/* 侧边栏样式 */
.doc-sidebar {
  flex: 0 0 280px;
  position: sticky;
  top: 20px;
  height: calc(100vh - 40px);
  overflow-y: auto;
  padding-right: 20px;
}

.doc-sidebar-box{
  padding-top: 20px;
  border-radius: 8px;
  background-color: white;
}

.sidebar-nav {
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  padding: 20px;
  margin-bottom: 20px;
}

.section-title {
  font-size: 1rem;
  font-weight: 600;
  color: #6c757d;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 15px;
  padding-bottom: 8px;
  border-bottom: 1px solid #e9ecef;
  cursor: pointer;
}

.nav-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.nav-list li {
  margin-bottom: 2px;
}

.nav-list li:last-child {
  margin-bottom: 10px;
}

.nav-list a {
  color: #495057;
  text-decoration: none;
  font-size: 0.95rem;
  display: block;
  padding: 4px 12px;
  border-radius: 4px;
  transition: all 0.2s ease;
  cursor: pointer;
}

.nav-list a:hover {
  background-color: #f1f3f5;
  color: #007bff;
}

.nav-list a.active {
  background-color: #e7f3ff;
  color: #007bff;
  font-weight: 500;
}


/* 侧边栏搜索 */
.sidebar-search {
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  padding: 0 15px 5px 15px;
}

.search-box {
  position: relative;
}

.sidebar-search-input {
  width: 100%;
  padding: 8px 12px 8px 40px;
  border: 1px solid #dee2e6;
  border-radius: 4px;
  font-size: 0.9rem;
}

.sidebar-search-btn {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #6c757d;
  cursor: pointer;
}

/* 文档版本选择 */
.sidebar-version {
  background-color: white;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  padding: 0 15px 5px 15px;
}

.sidebar-version label {
  font-size: 0.9rem;
  color: #495057;
  margin-right: 10px;
  font-weight: 500;
}

.version-select {
  padding: 6px 12px;
  border: 1px solid #dee2e6;
  border-radius: 4px;
  font-size: 0.9rem;
  background-color: white;
  cursor: pointer;
  width: calc(100% - 60px);
}

/* 文档内容区域 */
.doc-content {
  flex: 1;
  background-color: #dddddd;
  border-radius: 8px;
}

/* 文档头部导航 */
.doc-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 20px;
  border-bottom: 1px solid #e9ecef;
  padding: 30px;
  background-color: white;
  width: calc(100% - 6px);
}

.doc-breadcrumb {
  font-size: 0.9rem;
}

.doc-breadcrumb .breadcrumb {
  background: none;
  padding: 0;
  margin: 0;
}

.doc-breadcrumb .breadcrumb-item a {
  color: #007bff;
  text-decoration: none;
}

.doc-breadcrumb .breadcrumb-item.active {
  color: #6c757d;
}

.doc-actions {
  display: flex;
  gap: 10px;
}

.action-btn {
  width: 36px;
  height: 36px;
  border: 1px solid #dee2e6;
  background-color: white;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6c757d;
  cursor: pointer;
  transition: all 0.2s ease;
}

.action-btn:hover {
  background-color: #f8f9fa;
  color: #495057;
  border-color: #adb5bd;
}

/* 文档章节样式 */
.doc-chapters {
  margin-bottom: 40px;
}

.doc-chapter {
  margin-bottom: 40px;
}

.doc-chapter h2 {
  font-size: 2rem;
  font-weight: 700;
  color: #212529;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid #e9ecef;
}

.doc-chapter h3 {
  font-size: 1.5rem;
  font-weight: 600;
  color: #212529;
  margin: 25px 0 15px 0;
}

.doc-chapter p {
  font-size: 1rem;
  line-height: 1.7;
  color: #495057;
  margin-bottom: 15px;
}

.section-content {
  margin-bottom: 25px;
}

/* 列表样式 */
.doc-chapter ul,
.doc-chapter ol {
  margin-bottom: 20px;
  padding-left: 25px;
}

.doc-chapter li {
  margin-bottom: 8px;
  line-height: 1.6;
  color: #495057;
}

.doc-chapter li strong {
  font-weight: 600;
  color: #212529;
}

/* 架构图样式 */
.architecture-diagram {
  margin: 20px 0;
  text-align: center;
}

.architecture-diagram img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* 技术栈样式 */
.tech-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin: 20px 0;
}

.tech-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background-color: #f8f9fa;
  border-radius: 20px;
  font-size: 0.9rem;
  color: #495057;
  transition: all 0.2s ease;
}

.tech-item:hover {
  background-color: #e9ecef;
  transform: translateY(-2px);
}

.tech-item i {
  font-size: 1.2rem;
}

/* 代码块样式 */
.doc-chapter pre {
  background-color: #f8f9fa;
  border-radius: 6px;
  padding: 16px;
  overflow-x: auto;
  margin: 20px 0;
  position: relative;
}

.doc-chapter code {
  font-family: "Consolas", "Monaco", "Courier New", monospace;
  font-size: 0.9rem;
  color: #e83e8c;
}

/* 提示框样式 */
.note {
  background-color: #fff3cd;
  border-left: 4px solid #ffeaa7;
  padding: 15px;
  border-radius: 4px;
  margin: 20px 0;
}

/* 分页导航样式 */
.doc-pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 20px;
  border-top: 1px solid #e9ecef;
}

.prev-page,
.next-page {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  color: #007bff;
  text-decoration: none;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.prev-page:hover,
.next-page:hover {
  background-color: #f8f9fa;
  color: #0056b3;
}

#buildsDropdownContainer #buildsDropdown {
  width: 100%;
}

/* 响应式设计 */
@media (max-width: 1200px) {
  .doc-layout {
    flex-direction: column;
  }

  .doc-sidebar {
    flex: none;
    position: static;
    height: auto;
    padding-right: 0;
  }

  .sidebar-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
  }

  .nav-section {
    flex: 1;
    min-width: 200px;
  }
}

@media (max-width: 768px) {
  .page-header {
    padding: 40px 0;
  }

  .page-header h1 {
    font-size: 2rem;
  }

  .page-header p {
    font-size: 1rem;
  }

  .documentation-content {
    padding: 20px 0;
  }

  .doc-content {
    padding: 20px;
  }

  .doc-header {
    flex-direction: column;
    gap: 15px;
    text-align: center;
  }

  .doc-sidebar {
    margin-bottom: 20px;
  }

  .sidebar-nav {
    flex-direction: column;
  }

  .nav-section {
    min-width: auto;
  }
}

/* 滚动条样式 */
.doc-sidebar::-webkit-scrollbar {
  width: 6px;
}

.doc-sidebar::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 3px;
}

.doc-sidebar::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 3px;
}

.doc-sidebar::-webkit-scrollbar-thumb:hover {
  background: #a1a1a1;
}

/* 动画效果 */
.doc-chapter {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.5s ease forwards;
}


@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.doc-chapter:nth-child(1) {
  animation-delay: 0.1s;
}

.doc-chapter:nth-child(2) {
  animation-delay: 0.2s;
}

.doc-chapter:nth-child(3) {
  animation-delay: 0.3s;
}

/* 打印样式 */
@media print {
  .doc-sidebar,
  .doc-header,
  .doc-pagination,
  #navbar,
  #footer {
    display: none;
  }

  .doc-content {
    box-shadow: none;
    padding: 0;
  }

  .page-header {
    background: none;
    color: black;
    padding: 20px 0;
  }
}
