
/* 全局样式设置 */
body {
  margin: 0;
  padding: 0;
  font-family: 'Roboto', sans-serif; /* 使用现代无衬线字体 */
  color: #333333; /* 字体颜色 */
  background: linear-gradient(135deg, #1E88E5 70%, #43A047 25%, #FFC107 5%); /* 黄金比配色 */
  box-sizing: border-box;
}

/* 导航栏样式 */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  background-color: rgba(21, 101, 192, 0.9); /* 半透明主色 */
  padding: 15px 30px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background-color 0.3s ease;
}

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

.navbar a:hover {
  color: #FFC107; /* 点缀色 */
}

.navbar .logo {
  font-family: 'Merriweather', serif; /* 使用衬线字体 */
  font-size: 20px;
  font-weight: bold;
}

/* 侧边导航菜单 */
.navbar ul {
  list-style: none;
  display: flex;
  margin: 0;
  padding: 0;
}

.navbar li {
  position: relative;
}

.navbar li ul {
  display: none;
  position: absolute;
  top: 40px;
  left: 0;
  background-color: #1565C0;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.navbar li:hover ul {
  display: block;
  animation: fadeIn 0.3s ease forwards;
}

.navbar li ul li {
  width: 200px;
}

.navbar li ul li a {
  padding: 10px 15px;
  display: block;
  color: #ffffff;
}

.navbar li ul li a:hover {
  background-color: #1E88E5;
}

/* 渐入动画 */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Hero部分样式 */
.hero-section {
  background: linear-gradient(135deg, #1E88E5, #1565C0);
  color: #ffffff;
  padding: 120px 20px 60px 20px;
  text-align: center;
  position: relative;
  overflow: hidden;
  animation: backgroundShift 10s infinite;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('https://images.gptkong.com/demo/sample1.png') no-repeat center center;
  background-size: cover;
  opacity: 0.3;
}

.hero-section h1 {
  font-family: 'Merriweather', serif;
  font-size: 48px;
  margin-bottom: 20px;
}

.hero-section p {
  font-size: 18px;
  max-width: 800px;
  margin: 0 auto 40px auto;
}

.button {
  background-color: #43A047;
  color: #ffffff;
  padding: 15px 30px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 16px;
  transition: background-color 0.3s ease, transform 0.2s ease;
  text-decoration: none;
  display: inline-block;
}

.button:hover {
  background-color: #2E7D32;
}

.button:active {
  transform: scale(0.95);
}

/* 背景渐变动画 */
@keyframes backgroundShift {
  0% { background-color: #1E88E5; }
  50% { background-color: #1565C0; }
  100% { background-color: #1E88E5; }
}

/* 章节导航 */
.section-navigation {
  position: fixed;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(255, 255, 255, 0.9);
  padding: 10px;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.section-navigation a {
  display: block;
  margin: 10px 0;
  color: #1565C0;
  text-decoration: none;
  font-size: 14px;
  transition: color 0.3s ease;
}

.section-navigation a:hover {
  color: #43A047;
}

/* 内容区块 */
.content-section {
  padding: 80px 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.content-section h2, .content-section h3, .content-section h4 {
  font-family: 'Merriweather', serif;
  color: #1565C0;
  margin-top: 40px;
}

.content-section p {
  font-size: 16px;
  line-height: 1.6;
  margin: 20px 0;
}

/* 图片样式 */
.image-gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin: 40px 0;
}

.image-gallery img {
  width: 320px;
  height: 320px;
  object-fit: cover;
  border-radius: 12px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

/* CSS代码展示 */
.code-example {
  background-color: #f5f5f5;
  padding: 20px;
  border-radius: 8px;
  overflow-x: auto;
  margin: 40px 0;
}

.code-example pre {
  margin: 0;
  font-family: 'Courier New', Courier, monospace;
  font-size: 14px;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .navbar ul {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .hero-section {
    padding: 80px 20px 40px 20px;
  }

  .image-gallery {
    flex-direction: column;
    align-items: center;
  }

  .section-navigation {
    display: none;
  }
}

@media (min-width: 769px) and (max-width: 1200px) {
  .image-gallery {
    justify-content: center;
  }
}

