
/* 全局样式设置 */
/* 定义根变量，便于主题色彩管理 */
:root {
  --primary-color: #1E3A8A; /* 主色调：深蓝色 */
  --secondary-color: #374151; /* 辅色调：深灰色 */
  --accent-orange: #F59E0B; /* 点缀色：橙色 */
  --accent-green: #10B981; /* 点缀色：绿色 */
  --background-color: #f0f4f8; /* 页面背景色 */
  --text-color: #374151; /* 正文字体颜色 */
  --header-height: 80px; /* 导航栏高度 */
  --font-main: 'Open Sans', sans-serif; /* 正文字体 */
  --font-title: 'Roboto', sans-serif; /* 标题字体 */
}

/* 页面背景 */
body {
  margin: 0;
  padding: 0;
  background-color: var(--background-color);
  font-family: var(--font-main);
  color: var(--text-color);
  line-height: 1.6;
}

/* 导航栏样式 */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  height: var(--header-height);
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
  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;
}

.navbar a {
  color: white;
  text-decoration: none;
  margin: 0 15px;
  font-family: var(--font-title);
  font-size: 16px;
  transition: color 0.3s ease;
}

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

/* 主容器 */
.container {
  max-width: 1200px;
  margin: 100px auto 50px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 40px;
}

/* 标题样式 */
h1, h2, h3, h4 {
  font-family: var(--font-title);
  color: var(--primary-color);
}

h1 {
  font-size: 32px;    opacity: 1;
    color: #fff;
}

h2 {
  font-size: 28px;
}

h3 {
  font-size: 24px;
}

h4 {
  font-size: 20px;
}

/* 段落样式 */
p {
  font-size: 16px;
  color: var(--text-color);
}

/* 栅格系统 */
.grid-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
  gap: 20px;
}

.grid-item {
  background-color: white;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  padding: 20px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.grid-item:hover {
  transform: translateY(-10px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

/* 图片样式 */
img {
  width: 100%;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

img:hover {
  transform: scale(1.05);
}

/* 按钮样式 */
.button {
  background-color: var(--accent-green);
  color: white;
  padding: 12px 24px;
  border: none;
  border-radius: 25px;
  cursor: pointer;
  font-family: var(--font-title);
  transition: background-color 0.3s ease, transform 0.3s ease;
  text-decoration: none;
}

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

/* 代码块样式 */
pre {
  background-color: #f3f4f6;
  padding: 20px;
  border-radius: 8px;
  overflow: auto;
}

pre code {
  font-family: 'Courier New', Courier, monospace;
  color: #1E3A8A;
  position: relative;
}

pre code::before {
  content: "代码示例";
  position: absolute;
  top: -20px;
  left: 0;
  font-size: 14px;
  color: #374151;
}

/* 响应式设计 */
@media (max-width: 768px) {
  h1 {
    font-size: 28px;
  }
  h2 {
    font-size: 24px;
  }
  h3 {
    font-size: 20px;
  }
  h4 {
    font-size: 18px;
  }
}

@media (max-width: 480px) {
  .navbar {
    flex-direction: column;
    height: auto;
    padding: 10px;
  }
  .container {
    margin: 150px auto 30px;
    padding: 10px;
  }
}

/* 动态背景 */
.header {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  padding: 60px 0;
  text-align: center;
  position: relative;
  animation: backgroundFade 15s ease infinite;
}

@keyframes backgroundFade {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* 文字动画 */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.header h1 {
  animation: fadeInUp 2s ease forwards;
  opacity: 0;
}

/* 滚动动画 */
.scroll-animate {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.scroll-animate.visible {
  opacity: 1;
  transform: translateY(0);
}

/* 客服按钮 */
.chat-button {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background-color: var(--accent-green);
  color: white;
  border: none;
  border-radius: 50%;
  width: 60px;
  height: 60px;
  font-size: 1.5em;
  cursor: pointer;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: background-color 0.3s ease, transform 0.3s ease;
}

.chat-button:hover {
  background-color: var(--accent-orange);
  transform: rotate(360deg);
}

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

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

/* 提示信息样式 */
.notice {
  text-align: center;
  font-size: 18px;
  color: var(--secondary-color);
  margin: 20px 0;
}

/* 折叠区域样式 */
.collapsible {
  background-color: white;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 15px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.collapsible:hover {
  background-color: #f9fafb;
}

.content {
  display: none;
  padding: 10px 0;
}

.content.show {
  display: block;
}

/* 点缀线条 */
.decorative-line {
  width: 100%;
  height: 2px;
  background: linear-gradient(to right, var(--primary-color), var(--accent-orange));
  margin: 20px 0;
}

/* 表单隐藏 */
form {
  display: none;
}

/* 无水平滚动条 */
html, body {
  overflow-x: hidden;
}

