
/* 全局样式设置，包括字体、背景、颜色和响应式设计 */
body {
  margin: 0;
  padding: 0;
  font-family: 'Roboto', sans-serif; /* 使用无衬线字体，提高可读性 */
  background: linear-gradient(135deg, #0d47a1 70%, #42a5f5 25%, #ff9800 5%); /* 黄金比配色方案 */
  color: #333;
  overflow-x: hidden; /* 防止左右滚动条出现 */
}

/* 固定顶部导航栏样式 */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  background-color: rgba(13, 71, 161, 0.9); /* 半透明背景 */
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 30px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  z-index: 1000;
}

/* 导航栏内Logo样式 */
.navbar .logo {
  font-size: 24px;
  font-weight: bold;
  text-decoration: none;
  color: white;
}

/* 导航菜单样式 */
.navbar .menu {
  display: flex;
  gap: 20px;
}

.navbar .menu a {
  color: white;
  text-decoration: none;
  font-size: 16px;
  transition: color 0.3s;
}

.navbar .menu a:hover {
  color: #ff9800; /* 点缀色用于悬停效果 */
}

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

/* 章节导航系统样式 */
.chapter-navigation {
  position: fixed;
  right: 20px;
  top: 100px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.chapter-navigation a {
  background-color: rgba(66, 165, 245, 0.8);
  color: white;
  padding: 10px 15px;
  border-radius: 4px;
  text-decoration: none;
  font-size: 14px;
  transition: background-color 0.3s;
}

.chapter-navigation a:hover {
  background-color: #ff9800;
}

/* 文章内容样式 */
article {
  line-height: 1.6;
}

article h2 {
  font-size: 24px;
  margin-top: 40px;
  color: #0d47a1;
}

article h3 {
  font-size: 20px;
  margin-top: 30px;
  color: #42a5f5;
}

article p {
  font-size: 16px;
  margin-top: 15px;
}

/* 代码块样式，与正文区别开来 */
article pre {
  background-color: #f5f5f5;
  padding: 15px;
  border-radius: 8px;
  overflow-x: auto;
  margin-top: 15px;
}

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

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

.financial-table th,
.financial-table td {
  border: 1px solid #ddd;
  padding: 12px;
  text-align: center;
}

.financial-table th {
  background-color: #42a5f5;
  color: white;
}

.financial-table tr:nth-child(even) {
  background-color: #f2f2f2;
}

.financial-table tr:hover {
  background-color: #ddd;
}

/* 图片样式，添加圆角、阴影、悬停效果 */
img.decorative {
  width: 100%;
  max-width: 320px;
  border-radius: 12px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s, box-shadow 0.3s;
}

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

/* 卡片式布局样式 */
.container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  padding: 20px;
}

.card {
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  padding: 20px;
  transition: transform 0.3s ease;
}

.card:hover {
  transform: translateY(-10px);
}

/* 动画按钮样式 */
.button {
  background-color: #ff9800;
  border: none;
  color: white;
  padding: 15px 32px;
  text-align: center;
  text-decoration: none;
  display: inline-block;
  font-size: 16px;
  transition: transform 0.2s, background-color 0.2s;
  border-radius: 4px;
}

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

/* 粒子效果样式 */
body::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: transparent;
  pointer-events: none;
}

.particle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 50%;
  animation: move 10s linear infinite;
}

@keyframes move {
  from {
    transform: translateY(0) translateX(0);
    opacity: 1;
  }
  to {
    transform: translateY(-1000px) translateX(1000px);
    opacity: 0;
  }
}

/* 响应式设计媒体查询 */
@media (max-width: 768px) {
  .navbar .menu {
    display: none; /* 移动端隐藏菜单 */
  }

  .chapter-navigation {
    display: none; /* 移动端隐藏章节导航 */
  }
}

@media (min-width: 769px) {
  .hamburger-menu {
    display: none; /* 桌面端隐藏汉堡菜单 */
  }
}

