
/* 基础重置样式 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* 导入谷歌字体 */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@700&family=Open+Sans&display=swap');

/* 全局字体与颜色设置 */
body {
  font-family: 'Open Sans', sans-serif;
  background-color: #ffffff; /* 主背景色 */
  color: #333333; /* 文字主色 */
  line-height: 1.6;
}

/* 标题字体与颜色 */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Roboto', sans-serif;
  color: #2c3e50; /* 标题颜色 */
}

/* 链接样式设置 */
a {
  color: #4a90e2; /* 辅助色 */
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: #ff7e5f; /* 点缀色 */
}

/* 导航栏样式 */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  background: linear-gradient(90deg, #4567B7 70%, #8ECAE6 25%, #F19CBB 5%);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 30px;
}

.navbar a {
  color: #ffffff;
  margin: 0 15px;
  font-size: 16px;
}

.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
}

.hamburger div {
  width: 25px;
  height: 3px;
  background-color: #ffffff;
  margin: 4px 0;
  transition: all 0.3s ease;
}

/* 响应式导航栏 */
@media (max-width: 768px) {
  .navbar a {
    display: none;
  }
  .hamburger {
    display: flex;
  }
}

/* 主内容容器样式 */
.main-container {
  padding-top: 80px; /* 为固定导航栏预留空间 */
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
  gap: 40px;
  padding: 40px 20px;
}

/* 内容块样式 */
.content-block {
  background-color: #f5f5f5; /* 辅助背景色 */
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  position: relative;
}

/* 标题样式 */
.content-block h2 {
  margin-bottom: 20px;
  color: #2c3e50;
  font-size: 24px;
}

/* 正文段落样式 */
.content-block p {
  margin-bottom: 15px;
  font-size: 16px;
  color: #555555;
}

/* 图片样式 */
.decorative-image {
  width: 100%;
  border-radius: 15px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

/* 按钮样式 */
.btn {
  background-color: #ff7e5f; /* 点缀色 */
  color: #ffffff;
  padding: 12px 25px;
  border: none;
  border-radius: 25px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.btn:hover {
  background-color: #feb47b;
}

/* 折叠区域样式 */
.collapsible {
  background-color: #ffffff;
  color: #333333;
  cursor: pointer;
  padding: 18px;
  width: 100%;
  border: none;
  text-align: left;
  outline: none;
  font-size: 18px;
  border-radius: 5px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  margin-bottom: 10px;
  transition: background-color 0.3s ease;
}

.collapsible:hover {
  background-color: #f1f1f1;
}

.collapsible:after {
  content: '\002B';
  float: right;
  margin-left: 5px;
}

.active:after {
  content: "\2212";
}

.content {
  padding: 0 18px;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  background-color: #f9f9f9;
}

/* 代码块样式 */
.code-block {
  background-color: #f5f5f5;
  padding: 20px;
  border-radius: 8px;
  overflow-x: auto;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  margin: 20px 0;
}

.code-block code {
  font-family: 'Courier New', Courier, monospace;
  color: #d63384;
}

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

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

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

th {
  background-color: #4567B7; /* 主色 */
  color: #ffffff;
}

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

/* 提示信息样式 */
.notice {
  background-color: #ffd700; /* 点缀色 */
  color: #333333;
  padding: 15px;
  text-align: center;
  font-size: 18px;
  border-radius: 5px;
  margin: 30px 0;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* 动画效果 */
@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 1s forwards;
  animation-delay: 0.5s;
}

