
/* 
  网站整体样式配置
  使用HTML5和CSS3技术，结合Flexbox和Grid布局，确保响应式设计。
  主色调使用深蓝色传达专业与科技感，辅色采用亮蓝和绿色增强层次，点缀色为亮绿色吸引眼球。
*/

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

/* 设置全局字体和背景 */
body, html {
  width: 100%;
  height: 100%;
  font-family: 'Roboto', sans-serif;
  background: linear-gradient(135deg, #0a1f44 70%, #1e3a8a 25%, #00ff7f 5%);
  color: #ffffff;
  scroll-behavior: smooth;
}

/* 导航栏样式 */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  height: 60px;
  background-color: rgba(10, 31, 68, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.navbar ul {
  list-style: none;
  display: flex;
  gap: 20px;
}

.navbar a {
  color: #ffffff;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

.navbar a:hover {
  color: #00ff7f;
}

/* 主容器样式，使用Scroll Snap */
.container {
  scroll-snap-type: y mandatory;
  overflow-y: scroll;
  height: 100vh;
  width: 100vw;
}

/* 每个全屏章节的样式 */
.container section {
  scroll-snap-align: start;
  width: 100%;
  height: 100vh;
  position: relative;
  padding: 80px 20px 20px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  background: linear-gradient(135deg, #0a1f44, #1e3a8a);
  transition: background 0.5s ease;
}

/* 动态背景效果 */
.dynamic-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(45deg, rgba(0,123,255,0.3) 25%, transparent 25%, transparent 50%, rgba(0,123,255,0.3) 50%, rgba(0,123,255,0.3) 75%, transparent 75%, transparent);
  background-size: 50px 50px;
  animation: moveBackground 10s linear infinite;
  z-index: -1;
}

@keyframes moveBackground {
  from { background-position: 0 0; }
  to { background-position: 50px 50px; }
}

/* 主要标题样式 */
.main-title {
  font-size: 2.5rem;
  margin-bottom: 20px;
  text-align: center;
  color: #00ff7f;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

/* 章节标题样式 */
section h2 {
  font-size: 2rem;
  margin-bottom: 15px;
  color: #ffffff;
  text-shadow: 1px 1px 3px rgba(0,0,0,0.3);
}

/* 段落样式 */
section p {
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 15px;
  max-width: 800px;
  text-align: justify;
}

/* 图片样式：圆角、阴影、悬浮效果 */
section img {
  width: 320px;
  height: 320px;
  object-fit: cover;
  border-radius: 15px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.3);
  margin: 10px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

/* 代码块样式，与正文区分 */
pre code {
  background: rgba(255, 255, 255, 0.1);
  padding: 15px;
  border-radius: 10px;
  font-family: 'Courier New', Courier, monospace;
  overflow-x: auto;
}

/* CTA按钮样式 */
.cta-button {
  padding: 15px 30px;
  background-color: #00ff7f;
  color: #0a1f44;
  border: none;
  border-radius: 5px;
  font-size: 1.2rem;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.3s ease;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  margin-top: 20px;
}

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

/* 响应式设计 */
@media (max-width: 768px) {
  .navbar ul {
    flex-direction: column;
    gap: 10px;
  }

  .main-title {
    font-size: 2rem;
  }

  section h2 {
    font-size: 1.5rem;
  }

  section p {
    font-size: 0.9rem;
  }

  section img {
    width: 80%;
    height: auto;
  }

  .cta-button {
    width: 80%;
    font-size: 1rem;
  }
}

/* 折叠区域样式 */
.collapsible {
  background-color: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  cursor: pointer;
  padding: 10px;
  width: 80%;
  border: none;
  text-align: left;
  outline: none;
  font-size: 1rem;
  border-radius: 5px;
  margin: 10px 0;
}

.collapsible:after {
  content: '\002B';
  font-size: 1.2rem;
  float: right;
}

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

.content {
  padding: 0 15px;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  background-color: rgba(255, 255, 255, 0.05);
  border-radius: 5px;
}

/* 联系方式等隐藏元素 */
.hidden-info {
  display: none;
}

/* CSS3示例代码块样式 */
.css-example {
  background: rgba(0, 0, 0, 0.8);
  padding: 20px;
  border-radius: 10px;
  margin: 20px 0;
}

/* 导航链接样式 */
.nav-link {
  font-size: 1rem;
  color: #ffffff;
  text-decoration: none;
  margin: 0 10px;
  transition: color 0.3s ease;
}

.nav-link:hover {
  color: #00ff7f;
}

/* 页脚样式 */
footer {
  width: 100%;
  padding: 20px;
  background-color: rgba(10, 31, 68, 0.9);
  text-align: center;
  position: relative;
  bottom: 0;
}

/* 滚动时元素渐显效果 */
.section-transition {
  background: linear-gradient(to bottom right, #1e3a8a, #00ff7f);
  transition: opacity 1s ease, transform 1s ease;
  opacity: 0;
  transform: translateY(50px);
}

.section-transition.visible {
  opacity: 1;
  transform: translateY(0);
}

