
/* 全局样式设置，确保字体、背景及颜色和谐统一 */
body {
  margin: 0;
  padding: 0;
  font-family: 'Roboto', sans-serif;
  background: linear-gradient(135deg, #6B73FF 0%, #000DFF 100%);
  background-blend-mode: multiply;
  color: #ffffff;
}

/* 顶部导航栏样式，包括品牌标志和导航链接 */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  padding: 15px 30px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
}

.navbar a {
  color: #ffffff;
  text-decoration: none;
  margin: 0 15px;
  position: relative;
}

.navbar a::after {
  content: '';
  display: block;
  width: 0;
  height: 2px;
  background: #6B73FF;
  transition: width 0.3s;
}

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

/* 容器样式，确保内容在不同设备上居中且有适当的内边距 */
.container {
  max-width: 1200px;
  margin: 100px auto 50px;
  padding: 20px;
}

/* 章节导航系统样式，帮助用户快速定位内容 */
.chapter-nav {
  display: flex;
  justify-content: space-around;
  margin-bottom: 40px;
}

.chapter-nav a {
  background: rgba(255, 255, 255, 0.2);
  padding: 10px 20px;
  border-radius: 25px;
  text-decoration: none;
  color: #ffffff;
  transition: transform 0.3s, background 0.3s;
}

.chapter-nav a:hover {
  transform: scale(1.05);
  background: rgba(255, 255, 255, 0.3);
}

/* 文章内容样式，采用玻璃拟态设计 */
article {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(5px);
  border-radius: 15px;
  padding: 30px;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

article h2, article h3 {
  color: #ffffff;
}

article pre {
  background: rgba(0, 0, 0, 0.5);
  padding: 15px;
  border-radius: 10px;
  overflow-x: auto;
}

article code {
  color: #6B73FF;
  font-family: 'Courier New', Courier, monospace;
}

/* 代码示例代码块样式，突出显示 */
.code-example {
  background: rgba(0, 0, 0, 0.7);
  border-left: 5px solid #6B73FF;
  padding: 10px 20px;
  margin: 20px 0;
  border-radius: 5px;
  overflow-x: auto;
}

.code-example code {
  color: #ffffff;
  font-family: 'Courier New', Courier, monospace;
  font-size: 14px;
}

/* 图片样式，确保圆角、阴影及悬停效果 */
img {
  width: 100%;
  max-width: 320px;
  border-radius: 15px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s, box-shadow 0.3s;
  margin: 10px;
}

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

/* 按钮样式，包含渐变色、圆角及交互反馈 */
.button {
  padding: 10px 20px;
  background: linear-gradient(135deg, #6B73FF, #000DFF);
  border: none;
  border-radius: 25px;
  color: #ffffff;
  font-size: 16px;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(107, 115, 255, 0.4);
  transition: transform 0.2s, box-shadow 0.2s;
}

.button:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(107, 115, 255, 0.6);
}

.button:active {
  transform: scale(0.95);
  box-shadow: 0 2px 10px rgba(107, 115, 255, 0.3);
}

/* 分隔线样式，使用渐变线条进行段落分隔 */
.separator {
  height: 2px;
  background: linear-gradient(90deg, transparent, #6B73FF, transparent);
  margin: 40px 0;
}

/* 表格样式，确保清晰度和可读性 */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
}

table th, table td {
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 10px;
  text-align: left;
}

table th {
  background: rgba(107, 115, 255, 0.3);
}

table pre {
  background: rgba(0, 0, 0, 0.5);
  padding: 10px;
  border-radius: 5px;
  overflow-x: auto;
}

/* 响应式设计，确保在不同屏幕尺寸下的良好展示 */
@media (max-width: 768px) {
  .chapter-nav {
    flex-direction: column;
    align-items: center;
  }

  .navbar a {
    margin: 10px 0;
  }

  img {
    max-width: 100%;
  }
}

/* CSS3动画示例，添加页面加载淡入效果 */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

/* 卡片悬停动画，实现变形和阴影变化 */
.card:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease-in-out;
}

.card {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 15px;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
  margin: 20px 0;
  padding: 20px;
}

/* 其他CSS样式补充，确保整体页面丰富且无单调感 */
/* 动画渐变背景应用于不同的视觉区块 */
.section-background {
  background: linear-gradient(120deg, #89f7fe 0%, #66a6ff 100%);
  padding: 50px 0;
}

/* 微交互效果，添加按钮点击反馈 */
.button:focus {
  outline: none;
  box-shadow: 0 0 10px #6B73FF;
}

/* 进一步优化导航链接的视觉反馈 */
.navbar a.active::after {
  width: 100%;
  background: #ffffff;
}

/* 添加更多CSS3高级特性，如3D变换 */
.three-d-transform {
  transform: rotateY(10deg) rotateX(10deg);
  transition: transform 0.5s;
}

.three-d-transform:hover {
  transform: rotateY(0deg) rotateX(0deg);
}

/* 确保所有链接具有统一的过渡效果 */
a {
  transition: color 0.3s;
}

a:hover {
  color: #6B73FF;
}

/* 按需补充其他样式，确保CSS代码示例部分完整 */

