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

/* 设置主体背景和字体 */
body {
  font-family: 'Roboto', sans-serif; /* 使用无衬线字体 */
  color: #333333; /* 主文本颜色 */
  background: linear-gradient(135deg, #2a5298, #1e3c72); /* 主色调渐变背景 */
  line-height: 1.6;
  padding: 20px;
}

/* 头部样式 */
header {
  text-align: center;
  padding: 50px 20px;
  color: #ffffff;
}

header h1 {
  font-size: 2.5em;
  margin-bottom: 20px;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

header p {
  font-size: 1.2em;
  color: #ffae42; /* 点缀色用于强调 */
}

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

.navbar a {
  color: #ffffff;
  text-decoration: none;
  margin: 0 15px;
  transition: color 0.3s ease;
}

.navbar a:hover {
  color: #ffa500; /* 点缀色悬停效果 */
}

.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;
}

/* 主内容容器 */
.container {
  max-width: 1200px;
  margin: 150px auto 50px; /* 头部导航高度预留 */
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(500px, 1fr)); /* 每个模块宽度不低于500px */
  gap: 40px;
  padding: 20px;
}

/* 文章样式 */
article {
  background: rgba(255, 255, 255, 0.1);
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 8px 16px rgba(0,0,0,0.2);
  backdrop-filter: blur(10px);
}

article h2, article h3, article h4 {
  color: #ffffff;
  margin-bottom: 15px;
}

article p {
  color: #dddddd;
  margin-bottom: 20px;
}

article pre {
  background: #1e3c72;
  padding: 15px;
  border-radius: 5px;
  overflow-x: auto;
  margin-bottom: 20px;
}

article code {
  color: #ffae42; /* 点缀色用于代码 */
  font-family: 'Courier New', Courier, monospace;
}

article table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 20px;
}

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

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

article th {
  background-color: #2a5298;
}

.article-section {
  position: relative;
}

.article-section img {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 50px;
  height: 50px;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
  transition: transform 0.3s ease;
}

.article-section img:hover {
  transform: scale(1.1);
}

/* 按钮样式 */
.button {
  background-color: #1e3c72;
  color: #ffffff;
  padding: 12px 24px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.3s ease;
  font-size: 1em;
}

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

/* 代码块样式 */
.code-block {
  background: #2a5298;
  padding: 20px;
  border-radius: 8px;
  overflow-x: auto;
  margin-bottom: 20px;
}

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

/* 底部样式 */
footer {
  background-color: #1e3c72;
  color: #ffffff;
  padding: 40px 20px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  border-top: 2px solid #2a5298;
}

.footer-section {
  flex: 1 1 300px;
  margin: 10px;
}

.footer-section a {
  color: #ffa500;
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-section a:hover {
  color: #2a5298;
}

/* 响应式设计 */
@media (max-width: 1200px) {
  .container {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  }
}

@media (max-width: 768px) {
  .navbar a {
    display: none;
  }
  
  .hamburger {
    display: flex;
  }
  
  .navbar.active a {
    display: block;
    position: absolute;
    top: 60px;
    left: 0;
    background-color: rgba(30, 60, 114, 0.95);
    width: 100%;
    text-align: center;
    padding: 10px 0;
  }
  
  .container {
    grid-template-columns: 1fr;
  }
}

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

.module {
  opacity: 0;
  animation: fadeInUp 1s forwards;
  animation-delay: 0.3s;
}

.module.visible {
  opacity: 1;
}

/* 图片样式 */
.decorative-image {
  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);
}

/* 提示语样式 */
.reference-note {
  background-color: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  padding: 20px;
  border-left: 5px solid #ffa500;
  margin: 30px 0;
  font-size: 1.1em;
}

/* 链接样式 */
a {
  color: #ffae42;
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: #ffffff;
}

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

th, td {
  border: 1px solid #dddddd;
  text-align: left;
  padding: 8px;
}

th {
  background-color: #2a5298;
  color: #ffffff;
}

tr:nth-child(even) {
  background-color: rgba(255, 255, 255, 0.1);
}

/* 折叠区域样式 */
.collapsible {
  background-color: #2a5298;
  color: #ffffff;
  cursor: pointer;
  padding: 18px;
  width: 100%;
  border: none;
  text-align: left;
  outline: none;
  font-size: 1.1em;
  border-radius: 5px;
  transition: background-color 0.3s ease;
}

.collapsible:hover {
  background-color: #1e3c72;
}

.content {
  padding: 0 18px;
  display: none;
  overflow: hidden;
  background-color: rgba(30, 60, 114, 0.8);
  border-radius: 0 0 5px 5px;
}


