
/* 全局变量定义，方便整个项目统一管理颜色和字体 */
:root {
  /* 主色调 - 深蓝色 */
  --primary-color: #0D0D0D;
  /* 次色调 - 深灰色 */
  --secondary-color: #1A1A1A;
  /* 辅助色 - 电蓝色 */
  --accent-blue: #00FFFF;
  /* 点缀色 - 霓虹绿 */
  --accent-green: #39FF14;
  /* 文字颜色 - 白色 */
  --text-color: #FFFFFF;
  /* 背景渐变 */
  --background-gradient: linear-gradient(135deg, #1A1A1A 0%, #0D0D0D 100%);
  /* 过渡时间 */
  --transition-time: 0.3s;
  /* 字体 */
  --font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  /* 字号 */
  --font-size-base: 16px;
  --font-size-lg: 18px;
  --font-size-sm: 15px;
}

/* 设置全局样式 */
body {
  margin: 0;
  padding: 0;
  background: var(--background-gradient);
  color: var(--text-color);
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  line-height: 1.6;
  overflow-x: hidden;
}

/* 导航栏样式 */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  background: rgba(26, 26, 26, 0.9);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 40px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  z-index: 1000;
}

.navbar .logo {
  font-size: 1.5em;
  font-weight: bold;
  color: var(--accent-blue);
}

.navbar .nav-links {
  display: flex;
  gap: 20px;
}

.navbar .nav-links a {
  color: var(--text-color);
  text-decoration: none;
  font-size: var(--font-size-base);
  transition: color var(--transition-time);
}

.navbar .nav-links a:hover {
  color: var(--accent-green);
}

/* 移动端导航样式 */
.navbar-toggle {
  display: none;
  font-size: 1.5em;
  cursor: pointer;
}

@media (max-width: 768px) {
  .navbar .nav-links {
    display: none;
    flex-direction: column;
    background: var(--secondary-color);
    position: absolute;
    top: 60px;
    right: 40px;
    padding: 20px;
    border-radius: 10px;
  }
  
  .navbar .nav-links.show {
    display: flex;
  }
  
  .navbar-toggle {
    display: block;
    color: var(--text-color);
  }
}

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

.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero-content h1 {
  font-size: 3em;
  margin-bottom: 20px;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.7);
}

.hero-content p {
  font-size: 1.2em;
  margin-bottom: 30px;
}

.hero-content .cta-button {
  background: var(--accent-blue);
  padding: 15px 30px;
  border: none;
  border-radius: 5px;
  color: var(--text-color);
  cursor: pointer;
  transition: background var(--transition-time), transform var(--transition-time);
}

.hero-content .cta-button:hover {
  background: var(--accent-green);
  transform: scale(1.05);
}

/* 段落区块样式 */
.section {
  padding: 80px 40px;
  background: var(--primary-color);
  position: relative;
  overflow: hidden;
}

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

.card {
  background: var(--secondary-color);
  border-radius: 15px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
  overflow: hidden;
  transition: transform var(--transition-time), box-shadow var(--transition-time);
}

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

.card img {
  width: 100%;
  height: auto;
  border-bottom: 1px solid #333;
}

.card-content {
  padding: 20px;
}

.card-content h3 {
  font-size: var(--font-size-lg);
  margin-bottom: 10px;
  color: var(--accent-blue);
}

.card-content p {
  font-size: var(--font-size-sm);
  color: #ccc;
}

/* 图片装饰效果 */
.decorative-image {
  width: 100%;
  max-width: 320px;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.3);
  transition: transform var(--transition-time), box-shadow var(--transition-time);
}

.decorative-image:hover {
  transform: scale(1.05);
  box-shadow: 0 12px 24px rgba(0,0,0,0.5);
}

/* 文章内容样式 */
article {
  max-width: 800px;
  margin: 0 auto;
  padding: 40px;
  background: var(--secondary-color);
  border-radius: 15px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

article h2 {
  font-size: 2em;
  margin-bottom: 20px;
  color: var(--accent-blue);
}

article h3 {
  font-size: 1.5em;
  margin-top: 30px;
  margin-bottom: 15px;
  color: var(--accent-green);
}

article p {
  font-size: 1em;
  line-height: 1.8;
  color: #ddd;
}

article pre {
  background: #1A1A1A;
  padding: 15px;
  border-radius: 10px;
  overflow-x: auto;
  margin: 20px 0;
}

article pre code {
  color: #00FFFF;
  font-family: 'Courier New', Courier, monospace;
}

article .code-block {
  background: #0D0D0D;
  padding: 20px;
  border-left: 5px solid var(--accent-green);
  margin: 20px 0;
}

/* 滚动动画 */
@keyframes slide {
  0% { transform: translateX(0); }
  25% { transform: translateX(-100%); }
  50% { transform: translateX(-200%); }
  75% { transform: translateX(-300%); }
  100% { transform: translateX(0); }
}

.feedback-carousel {
  display: flex;
  overflow: hidden;
  position: relative;
  height: 200px;
  animation: slide 20s infinite;
}

.feedback-carousel .feedback-item {
  min-width: 100%;
  transition: transform 0.5s ease-in-out;
}

.feedback-carousel .feedback-item p {
  font-size: 1em;
  color: #ccc;
}

/* 章节导航样式 */
.chapter-nav {
  position: fixed;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(26, 26, 26, 0.8);
  padding: 10px;
  border-radius: 10px;
  z-index: 1000;
}

.chapter-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

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

.chapter-nav ul li a {
  color: var(--accent-blue);
  text-decoration: none;
  font-size: 0.9em;
  transition: color var(--transition-time);
}

.chapter-nav ul li a:hover {
  color: var(--accent-green);
}

/* 响应式字体调整 */
@media (max-width: 768px) {
  .hero-content h1 {
    font-size: 2em;
  }
  
  .hero-content p {
    font-size: 1em;
  }
  
  .navbar {
    padding: 15px 20px;
  }
}

