
/* 全局样式设置 */
:root {
  --primary-color: #1E272E; /* 主色调：深蓝色 */
  --accent-orange: #FFA500; /* 辅助色：亮橙色 */
  --accent-green: #98FB98; /* 点缀色：薄荷绿 */
  --background-gradient: linear-gradient(135deg, #1E272E, #3B3F51); /* 背景渐变 */
  --text-color: #BDC3C7; /* 正文字体颜色 */
  --header-height: 60px; /* 头部高度 */
  --font-family: 'Roboto', sans-serif; /* 全局字体 */
}

/* 页面整体背景与字体 */
body {
  margin: 0;
  padding: 0;
  background: var(--background-gradient);
  color: var(--text-color);
  font-family: var(--font-family);
  line-height: 1.6;
}

/* 固定导航栏 */
.fixed-nav {
  position: fixed;
  top: 0;
  width: 100%;
  height: var(--header-height);
  background-color: rgba(30, 39, 46, 0.9);
  display: flex;
  align-items: center;
  padding: 0 20px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  z-index: 1000;
}

/* 导航栏链接样式 */
.nav-links {
  display: flex;
  gap: 20px;
}

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

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

/* 主容器样式 */
.container {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
  padding: calc(var(--header-height) + 40px) 20px 20px 20px;
  max-width: 1200px;
  margin: 0 auto;
}

/* 主要内容区域 */
.main-content {
  background-color: rgba(30, 39, 46, 0.8);
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

/* 侧边栏样式 */
.sidebar {
  background-color: rgba(30, 39, 46, 0.8);
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

/* 标题样式 */
h2, h3, h4 {
  font-family: 'Roboto', sans-serif;
  color: #FFFFFF;
  margin-top: 20px;
}

h2 {
  font-size: 24px;
  border-bottom: 2px solid var(--accent-orange);
  padding-bottom: 10px;
}

h3 {
  font-size: 20px;
  margin-top: 30px;
}

h4 {
  font-size: 18px;
  margin-top: 25px;
}

/* 段落与列表样式 */
p, li {
  font-size: 16px;
  color: #BDC3C7;
}

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

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

/* 表格样式 */
table {
  width: 100%;
  border-collapse: collapse;
  background-color: #1E272E;
  color: #BDC3C7;
  margin: 20px 0;
}

th, td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid #3B3F51;
}

th {
  background-color: #3B3F51;
  color: #FFFFFF;
}

tr:hover {
  background-color: rgba(255, 165, 0, 0.2);
}

/* 按钮样式 */
.cta-button {
  background: linear-gradient(45deg, var(--accent-orange), #FF8C00);
  border: none;
  color: #FFFFFF;
  padding: 14px 28px;
  font-size: 16px;
  border-radius: 25px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.cta-button:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 15px rgba(255, 165, 0, 0.4);
}

/* 图片样式 */
img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  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 6px 12px rgba(0,0,0,0.2);
}

/* 模块化设计 */
.module-section {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 40px;
}

.module-section > div {
  background-color: rgba(30, 39, 46, 0.85);
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  transition: transform 0.3s ease, opacity 0.3s ease;
  opacity: 0;
  transform: translateY(20px);
}

.module-section > div.visible {
  opacity: 1;
  transform: translateY(0);
}

.module-section > div:hover {
  transform: translateY(-10px);
  opacity: 1;
}

/* 背景数据流动效果 */
.data-flow {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('data-flow.svg') repeat;
  opacity: 0.1;
  animation: moveFlow 20s linear infinite;
}

@keyframes moveFlow {
  from { background-position: 0 0; }
  to { background-position: 1000px 0; }
}

/* 网络节点动画 */
.network-node {
  position: absolute;
  width: 10px;
  height: 10px;
  background-color: var(--accent-orange);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.5); opacity: 0.5; }
  100% { transform: scale(1); opacity: 1; }
}

/* 隐形网格系统 */
.grid-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.grid-item {
  background-color: rgba(30, 39, 46, 0.85);
  padding: 20px;
  border-radius: 8px;
  position: relative;
}

.grid-item::before {
  content: '';
  position: absolute;
  top: 10px;
  left: 10px;
  width: 5px;
  height: 5px;
  background-color: var(--accent-green);
  border-radius: 50%;
  animation: blink 1s infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* 章节导航样式 */
.chapter-navigation {
  position: fixed;
  top: var(--header-height);
  right: 20px;
  background-color: rgba(30, 39, 46, 0.8);
  padding: 15px;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.chapter-navigation ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.chapter-navigation li {
  margin-bottom: 10px;
}

.chapter-navigation a {
  color: #FFFFFF;
  text-decoration: none;
  transition: color 0.3s ease;
}

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

/* 微交互效果 */
.module {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.module.visible {
  opacity: 1;
  transform: translateY(0);
}

/* 响应式设计 */
@media (max-width: 768px) {
  .container {
    grid-template-columns: 1fr;
  }
  
  .chapter-navigation {
    display: none;
  }
}

