
/* 全局样式设置 */
body {
  margin: 0;
  padding: 0;
  font-family: 'Roboto', sans-serif; /* 使用现代无衬线字体 */
  background: linear-gradient(135deg, #1e3c72, #2a5298); /* 背景渐变色，深蓝到深蓝色 */
  color: #ffffff;
  line-height: 1.6;
}

/* 容器设置，确保内容居中排列，适应不同屏幕 */
.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

/* 导航栏样式 */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(30, 60, 114, 0.9); /* 半透明深蓝色背景 */
  padding: 15px 30px;
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.navbar .logo {
  font-size: 1.5em;
  font-weight: bold;
}

.navbar .nav-links a {
  color: #ffffff;
  margin: 0 15px;
  text-decoration: none;
  transition: color 0.3s;
}

.navbar .nav-links a:hover {
  color: #feb47b; /* 悬停时变为亮橙色 */
}

/* Hero区域样式 */
.hero {
  background: url('https://images.gptkong.com/demo/sample1.png') center center / cover no-repeat;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  margin-top: 60px; /* 导航栏高度留白 */
}

.hero::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(30, 60, 114, 0.6); /* 半透明覆盖层 */
}

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

.hero-content h1 {
  font-size: 3em;
  margin-bottom: 20px;
  color: #ffffff;
  animation: fadeInDown 1s ease-out;
}

.hero-content p {
  font-size: 1.2em;
  color: #ffffff;
  animation: fadeInUp 1s ease-out;
}

@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);
  }
}

/* 主内容区域 */
.main-content {
  padding: 60px 20px;
  background: linear-gradient(to bottom, rgba(30, 60, 114, 0.8), rgba(42, 82, 152, 0.8));
}

/* 章节导航 */
.chapter-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 40px;
}

.chapter-nav a {
  background: #ff7e5f; /* 亮橙色背景 */
  color: #ffffff;
  padding: 10px 20px;
  margin: 10px;
  border-radius: 25px;
  text-decoration: none;
  transition: background 0.3s, transform 0.3s;
}

.chapter-nav a:hover {
  background: #feb47b;
  transform: scale(1.05);
}

/* 文章内容样式 */
article h2 {
  font-size: 2em;
  margin-top: 40px;
  color: #ff7e5f; /* 亮橙色标题 */
}

article section {
  margin-top: 20px;
  font-size: 1em;
  color: #ffffff;
}

article pre {
  background: rgba(255, 255, 255, 0.1);
  padding: 15px;
  border-radius: 8px;
  overflow-x: auto;
  margin-top: 20px;
}

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

/* 图片装饰样式 */
.decoration-images {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
  margin-top: 30px;
}

.decoration-images img {
  width: 160px;
  height: 160px;
  object-fit: cover;
  border-radius: 15px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s, box-shadow 0.3s;
}

.decoration-images img:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 8px rgba(0, 0, 0, 0.5);
}

/* 提示文本样式 */
.reference-note {
  text-align: center;
  font-size: 1.2em;
  color: #ffffff;
  margin-top: 20px;
  padding: 10px;
  background: rgba(255, 126, 95, 0.8);
  border-radius: 8px;
  animation: highlight 2s infinite;
}

@keyframes highlight {
  0%, 100% {
    background: rgba(255, 126, 95, 0.8);
  }
  50% {
    background: rgba(254, 180, 123, 0.8);
  }
}

/* 阴影和过渡效果 */
button, .button {
  background: linear-gradient(to right, #ff7e5f, #feb47b);
  border: none;
  padding: 12px 25px;
  color: #ffffff;
  cursor: pointer;
  border-radius: 25px;
  font-size: 1em;
  transition: background 0.3s, transform 0.3s;
}

button:hover, .button:hover {
  background: linear-gradient(to left, #ff7e5f, #feb47b);
  transform: scale(1.05);
}

.loader {
  border: 8px solid #f3f3f3;
  border-top: 8px solid #1e3c72;
  border-radius: 50%;
  width: 60px;
  height: 60px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

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

  .chapter-nav {
    flex-direction: column;
  }

  .decoration-images img {
    width: 100px;
    height: 100px;
  }

  .hero-content h1 {
    font-size: 2em;
  }

  .hero-content p {
    font-size: 1em;
  }
}

