
/* 
整体样式设置
使用现代Web技术栈，包括HTML5和CSS3，确保页面的响应式设计和高端视觉效果。
*/

/* 定义颜色变量，遵循黄金比例配色法则 */
:root {
  --primary-color: #1E3A8A; /* 主色：深蓝色，用于整体氛围 */
  --secondary-color: #4B5563; /* 辅色：灰色，增强层次感 */
  --accent-color: #FF6600; /* 点缀色：亮橙色，吸引视觉焦点 */
  --background-color: #F0F4F8; /* 背景色：浅灰色，避免纯白 */
}

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

body {
  font-family: 'Roboto', sans-serif;
  color: var(--secondary-color);
  background: linear-gradient(135deg, #F0F4F8, #D1D9E6);
  line-height: 1.6;
  font-size: 16px;
}

/* 导航栏样式 */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  background-color: rgba(30, 58, 138, 0.9);
  color: #FFFFFF;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 30px;
  z-index: 1000;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  transition: background-color 0.3s ease;
}

.navbar:hover {
  background-color: var(--primary-color);
}

.navbar .logo {
  font-size: 24px;
  font-weight: bold;
  letter-spacing: 2px;
}

.navbar .menu {
  display: flex;
  gap: 20px;
}

.navbar .menu a {
  color: #FFFFFF;
  text-decoration: none;
  font-size: 16px;
  transition: color 0.3s ease;
}

.navbar .menu a:hover {
  color: var(--accent-color);
}

/* 主容器样式 */
.container {
  max-width: 1200px;
  margin: 100px auto 50px;
  padding: 0 20px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
}

/* 模块块样式 */
.section {
  background-color: #FFFFFF;
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.section:hover {
  transform: translateY(-10px);
  box-shadow: 0 10px 15px rgba(0,0,0,0.2);
}

/* 标题样式 */
.section h2 {
  font-size: 28px;
  color: var(--primary-color);
  margin-bottom: 20px;
}

.section h3 {
  font-size: 22px;
  color: var(--primary-color);
  margin-top: 20px;
  margin-bottom: 15px;
}

/* 段落样式 */
.section p {
  font-size: 16px;
  color: var(--secondary-color);
  margin-bottom: 15px;
}

/* 代码块样式 */
pre {
  background: #F3F4F6;
  padding: 15px;
  border-radius: 8px;
  overflow-x: auto;
  margin-bottom: 20px;
}

code {
  font-family: 'Courier New', Courier, monospace;
  color: #D63384;
}

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

table th, table td {
  border: 1px solid #E5E7EB;
  padding: 12px 15px;
  text-align: left;
}

table th {
  background-color: var(--primary-color);
  color: #FFFFFF;
}

table tr:nth-child(even) {
  background-color: #F9FAFB;
}

/* 图片样式 */
img {
  width: 100%;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

img:hover {
  transform: scale(1.05);
  box-shadow: 0 10px 15px rgba(0,0,0,0.2);
}

/* 底部导航样式 */
.footer {
  background-color: var(--secondary-color);
  color: #FFFFFF;
  padding: 20px;
  text-align: center;
  position: relative;
}

.footer .social-icons a {
  margin: 0 10px;
  color: #FFFFFF;
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer .social-icons a:hover {
  color: var(--accent-color);
}

/* 响应式设计 */
@media (min-width: 768px) {
  .container {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .container {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* 微交互效果 */
.button {
  background-color: var(--accent-color);
  color: #FFFFFF;
  padding: 10px 20px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.3s ease;
}

.button:hover {
  background-color: darken(var(--accent-color), 10%);
  transform: scale(1.05);
}

/* 折叠区域样式 */
.collapsible {
  background-color: #F3F4F6;
  color: var(--secondary-color);
  cursor: pointer;
  padding: 18px;
  width: 100%;
  border: none;
  text-align: left;
  outline: none;
  font-size: 18px;
  transition: background-color 0.3s ease;
}

.collapsible:hover {
  background-color: #E5E7EB;
}

.content {
  padding: 0 18px;
  display: none;
  overflow: hidden;
  background-color: #FFFFFF;
  border-left: 4px solid var(--accent-color);
}

/* 章节导航样式 */
.chapter-nav {
  position: fixed;
  top: 60px;
  right: 20px;
  background-color: rgba(30, 58, 138, 0.8);
  padding: 15px;
  border-radius: 8px;
  z-index: 999;
}

.chapter-nav a {
  display: block;
  color: #FFFFFF;
  text-decoration: none;
  margin-bottom: 10px;
  transition: color 0.3s ease;
}

.chapter-nav a:hover {
  color: var(--accent-color);
}

/* 过渡与动画效果 */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translate3d(0, 40px, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

.fade-in-up {
  opacity: 0;
  animation: fadeInUp 0.6s forwards;
}

/* 视差滚动效果 */
.parallax {
  background-image: url('https://images.gptkong.com/demo/sample1.png');
  height: 500px;
  background-attachment: fixed;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  position: relative;
}

