
/* 全局样式设置 */
/* 定义颜色变量，遵循70%主色，25%辅色，5%点缀色的配色方案 */
:root {
  --main-color: #001f3f; /* 深蓝色，作为主色调，营造科技感与专业性 */
  --secondary-color: #0074D9; /* 电光蓝，增强层次感 */
  --accent-color: #39FF14; /* 荧光绿，作为点缀色，吸引视觉焦点 */
  --background-gradient: linear-gradient(135deg, #001f3f, #0074D9, #85144b);
  --text-color: #ffffff; /* 白色文字，确保与深色背景的高对比度 */
  --font-primary: 'Roboto', sans-serif; /* 主要字体，现代无衬线字体 */
}

/* 重置默认样式，确保跨浏览器一致性 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* 设置页面背景与基本字体 */
body {
  background: var(--background-gradient);
  color: var(--text-color);
  font-family: var(--font-primary);
  line-height: 1.6;
  padding: 20px;
}

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

.navbar a {
  color: var(--text-color);
  text-decoration: none;
  margin-left: 20px;
  transition: color 0.3s;
}

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

/* 主要内容区域，使用Flexbox布局 */
.main-content {
  display: flex;
  flex-direction: column;
  margin-top: 80px; /* 留出导航栏空间 */
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

/* 文章样式 */
article {
  background-color: rgba(0, 31, 63, 0.8);
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

article h2, article h3 {
  color: var(--accent-color);
  margin-bottom: 15px;
}

article p {
  margin-bottom: 20px;
  font-size: 16px;
}

article pre {
  background-color: #001f3f;
  padding: 15px;
  border-radius: 5px;
  overflow-x: auto;
  margin-bottom: 20px;
}

article code {
  color: #39FF14;
  font-family: 'Courier New', Courier, monospace;
}

/* 图片样式，圆角、阴影与悬浮效果 */
img.decorative {
  width: 100%;
  max-width: 320px;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.3);
  transition: transform 0.3s, box-shadow 0.3s;
  margin: 15px;
}

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

/* 选项卡样式 */
.tabs {
  display: flex;
  border-bottom: 2px solid var(--accent-color);
  margin-bottom: 20px;
}

.tab {
  padding: 15px 25px;
  cursor: pointer;
  transition: color 0.3s, transform 0.3s;
}

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

.tab.active {
  border-bottom: 3px solid var(--accent-color);
  color: var(--accent-color);
}

/* 模块化内容布局，使用Grid系统 */
.module-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}

/* 数据卡片样式 */
.data-card {
  background: rgba(0, 31, 63, 0.9);
  padding: 20px;
  border-radius: 8px;
  transition: transform 0.3s, background-color 0.3s;
}

.data-card:hover {
  transform: translateY(-10px);
  background-color: var(--secondary-color);
}

/* 固定导航栏与面包屑导航 */
.breadcrumb {
  list-style: none;
  display: flex;
  margin-bottom: 20px;
}

.breadcrumb li + li:before {
  content: ">";
  padding: 0 8px;
  color: var(--accent-color);
}

.breadcrumb a {
  color: var(--accent-color);
  text-decoration: none;
}

.breadcrumb a:hover {
  text-decoration: underline;
}

/* 响应式设计，调整布局 */
@media (max-width: 768px) {
  .tabs {
    flex-direction: column;
  }

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

/* 代码示例块样式，与正文内容区分 */
.code-example {
  background-color: #001f3f;
  padding: 20px;
  border-radius: 5px;
  overflow-x: auto;
  margin-bottom: 20px;
}

.code-example code {
  color: #39FF14;
  font-family: 'Courier New', Courier, monospace;
}

/* 提示信息样式，显著位置 */
#design-reference {
  background-color: rgba(57, 255, 20, 0.1);
  padding: 20px;
  border-left: 5px solid var(--accent-color);
  margin-bottom: 30px;
}

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

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

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

/* 折叠内容样式 */
.collapsible {
  background-color: rgba(0, 31, 63, 0.7);
  color: var(--text-color);
  cursor: pointer;
  padding: 18px;
  width: 100%;
  border: none;
  text-align: left;
  outline: none;
  font-size: 16px;
  margin-bottom: 10px;
  border-radius: 5px;
  transition: background-color 0.3s;
}

.active, .collapsible:hover {
  background-color: var(--secondary-color);
}

.content {
  padding: 0 18px;
  display: none;
  overflow: hidden;
  background-color: rgba(0, 31, 63, 0.5);
  border-radius: 5px;
  margin-bottom: 10px;
}


