
/* 基础样式设置 */
body {
  margin: 0;
  padding: 0;
  font-family: 'Montserrat', sans-serif; /* 采用无衬线字体，提升现代感 */
  color: #FFFFFF;
  background: linear-gradient(135deg, #0D47A1, #42A5F5); /* 主背景渐变，深蓝到亮蓝 */
  overflow-x: hidden; /* 禁止水平滚动 */
}

/* 导航栏样式 */
.navbar {
  background: linear-gradient(to right, #1E3C72, #2A5298); /* 渐变背景 */
  position: fixed;
  top: 0;
  width: 100%;
  padding: 15px 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); /* 轻微阴影，增加层次感 */
  transition: background 0.5s ease;
}

.navbar:hover {
  background: linear-gradient(to right, #2A5298, #1E3C72); /* 悬浮时颜色反转 */
}

.navbar a {
  color: #FFFFFF;
  text-decoration: none;
  margin: 0 15px;
  font-size: 16px;
  transition: color 0.3s ease;
  rel="nofollow";
}

.navbar a:hover {
  color: #FFD54F; /* 点缀色，橙色 */
}

/* 主内容区块样式 */
.section {
  min-width: 500px; /* 确保每个板块宽度不小于500px */
  padding: 100px 50px; /* 上下预留导航栏空间 */
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.section:nth-child(odd) {
  background: linear-gradient(120deg, #2980B9, #6DD5FA); /* 奇数板块渐变背景 */
}

.section:nth-child(even) {
  background: linear-gradient(120deg, #8E2DE2, #4A00E0); /* 偶数板块渐变背景 */
}

/* 标题样式 */
h2, h3, h4 {
  font-family: 'Roboto', sans-serif; /* 采用Roboto字体 */
  color: #FFFFFF;
}

h2 {
  font-size: 24px;
  margin-bottom: 20px;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.3); /* 文字阴影，提升可读性 */
}

h3 {
  font-size: 20px;
  margin-bottom: 15px;
}

h4 {
  font-size: 18px;
  margin-bottom: 10px;
}

/* 段落样式 */
p {
  font-size: 16px;
  line-height: 1.6;
  max-width: 800px;
  margin-bottom: 20px;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
}

/* 按钮样式 */
.button {
  background-color: #FFA726; /* 橙色作为强调色 */
  border: none;
  padding: 10px 20px;
  border-radius: 25px;
  color: #fff;
  cursor: pointer;
  font-size: 16px;
  transition: background-color 0.3s ease, transform 0.3s ease;
}

.button:hover {
  background-color: #FB8C00; /* 悬浮时颜色加深 */
  transform: scale(1.05);
}

/* 图片样式 */
img {
  width: 320px;
  height: 320px;
  object-fit: cover;
  border-radius: 15px; /* 圆角效果 */
  box-shadow: 0 4px 8px rgba(0,0,0,0.2); /* 阴影效果 */
  margin: 20px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

img:hover {
  transform: scale(1.05); /* 悬浮时放大 */
  box-shadow: 0 8px 16px rgba(0,0,0,0.3);
}

/* 代码块样式 */
pre code {
  background: rgba(0, 0, 0, 0.7);
  padding: 15px;
  border-radius: 8px;
  display: block;
  overflow-x: auto;
  font-size: 14px;
  line-height: 1.5;
  color: #FFD54F; /* 代码颜色与点缀色一致 */
  position: relative;
}

pre code::before {
  content: "CSS3 示例代码";
  display: block;
  background: #2A5298;
  color: #FFFFFF;
  padding: 5px 10px;
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
  font-size: 12px;
  position: absolute;
  top: -25px;
  left: 0;
}

/* 响应式设计 */
@media (max-width: 1200px) {
  .section {
    padding: 80px 30px;
  }

  img {
    width: 280px;
    height: 280px;
  }
}

@media (max-width: 768px) {
  .navbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .navbar a {
    margin: 10px 0;
    font-size: 18px;
  }

  .section {
    padding: 60px 20px;
  }

  img {
    width: 240px;
    height: 240px;
  }

  h2 {
    font-size: 22px;
  }

  h3 {
    font-size: 18px;
  }

  p {
    font-size: 15px;
  }
}

/* 底部信息区样式 */
.footer {
  background: rgba(0, 0, 0, 0.8);
  padding: 40px 20px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-around;
  color: #fff;
}

.footer .data-stream {
  flex: 1 1 300px;
  margin: 10px;
}

.footer .data-stream h4 {
  margin-bottom: 15px;
  font-size: 18px;
  border-bottom: 2px solid #FFD54F;
  display: inline-block;
}

.footer .data-stream p {
  font-size: 16px;
  animation: fadeIn 2s ease-in-out infinite;
}

@keyframes fadeIn {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

/* 社区互动功能样式 */
.community {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px;
}

.community .forum, .community .blog {
  background: rgba(255, 255, 255, 0.1);
  width: 80%;
  max-width: 800px;
  margin: 10px 0;
  padding: 20px;
  border-radius: 10px;
  transition: transform 0.3s ease, background 0.3s ease;
}

.community .forum:hover, .community .blog:hover {
  transform: translateY(-10px);
  background: rgba(255, 255, 255, 0.2);
}

.community h4 {
  margin-bottom: 10px;
  color: #FFD54F;
}

.community p {
  font-size: 14px;
}

/* 图标样式 */
.icon, .icon-set .icon {
  width: 50px;
  height: 50px;
  background: linear-gradient(45deg, #FF6F61, #DE5252);
  mask: url('icon.svg') no-repeat center / contain;
  -webkit-mask: url('icon.svg') no-repeat center / contain;
  transition: transform 0.3s ease, background 0.3s ease;
}

.icon:hover, .icon-set .icon:hover {
  transform: rotate(10deg) scale(1.1);
  background: linear-gradient(45deg, #FF8A65, #FF7043);
}

.svg-container {
  width: 100%;
  height: 400px;
  position: relative;
}

.svg-container svg {
  width: 100%;
  height: 100%;
}

/* 视差滚动样式 */
.parallax {
  background-image: url('https://images.gptkong.com/demo/sample5.png');
  height: 500px;
  background-attachment: fixed;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  transform: translateZ(0);
  will-change: transform;
}

.content {
  height: 500px;
  background-color: rgba(255, 255, 255, 0.8);
  padding: 50px;
  text-align: center;
}

/* 数据仪表盘区样式 */
.dashboard {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.dashboard-item {
  background: rgba(255, 255, 255, 0.1);
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

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

.collapsible:hover {
  background-color: #1E3C72;
}

.content-collapsible {
  padding: 0 18px;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.2s ease-out;
  background-color: #f1f1f1;
}

