
/* 
  页面整体样式设计
  本样式表采用现代CSS3技术，结合Flexbox和Grid布局，实现响应式与高端视觉效果。色彩搭配遵循黄金比例，主色调为科技蓝、黑色与银灰色，辅以荧光绿与橙色点缀，营造出未来感与高级质感。
*/

/* 全局设置 */
body {
  margin: 0;
  padding: 0;
  font-family: 'Roboto', sans-serif;
  background: linear-gradient(135deg, #1E90FF, #C0C0C0);
  color: #ffffff;
  overflow-x: hidden;
}

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

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

.navbar a:hover {
  color: #32CD32;
}

/* 章节导航样式 */
.chapter-nav {
  position: fixed;
  top: 60px;
  right: 20px;
  background-color: rgba(0, 0, 0, 0.7);
  padding: 15px;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.chapter-nav a {
  display: block;
  color: #ffffff;
  text-decoration: none;
  margin: 10px 0;
  font-size: 14px;
  transition: background-color 0.3s ease, color 0.3s ease;
  padding: 5px 10px;
  border-radius: 4px;
}

.chapter-nav a:hover {
  background-color: #32CD32;
  color: #000000;
}

/* 主内容区样式 */
.main-content {
  display: grid;
  grid-template-columns: 1fr 3fr;
  gap: 20px;
  padding: 100px 50px 50px 50px;
}

/* 侧边栏样式 */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* 文章内容样式 */
article {
  background-color: rgba(0, 0, 0, 0.5);
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

article h2, article h3, article h4 {
  color: #32CD32;
  margin-bottom: 15px;
  font-family: 'Montserrat', sans-serif;
}

article p {
  line-height: 1.8;
  font-size: 16px;
  margin-bottom: 20px;
}

article pre {
  background-color: #1E90FF;
  padding: 15px;
  border-radius: 8px;
  overflow-x: auto;
  font-size: 14px;
  margin-bottom: 20px;
}

article code {
  color: #FFD700;
}

/* 图片样式 */
.image-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
  margin-top: 30px;
}

.image-gallery img {
  width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 4px 6px 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 12px rgba(0, 0, 0, 0.5);
}

/* 按钮样式 */
.button {
  background-color: #32CD32;
  border: none;
  padding: 12px 24px;
  text-align: center;
  text-decoration: none;
  display: inline-block;
  font-size: 16px;
  margin: 10px 0;
  transition: transform 0.2s, background-color 0.2s;
  cursor: pointer;
  border-radius: 8px;
  font-family: 'Montserrat', sans-serif;
}

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

/* 响应式设计 */
@media (max-width: 1200px) {
  .main-content {
    grid-template-columns: 1fr;
    padding: 100px 30px 30px 30px;
  }

  .chapter-nav {
    position: static;
    margin-bottom: 20px;
  }
}

@media (max-width: 768px) {
  .navbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .navbar a {
    margin: 10px 0;
  }

  .chapter-nav {
    display: none;
  }

  .image-gallery {
    grid-template-columns: 1fr;
  }
}

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

.fade-in {
  animation: fadeIn 2s ease-in-out;
}

/* 过渡效果 */
.transition {
  transition: all 0.3s ease;
}

/* 3D效果 */
.three-d {
  transform: perspective(1000px) rotateY(10deg) rotateX(10deg);
  transition: transform 0.5s ease-in-out;
}

.three-d:hover {
  transform: perspective(1000px) rotateY(0deg) rotateX(0deg);
}

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

.code-block code {
  color: #ADFF2F;
  font-family: 'Courier New', Courier, monospace;
  font-size: 14px;
}

/* 提示信息样式 */
.reference-note {
  background-color: rgba(255, 140, 0, 0.8);
  color: #ffffff;
  padding: 15px;
  border-radius: 8px;
  text-align: center;
  font-size: 18px;
  margin-bottom: 30px;
}

/* 折叠区域样式 */
.collapsible {
  background-color: #1E90FF;
  color: white;
  cursor: pointer;
  padding: 10px;
  width: 100%;
  border: none;
  text-align: left;
  outline: none;
  font-size: 16px;
  border-radius: 5px;
  margin-bottom: 10px;
}

.active, .collapsible:hover {
  background-color: #32CD32;
}

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

/* 点缀线条 */
.decorative-line {
  height: 2px;
  background: linear-gradient(90deg, #1E90FF, #32CD32, #FF8C00);
  margin: 20px 0;
  border: none;
}

/* 模块样式 */
.module {
  background-color: rgba(0, 0, 0, 0.6);
  padding: 20px;
  border-radius: 10px;
  margin-bottom: 20px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.module h3 {
  color: #FF8C00;
  margin-bottom: 15px;
}

.module p {
  font-size: 16px;
  line-height: 1.6;
}

/* 圆角按钮 */
.rounded-button {
  border-radius: 50px;
}

/* 阴影效果 */
.shadow {
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* 平滑过渡 */
.smooth-transition {
  transition: all 0.3s ease;
}

/* 点缀图标 */
.icon {
  width: 24px;
  height: 24px;
  margin-right: 8px;
}

/* 图片边框 */
.image-border {
  border: 3px solid #32CD32;
  border-radius: 12px;
}

/* 悬浮效果 */
.hover-effect:hover {
  transform: scale(1.02);
}

/* 隐藏属性 */
.hidden {
  display: none;
}


