
/* 全局样式设置 */
body {
  margin: 0;
  padding: 0;
  font-family: 'Roboto', sans-serif; /* 使用Roboto字体，保证现代感与易读性 */
  background-color: #1E272E; /* 主色调深蓝色背景，营造科技感 */
  color: #ffffff; /* 文字颜色为白色，确保高对比度 */
}

/* 导航栏样式 */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  background-color: #1E272E; /* 与背景一致的深蓝色 */
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 15px 0;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5); /* 细微阴影增强层次感 */
  z-index: 1000; /* 确保导航栏在最前 */
}

.navbar a {
  color: #487EB0; /* 辅助色亮蓝色，用于导航链接 */
  text-decoration: none;
  font-weight: bold;
  margin: 0 20px;
  transition: color 0.3s ease; /* 平滑过渡效果 */
}

.navbar a:hover {
  color: #FFA500; /* 橙色点缀色，增强交互反馈 */
}

/* 侧边栏样式 */
.sidebar {
  position: fixed;
  left: 0;
  top: 60px; /* 导航栏下方 */
  width: 200px;
  height: calc(100% - 60px);
  background-color: #2F3640; /* 辅助色深灰色 */
  padding: 20px;
  box-shadow: 2px 0 5px rgba(0, 0, 0, 0.5);
}

.sidebar a {
  display: block;
  color: #ffffff;
  margin-bottom: 15px;
  text-decoration: none;
  font-size: 16px;
  transition: color 0.3s ease;
}

.sidebar a:hover {
  color: #34C759; /* 绿色点缀色，提升可点击性 */
}

/* 主内容区域样式 */
.content {
  margin-left: 220px; /* 侧边栏宽度 + 一些间距 */
  padding: 80px 40px 40px 40px; /* 顶部留空间容纳固定导航 */
  background: linear-gradient(135deg, #1E272E, #2F3640); /* 渐变背景，增加视觉层次 */
  min-height: 100vh;
}

/* 文章样式 */
article {
  max-width: 1200px;
  margin: 0 auto;
}

article h2, article h3, article h4 {
  color: #487EB0; /* 辅助色用于标题 */
}

article p {
  font-size: 16px;
  line-height: 1.6;
  color: #ffffff;
  margin-bottom: 20px;
}

/* 图片样式 */
img.decorative {
  width: 100%;
  max-width: 320px;
  height: auto;
  border-radius: 10px; /* 圆角效果 */
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3); /* 阴影增强立体感 */
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

img.decorative:hover {
  transform: scale(1.05); /* 悬停放大效果 */
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.5); /* 加深阴影 */
}

/* 网格系统样式 */
.grid-container {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 20px;
  padding: 20px 0;
}

.grid-item {
  background-color: rgba(255, 255, 255, 0.1); /* 半透明背景 */
  padding: 15px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* 响应式布局 */
@media (max-width: 1200px) {
  .sidebar {
    width: 180px;
  }
  .content {
    margin-left: 200px;
    padding: 80px 20px 20px 20px;
  }
}

@media (max-width: 992px) {
  .sidebar {
    display: none; /* 小屏幕隐藏侧边栏 */
  }
  .content {
    margin-left: 0;
    padding: 80px 20px 20px 20px;
  }
}

@media (max-width: 768px) {
  .navbar a {
    margin: 0 10px;
    font-size: 14px;
  }
  article p {
    font-size: 15px;
  }
}

@media (max-width: 480px) {
  .navbar {
    flex-direction: column;
  }
  .navbar a {
    margin: 5px 0;
  }
  .grid-container {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* 动态背景动画 */
@keyframes dataFlow {
  0% { background-position: 0 0; }
  100% { background-position: 1000px 0; }
}

.dynamic-background {
  background: linear-gradient(270deg, #1E272E, #487EB0, #1E272E);
  background-size: 1000px 100%;
  animation: dataFlow 20s linear infinite;
}

/* 按钮样式 */
.button {
  background-color: #FFA500; /* 橙色点缀色 */
  color: #ffffff;
  padding: 10px 20px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.3s ease;
  font-size: 16px;
}

.button:hover {
  background-color: #34C759; /* 绿色点缀色 */
  transform: scale(1.05); /* 放大效果 */
}

/* 滚动触发动画样式 */
.scroll-animate {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.6s ease-out;
}

.scroll-animate.active {
  opacity: 1;
  transform: translateY(0);
}

/* 页脚样式 */
.footer {
  background-color: #1E272E;
  padding: 30px 20px;
  display: flex;
  justify-content: space-around;
  align-items: center;
  color: #ffffff;
  flex-wrap: wrap;
}

.footer .community, .footer .live {
  flex: 1;
  min-width: 200px;
  margin: 10px 0;
}

.footer .button {
  background-color: #FFA500;
  color: #ffffff;
  padding: 10px 20px;
  border: none;
  border-radius: 5px;
  transition: background-color 0.3s ease;
  cursor: pointer;
}

.footer .button:hover {
  background-color: #34C759;
}

/* 特别提示样式 */
.special-note {
  text-align: center;
  background-color: rgba(255, 165, 0, 0.2); /* 橙色半透明背景 */
  padding: 15px;
  border-radius: 5px;
  margin-bottom: 40px;
  font-size: 18px;
  font-weight: bold;
  color: #FFA500;
}

/* 图片展示区块 */
.image-gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 40px;
}

.image-gallery img {
  width: calc(25% - 20px);
  max-width: 320px;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

/* 章节导航样式 */
.chapter-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin-bottom: 30px;
}

.chapter-nav a {
  background-color: #487EB0;
  color: #ffffff;
  padding: 10px 15px;
  border-radius: 5px;
  text-decoration: none;
  transition: background-color 0.3s ease;
}

.chapter-nav a:hover {
  background-color: #FFA500;
}

/* 代码块样式 */
pre {
  background-color: rgba(255, 255, 255, 0.1);
  padding: 15px;
  border-radius: 8px;
  overflow-x: auto;
  font-family: 'Courier New', Courier, monospace;
  color: #34C759;
  margin-bottom: 20px;
}

/* 代码高亮 */
code {
  color: #34C759;
}

