
/* 全局样式设置 */
/* 设置页面的背景为深蓝色渐变，营造科技感 */
body {
  margin: 0;
  padding: 0;
  background: linear-gradient(135deg, #0f2027, #203a43, #2c5364);
  font-family: 'Roboto', sans-serif;
  color: #ffffff;
  overflow-x: hidden;
}

/* 导航栏样式 */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  background: rgba(20, 29, 75, 0.8);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 30px;
  z-index: 1000;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* 导航链接样式 */
.navbar a {
  color: #ffffff;
  margin: 0 15px;
  text-decoration: none;
  font-size: 16px;
  transition: color 0.3s;
}

.navbar a:hover {
  color: #00ffcc;
}

/* 章节导航样式 */
.chapter-nav {
  position: fixed;
  top: 60px;
  left: 20px;
  background: rgba(255, 255, 255, 0.1);
  padding: 10px 15px;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.chapter-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.chapter-nav li {
  margin: 10px 0;
}

.chapter-nav a {
  color: #ffffff;
  text-decoration: none;
  font-size: 14px;
  transition: color 0.3s;
}

.chapter-nav a:hover {
  color: #ff6347;
}

/* 主内容区域样式 */
.container {
  display: flex;
  flex-direction: row;
  padding: 100px 50px;
  max-width: 1200px;
  margin: 0 auto;
}

/* 文章内容样式 */
.main-content {
  flex: 3;
  margin-right: 20px;
}

.main-content h2 {
  font-size: 2em;
  margin-bottom: 20px;
  color: #00ffcc;
}

.main-content h3 {
  font-size: 1.5em;
  margin-top: 30px;
  margin-bottom: 15px;
  color: #ff7f50;
}

.main-content p {
  font-size: 16px;
  line-height: 1.8;
  margin-bottom: 20px;
}

/* 代码块样式 */
.code-block {
  background: rgba(0, 0, 0, 0.8);
  padding: 15px;
  border-radius: 8px;
  overflow-x: auto;
  margin-bottom: 20px;
}

.code-block code {
  color: #00ffcc;
  font-family: 'Courier New', Courier, monospace;
  font-size: 14px;
}

/* 图片样式 */
.image-gallery {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.image-gallery img {
  width: 100%;
  border-radius: 10px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
  margin-bottom: 20px;
  transition: transform 0.3s, box-shadow 0.3s;
}

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

/* 底部样式 */
.footer {
  background: rgba(20, 29, 75, 0.8);
  padding: 20px;
  text-align: center;
  position: relative;
  bottom: 0;
  width: 100%;
  color: #ffffff;
  margin-top: 50px;
}

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

  .chapter-nav {
    position: static;
    margin-bottom: 20px;
  }

  .image-gallery {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .image-gallery img {
    width: 48%;
    margin: 1%;
  }
}

/* 按钮样式 */
.button {
  background-color: #ff7f50;
  border: none;
  border-radius: 25px;
  color: #ffffff;
  padding: 10px 20px;
  cursor: pointer;
  transition: background-color 0.3s, transform 0.3s;
  font-size: 16px;
}

.button:hover {
  background-color: #ff6347;
  transform: scale(1.05);
}

/* 卡片式设计 */
.card {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 15px;
  box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
  backdrop-filter: blur(8.5px);
  -webkit-backdrop-filter: blur(8.5px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  padding: 20px;
  margin: 20px 0;
  transition: transform 0.3s, box-shadow 0.3s;
}

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

/* 动画效果 */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translate3d(0, 40px, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

.module {
  opacity: 0;
  animation: fadeInUp 1s forwards;
  animation-delay: 0.3s;
}

.module.visible {
  opacity: 1;
}

/* 提示信息样式 */
#reference-note {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: rgba(255, 255, 255, 0.1);
  padding: 10px 15px;
  border-radius: 8px;
  font-size: 14px;
  color: #ffffff;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* 过渡效果 */
a, button {
  transition: all 0.3s ease;
}

/* 特殊提示样式 */
.highlight {
  background: rgba(255, 99, 71, 0.2);
  padding: 2px 4px;
  border-radius: 4px;
}

