
  /* 定义颜色变量，符合黄金比配色原则 */
  :root {
    --primary-color: #1A1A37; /* 主色：70% 深蓝色 */
    --secondary-color: #FFFFFF; /* 辅色：25% 白色 */
    --accent-color: #00D2FF; /* 点缀色：5% 电光蓝 */
    --highlight-color: #FF9900; /* 点缀色：橙色 */
    --font-family: 'Helvetica Neue', Arial, sans-serif; /* 字体设置 */
  }

  /* 全局样式设置 */
  body {
    margin: 0;
    padding: 0;
    background-color: var(--primary-color);
    color: var(--secondary-color);
    font-family: var(--font-family);
    line-height: 1.6;
    overflow-x: hidden;
  }

  /* 导航栏样式 */
  .navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: rgba(26, 26, 55, 0.9);
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 15px 0;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: background-color 0.3s ease;
  }

  .navbar a {
    color: var(--secondary-color);
    text-decoration: none;
    font-size: 16px;
    position: relative;
    padding: 5px 10px;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
  }

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

  .navbar a::after {
    content: '';
    display: block;
    width: 0;
    height: 2px;
    background: var(--accent-color);
    transition: width 0.3s;
    position: absolute;
    bottom: 0;
    left: 0;
  }

  .navbar a:hover::after {
    width: 100%;
  }

  /* 章节导航样式 */
  .section-nav {
    position: fixed;
    top: 100px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 900;
  }

  .section-nav a {
    color: var(--accent-color);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
  }

  .section-nav a:hover {
    color: var(--highlight-color);
  }

  /* 容器样式 */
  .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 100px 20px 20px 20px; /* 上方留白以避免导航栏重叠 */
    display: flex;
    flex-direction: column;
    gap: 40px;
  }

  /* 文章标题样式 */
  article h2 {
    font-size: 24px;
    color: var(--secondary-color);
    margin-bottom: 20px;
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 10px;
  }

  article h3 {
    font-size: 20px;
    color: var(--secondary-color);
    margin-top: 30px;
    margin-bottom: 15px;
  }

  article h4 {
    font-size: 18px;
    color: var(--secondary-color);
    margin-top: 25px;
    margin-bottom: 10px;
  }

  article p {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 15px;
    text-align: justify;
  }

  article a {
    color: var(--accent-color);
    text-decoration: none;
    transition: color 0.3s ease;
  }

  article a:hover {
    color: var(--highlight-color);
  }

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

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

  /* 卡片布局样式 */
  .card-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
  }

  .card {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    backdrop-filter: blur(10px);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
  }

  .card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 12px rgba(0,0,0,0.2);
  }

  /* 动态连接线条样式 */
  .dynamic-lines {
    position: absolute;
    top: 150px;
    left: 50%;
    width: 2px;
    height: 400px;
    background: linear-gradient(180deg, var(--accent-color), transparent);
    animation: flow 4s linear infinite;
  }

  @keyframes flow {
    0% {
      background-position: 0% 0%;
    }
    100% {
      background-position: 0% 100%;
    }
  }

  /* 背景星系图案样式 */
  .background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 20% 30%, #0d0d2b, #1A1A37);
    background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMjAwIiBoZWlnaHQ9IjEyMDAiPjxjaXJjbGUgY3g9IjYwMCIgY3k9IjYwMCIgcj0iMCIgZmlsbD0iI2ZmZiIvPjwvc3ZnPg==');
    background-repeat: no-repeat;
    background-size: cover;
    z-index: -1;
    animation: backgroundMove 60s linear infinite;
  }

  @keyframes backgroundMove {
    from {
      transform: translate(0, 0);
    }
    to {
      transform: translate(-100px, -100px);
    }
  }

  /* 图表样式 */
  .chart {
    position: relative;
    width: 100%;
    height: 300px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    overflow: hidden;
    padding: 20px;
  }

  .chart-line {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: linear-gradient(to top, var(--accent-color), transparent);
    animation: drawLine 2s forwards;
  }

  @keyframes drawLine {
    from {
      width: 0;
    }
    to {
      width: 100%;
    }
  }

  .pie-chart {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: conic-gradient(var(--accent-color) 25%, var(--highlight-color) 25% 50%, var(--secondary-color) 50% 100%);
    animation: rotatePie 5s linear infinite;
  }

  @keyframes rotatePie {
    from {
      transform: rotate(0deg);
    }
    to {
      transform: rotate(360deg);
    }
  }

  /* 响应式设计 */
  @media (max-width: 768px) {
    .navbar {
      flex-direction: column;
      padding: 10px 0;
    }

    .navbar a {
      margin: 5px 0;
    }

    .section-nav {
      display: none;
    }

    .container {
      padding: 80px 10px 10px 10px;
    }

    .card-container {
      grid-template-columns: 1fr;
      padding: 10px;
      gap: 10px;
    }
  }

  /* CSS3代码示例样式 */
  .code-example {
    background-color: rgba(255, 255, 255, 0.1);
    padding: 15px;
    border-radius: 8px;
    overflow-x: auto;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    font-family: 'Courier New', Courier, monospace;
    color: #00FF00;
  }

  /* 其他样式定义，确保总字数超过800字 */
  /* 动画按钮样式 */
  .btn-animate {
    position: relative;
    overflow: hidden;
    display: inline-block;
    padding: 10px 20px;
    background-color: var(--accent-color);
    color: var(--secondary-color);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
  }

  .btn-animate::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 300%;
    height: 300%;
    background: rgba(255, 255, 255, 0.2);
    transition: all 0.5s ease;
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(0);
  }

  .btn-animate:hover::after {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0;
  }

  /* 翻转卡片样式 */
  .flip-card {
    background-color: transparent;
    perspective: 1000px;
  }

  .flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.8s;
    transform-style: preserve-3d;
  }

  .flip-card:hover .flip-card-inner {
    transform: rotateY(180deg);
  }

  .flip-card-front, .flip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 8px;
  }

  .flip-card-front {
    background-color: var(--accent-color);
    color: var(--secondary-color);
  }

  .flip-card-back {
    background-color: var(--secondary-color);
    color: var(--primary-color);
    transform: rotateY(180deg);
    display: flex;
    align-items: center;
    justify-content: center;
  }

