
  /* 根元素定义颜色变量 */
  :root {
    --primary-color: #0277BD; /* 主色调：深蓝色 */
    --secondary-color: #ECEFF1; /* 辅助色：浅灰色 */
    --accent-color: #FFC107; /* 点缀色：橙色 */
    --text-color: #333333; /* 文字颜色 */
    --background-gradient: linear-gradient(135deg, #0277BD, #6A1B9A); /* 背景渐变 */
  }

  /* 全局样式 */
  * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
  }

  body {
    font-family: 'Roboto', sans-serif;
    color: var(--text-color);
    background: var(--secondary-color);
    line-height: 1.6;
    overflow-x: hidden;
  }

  /* 导航栏样式 */
  .navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(2, 119, 189, 0.9);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 30px;
    z-index: 1000;
    transition: background 0.3s ease;
  }

  .navbar.scrolled {
    background: var(--primary-color);
  }

  .navbar .logo {
    color: #fff;
    font-size: 1.5rem;
    text-decoration: none;
  }

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

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

  .navbar ul li a {
    color: #fff;
    text-decoration: none;
    font-size: 1rem;
    transition: color 0.3s ease;
  }

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

  /* 主要内容区 */
  .container {
    max-width: 1200px;
    margin: 100px auto 50px auto; /* 顶部留出导航栏空间 */
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr 3fr;
    gap: 40px;
  }

  /* 侧边导航 */
  .sidebar {
    position: sticky;
    top: 100px;
    align-self: start;
  }

  .sidebar ul {
    list-style: none;
  }

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

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

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

  /* 文章内容 */
  article {
    background: #fff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
  }

  article h2, article h3 {
    color: var(--primary-color);
    margin-bottom: 20px;
  }

  article h2 {
    font-size: 2rem;
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 10px;
  }

  article h3 {
    font-size: 1.5rem;
    margin-top: 30px;
  }

  article p {
    margin-bottom: 20px;
    font-size: 1rem;
    color: var(--text-color);
  }

  /* 代码块样式 */
  pre code {
    display: block;
    padding: 15px;
    background: #f5f5f5;
    border-left: 5px solid var(--accent-color);
    border-radius: 5px;
    overflow-x: auto;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9rem;
  }

  /* 图片样式 */
  img {
    width: 100%;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
  }

  img:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
  }

  /* 提示信息样式 */
  .notice {
    background: var(--primary-color);
    color: #fff;
    text-align: center;
    padding: 20px;
    font-size: 1.2rem;
    border-radius: 5px;
    margin-bottom: 30px;
  }

  /* 折叠区样式 */
  details {
    margin-bottom: 20px;
  }

  summary {
    font-size: 1.1rem;
    cursor: pointer;
    color: var(--primary-color);
    margin-bottom: 10px;
  }

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

    .sidebar {
      display: none;
    }
  }

  /* 导航链接无follow属性 */
  a[rel="nofollow"] {
    /* 强制添加rel="nofollow" */
  }

  /* 按钮样式 */
  .btn {
    display: inline-block;
    background: var(--accent-color);
    color: #fff;
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    transition: background 0.3s ease;
  }

  .btn:hover {
    background: darkorange;
  }

  /* 动画效果 */
  @keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
  }

  .animate-fadeIn {
    animation: fadeIn 1s ease-in-out;
  }

  /* 章节导航 */
  .chapter-nav {
    position: fixed;
    top: 150px;
    right: 20px;
    background: rgba(255, 255, 255, 0.8);
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  }

  .chapter-nav ul {
    list-style: none;
  }

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

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

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

  /* 背景粒子动画 */
  .particle-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--background-gradient);
    overflow: hidden;
    z-index: -2;
  }

  .particle {
    position: absolute;
    width: 6px;
    height: 6px;
    background-color: var(--accent-color);
    border-radius: 50%;
    animation: moveParticle 12s linear infinite;
    opacity: 0.7;
  }

  @keyframes moveParticle {
    from { transform: translateY(0); opacity: 1; }
    to { transform: translateY(100vh); opacity: 0; }
  }

  /* 鼠标悬停粒子 */
  .particle:hover {
    transform: scale(1.5);
    background-color: var(--secondary-color);
  }

  /* 卡片样式 */
  .card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 30px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
  }

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

  /* 代码示例部分样式 */
  .code-example {
    background: #2d2d2d;
    color: #f8f8f2;
    padding: 15px;
    border-radius: 5px;
    font-family: 'Courier New', Courier, monospace;
    overflow-x: auto;
    margin-bottom: 20px;
  }

  .code-example code {
    display: block;
  }


