
  /* 颜色变量定义 */
  :root {
    --primary-color: #0A2463; /* 主色调，深蓝色，传达科技感与专业性 */
    --background-color: #F7F7F7; /* 背景色，浅灰色，提供舒适的视觉体验 */
    --accent-color: #FF7E0E; /* 点缀色，橙色，用于强调重要元素 */
    --secondary-color: #E0E0E0; /* 辅助色，浅灰，增加层次感 */
    --text-color: #333333; /* 正文字体颜色，深灰 */
    --header-color: #FFFFFF; /* 导航栏文字颜色，白色 */
  }

  /* 全局样式 */
  body {
    margin: 0;
    padding: 0;
    background-color: var(--background-color);
    color: var(--text-color);
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
  }

  /* 导航栏样式 */
  .navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(10, 36, 99, 0.8); /* 半透明背景 */
    backdrop-filter: blur(10px); /* 背景模糊效果 */
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: opacity 0.5s ease;
    z-index: 1000;
  }

  .navbar.hidden {
    opacity: 0;
  }

  .navbar.visible {
    opacity: 1;
  }

  .navbar .logo {
    color: var(--header-color);
    font-size: 1.5rem;
    font-weight: bold;
    text-decoration: none;
  }

  .navbar ul {
    list-style: none;
    display: flex;
    margin: 0;
    padding: 0;
  }

  .navbar ul li {
    margin-left: 20px;
  }

  .navbar ul li a {
    color: var(--header-color);
    text-decoration: none;
    font-size: 1rem;
    transition: color 0.3s ease;
  }

  .navbar ul li a:hover {
    color: var(--accent-color);
  }

  /* 汉堡菜单样式 */
  .hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
  }

  .hamburger .line {
    width: 25px;
    height: 3px;
    background-color: var(--header-color);
    margin: 4px 0;
    transition: all 0.3s ease;
  }

  /* 主容器样式 */
  .container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    padding: 100px 40px 60px 40px; /* 上方预留导航栏空间 */
  }

  /* 章节导航样式 */
  .toc {
    position: fixed;
    top: 80px;
    right: 20px;
    background-color: var(--secondary-color);
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  }

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

  .toc ul li {
    margin-bottom: 10px;
  }

  .toc ul li a {
    text-decoration: none;
    color: var(--text-color);
    font-size: 0.9rem;
    transition: color 0.3s ease;
  }

  .toc ul li a:hover {
    color: var(--accent-color);
  }

  /* 文章样式 */
  article {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
  }

  article h2 {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-top: 20px;
    margin-bottom: 10px;
  }

  article h3 {
    font-size: 1.5rem;
    color: var(--accent-color);
    margin-top: 15px;
    margin-bottom: 8px;
  }

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

  /* 代码块样式 */
  pre {
    background-color: #2D2D2D;
    color: #CCCCCC;
    padding: 15px;
    border-radius: 8px;
    overflow-x: auto;
    font-size: 0.9rem;
    margin-bottom: 20px;
  }

  /* 图片样式 */
  .card img {
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
  }

  .card img:hover {
    transform: scale(1.05);
  }

  /* 轮播图样式 */
  .carousel {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding: 20px;
    gap: 20px;
    background-color: var(--secondary-color);
    border-top: 1px solid #E0E0E0;
  }

  .carousel-item {
    flex: 0 0 300px;
    background-color: #FFFFFF;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 15px;
    scroll-snap-align: start;
    transition: transform 0.3s ease;
  }

  .carousel-item:hover {
    transform: scale(1.05);
  }

  /* 响应式设计 */
  @media (max-width: 768px) {
    .navbar ul {
      display: none; /* 隐藏导航菜单 */
    }

    .hamburger {
      display: flex; /* 显示汉堡菜单 */
    }

    .toc {
      display: none; /* 隐藏章节导航 */
    }

    .container {
      padding: 100px 20px 60px 20px; /* 调整内边距 */
    }
  }

  /* 背景粒子效果 */
  .background-particles {
    position: absolute;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #0A2463 25%, #FF7E0E 25%, #FF7E0E 50%, #0A2463 50%, #0A2463 75%, #FF7E0E 75%, #FF7E0E 100%);
    background-size: 56.57px 56.57px;
    animation: moveBg 10s linear infinite;
    opacity: 0.1;
    z-index: -1;
  }

  @keyframes moveBg {
    from {
      background-position: 0 0;
    }
    to {
      background-position: 56.57px 56.57px;
    }
  }

  /* 按钮样式 */
  button, a.button-link {
    background-color: var(--primary-color);
    color: #FFFFFF;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    text-decoration: none;
    font-size: 1rem;
  }

  button:hover, a.button-link:hover {
    background-color: var(--accent-color);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  }

  /* 数字展示与图表样式 */
  .chart-point {
    position: relative;
    width: 10px;
    height: 10px;
    background-color: var(--accent-color);
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.2s ease;
    display: inline-block;
    margin-right: 5px;
  }

  .chart-point:hover {
    transform: scale(1.5);
  }

  .tooltip {
    position: absolute;
    bottom: 120%;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--primary-color);
    color: #FFFFFF;
    padding: 5px 10px;
    border-radius: 4px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease;
    white-space: nowrap;
  }

  .chart-point:hover .tooltip {
    opacity: 1;
    visibility: visible;
  }

