
/* 定义全局颜色变量 */
:root {
  --主色: #0D47A1; /* 深蓝色，传达专业与稳重 */
  --辅色: #90A4AE; /* 浅灰色，增强层次感 */
  --点缀色橙: #FF9800; /* 亮橙色，用于重要信息和交互元素 */
  --点缀色绿: #4CAF50; /* 绿色，用于辅助图标和按钮 */
  --背景色: #FFFFFF; /* 白色背景，突出极简风格 */
  --字体: 'Roboto', sans-serif; /* 现代无衬线字体，提高可读性 */
}

/* 设置全局样式 */
body {
  margin: 0;
  padding: 0;
  background-color: var(--背景色);
  color: #333333;
  font-family: var(--字体);
  line-height: 1.6;
}

/* 固定导航栏样式 */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  background-color: var(--主色);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 30px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  z-index: 1000;
}

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

.navbar a:hover {
  color: var(--点缀色橙);
}

/* 主容器设置，确保内容不被导航栏遮挡 */
.main-container {
  padding-top: 80px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

/* 标题样式 */
h1, h2, h3, h4 {
  font-family: var(--字体);
  color: var(--主色);
  margin-bottom: 20px;
}

h1 {
  font-size: 2.5em;
}

h2 {
  font-size: 2em;
}

h3 {
  font-size: 1.75em;
}

h4 {
  font-size: 1.5em;
}

/* 段落样式 */
p {
  font-size: 1em;
  margin-bottom: 15px;
  color: #555555;
}

/* 按钮样式 */
.btn-primary {
  background-color: var(--点缀色橙);
  color: #FFFFFF;
  padding: 10px 20px;
  border: none;
  border-radius: 4px;
  transition: background-color 0.3s ease;
  cursor: pointer;
}

.btn-primary:hover {
  background-color: darken(var(--点缀色橙), 10%);
}

/* 模块化布局 */
.module {
  background-color: var(--辅色);
  padding: 20px;
  margin-bottom: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* 响应式网格系统 */
.container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
  gap: 20px;
  padding: 20px;
}

/* 图片样式，包含圆角和阴影效果 */
img {
  width: 100%;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  transition: transform 0.3s ease;
}

img:hover {
  transform: scale(1.05);
}

/* 代码块样式，区分于正文 */
pre {
  background-color: #f5f5f5;
  padding: 15px;
  border-radius: 8px;
  overflow-x: auto;
  margin-bottom: 20px;
}

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

/* 动画效果 */
.background-lines {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent 50%, rgba(0,0,0,0.05) 50%);
  background-size: 20px 20px;
  animation: moveLines 5s linear infinite;
  z-index: -1;
}

@keyframes moveLines {
  from {
    background-position: 0 0;
  }
  to {
    background-position: 20px 0;
  }
}

/* 淡入效果 */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* 折叠内容样式 */
.collapsible {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s ease-out;
}

.collapsible.active {
  max-height: 500px; /* 根据内容调整 */
}

.collapsible-toggle {
  cursor: pointer;
  color: var(--点缀色橙);
  text-decoration: underline;
}

/* 表格样式 */
table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 20px;
}

table, th, td {
  border: 1px solid #dddddd;
}

th, td {
  padding: 12px;
  text-align: left;
}

th {
  background-color: var(--主色);
  color: #FFFFFF;
}

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

  .container {
    grid-template-columns: 1fr;
  }
}

