
/* 全局样式设置 */
body {
  margin: 0;
  padding: 0;
  font-family: 'Roboto', sans-serif; /* 字体选择 */
  background: linear-gradient(135deg, #8E2DE2 70%, #4A00E0 25%, #22C1C3 5%);
  color: #333;
  line-height: 1.6;
}

/* 顶部导航栏样式 */
.header {
  background: linear-gradient(90deg, #4A00E0, #8E2DE2);
  color: #fff;
  padding: 20px 0;
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* 导航菜单样式 */
.navbar {
  display: flex;
  justify-content: center;
  align-items: center;
}

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

.navbar a:hover {
  color: #Fdbb2d;
}

/* 主内容区样式 */
.main {
  padding: 100px 50px 50px 50px;
  max-width: 1200px;
  margin: 0 auto;
}

/* 章节导航样式 */
.sidebar {
  position: fixed;
  top: 80px;
  left: 20px;
  width: 200px;
}

.sidebar a {
  display: block;
  margin-bottom: 10px;
  color: #4A00E0;
  text-decoration: none;
  font-size: 16px;
  transition: color 0.3s;
}

.sidebar a:hover {
  color: #22C1C3;
}

/* 文章内容区块样式 */
.article-section {
  margin-bottom: 50px;
  padding: 20px;
  background: #f9f9f9;
  border-radius: 10px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s, box-shadow 0.3s;
}

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

/* 标题样式 */
.article-section h2 {
  font-size: 24px;
  color: #4A00E0;
  margin-bottom: 15px;
}

.article-section h3 {
  font-size: 20px;
  color: #8E2DE2;
  margin-top: 20px;
  margin-bottom: 10px;
}

/* 正文段落样式 */
.article-section p {
  font-size: 16px;
  color: #333;
  margin-bottom: 15px;
}

/* 图片样式 */
.article-section img {
  width: 100%;
  max-width: 320px;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s;
}

.article-section img:hover {
  transform: scale(1.05);
}

/* 代码块样式 */
.code-block {
  background: #2c2c2c;
  color: #f8f8f2;
  padding: 20px;
  border-radius: 10px;
  overflow-x: auto;
  font-family: 'Courier New', Courier, monospace;
  margin-bottom: 20px;
}

.code-block pre {
  margin: 0;
}

.code-block code {
  display: block;
  white-space: pre;
  font-size: 14px;
}

/* 按钮样式 */
.button {
  display: inline-block;
  background: linear-gradient(90deg, #22C1C3, #Fdbb2d);
  color: #fff;
  padding: 15px 30px;
  border: none;
  border-radius: 25px;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.3s, transform 0.3s;
}

.button:hover {
  background: linear-gradient(90deg, #Fdbb2d, #22C1C3);
  transform: translateY(-5px);
}

/* 动画效果 */
@keyframes fadeInGradient {
  0% {
    background-position: 0% 50%;
  }
  100% {
    background-position: 100% 50%;
  }
}

.header {
  background: linear-gradient(-45deg, #4A00E0, #8E2DE2, #22C1C3, #Fdbb2d);
  background-size: 400% 400%;
  animation: fadeInGradient 15s ease infinite;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .sidebar {
    display: none;
  }

  .main {
    padding: 100px 20px 20px 20px;
  }

  .article-section h2 {
    font-size: 20px;
  }

  .article-section h3 {
    font-size: 18px;
  }

  .article-section p {
    font-size: 14px;
  }

  .navbar a {
    margin: 0 10px;
    font-size: 14px;
  }

  .button {
    padding: 10px 20px;
    font-size: 14px;
  }
}

/* 提示信息样式 */
.reference-note {
  text-align: center;
  font-size: 18px;
  color: #fff;
  padding: 10px 0;
  background: rgba(0, 0, 0, 0.5);
}

/* 背景渐变 */
body {
  background: linear-gradient(135deg, #8E2DE2 70%, #4A00E0 25%, #22C1C3 5%);
  background-attachment: fixed;
}

/* 图片阴影 */
.image-shadow {
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* 阴影淡入效果 */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeIn 1s forwards;
}

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

/* 交互悬停效果 */
.interactive:hover {
  transform: scale(1.05);
  transition: transform 0.3s;
}

/* 装饰元素渐变线条 */
.decorative-line {
  height: 2px;
  background: linear-gradient(to right, #4A00E0, #8E2DE2);
  margin: 40px 0;
  border: none;
}

/* 按需添加更多样式以满足设计要求 */

