
/* 全局样式设置 */
body {
  margin: 0;
  padding: 0;
  font-family: 'Open Sans', sans-serif; /* 使用现代无衬线字体 */
  background: linear-gradient(135deg, #2D3436, #FFFFFF); /* 主色调渐变背景 */
  color: #0D2C5A; /* 主文本颜色 */
  transition: all 0.3s ease;
}

/* 导航栏样式 */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  background-color: #2D3436; /* 主色背景 */
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 20px 0;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  z-index: 1000;
}

.navbar a {
  color: #FFFFFF; /* 导航文字颜色 */
  text-decoration: none;
  font-weight: 600;
  font-size: 18px;
  transition: color 0.3s ease, border-bottom 0.3s ease;
}

.navbar a:hover {
  color: #0074D9; /* 辅助色悬停颜色 */
}

.navbar a.active {
  color: #9B59B6; /* 点缀色激活状态 */
  border-bottom: 2px solid #9B59B6;
}

/* 主要内容容器 */
.container {
  display: grid;
  grid-template-columns: 3fr 1fr;
  gap: 20px;
  padding: 120px 50px 50px 50px; /* 顶部留白以避开固定导航栏 */
}

@media (max-width: 768px) {
  .container {
    grid-template-columns: 1fr;
    padding: 120px 20px 20px 20px;
  }
}

/* 文章内容样式 */
article {
  background-color: rgba(255, 255, 255, 0.8); /* 半透明白色背景 */
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

article h2 {
  font-size: 28px;
  color: #2D3436;
  margin-bottom: 20px;
  border-bottom: 2px solid #0074D9; /* 辅助色底线 */
  padding-bottom: 10px;
}

article h3 {
  font-size: 20px;
  color: #0074D9;
  margin-top: 20px;
  margin-bottom: 10px;
}

article p {
  font-size: 16px;
  line-height: 1.6;
  color: #2D3436;
  margin-bottom: 15px;
}

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

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

/* 侧边栏样式 */
.sidebar {
  background-color: #F1F3F6; /* 辅助色背景 */
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.sidebar .tool {
  margin-bottom: 15px;
}

.sidebar .tool a {
  color: #0074D9;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

.sidebar .tool a:hover {
  color: #9B59B6;
}

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

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

/* 提示信息样式 */
.prompt {
  text-align: center;
  font-size: 18px;
  color: #FF8C00; /* 点缀色 */
  margin: 30px 0;
}

/* 代码示例样式 */
.code-example {
  background-color: #2D3436;
  color: #FFFFFF;
  padding: 15px;
  border-radius: 5px;
  font-family: 'Courier New', Courier, monospace;
  overflow-x: auto;
  margin-bottom: 20px;
}

.code-example code {
  color: #FF8C00;
}

/* 背景装饰元素 */
.background-lines {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: linear-gradient(45deg, rgba(0,116,217,0.1) 25%, transparent 25%, transparent 50%, rgba(0,116,217,0.1) 50%, rgba(0,116,217,0.1) 75%, transparent 75%, transparent);
  background-size: 50px 50px;
  z-index: -1;
}

/* 按钮样式 */
.button {
  background-color: #0074D9;
  color: #FFFFFF;
  padding: 10px 20px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.3s ease;
}

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

/* 折叠内容样式 */
.collapsible {
  background-color: #FFFFFF;
  color: #0074D9;
  cursor: pointer;
  padding: 10px;
  width: 100%;
  border: none;
  text-align: left;
  outline: none;
  font-size: 18px;
  transition: background-color 0.3s ease;
}

.collapsible:hover {
  background-color: #F1F3F6;
}

.collapsible:after {
  content: '\002B'; /* 加号符号 */
  font-size: 13px;
  float: right;
  margin-left: 5px;
}

.collapsible.active:after {
  content: "\2212"; /* 减号符号 */
}

.content {
  padding: 0 18px;
  display: none;
  overflow: hidden;
  background-color: #F9F9F9;
}

/* 进度指示器样式 */
.loader {
  border: 6px solid #F1F3F6;
  border-top: 6px solid #0074D9;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
  margin: 50px auto;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* 背景动态粒子效果 */
@keyframes moveBackground {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

body {
  background: linear-gradient(-45deg, #2D3436, #0074D9, #9B59B6, #FFFFFF);
  background-size: 400% 400%;
  animation: moveBackground 15s ease infinite;
}

