
/* 主体背景渐变，从深蓝到浅紫，营造科技感 */
body {
  margin: 0;
  padding: 0;
  background: linear-gradient(135deg, #0D47A1, #8E24AA);
  font-family: 'Roboto', sans-serif;
  color: #FFFFFF;
}

/* 全局盒模型设置，统一元素的盒子模型 */
*, *::before, *::after {
  box-sizing: border-box;
}

/* 固定导航栏，顶部固定，使用半透明背景 */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  background: rgba(13, 71, 161, 0.8);
  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);
}

/* 导航链接样式，去除下划线，添加悬停效果 */
.navbar a {
  color: #FFFFFF;
  text-decoration: none;
  margin: 0 15px;
  font-size: 16px;
  transition: color 0.3s ease;
}

.navbar a:hover {
  color: #FFD700;
}

/* 主容器，设置上边距以避开固定导航栏 */
.container {
  max-width: 1200px;
  margin: 100px auto 50px;
  padding: 0 20px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 40px;
}

/* 各个模块的基本样式，使用卡片式布局 */
.section {
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 15px;
  padding: 30px;
  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: 24px;
  margin-bottom: 20px;
  background: linear-gradient(45deg, #FFD700, #FF8C00);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* 段落文字样式，适中的行高和字体大小 */
.section p {
  font-size: 16px;
  line-height: 1.6;
  margin-bottom: 20px;
}

/* 图片样式，圆角、阴影和悬停放大效果 */
.section img {
  width: 100%;
  border-radius: 10px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

/* 表格样式，透明背景，边框和文字对齐 */
table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
}

table th, table td {
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 10px;
  text-align: center;
}

table th {
  background-color: rgba(13, 71, 161, 0.6);
  font-size: 18px;
}

table td {
  font-size: 16px;
}

/* 代码块样式，背景半透明，圆角，内边距，等宽字体 */
pre {
  background-color: rgba(0, 0, 0, 0.6);
  padding: 15px;
  border-radius: 10px;
  overflow-x: auto;
  margin: 20px 0;
}

code {
  font-family: 'Courier New', Courier, monospace;
  color: #FFD700;
  display: block;
}

/* 按钮样式，渐变背景，圆角，悬停变色和放大 */
.button {
  background: linear-gradient(45deg, #0D47A1, #8E24AA);
  border: none;
  border-radius: 25px;
  color: #FFFFFF;
  padding: 12px 30px;
  font-size: 16px;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.2s ease;
}

.button:hover {
  background: linear-gradient(45deg, #8E24AA, #0D47A1);
  transform: scale(1.05);
}

/* 渐变线条作为视觉分隔符 */
.separator {
  height: 4px;
  background: linear-gradient(90deg, #FFD700, #FF8C00);
  border-radius: 2px;
  margin: 40px 0;
}

/* 章节导航栏样式，侧边固定，滚动时保持可见 */
.sidebar {
  position: fixed;
  top: 80px;
  left: 20px;
  width: 200px;
}

.sidebar a {
  display: block;
  color: #FFFFFF;
  text-decoration: none;
  margin: 10px 0;
  font-size: 16px;
  transition: color 0.3s ease;
}

.sidebar a:hover {
  color: #FFD700;
}

/* 响应式设计：小于768px时隐藏侧边导航，调整主容器布局 */
@media (max-width: 768px) {
  .sidebar {
    display: none;
  }
  
  .container {
    grid-template-columns: 1fr;
  }
}

/* 渐显动画 */
.fade-in {
  opacity: 0;
  animation: fadeInAnimation 1s forwards;
}

@keyframes fadeInAnimation {
  to {
    opacity: 1;
  }
}

/* 代码示例的特殊样式，与文章内容区分开 */
.code-snippet {
  background-color: rgba(0, 0, 0, 0.7);
  padding: 20px;
  border-radius: 10px;
  font-family: 'Courier New', Courier, monospace;
  color: #00FF00;
  overflow-x: auto;
}

/* 搜索框样式，圆角和内边距 */
.search-box {
  width: 100%;
  padding: 10px 15px;
  border: none;
  border-radius: 25px;
  margin-bottom: 20px;
  font-size: 16px;
}

.search-box:focus {
  outline: none;
  box-shadow: 0 0 5px #FFD700;
}

/* 用户仪表盘模块样式 */
.dashboard {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 15px;
  padding: 25px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

/* AI助手聊天框样式 */
.ai-assistant {
  background: rgba(0, 0, 0, 0.5);
  border-radius: 10px;
  padding: 15px;
  margin-top: 20px;
  font-size: 16px;
}

/* 社区互动区样式，卡片式布局 */
.community {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

