
/* 基本样式设置 */
/* 设置全局字体、背景和颜色 */
body {
  margin: 0;
  padding: 0;
  font-family: 'Roboto', 'Open Sans', sans-serif; /* 使用现代无衬线字体 */
  font-size: 16px; /* 正文字号设为16px */
  background: linear-gradient(135deg, #2c3e50 70%, #27ae60 25%, #e67e22 5%); /* 主色调70%深蓝色，辅色25%绿色，点缀色5%橙色 */
  color: #2c3e50; /* 主要文本颜色 */
  line-height: 1.6;
}

/* 顶部导航栏样式 */
.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: 15px 30px;
  z-index: 1000;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.navbar a {
  color: #ecf0f1;
  text-decoration: none;
  margin: 0 15px;
  font-size: 16px;
}

.navbar a:hover {
  color: #e67e22; /* 点缀色 hover 效果 */
  transition: color 0.3s ease;
}

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

  .navbar a {
    margin: 10px 0;
  }
}

/* 主内容区样式 */
.main-content {
  padding: 100px 20px 50px 20px; /* 顶部留出导航栏空间 */
  max-width: 1200px;
  margin: 0 auto;
}

/* 标题样式 */
h2, h3, h4 {
  color: #34495e;
}

h2 {
  font-size: 2em; /* 32px */
  margin-bottom: 20px;
  border-bottom: 2px solid #ecf0f1;
  padding-bottom: 10px;
}

h3 {
  font-size: 1.5em; /* 24px */
  margin-top: 30px;
  margin-bottom: 15px;
}

h4 {
  font-size: 1.2em; /* 19px */
  margin-top: 20px;
  margin-bottom: 10px;
}

/* 段落和文字样式 */
p {
  font-size: 1em; /* 16px */
  color: #7f8c8d;
  margin-bottom: 20px;
  text-align: justify;
}

/* 图片样式 */
img {
  width: 100%;
  max-width: 320px;
  height: auto;
  border-radius: 10px; /* 圆角 */
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); /* 阴影效果 */
  margin: 20px 0;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

img:hover {
  transform: scale(1.05); /* 悬浮放大效果 */
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
}

/* 代码块样式 */
.code-block {
  background-color: #ecf0f1;
  padding: 15px;
  border-radius: 5px;
  overflow-x: auto;
  margin: 20px 0;
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.95em;
}

/* CSS代码示例的特殊样式 */
.code-block pre {
  margin: 0;
}

.code-block code {
  color: #2c3e50;
}

/* 按钮样式 */
.button {
  display: inline-block;
  padding: 10px 20px;
  background-color: #e67e22;
  color: #ffffff;
  text-decoration: none;
  border-radius: 5px;
  transition: background-color 0.3s ease, transform 0.3s ease;
}

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

/* 背景粒子动画样式 */
.background-particles {
  position: fixed;
  width: 100%;
  height: 100%;
  background: transparent;
  pointer-events: none;
  z-index: -1;
  animation: moveParticles 10s linear infinite;
}

@keyframes moveParticles {
  from { opacity: 0.5; }
  to { opacity: 1; }
}

/* 导航章节样式 */
.section-navigation {
  position: fixed;
  right: 20px;
  top: 100px;
  background-color: rgba(44, 62, 80, 0.8);
  padding: 10px 15px;
  border-radius: 5px;
}

.section-navigation a {
  display: block;
  color: #ecf0f1;
  text-decoration: none;
  margin: 5px 0;
  font-size: 14px;
}

.section-navigation a:hover {
  color: #e67e22;
  transition: color 0.3s ease;
}

/* 响应式设计调整 */
@media (max-width: 768px) {
  .section-navigation {
    position: static;
    background-color: transparent;
    padding: 0;
  }

  .section-navigation a {
    display: inline;
    margin: 0 10px;
    font-size: 16px;
  }
}

/* 提示信息样式 */
.prominent-message {
  text-align: center;
  background-color: #16a085;
  color: #ffffff;
  padding: 20px;
  font-size: 1.2em;
  border-radius: 10px;
  margin: 40px 0;
}

/* 仪表盘样式 */
.dashboard {
  display: flex;
  justify-content: space-around;
  padding: 20px;
  background: linear-gradient(45deg, #2980b9, #27ae60);
  color: #ffffff;
  border-radius: 10px;
  transition: background 0.5s ease;
}

.dashboard:hover {
  transform: scale(1.02);
}

/* 自定义仪表盘网格布局 */
.custom-dashboard {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
}

/* 进度条和加载图标样式 */
.loader {
  border: 4px solid #f3f3f3;
  border-top: 4px solid #3498db;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 2s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* 字体大小调整 */
h2, h3, h4 {
  margin-top: 0;
}

h2 {
  font-size: 2em;
}

h3 {
  font-size: 1.5em;
}

h4 {
  font-size: 1.2em;
}

