
/* 全局样式设置 */
body {
  margin: 0;
  padding: 0;
  background: linear-gradient(135deg, #2C3E50 70%, #34495E 25%, #1ABC9C 5%);
  font-family: 'Roboto', sans-serif;
  color: #ECF0F1;
  line-height: 1.6;
  font-size: 16px;
}

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

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

.navbar a:hover {
  color: #1ABC9C;
}

/* 章节导航 */
.chapter-nav {
  position: fixed;
  top: 80px;
  left: 20px;
  background-color: rgba(44, 62, 80, 0.8);
  padding: 15px;
  border-radius: 8px;
}

.chapter-nav a {
  display: block;
  color: #ECF0F1;
  text-decoration: none;
  margin: 10px 0;
  transition: color 0.3s ease;
}

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

/* 标题样式 */
h1, h2, h3, h4 {
  color: #1ABC9C;
}

h1 {
  font-size: 2.5em;
  margin-bottom: 20px;
}

h2 {
  font-size: 2em;
  margin-top: 40px;
  margin-bottom: 20px;
}

h3 {
  font-size: 1.75em;
  margin-top: 30px;
  margin-bottom: 15px;
}

h4 {
  font-size: 1.5em;
  margin-top: 20px;
  margin-bottom: 10px;
}

/* 段落与文本 */
p {
  margin-bottom: 20px;
}

.highlight {
  color: #1ABC9C;
  font-weight: bold;
}

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

img.decorative:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 8px rgba(0,0,0,0.4);
}

/* 分隔线样式 */
.separator {
  height: 2px;
  background: linear-gradient(90deg, #1ABC9C, #3498DB);
  margin: 40px 0;
  border: none;
}

/* 按钮样式 */
.button {
  background-color: #1ABC9C;
  border: none;
  padding: 10px 20px;
  color: #ffffff;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.button:hover {
  background-color: #16A085;
}

/* 卡片式布局 */
.card {
  background-color: rgba(52, 73, 94, 0.9);
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  margin-bottom: 20px;
  transition: transform 0.3s ease;
}

.card:hover {
  transform: translateY(-10px);
}

/* 折叠区域样式 */
.collapsible {
  background-color: rgba(52, 73, 94, 0.8);
  color: #ECF0F1;
  cursor: pointer;
  padding: 10px;
  width: 100%;
  border: none;
  text-align: left;
  outline: none;
  font-size: 1.2em;
  border-radius: 5px;
  transition: background-color 0.3s ease;
}

.collapsible:hover {
  background-color: rgba(26, 188, 156, 0.8);
}

.collapsible:after {
  content: '\002B';
  font-size: 1.2em;
  float: right;
}

.collapsible.active:after {
  content: "\2212";
}

.content {
  padding: 0 18px;
  display: none;
  overflow: hidden;
  background-color: rgba(52, 73, 94, 0.6);
  border-radius: 5px;
}

.content p {
  margin: 10px 0;
}

/* 代码块样式 */
pre {
  background-color: #1C2833;
  padding: 15px;
  border-radius: 8px;
  overflow-x: auto;
  margin: 20px 0;
}

code {
  color: #E74C3C;
  font-family: 'Courier New', Courier, monospace;
}

/* 响应式布局 */
@media (max-width: 768px) {
  .navbar {
    flex-direction: column;
    align-items: flex-start;
  }

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

  img.decorative {
    max-width: 100%;
  }
}

