
  /* 全局样式设置 */
  body {
    margin: 0;
    padding: 0;
    font-family: 'Roboto', sans-serif; /* 使用现代无衬线字体 */
    background: linear-gradient(135deg, #0074D9 70%, #BDC3C7 25%, #FFC107 5%); /* 主色调70%，辅色25%，点缀色5% */
    color: #333;
    line-height: 1.6;
  }

  /* 导航栏样式 */
  .navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(0, 116, 217, 0.9); /* 主色调透明背景 */
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 30px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    z-index: 1000;
  }

  .navbar a {
    color: #fff;
    text-decoration: none;
    margin: 0 15px;
    font-size: 18px;
    transition: color 0.3s;
  }

  .navbar a:hover {
    color: #FFC107; /* 点缀色 */
  }

  /* 主内容区域布局 */
  .main-content {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 20px;
    padding: 100px 30px 30px 30px; /* 顶部留出导航栏空间 */
    max-width: 1920px;
    margin: 0 auto;
  }

  /* 侧边导航样式 */
  .sidebar {
    position: sticky;
    top: 100px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  }

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

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

  .sidebar a {
    color: #28A745; /* 辅助色 */
    text-decoration: none;
    font-size: 16px;
    transition: color 0.3s;
  }

  .sidebar a:hover {
    color: #FFC107; /* 点缀色 */
  }

  /* 文章内容样式 */
  article {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  }

  article h2, article h3, article h4 {
    color: #0074D9; /* 主色调 */
    margin-top: 20px;
    margin-bottom: 10px;
  }

  article p {
    font-size: 16px;
    margin-bottom: 15px;
  }

  article pre {
    background: #2C3E50;
    color: #ECF0F1;
    padding: 15px;
    border-radius: 5px;
    overflow-x: auto;
    margin: 20px 0;
  }

  article code {
    background: #34495E;
    padding: 2px 4px;
    border-radius: 3px;
    color: #ECF0F1;
  }

  /* 图片装饰样式 */
  .decorative-image {
    width: 100%;
    border-radius: 15px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    transition: transform 0.3s, box-shadow 0.3s;
    margin: 20px 0;
  }

  .decorative-image:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 16px rgba(0,0,0,0.3);
  }

  /* 按钮样式 */
  .btn {
    display: inline-block;
    padding: 12px 25px;
    background: #28A745; /* 辅助色 */
    color: #fff;
    text-decoration: none;
    border-radius: 5px;
    transition: background 0.3s;
    font-size: 16px;
  }

  .btn:hover {
    background: #218838;
  }

  /* 折叠区域样式 */
  .collapsible {
    background-color: #0074D9; /* 主色调 */
    color: white;
    cursor: pointer;
    padding: 15px;
    width: 100%;
    border: none;
    text-align: left;
    outline: none;
    font-size: 17px;
    border-radius: 5px;
    margin-bottom: 10px;
    transition: background 0.3s;
  }

  .collapsible:hover {
    background-color: #0056b3;
  }

  .content {
    padding: 0 18px;
    display: none;
    background-color: rgba(255,255,255,0.1);
    overflow: hidden;
    border-radius: 5px;
    margin-bottom: 20px;
  }

  /* 代码示例样式 */
  .code-example {
    background: #2C3E50;
    color: #ECF0F1;
    padding: 20px;
    border-radius: 5px;
    overflow-x: auto;
    font-family: 'Courier New', Courier, monospace;
    margin: 25px 0;
  }

  /* 关键帧动画 */
  @keyframes fadeInUp {
    from {
      opacity: 0;
      transform: translateY(20px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  .animate-fadeInUp {
    opacity: 0;
    animation: fadeInUp 1s forwards;
  }

  .is-visible {
    opacity: 1;
    animation-play-state: running;
  }

  /* 章节导航样式 */
  .chapter-nav {
    margin-bottom: 30px;
  }

  .chapter-nav a {
    display: block;
    margin-bottom: 10px;
    color: #28A745; /* 辅助色 */
    text-decoration: none;
    font-size: 16px;
    transition: color 0.3s;
  }

  .chapter-nav a:hover {
    color: #FFC107; /* 点缀色 */
  }

  /* 响应式设计 */
  @media (max-width: 1200px) {
    .main-content {
      grid-template-columns: 200px 1fr;
    }
  }

  @media (max-width: 992px) {
    .main-content {
      grid-template-columns: 1fr;
    }

    .sidebar {
      display: none;
    }
  }

  @media (max-width: 768px) {
    .navbar {
      flex-direction: column;
      align-items: flex-start;
    }

    .navbar a {
      margin: 5px 0;
    }

    .main-content {
      padding: 100px 15px 15px 15px;
    }
  }

