
/* 重置默认样式，确保跨浏览器一致性 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* 设置网页的字体和背景 */
body {
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: #333;
  background: linear-gradient(135deg, #F5F5F5, #E0E0E0); /* 非纯白背景 */
  overflow-x: hidden; /* 防止出现左右滚动条 */
}

/* 导航栏样式 */
.navbar {
  background: linear-gradient(to right, #F7941D 70%, #2E4053 25%, #B87333 5%);
  padding: 20px;
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* 导航栏中的logo样式 */
.navbar .logo {
  font-size: 1.5em;
  color: #fff;
  text-decoration: none;
}

/* 导航菜单样式 */
.navbar ul {
  list-style: none;
  display: flex;
}

.navbar ul li {
  margin-left: 20px;
}

.navbar ul li a {
  color: #fff;
  text-decoration: none;
  font-size: 1em;
  transition: color 0.3s;
}

.navbar ul li a:hover {
  color: #B87333; /* 点缀色 */
}

/* 主容器样式 */
.container {
  max-width: 1200px;
  margin: 100px auto 50px;
  padding: 20px;
  display: grid;
  grid-template-columns: 1fr 3fr;
  grid-gap: 20px;
}

/* 侧边栏样式 */
.sidebar {
  background: #fff;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.sidebar h3 {
  font-size: 1.2em;
  margin-bottom: 15px;
}

.sidebar ul {
  list-style: none;
}

.sidebar ul li {
  margin-bottom: 10px;
}

.sidebar ul li a {
  text-decoration: none;
  color: #2E4053;
  font-size: 1em;
  transition: color 0.3s;
}

.sidebar ul li a:hover {
  color: #F7941D;
}

/* 主内容区样式 */
.main-content {
  background: #fff;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.main-content h2,
.main-content h3 {
  color: #2E4053;
}

.main-content p {
  margin-bottom: 15px;
  font-size: 1em;
  line-height: 1.6;
}

/* 按钮样式 */
.button {
  background: #F7941D;
  color: #fff;
  padding: 10px 20px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.5s, transform 0.3s;
}

.button:hover {
  background: #B87333;
  transform: translateY(-3px);
}

/* 图片样式 */
img {
  width: 100%;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  transition: transform 0.3s, box-shadow 0.3s;
}

img:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

/* 卡片式模块样式 */
.card {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  transition: transform 0.3s, box-shadow 0.3s;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

/* 页脚样式 */
.footer {
  background: #2E4053;
  color: #fff;
  text-align: center;
  padding: 20px;
  position: relative;
  bottom: 0;
  width: 100%;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .container {
    grid-template-columns: 1fr;
    margin: 100px 10px 20px;
  }

  .sidebar {
    margin-bottom: 20px;
  }

  .navbar ul {
    flex-direction: column;
    background: #2E4053;
    position: absolute;
    top: 60px;
    right: 0;
    width: 200px;
    display: none;
  }

  .navbar ul li {
    margin: 10px 0;
  }

  .navbar .menu-toggle {
    display: block;
    cursor: pointer;
  }

  .navbar ul.active {
    display: block;
  }
}

/* 动画效果 */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* 页面提示样式 */
.prominent-message {
  background: #F7941D;
  color: #fff;
  padding: 15px;
  text-align: center;
  font-size: 1.2em;
  border-radius: 4px;
  margin-bottom: 20px;
  animation: fadeIn 2s ease-in-out;
}

/* 章节导航样式 */
.chapter-nav {
  position: sticky;
  top: 80px;
  padding: 20px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

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

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

.chapter-nav ul li a {
  text-decoration: none;
  color: #2E4053;
  font-size: 1em;
  transition: color 0.3s;
}

.chapter-nav ul li a:hover {
  color: #F7941D;
}

/* 数据可视化图表样式 */
.chart {
  border: 2px solid #B87333;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  padding: 20px;
  background: #fff;
  border-radius: 8px;
}

/* 按钮聚焦样式 */
.input-field:focus {
  border: 2px solid #F7941D;
  box-shadow: 0 0 5px rgba(247, 148, 29, 0.5);
}

