
/* 
整体页面样式设置，采用深色调为主，提升科技感与沉稳感
使用CSS变量管理色彩，方便主题切换
主色调为深蓝灰#1E1E2F，辅色为电光蓝#0ABDE3和霓虹绿#39FF14，点缀色为亮橙色#FF5733
定义基础字体为Roboto，确保文字清晰易读
*/

/* 定义CSS变量 */
:root {
  --background-color: #1E1E2F; /* 主背景色 */
  --primary-color: #0ABDE3;     /* 主色调 */
  --accent-color: #39FF14;      /* 辅助色调 */
  --highlight-color: #FF5733;   /* 点缀色 */
  --text-color: #FFFFFF;        /* 文字颜色 */
  --font-family: 'Roboto', sans-serif; /* 基础字体 */
}

/* 页面整体样式 */
body {
  margin: 0;
  padding: 0;
  background-color: var(--background-color);
  color: var(--text-color);
  font-family: var(--font-family);
  line-height: 1.6;
  transition: background-color 0.3s, color 0.3s;
}

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

.navbar a {
  color: var(--text-color);
  text-decoration: none;
  margin: 0 15px;
  font-weight: 600;
  transition: color 0.3s;
}

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

/* 主要容器样式 */
.container {
  max-width: 1200px;
  margin: 100px auto 50px; /* 顶部留出导航栏空间 */
  padding: 20px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

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

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

/* 标题样式 */
h1, h2, h3, h4 {
  color: var(--primary-color);
  margin-bottom: 15px;
}

h1 {
  font-size: 2.5em;
  text-align: center;
  margin-top: 50px;
}

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

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

h4 {
  font-size: 1.5em;
  margin-top: 20px;
}

/* 段落样式 */
p {
  font-size: 16px;
  margin-bottom: 15px;
}

/* 强调文字 */
strong {
  color: var(--accent-color);
}

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

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

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

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

/* 代码块样式 */
pre {
  background-color: #2E2E3D;
  padding: 15px;
  border-radius: 8px;
  overflow-x: auto;
  font-family: 'Courier New', Courier, monospace;
  margin-bottom: 20px;
}

code {
  color: #39FF14;
  font-size: 14px;
}

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

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

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

tr:hover {
  background-color: #33334D;
}

/* 背景动态效果 */
.background {
  position: relative;
  width: 100%;
  height: 400px;
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  animation: backgroundAnimation 10s infinite alternate;
  border-radius: 10px;
  margin-bottom: 30px;
}

@keyframes backgroundAnimation {
  0% {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  }
  100% {
    background: linear-gradient(225deg, var(--accent-color), var(--primary-color));
  }
}

/* 按钮样式 */
.button {
  background-color: var(--primary-color);
  color: var(--text-color);
  padding: 10px 20px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s, transform 0.3s;
  font-size: 16px;
}

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

/* 交互部分：AI助手 */
.ai-assistant {
  position: fixed;
  bottom: 80px;
  right: 20px;
  width: 60px;
  height: 60px;
  background-color: var(--primary-color);
  border-radius: 50%;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
  cursor: pointer;
  transition: transform 0.3s;
}

.ai-assistant:hover {
  transform: scale(1.1);
}

/* 反馈区域样式 */
.feedback {
  position: fixed;
  bottom: 150px;
  right: 20px;
  background-color: #2E2E3D;
  color: var(--text-color);
  padding: 15px;
  border-radius: 8px;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s, transform 0.5s;
}

.feedback.active {
  opacity: 1;
  transform: translateY(0);
}

/* 折叠区域样式 */
.details {
  margin: 20px 0;
}

.details summary {
  cursor: pointer;
  font-weight: bold;
  color: var(--primary-color);
}

.details[open] summary {
  color: var(--accent-color);
}

/* 响应式调整 */
@media (max-width: 768px) {
  .navbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .container {
    grid-template-columns: 1fr;
  }
}

/* 章节导航样式 */
.chapter-navigation {
  position: fixed;
  top: 70px;
  right: 20px;
  background-color: #121212;
  padding: 15px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.chapter-navigation a {
  display: block;
  color: var(--text-color);
  margin: 10px 0;
  text-decoration: none;
  transition: color 0.3s;
}

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


