
/* 全局样式设置，包括字体、颜色和基础布局 */
body {
  margin: 0;
  padding: 0;
  font-family: 'Roboto', sans-serif; /* 使用无衬线字体Roboto，确保易读性 */
  color: #555555; /* 正文文字颜色 */
  background: linear-gradient(135deg, #032B44 70%, #F7F9FC 30%); /* 主色与辅色渐变背景 */
  line-height: 1.6;
}

/* 固定导航栏样式 */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  background-color: #032B44; /* 深蓝色主色 */
  padding: 20px 0;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1); /* 阴影效果提升层次感 */
  transition: background-color 0.3s ease; /* 背景色过渡效果 */
  z-index: 1000; /* 确保导航栏在最上层 */
}

.navbar:hover {
  background-color: #025678; /* 悬停时背景色变化 */
}

.navbar a {
  color: #F7F9FC; /* 链接颜色为辅色 */
  text-decoration: none;
  margin: 0 15px;
  font-size: 16px;
  transition: color 0.3s ease; /* 链接颜色过渡 */
}

.navbar a:hover {
  color: #FFA500; /* 悬停时链接颜色变为点缀色 */
}

/* 主内容区样式 */
.container {
  max-width: 1200px;
  margin: 100px auto 50px; /* 顶部留出导航栏空间 */
  padding: 0 20px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); /* 自适应网格布局 */
  gap: 20px;
}

/* 卡片样式 */
.card {
  background-color: #FFFFFF;
  border-radius: 10px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  padding: 20px;
  transition: transform 0.3s ease, background-color 0.3s ease; /* 放大和背景色过渡 */
}

.card:hover {
  transform: scale(1.05); /* 悬停时放大 */
  background: linear-gradient(135deg, #FFA500, #61C48D); /* 背景色渐变 */
}

.card img {
  max-width: 100%;
  border-radius: 8px; /* 圆角效果 */
  box-shadow: 0 2px 4px rgba(0,0,0,0.1); /* 图片阴影 */
  transition: transform 0.3s ease;
}

.card img:hover {
  transform: rotate(5deg); /* 图片悬停时轻微旋转 */
}

.card-title {
  font-size: 1.8em;
  color: #032B44;
  margin-top: 15px;
}

.card-description {
  font-size: 1em;
  color: #555555;
  margin-top: 10px;
}

/* 代码块样式，与正文区分明显 */
.code-block {
  background-color: #F7F9FC;
  border-left: 4px solid #FFA500;
  padding: 15px;
  border-radius: 5px;
  font-family: 'Courier New', Courier, monospace; /* 等宽字体 */
  overflow-x: auto;
  margin: 20px 0;
}

.code-block code {
  color: #61C48D;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .navbar a {
    margin: 0 10px;
    font-size: 14px;
  }

  .card-title {
    font-size: 1.5em;
  }
}

@media (max-width: 480px) {
  .container {
    grid-template-columns: 1fr; /* 单列布局 */
    margin: 120px auto 20px;
  }

  .navbar {
    padding: 15px 0;
  }

  .navbar a {
    margin: 0 8px;
    font-size: 14px;
  }
}

/* 提示信息样式，显著位置 */
.highlight-message {
  text-align: center;
  font-size: 1.2em;
  color: #FFA500;
  margin: 20px 0;
  animation: fadeIn 2s ease-in-out; /* 渐入动画 */
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* 底部样式 */
.footer {
  background-color: #032B44;
  color: #F7F9FC;
  padding: 40px 20px;
  text-align: center;
}

.footer a {
  color: #FFA500;
  text-decoration: none;
  margin: 0 10px;
}

.footer a:hover {
  text-decoration: underline;
}

/* 图片展示样式 */
.image-gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
}

.image-gallery img {
  max-width: 100%;
  border-radius: 10px;
  box-shadow: 0 3px 5px rgba(0,0,0,0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.image-gallery img:hover {
  transform: scale(1.05); /* 悬停时放大 */
  box-shadow: 0 6px 10px rgba(0,0,0,0.3); /* 阴影加深 */
}

/* 折叠区域样式 */
.collapsible {
  background-color: #F7F9FC;
  color: #032B44;
  cursor: pointer;
  padding: 18px;
  width: 100%;
  border: none;
  text-align: left;
  outline: none;
  font-size: 1em;
  transition: background-color 0.3s ease;
}

.collapsible:hover {
  background-color: #61C48D;
}

.active, .collapsible:hover {
  background-color: #61C48D;
}

.content {
  padding: 0 18px;
  display: none;
  overflow: hidden;
  background-color: #F7F9FC;
  border-left: 4px solid #FFA500;
  margin-bottom: 10px;
}

/* 导航栏优化，避免内容显示不全 */
.navbar-container {
  display: flex;
  justify-content: center;
  align-items: center;
}

/* 链接属性设置 */
a {
  rel: "nofollow"; /* 所有内部链接添加rel属性 */
}

