
/* 定义全局变量，便于统一管理色彩体系 */
:root {
  --主色: #1E3A8A; /* 深蓝色，传达专业与可靠 */
  --辅色1: #10B981; /* 绿色，增加活力 */
  --辅色2: #F59E0B; /* 橙色，提升视觉层次 */
  --背景色: #F3F4F6; /* 浅灰色，确保内容清晰 */
  --点缀色: #FF5722; /* 点缀色，突出重要元素 */
}

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

/* 页面背景 */
body {
  font-family: 'Open Sans', sans-serif; /* 使用易读字体 */
  background-color: var(--背景色);
  color: #333333;
  line-height: 1.6;
  font-size: 16px;
  overflow-x: hidden; /* 防止出现横向滚动条 */
}

/* 导航栏样式 */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  background: linear-gradient(90deg, var(--主色), var(--辅色2));
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  z-index: 1000;
}

.navbar .nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 20px;
}

.navbar .logo {
  font-size: 1.5rem;
  color: #ffffff;
  text-decoration: none;
}

.navbar ul {
  list-style: none;
  display: flex;
}

.navbar ul li {
  margin-left: 20px;
}

.navbar ul li a {
  color: #ffffff;
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 4px;
  transition: background 0.3s ease, color 0.3s ease;
}

.navbar ul li a:hover {
  background-color: var(--辅色1);
  color: #ffffff;
}

/* 主标题样式 */
header {
  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;
}

header::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(30, 58, 138, 0.6);
}

header .header-content {
  position: relative;
  color: #ffffff;
  text-align: center;
  z-index: 1;
}

header h1 {
  font-size: 3rem;
  margin-bottom: 20px;
}

header p {
  font-size: 1.2rem;
}

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

.section-title {
  font-size: 2rem;
  color: var(--主色);
  margin-bottom: 20px;
  position: relative;
  display: inline-block;
}

.section-title::after {
  content: "";
  width: 50px;
  height: 3px;
  background: var(--辅色1);
  position: absolute;
  left: 0;
  bottom: -10px;
}

.article-content {
  margin-top: 40px;
}

.article-content h2, .article-content h3, .article-content h4 {
  color: var(--主色);
  margin-bottom: 15px;
}

.article-content p {
  margin-bottom: 20px;
  font-size: 1rem;
}

.article-content pre {
  background: #2d2d2d;
  color: #f8f8f2;
  padding: 15px;
  border-radius: 5px;
  overflow-x: auto;
  margin-bottom: 20px;
}

.article-content code {
  font-family: 'Courier New', Courier, monospace;
}

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

.card {
  background-color: #ffffff;
  border-radius: 10px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  padding: 20px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
}

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

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

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

.card .card-title {
  font-size: 1.2rem;
  color: var(--主色);
  margin: 15px 0;
}

.card .card-description {
  font-size: 0.95rem;
  color: #555555;
}

.card a {
  display: inline-block;
  margin-top: 10px;
  color: var(--辅色2);
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s ease;
}

.card a:hover {
  color: var(--辅色1);
}

/* 按钮样式 */
.button-primary {
  background-color: var(--主色);
  color: #ffffff;
  padding: 12px 24px;
  border: none;
  border-radius: 5px;
  transition: background-color 0.3s ease, transform 0.3s ease;
  cursor: pointer;
  font-size: 1rem;
}

.button-primary:hover {
  background-color: var(--辅色1);
  transform: scale(1.05);
}

/* 响应式设计 */
@media (max-width: 768px) {
  .navbar .nav-container {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .navbar ul {
    flex-direction: column;
    width: 100%;
  }
  
  .navbar ul li {
    margin: 10px 0;
  }
  
  header h1 {
    font-size: 2rem;
  }
  
  section {
    padding: 60px 10px;
  }
}

