
/* 
整体样式表：此样式表旨在营造一个融合未来感与高级质感的图文并茂网页。采用深蓝色和银灰色为主色调，辅以亮紫色和蓝绿色的渐变，营造冷酷而梦幻的科技氛围。通过Flexbox和Grid布局实现响应式设计，确保在各种设备上均能良好展示。
*/

/* 基础样式设置 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Roboto', sans-serif; /* 使用现代无衬线字体 */
  background: linear-gradient(135deg, #0a1d37, #1f2a44); /* 深蓝色渐变背景 */
  color: #ffffff;
  line-height: 1.6;
}

/* 导航栏样式 */
.navbar {
  position: fixed; /* 固定在顶部 */
  top: 0;
  width: 100%;
  background: rgba(10, 29, 55, 0.9); /* 半透明深蓝色背景 */
  padding: 20px;
  z-index: 1000; /* 保证在最上层 */
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5); /* 阴影效果 */
}

.navbar ul {
  list-style: none;
  display: flex;
  justify-content: space-around;
  align-items: center;
}

.navbar li {
  position: relative;
}

.navbar a {
  color: #ffffff;
  text-decoration: none;
  font-size: 16px;
  transition: color 0.3s ease;
}

.navbar a:hover {
  color: #4a00e0; /* 悬停时颜色变化 */
}

.navbar li ul {
  display: none; /* 默认隐藏下拉菜单 */
  position: absolute;
  top: 100%;
  left: 0;
  background: rgba(31, 42, 68, 0.95);
  padding: 10px;
  border-radius: 5px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.navbar li:hover ul {
  display: block; /* 悬停时显示下拉菜单 */
  animation: dropdown 0.3s ease-out forwards;
}

@keyframes dropdown {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Hero区样式 */
.hero {
  height: 100vh;
  background: url('https://images.gptkong.com/demo/sample1.png') no-repeat center center / cover;
  perspective: 1000px;
  overflow: hidden;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero::after {
  content: "这是一个网页样式设计参考"; /* 显著提示 */
  position: absolute;
  bottom: 50px;
  font-size: 24px;
  color: #ffffff;
  animation: fadeInText 2s ease-out forwards;
}

@keyframes fadeInText {
  from { opacity: 0; }
  to { opacity: 1; }
}

.particles {
  position: absolute;
  width: 100%;
  height: 100%;
  background: transparent;
  pointer-events: none;
}

.particles::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 2000px;
  background: rgba(255, 255, 255, 0.1) url('https://images.gptkong.com/demo/sample2.png') repeat;
  animation: moveParticles 60s linear infinite;
}

@keyframes moveParticles {
  from { transform: translateY(0); }
  to { transform: translateY(-1000px); }
}

/* 主要内容区样式 */
.main-content {
  padding: 100px 40px 40px 40px; /* 顶部预留导航栏空间 */
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.card {
  background: rgba(255, 255, 255, 0.1); /* 半透明卡片背景 */
  border-radius: 10px;
  backdrop-filter: blur(10px);
  padding: 20px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-10px);
  box-shadow: 0 4px 25px rgba(0, 0, 0, 0.3);
}

.card img {
  max-width: 100%;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease;
}

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

.card h3 {
  margin-top: 15px;
  font-size: 18px;
  color: #e02de2; /* 亮紫色标题 */
  animation: fadeIn 1s ease-out both;
}

.card p {
  margin-top: 10px;
  font-size: 16px;
  color: #ffffff;
}

/* 代码块样式 */
code, pre {
  background: rgba(0, 0, 0, 0.7);
  color: #00ffea;
  padding: 10px;
  border-radius: 5px;
  font-family: 'Courier New', Courier, monospace;
}

pre {
  overflow-x: auto;
  margin-top: 10px;
}

/* 折叠内容样式 */
.collapsible {
  background-color: rgba(74, 0, 224, 0.8);
  color: #ffffff;
  cursor: pointer;
  padding: 10px;
  width: 100%;
  border: none;
  text-align: left;
  outline: none;
  font-size: 16px;
  margin-top: 10px;
  border-radius: 5px;
  transition: background 0.3s ease;
}

.collapsible:hover {
  background-color: #4a00e0;
}

.collapsible:after {
  content: '\002B'; /* 加号 */
  float: right;
}

.collapsible.active:after {
  content: "\2212"; /* 减号 */
}

.content {
  padding: 0 20px;
  display: none;
  background-color: rgba(74, 0, 224, 0.5);
  overflow: hidden;
  border-radius: 5px;
}

.content p {
  margin: 10px 0;
}

/* 底部区域样式 */
.footer {
  background: #1f2a44;
  color: #ffffff;
  padding: 40px 20px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
}

.footer .module {
  flex: 1 1 200px;
  margin: 10px;
}

.footer .module h4 {
  border-bottom: 2px solid #8e2de2;
  padding-bottom: 10px;
  margin-bottom: 10px;
}

.footer .module ul {
  list-style: none;
  padding: 0;
}

.footer .module ul li {
  margin: 8px 0;
}

.footer .module ul li a {
  color: #ffffff;
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer .module ul li a:hover {
  color: #4a00e0;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .navbar ul {
    flex-direction: column;
    align-items: center;
  }
  
  .main-content {
    grid-template-columns: 1fr;
    padding: 80px 20px 20px 20px;
  }
}

@media (max-width: 500px) {
  .main-content {
    padding: 80px 10px 10px 10px;
  }
  
  .footer {
    flex-direction: column;
    align-items: center;
  }
  
  .footer .module {
    margin: 20px 0;
  }
}

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

/* 高亮CTA按钮 */
.cta-button {
  background: #e02de2;
  color: #ffffff;
  padding: 15px 30px;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(224, 45, 226, 0.4);
  transition: background 0.3s ease, transform 0.3s ease;
  font-size: 16px;
}

.cta-button:hover {
  background: #4a00e0;
  transform: translateY(-5px);
}

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

/* 添加渐变线条装饰 */
.gradient-line {
  height: 4px;
  background: linear-gradient(90deg, #8e2de2, #4a00e0);
  margin: 20px 0;
  border-radius: 2px;
}

/* 按钮动效 */
.interactive-element {
  transition: transform 0.2s ease-in-out;
}

.interactive-element:hover {
  transform: scale(1.05);
}

/* 保证代码块样式不遮挡内容 */
.code-block {
  background: rgba(0, 0, 0, 0.8);
  padding: 15px;
  border-radius: 5px;
  overflow-x: auto;
}

