
/* 全局样式设置 */
/* 设置网页的整体背景，采用线性渐变色，营造科技感与现代感 */
body {
  margin: 0;
  padding: 0;
  font-family: 'Roboto', sans-serif; /* 使用Roboto字体，提升可读性与现代感 */
  font-size: 16px;
  line-height: 1.6;
  background: linear-gradient(135deg, #0f2027, #203a43, #2c5364); /* 渐变背景色 */
  color: #ffffff; /* 文本颜色设置为白色，确保与背景对比度 */
  overflow-x: hidden; /* 禁止水平滚动 */
}

/* 导航栏样式 */
.navbar {
  position: fixed; /* 固定导航栏在顶部 */
  top: 0;
  width: 100%;
  height: 60px;
  background: rgba(255, 255, 255, 0.2); /* 半透明背景 */
  backdrop-filter: blur(10px); /* 磨砂玻璃效果 */
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); /* 阴影效果，增加层次感 */
  z-index: 1000; /* 确保导航栏在最前 */
}

/* 导航链接样式 */
.nav-links a {
  color: #ffffff;
  text-decoration: none;
  margin: 0 15px;
  font-size: 16px;
  transition: color 0.3s ease, transform 0.3s ease; /* 平滑过渡效果 */
}

.nav-links a:hover {
  color: #ff9800; /* 悬停时颜色变化 */
  transform: scale(1.05); /* 悬停时略微放大 */
}

/* 主要内容区域 */
.container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); /* 响应式网格布局 */
  gap: 20px;
  padding: 100px 20px 40px 20px; /* 上方留出导航栏空间 */
  max-width: 1200px;
  margin: 0 auto;
}

/* 文章内容样式 */
article {
  background: rgba(0, 0, 0, 0.5); /* 半透明背景 */
  padding: 40px;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); /* 阴影效果 */
}

/* 文章标题样式 */
article h2 {
  font-size: 2.5em;
  background: linear-gradient(45deg, #ff9800, #e68900); /* 渐变文字效果 */
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 20px;
}

/* 文章副标题样式 */
article h3 {
  font-size: 2em;
  color: #ff9800; /* 副标题颜色突出 */
  margin-top: 30px;
  margin-bottom: 15px;
}

/* 文章段落样式 */
article p {
  font-size: 1em;
  color: #d1d1d1;
  margin-bottom: 20px;
}

/* 代码块样式 */
pre code {
  display: block;
  padding: 20px;
  background: rgba(255, 255, 255, 0.1); /* 半透明背景 */
  border-radius: 8px;
  overflow: auto;
  position: relative;
  font-family: 'Courier New', Courier, monospace;
}

/* 为代码块添加标题 */
pre code::before {
  content: "代码示例";
  display: block;
  background: #ff9800;
  color: #ffffff;
  padding: 5px 10px;
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
  font-weight: bold;
  position: absolute;
  top: 0;
  left: 0;
}

/* 确保代码块内容不被遮挡 */
pre code {
  padding-top: 30px;
  overflow: visible;
}

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

table th, table td {
  border: 1px solid #ffffff;
  padding: 10px;
  text-align: left;
  font-size: 0.9em;
}

/* 图片样式 */
img.decorative {
  width: 100%;
  max-width: 320px;
  border-radius: 12px; /* 圆角效果 */
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3); /* 阴影效果 */
  transition: transform 0.3s ease, box-shadow 0.3s ease; /* 平滑过渡 */
}

img.decorative:hover {
  transform: scale(1.05); /* 悬停时略微放大 */
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.5); /* 阴影加深 */
}

/* 响应式设计 */
/* 针对屏幕宽度小于768px的设备进行调整 */
@media (max-width: 768px) {
  .navbar {
    flex-direction: column;
    height: auto;
    padding: 10px;
  }

  .nav-links {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .nav-links a {
    margin: 10px 0;
  }

  .container {
    padding: 120px 10px 20px 10px; /* 适当调整内边距 */
  }

  article {
    padding: 20px;
  }

  pre code::before {
    font-size: 0.8em;
  }
}

/* 折叠区域样式 */
.collapsible {
  background-color: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  cursor: pointer;
  padding: 10px 20px;
  width: 100%;
  border: none;
  text-align: left;
  outline: none;
  font-size: 1em;
  transition: background 0.3s ease;
  border-radius: 4px;
  margin-bottom: 10px;
}

.collapsible:hover {
  background: rgba(255, 152, 0, 0.2);
}

.content {
  padding: 0 20px;
  display: none;
  overflow: hidden;
  background-color: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
}

.content p {
  margin: 10px 0;
}

/* 提示文字样式 */
.prompt-text {
  text-align: center;
  font-size: 1.2em;
  margin: 40px 0;
  color: #ff9800;
}

/* 引导区样式 */
.intro-section {
  padding: 60px 20px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  margin-bottom: 40px;
  text-align: center;
}

.intro-section h1 {
  font-size: 2.5em;
  background: linear-gradient(45deg, #ff9800, #e68900);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 20px;
}

.intro-section p {
  font-size: 1.2em;
  color: #d1d1d1;
}

/* 图文并茂布局 */
.image-text {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 30px;
}

.image-text img {
  flex: 1 1 300px;
  margin-right: 20px;
}

.image-text div {
  flex: 2 1 500px;
}

/* 动态背景样式 */
.dynamic-bg {
  position: absolute;
  width: 200%;
  height: 200%;
  background: url('https://images.gptkong.com/demo/sample3.png') repeat;
  animation: moveBackground 20s linear infinite;
  opacity: 0.3;
  top: -50%;
  left: -50%;
}

/* 动画关键帧 */
@keyframes moveBackground {
  0% {
    transform: translate(0, 0);
  }
  50% {
    transform: translate(-50px, 50px);
  }
  100% {
    transform: translate(0, 0);
  }
}

/* 按钮样式 */
.button {
  background: #ff9800;
  color: #ffffff;
  padding: 10px 20px;
  border: none;
  border-radius: 4px;
  transition: transform 0.3s ease, background 0.3s ease;
  cursor: pointer;
  font-size: 1em;
}

.button:hover {
  transform: scale(1.05);
  background: #e68900;
}

/* 互动数据可视化模块样式 */
.chart-container {
  position: relative;
  width: 100%;
  height: 400px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 20px;
  backdrop-filter: blur(5px);
}

/* 联系我们提示 */
.contact-prompt {
  text-align: center;
  margin-top: 40px;
  font-size: 1.2em;
  color: #ff9800;
}

