
/* 主体样式定义 */

/* 全局样式 */
body {
  margin: 0;
  padding: 0;
  background: linear-gradient(135deg, #1E3A8A 70%, #22D3EE 25%, #34D399 5%);
  color: #F5F7FA;
  font-family: 'Roboto', sans-serif;
  font-size: 16px;
}

/* 导航栏样式 */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  background-color: rgba(30, 58, 138, 0.9);
  padding: 20px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  z-index: 1000;
}

.navbar ul {
  list-style: none;
  display: flex;
  justify-content: center;
  margin: 0;
  padding: 0;
}

.navbar li {
  margin: 0 15px;
}

.navbar a {
  color: #F5F7FA;
  text-decoration: none;
  font-size: 18px;
  transition: color 0.3s ease;
}

.navbar a:hover {
  color: #34D399;
}

/* 主要内容区样式 */
.container {
  max-width: 1200px;
  margin: 100px auto 50px auto;
  padding: 20px;
}

h2, h3, h4 {
  color: #1E3A8A;
  margin-top: 40px;
}

h2 {
  font-size: 22px;
}

h3 {
  font-size: 20px;
}

h4 {
  font-size: 18px;
}

p {
  font-size: 16px;
  line-height: 1.8;
  color: #333333;
}

code {
  background-color: #f0f0f0;
  color: #d63384;
  padding: 2px 4px;
  border-radius: 4px;
  font-family: 'Courier New', Courier, monospace;
}

pre {
  background-color: #f8f9fa;
  padding: 15px;
  border-radius: 8px;
  overflow: auto;
}

pre code {
  color: #1E3A8A;
}

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

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

/* 模块样式 */
.module {
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 30px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  transition: background-color 0.3s ease;
}

.module:hover {
  background-color: rgba(34, 211, 238, 0.2);
}

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

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

/* 加载动画样式 */
.loader {
  border: 4px solid #F3F3F3;
  border-top: 4px solid #1E3A8A;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  animation: spin 2s linear infinite;
  margin: auto;
}

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

/* 粒子动画样式 */
.particle {
  position: absolute;
  width: 5px;
  height: 5px;
  background-color: #22D3EE;
  border-radius: 50%;
  animation: moveParticles 10s infinite;
}

@keyframes moveParticles {
  0% { transform: translate(0, 0); }
  50% { transform: translate(100px, 100px); }
  100% { transform: translate(0, 0); }
}

/* 仪表盘样式 */
.dashboard {
  background-color: var(--background-color, #F5F7FA);
  color: var(--primary-color, #1E3A8A);
  padding: 20px;
  border-radius: 10px;
}

.dashboard .widget {
  border: 1px solid var(--secondary-color, #22D3EE);
  border-radius: 8px;
  padding: 15px;
  margin: 10px;
}

/* 图标样式 */
.icon {
  width: 24px;
  height: 24px;
  fill: #1E3A8A;
  transition: fill 0.3s ease;
}

.icon:hover {
  fill: #22D3EE;
}

/* 代码示例样式 */
.code-example {
  background-color: #2D3748;
  color: #CBD5E0;
  padding: 20px;
  border-radius: 8px;
  font-family: 'Courier New', Courier, monospace;
  overflow: auto;
}

/* 导航菜单样式 */
.chapter-nav {
  position: fixed;
  right: 20px;
  top: 100px;
  background-color: rgba(30, 58, 138, 0.8);
  padding: 15px;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.chapter-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.chapter-nav li {
  margin-bottom: 10px;
}

.chapter-nav a {
  color: #F5F7FA;
  text-decoration: none;
  font-size: 16px;
  transition: color 0.3s ease;
}

.chapter-nav a:hover {
  color: #34D399;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .navbar ul {
    flex-direction: column;
    align-items: center;
  }

  .chapter-nav {
    display: none;
  }
}

@media (max-width: 480px) {
  body {
    font-size: 15px;
  }

  h2 {
    font-size: 20px;
  }

  h3 {
    font-size: 18px;
  }

  h4 {
    font-size: 16px;
  }
}

/* 提示信息样式 */
.reference-note {
  background-color: rgba(52, 211, 153, 0.9);
  color: #FFFFFF;
  padding: 15px;
  border-radius: 8px;
  text-align: center;
  font-size: 18px;
  margin-bottom: 30px;
}

/* 其他装饰性元素 */
.decorative-line {
  height: 2px;
  background: linear-gradient(90deg, #1E3A8A, #22D3EE);
  margin: 40px 0;
  border: none;
}


