
/* 主体背景采用深色调，使用炭灰色作为基础背景色 */
body {
  background-color: #121212; /* 炭灰色背景 */
  color: #FFFFFF; /* 白色文字 */
  font-family: 'Open Sans', sans-serif; /* 使用Open Sans字体，保证可读性 */
  margin: 0;
  padding: 0;
  line-height: 1.6;
  font-size: 16px;
}

/* 全局链接样式，添加过渡效果 */
a {
  color: #1E90FF; /* 道奇蓝色 */
  text-decoration: none;
  transition: color 0.3s ease;
}
a:hover {
  color: #3AA0FF; /* 悬停时颜色变化 */
}

/* 固定导航栏样式 */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  background-color: #1E1E1E; /* 深色导航栏 */
  padding: 15px 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 1000;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); /* 阴影效果 */
}
.navbar a {
  color: #BB86FC; /* 紫罗兰色链接 */
  margin-left: 20px;
  font-weight: 600;
}
.navbar a:hover {
  color: #03DAC6; /* 薄荷绿悬停颜色 */
}

/* 侧边栏导航样式 */
.sidebar {
  position: fixed;
  left: 0;
  top: 60px; /* 导航栏高度 */
  width: 250px;
  height: 100%;
  background-color: #1E1E1E; /* 深色侧边栏 */
  padding: 20px;
  box-shadow: 2px 0 5px rgba(0, 0, 0, 0.2); /* 侧边栏阴影 */
}
.sidebar a {
  display: block;
  color: #BB86FC; /* 紫罗兰色链接 */
  margin-bottom: 15px;
  font-size: 16px;
  transition: color 0.3s ease;
}
.sidebar a:hover {
  color: #03DAC6; /* 薄荷绿悬停颜色 */
}

/* 主内容区样式，考虑侧边栏的宽度 */
.main-content {
  margin-left: 270px; /* 侧边栏宽度 + 20px间距 */
  padding: 80px 40px 40px 40px; /* 顶部留出导航栏空间 */
}

/* 章节导航系统样式 */
.chapter-nav {
  position: fixed;
  right: 20px;
  top: 100px;
  background-color: rgba(30, 144, 255, 0.1); /* 透明背景 */
  padding: 10px;
  border-radius: 8px;
}
.chapter-nav a {
  display: block;
  color: #1E90FF; /* 道奇蓝色 */
  margin-bottom: 10px;
  font-size: 14px;
  transition: color 0.3s ease;
}
.chapter-nav a:hover {
  color: #03DAC6; /* 薄荷绿悬停颜色 */
}

/* 文章标题样式 */
article h2, article h3, article h4 {
  color: #BB86FC; /* 紫罗兰色标题 */
  margin-top: 40px;
  margin-bottom: 20px;
}
article h2 {
  font-size: 24px;
  border-bottom: 2px solid #1E90FF; /* 道奇蓝边框 */
  padding-bottom: 10px;
}
article h3 {
  font-size: 20px;
  border-bottom: 1px solid #1E90FF;
  padding-bottom: 5px;
}
article h4 {
  font-size: 18px;
}

/* 文章段落样式 */
article p {
  margin-bottom: 20px;
  line-height: 1.8;
  color: #EEEEEE; /* 浅灰色文字 */
}

/* 代码块样式 */
code {
  background-color: #1E1E1E;
  color: #03DAC6; /* 薄荷绿代码文字 */
  padding: 2px 4px;
  border-radius: 4px;
  font-family: 'Courier New', Courier, monospace;
}

/* 表格样式 */
table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 40px;
}
table thead {
  background-color: #1E1E1E;
}
table th, table td {
  padding: 12px;
  text-align: left;
  border: 1px solid #333333;
}
table th {
  color: #1E90FF; /* 道奇蓝色表头文字 */
}
table td {
  color: #EEEEEE; /* 浅灰色表格文字 */
}
table pre {
  background-color: #1E1E1E;
  padding: 10px;
  border-radius: 6px;
  overflow-x: auto;
}

/* 图片样式，添加圆角、阴影和悬停效果 */
img {
  border-radius: 12px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  width: 100%;
  height: auto;
}
img:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.5);
}

/* 响应式设计，确保在不同屏幕大小下布局适应 */
@media (max-width: 768px) {
  .sidebar {
    display: none; /* 移动端隐藏侧边栏 */
  }
  .main-content {
    margin-left: 20px;
    padding: 80px 20px 20px 20px;
  }
  .chapter-nav {
    display: none; /* 移动端隐藏章节导航 */
  }
}
@media (max-width: 480px) {
  .navbar {
    flex-direction: column;
    align-items: flex-start;
  }
  .navbar a {
    margin-left: 0;
    margin-top: 10px;
  }
  article h2 {
    font-size: 20px;
  }
  article h3 {
    font-size: 18px;
  }
  article h4 {
    font-size: 16px;
  }
}

/* 动画效果：淡入 */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
.fade-in {
  animation: fadeIn 1s ease-in-out;
}

/* 动画效果：滑入 */
@keyframes slideIn {
  from { transform: translateX(-100px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}
.slide-in {
  animation: slideIn 1s ease-out;
}

/* 提示文字样式，显著位置 */
.prompt-text {
  background: linear-gradient(135deg, #1E90FF, #BB86FC);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-size: 18px;
  text-align: center;
  margin: 40px 0;
  font-weight: bold;
}

/* 折叠区域样式 */
.collapsible {
  background-color: #1E1E1E;
  color: #FFFFFF;
  cursor: pointer;
  padding: 10px;
  width: 100%;
  border: none;
  text-align: left;
  outline: none;
  font-size: 16px;
  transition: background-color 0.3s ease;
}
.collapsible:hover {
  background-color: #333333;
}
.collapsible:after {
  content: '\002B'; /* 加号 */
  font-size: 13px;
  float: right;
}
.active:after {
  content: "\2212"; /* 减号 */
}
.content {
  padding: 0 18px;
  display: none;
  overflow: hidden;
  background-color: #2C2C2C;
  border-left: 2px solid #1E90FF;
  margin-bottom: 20px;
}

/* CSS3代码示例块样式 */
.code-sample {
  background-color: #1E1E1E;
  padding: 20px;
  border-radius: 8px;
  overflow-x: auto;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
  margin-bottom: 40px;
}
.code-sample pre {
  margin: 0;
  color: #03DAC6; /* 薄荷绿代码文字 */
  font-family: 'Courier New', Courier, monospace;
}

/* 按钮样式 */
button.primary-button {
  background-color: #1E90FF; /* 道奇蓝色按钮 */
  color: #FFFFFF;
  border: none;
  padding: 10px 20px;
  border-radius: 4px;
  transition: background-color 0.3s ease, transform 0.3s ease;
  cursor: pointer;
}
button.primary-button:hover {
  background-color: #3AA0FF; /* 悬停变色 */
  transform: translateY(-2px); /* 轻微提升 */
}

/* 卡片式布局样式 */
.card {
  background-color: #1E1E1E;
  border: 1px solid #333333;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 12px rgba(0, 0, 0, 0.2);
}

/* Grid布局容器 */
.grid-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

/* 提示信息框样式 */
.alert {
  background-color: #BB86FC;
  color: #1E1E1E;
  padding: 15px;
  border-radius: 6px;
  margin-bottom: 20px;
}

