
/* 全局变量定义 */
:root {
  --primary-color: #1E3A8A; /* 主色调：深蓝色 */
  --secondary-color: #E5E7EB; /* 辅助色：银灰色 */
  --accent-color: #F97316; /* 点缀色：橙色 */
  --success-color: #10B981; /* 成功色：绿色 */
  --danger-color: #EF4444; /* 危险色：红色 */
}

/* 全局样式 */
body {
  margin: 0;
  padding: 0;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  font-family: 'Roboto', sans-serif;
  color: #333;
  line-height: 1.6;
  overflow-x: hidden;
}

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

.navbar .logo {
  font-size: 1.5em;
  font-weight: bold;
}

.navbar .nav-links {
  display: flex;
  gap: 20px;
}

.navbar .nav-links a {
  color: #fff;
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 4px;
  transition: background 0.3s ease;
}

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

/* 主要内容区 */
.main-content {
  padding: 100px 20px 60px 20px;
  max-width: 1200px;
  margin: 0 auto;
}

/* 章节导航系统 */
.section-nav {
  position: fixed;
  top: 80px;
  right: 20px;
  background: rgba(245, 245, 245, 0.9);
  padding: 15px;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.section-nav h3 {
  margin-top: 0;
  font-size: 1.2em;
  color: var(--primary-color);
}

.section-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.section-nav ul li {
  margin-bottom: 10px;
}

.section-nav ul li a {
  text-decoration: none;
  color: #333;
  transition: color 0.3s ease;
}

.section-nav ul li a:hover {
  color: var(--accent-color);
}

/* 文章内容 */
article h2 {
  font-size: 2em;
  color: var(--primary-color);
  margin-bottom: 20px;
  text-align: center;
}

article section {
  margin-bottom: 40px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 10px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

article section h3 {
  font-size: 1.6em;
  color: var(--primary-color);
  margin-bottom: 15px;
}

article section p {
  font-size: 1em;
  color: #333;
  margin-bottom: 15px;
}

/* 代码块样式 */
article pre {
  background: #f5f5f5;
  padding: 15px;
  border-left: 5px solid var(--accent-color);
  border-radius: 5px;
  overflow-x: auto;
  margin-bottom: 15px;
}

article pre code {
  font-family: 'Courier New', Courier, monospace;
  color: #2d2d2d;
}

/* 图片样式 */
.article-image {
  width: 100%;
  max-width: 320px;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  margin: 20px auto;
  display: block;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.article-image:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 12px rgba(0,0,0,0.2);
}

/* 提示信息样式 */
.prompt-message {
  text-align: center;
  font-size: 1.2em;
  color: var(--accent-color);
  margin-bottom: 40px;
  padding: 10px;
  border: 2px dashed var(--accent-color);
  border-radius: 5px;
}

/* 底部区域 */
.footer {
  background: rgba(30, 58, 138, 0.9);
  color: #fff;
  padding: 40px 20px;
  text-align: center;
}

.footer p {
  margin: 0;
  font-size: 1em;
}

/* 响应式设计 */
@media (max-width: 1200px) {
  .section-nav {
    display: none;
  }
}

@media (max-width: 768px) {
  .navbar .nav-links {
    display: none;
  }
  
  .navbar .menu-toggle {
    display: block;
    cursor: pointer;
    font-size: 1.5em;
  }
  
  .navbar .nav-links.mobile {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 60px;
    right: 20px;
    background: rgba(30, 58, 138, 0.95);
    padding: 20px;
    border-radius: 8px;
  }
  
  .main-content {
    padding: 80px 10px 40px 10px;
  }
  
  article section {
    padding: 15px;
  }
  
  .article-image {
    max-width: 100%;
  }
}

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

body {
  animation: fadeIn 1s ease-in;
}

/* 按钮样式 */
.btn-primary {
  background: linear-gradient(45deg, var(--accent-color), var(--success-color));
  border: none;
  color: #fff;
  padding: 10px 20px;
  border-radius: 25px;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.3s ease;
  text-decoration: none;
  display: inline-block;
}

.btn-primary:hover {
  background: linear-gradient(45deg, var(--success-color), var(--accent-color));
  transform: scale(1.05);
}

/* 链接样式 */
a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

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

/* 卡片样式 */
.card {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  padding: 20px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-10px);
  box-shadow: 0 8px 16px rgba(0,0,0,0.2);
}

/* 动态背景线条 */
.background-lines {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('https://images.gptkong.com/demo/sample1.png') repeat;
  animation: moveLines 20s linear infinite;
  opacity: 0.1;
  z-index: -1;
}

/* 动画关键帧 */
@keyframes moveLines {
  from {
    background-position: 0 0;
  }
  to {
    background-position: 1000px 0;
  }
}

/* 提示信息动画 */
.prompt-message {
  animation: fadeIn 2s ease-in;
}

/* CSS3 示例代码块样式 */
.css-example {
  background: #f0f0f0;
  padding: 15px;
  border-left: 5px solid var(--success-color);
  border-radius: 5px;
  font-family: 'Courier New', Courier, monospace;
  margin-bottom: 20px;
}

/* 按需添加更多样式以满足设计需求 */

