
/* 
  整体页面样式定义
  使用HTML5和CSS3技术，结合Flexbox和Grid布局，实现响应式设计和现代化视觉效果。
  设计注重色彩的和谐搭配，运用渐变、阴影、动画和过渡效果，提升用户体验和视觉吸引力。
*/

/* 修改默认样式，确保跨浏览器一致性 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* 设置全局字体和基础样式 */
body {
  font-family: 'Open Sans', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  background: linear-gradient(135deg, #1E90FF 70%, #7B68EE 25%, #32CD32 5%);
  color: #333;
  overflow-x: hidden;
}

/* 固定导航栏样式 */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  background: rgba(30, 144, 255, 0.9);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 30px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  z-index: 1000;
  transition: background 0.3s ease;
}

.navbar:hover {
  background: rgba(30, 144, 255, 1);
}

/* 导航栏内链接样式 */
.navbar a {
  color: #FFFFFF;
  text-decoration: none;
  margin: 0 15px;
  font-weight: 600;
  transition: color 0.3s ease;
}

.navbar a:hover {
  color: #32CD32;
}

/* 搜索框样式 */
.search-box {
  display: flex;
  align-items: center;
}

.search-box input {
  padding: 8px 12px;
  border: none;
  border-radius: 4px 0 0 4px;
  outline: none;
}

.search-box button {
  padding: 8px 16px;
  border: none;
  background-color: #32CD32;
  color: #fff;
  border-radius: 0 4px 4px 0;
  cursor: pointer;
  transition: background 0.3s ease;
}

.search-box button:hover {
  background: linear-gradient(45deg, #32CD32, #7B68EE);
}

/* 主页英雄区样式 */
.hero {
  height: 100vh;
  background: url('https://images.gptkong.com/demo/sample1.png') no-repeat center center/cover;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.hero::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(30, 144, 255, 0.6);
}

.hero-content {
  position: relative;
  color: #fff;
  text-align: center;
  z-index: 1;
  max-width: 800px;
}

.hero-content h1 {
  font-size: 48px;
  margin-bottom: 20px;
  animation: fadeInDown 1s ease-out;
}

.hero-content p {
  font-size: 18px;
  margin-bottom: 30px;
  animation: fadeInUp 1s ease-out;
}

.hero-content .cta-button {
  padding: 12px 24px;
  background-color: #32CD32;
  color: #fff;
  border: none;
  border-radius: 25px;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.3s ease;
}

.hero-content .cta-button:hover {
  background: linear-gradient(45deg, #32CD32, #7B68EE);
  transform: scale(1.05);
}

/* 渐变动画效果 */
@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 页脚样式 */
.footer {
  background-color: rgba(0, 0, 0, 0.8);
  color: #fff;
  padding: 40px 20px;
  text-align: center;
  position: relative;
}

.footer a {
  color: #32CD32;
  text-decoration: none;
  margin: 0 10px;
  transition: color 0.3s ease;
}

.footer a:hover {
  color: #7B68EE;
}

/* 主内容区块样式 */
.section {
  padding: 80px 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.section:nth-child(even) {
  background: #F5F5F5;
}

.section:nth-child(odd) {
  background: #FFFFFF;
}

.section h2 {
  font-size: 24px;
  margin-bottom: 20px;
  color: #1E90FF;
  position: relative;
}

.section h2::after {
  content: '';
  width: 50px;
  height: 3px;
  background: #32CD32;
  position: absolute;
  left: 0;
  bottom: -10px;
}

.section p {
  font-size: 16px;
  margin-bottom: 20px;
  color: #333;
}

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

.section img:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 16px rgba(0,0,0,0.2);
}

/* 卡片式布局 */
.card-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.card {
  background: #FFFFFF;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-10px);
  box-shadow: 0 12px 24px rgba(0,0,0,0.2);
}

.card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.card-content {
  padding: 20px;
}

.card-content h3 {
  font-size: 18px;
  margin-bottom: 10px;
  color: #7B68EE;
}

.card-content p {
  font-size: 14px;
  color: #555;
}

/* 章节导航样式 */
.nav-system {
  position: fixed;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.8);
  padding: 10px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.nav-system ul {
  list-style: none;
}

.nav-system ul li {
  margin: 10px 0;
}

.nav-system ul li a {
  text-decoration: none;
  color: #1E90FF;
  font-size: 14px;
  transition: color 0.3s ease;
}

.nav-system ul li a:hover {
  color: #32CD32;
}

/* 提示文字样式 */
.prompt {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(30, 144, 255, 0.9);
  color: #fff;
  padding: 10px 20px;
  border-radius: 20px;
  font-size: 14px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* CSS3 示例代码样式 */
.code-example {
  background: #2d2d2d;
  color: #f8f8f2;
  padding: 20px;
  border-radius: 8px;
  overflow-x: auto;
  font-family: 'Courier New', Courier, monospace;
  margin-bottom: 20px;
}

.code-example pre {
  margin: 0;
  white-space: pre-wrap;
}

.code-example h3 {
  color: #66d9ef;
  margin-bottom: 10px;
}

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

  .navbar a {
    margin: 10px 0;
  }

  .hero-content h1 {
    font-size: 32px;
  }

  .hero-content p {
    font-size: 16px;
  }

  .section {
    padding: 60px 10px;
  }

  .nav-system {
    display: none;
  }
}

@media (max-width: 480px) {
  .hero-content h1 {
    font-size: 24px;
  }

  .hero-content p {
    font-size: 14px;
  }

  .cta-button {
    padding: 10px 20px;
    font-size: 14px;
  }
}

