
/* 全局样式 */
body {
  /* 使用线性渐变作为背景，营造丰富的色彩层次 */
  background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
  font-family: 'Helvetica', sans-serif; /* 设置全局字体 */
  margin: 0;
  padding: 0;
  color: #333;
  /* 使用flex布局确保内容居中 */
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* 导航栏样式 */
.navbar {
  position: fixed; /* 固定在顶部 */
  top: 0;
  width: 100%;
  background: rgba(255, 255, 255, 0.8); /* 半透明背景 */
  backdrop-filter: blur(10px); /* 背景模糊滤镜 */
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 20px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); /* 轻微阴影 */
  z-index: 1000; /* 确保导航栏在最上层 */
}

/* 导航菜单样式 */
.navbar .menu {
  display: flex;
  gap: 15px;
}

.navbar .menu a {
  text-decoration: none;
  color: #333;
  font-weight: bold;
  transition: color 0.3s ease;
}

.navbar .menu a:hover {
  color: #007BFF; /* 悬停时颜色变化 */
}

/* 主要内容容器 */
.container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(500px, 1fr)); /* 确保每个板块宽度不小于500px */
  gap: 40px;
  padding: 100px 20px 40px 20px; /* 上方预留导航栏空间 */
}

/* 文章样式 */
article {
  background: rgba(255, 255, 255, 0.2); /* 半透明背景 */
  border-radius: 15px;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 20px;
}

/* 头部标题样式 */
h2, h3, h4 {
  font-family: 'Roboto', sans-serif;
  font-weight: bold;
  color: #333;
  margin-top: 20px;
}

/* 段落样式 */
p {
  font-size: 16px;
  line-height: 1.6;
  color: #555;
}

/* 代码块样式 */
pre code {
  display: block;
  padding: 15px;
  background: #2d2d2d;
  color: #f8f8f2;
  border-radius: 8px;
  overflow: auto; /* 确保代码内容不溢出 */
  position: relative;
  margin: 20px 0;
}

/* 代码块标题 */
pre code::before {
  content: "代码示例";
  display: block;
  background: #4CAF50;
  color: #fff;
  padding: 5px 10px;
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
  font-size: 14px;
  position: sticky;
  top: 0;
}

/* 按钮样式 */
.button {
  background-color: #4CAF50;
  border: none;
  color: white;
  padding: 15px 32px;
  text-align: center;
  text-decoration: none;
  display: inline-block;
  font-size: 16px;
  margin: 4px 2px;
  transition: background-color 0.3s ease, transform 0.3s ease;
  border-radius: 8px;
  cursor: pointer;
}

.button:hover {
  background-color: #45a049;
  transform: scale(1.05);
}

/* 图片装饰样式 */
.decorative-image {
  width: 100%;
  max-width: 320px;
  border-radius: 15px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

/* 底部样式 */
.footer {
  background: #333;
  color: #fff;
  padding: 40px 20px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
}

.footer .contact-form,
.footer .online-chat {
  flex: 1;
  min-width: 300px;
  margin: 10px;
}

.footer .contact-form input,
.footer .contact-form textarea {
  width: 100%;
  padding: 10px;
  margin: 5px 0;
  border: none;
  border-radius: 5px;
}

.footer .contact-form button {
  background: #4CAF50;
  color: #fff;
  padding: 10px 20px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: background 0.3s ease;
}

.footer .contact-form button:hover {
  background: #45a049;
}

.footer .online-chat a {
  background: #007BFF;
  color: #fff;
  padding: 15px;
  border-radius: 50%;
  font-size: 24px;
  text-decoration: none;
  transition: background 0.3s ease;
}

.footer .online-chat a:hover {
  background: #0056b3;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .navbar .menu {
    flex-direction: column;
    align-items: center;
  }

  .container {
    grid-template-columns: 1fr;
    padding: 100px 10px 20px 10px;
  }

  .footer {
    flex-direction: column;
    align-items: center;
  }

  .footer .contact-form,
  .footer .online-chat {
    margin: 20px 0;
  }
}

/* 视觉引导区样式 */
.hero-section {
  position: relative;
  height: 300px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 15px;
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.hero-section h1 {
  font-size: 36px;
  color: #333;
  animation: fadeIn 2s ease-in-out;
}

/* 渐变动画 */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* 折叠区域样式 */
.collapsible {
  background-color: #f1f1f1;
  color: #333;
  cursor: pointer;
  padding: 18px;
  width: 100%;
  border: none;
  text-align: left;
  outline: none;
  font-size: 18px;
  border-radius: 5px;
  transition: background-color 0.3s ease;
}

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

.content {
  padding: 0 18px;
  display: none;
  overflow: hidden;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 5px;
}

.content p {
  margin: 15px 0;
}

/* 提示信息样式 */
.notice {
  background: #ffeb3b;
  color: #333;
  padding: 20px;
  border-radius: 8px;
  text-align: center;
  font-size: 18px;
  margin: 20px 0;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

