
/* 全局样式设置 */
body {
  margin: 0;
  padding: 0;
  font-family: 'Roboto', sans-serif;
  background-color: #ffffff; /* 纯白色背景 */
  color: #333333;
  line-height: 1.6;
  font-size: 16px;
}

/* 头部固定导航栏 */
.header {
  position: fixed;
  top: 0;
  width: 100%;
  background: #1e3c72; /* 主色调蓝色 */
  color: #ffffff;
  padding: 20px 0;
  text-align: center;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  z-index: 1000;
}

.header h1 {
  margin: 0;
  font-size: 24px;
}

/* 导航菜单 */
.navbar {
  display: flex;
  justify-content: center;
  gap: 30px;
  margin-top: 10px;
}

.navbar a {
  color: #ffffff;
  text-decoration: none;
  font-size: 17px;
  position: relative;
}

.navbar a::after {
  content: '';
  display: block;
  width: 0;
  height: 2px;
  background: #00ffff; /* 点缀色 */
  transition: width 0.3s;
}

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

@media (max-width: 768px) {
  .navbar {
    flex-direction: column;
    gap: 15px;
  }
}

/* 主内容区 */
.main {
  padding: 120px 20px 40px 20px; /* 顶部留出导航栏空间 */
  max-width: 1200px;
  margin: 0 auto;
}

/* 章节标题样式 */
.main h2, .main h3, .main h4 {
  color: #1e3c72;
  margin-top: 40px;
}

.main h2 {
  font-size: 28px;
}

.main h3 {
  font-size: 24px;
}

.main h4 {
  font-size: 20px;
}

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

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

/* 文章内容样式 */
.article p {
  margin-bottom: 20px;
}

.article pre {
  background: #f5f5f5;
  padding: 15px;
  border-radius: 5px;
  overflow-x: auto;
  margin-bottom: 20px;
}

/* 按钮样式 */
.button {
  display: inline-block;
  padding: 10px 20px;
  background: #00ffff; /* 点缀色 */
  color: #ffffff;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: box-shadow 0.3s ease-in-out, transform 0.3s ease-in-out;
}

.button:hover {
  box-shadow: 0 0 10px rgba(0, 255, 255, 0.7);
  transform: translateY(-5px);
}

/* 导航系统样式 */
.sidebar {
  position: fixed;
  top: 100px;
  right: 20px;
  width: 200px;
}

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

.sidebar li {
  margin-bottom: 10px;
}

.sidebar a {
  text-decoration: none;
  color: #2a5298; /* 辅色 */
  font-size: 16px;
  transition: color 0.3s;
}

.sidebar a:hover {
  color: #00ffff; /* 点缀色 */
}

/* 响应式布局 */
@media (max-width: 1200px) {
  .main {
    padding: 100px 20px 40px 20px;
  }
}

@media (max-width: 576px) {
  .header h1 {
    font-size: 20px;
  }

  .navbar a {
    font-size: 15px;
  }

  .sidebar {
    display: none;
  }

  .main h2 {
    font-size: 24px;
  }

  .main h3 {
    font-size: 20px;
  }

  .main h4 {
    font-size: 18px;
  }
}

/* 微交互效果 */
.fade-in {
  opacity: 0;
  animation: fadeIn 1s forwards;
}

@keyframes fadeIn {
  to {
    opacity: 1;
  }
}

/* 高级动画效果 */
@keyframes slideIn {
  from {
    transform: translateX(-50px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.slide-in {
  animation: slideIn 1s forwards;
}

/* 数据可视化样式 */
.chart {
  width: 100%;
  height: 400px;
  background: #f0f0f0;
  border-radius: 10px;
  position: relative;
}

.chart::before {
  content: '';
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  bottom: 10px;
  background: #ffffff;
  border-radius: 5px;
}

/* 动态背景效果 */
.dynamic-bg {
  background: linear-gradient(135deg, #1e3c72, #2a5298);
  background-size: 400% 400%;
  animation: gradientAnimation 15s ease infinite;
}

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