
/* 根元素变量定义 */
:root {
  --forest-green: #228B22; /* 森林绿，用于主色调 */
  --earth-brown: #964B00; /* 土褐色，用于辅助色 */
  --tech-blue: #1E90FF; /* 科技蓝，用于点缀色 */
  --silver-gray: #C0C0C0; /* 银灰色，用于背景色 */
  --background-gray: #F5F5F5; /* 背景灰色，用于整体背景 */
  --text-color: #333333; /* 正文字体颜色 */
  --title-color: var(--forest-green); /* 标题字体颜色 */
  --link-color: var(--tech-blue); /* 链接颜色 */
}

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

body {
  font-family: 'Lora', serif; /* 正文字体 */
  color: var(--text-color);
  background-color: var(--background-gray);
  line-height: 1.6;
}

/* 标题样式 */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Roboto', sans-serif; /* 标题字体 */
  color: var(--title-color);
  margin-bottom: 20px;
}

h2 {
  font-size: 2rem;
}

h3 {
  font-size: 1.75rem;
}

/* 段落样式 */
p {
  font-size: 1rem;
  margin-bottom: 20px;
}

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

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

.navbar li a {
  text-decoration: none;
  color: var(--forest-green);
  font-weight: bold;
  transition: color 0.3s ease;
}

.navbar li a:hover {
  color: var(--tech-blue);
}

/* 轮播图容器样式 */
.carousel {
  display: flex;
  overflow: hidden;
  height: 100vh;
  position: relative;
}

.carousel-slide {
  min-width: 100%;
  transition: transform 0.5s ease-in-out;
  background-size: cover;
  background-position: center;
  position: relative;
}

.carousel-slide::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(34, 139, 34, 0.5); /* 半透明覆盖层 */
}

/* 三列卡片容器样式 */
.card-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  padding: 40px;
  background-color: var(--background-gray);
}

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

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

.card::before {
  content: '';
  background: url('https://images.gptkong.com/demo/sample1.png') no-repeat center center;
  background-size: cover;
  opacity: 0.1;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* 图片样式 */
img.decorative {
  width: 320px;
  height: 320px;
  border-radius: 15px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

/* 代码块样式 */
pre code {
  display: block;
  padding: 20px;
  background-color: #2d2d2d;
  color: #f8f8f2;
  border-radius: 5px;
  overflow: auto;
  position: relative;
}

/* 代码块标题 */
pre code::before {
  content: '代码示例';
  display: block;
  background-color: #1e90ff;
  color: white;
  padding: 5px 10px;
  border-top-left-radius: 5px;
  border-top-right-radius: 5px;
  font-family: 'Roboto', sans-serif;
}

/* 段落独立样式 */
.section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 60px 20px;
}

.section-block {
  margin-bottom: 60px;
}

.section-block h2 {
  margin-bottom: 20px;
}

.section-block p {
  margin-bottom: 20px;
}

/* 提示信息样式 */
.notice {
  background-color: var(--tech-blue);
  color: white;
  padding: 15px;
  text-align: center;
  font-size: 1.2rem;
  margin: 40px 0;
  border-radius: 5px;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .navbar ul {
    flex-direction: column;
    gap: 10px;
  }
  
  .card-container {
    grid-template-columns: 1fr;
    padding: 20px;
  }
  
  img.decorative {
    width: 100%;
    height: auto;
  }
}

@media (min-width: 769px) and (max-width: 1200px) {
  .card-container {
    grid-template-columns: repeat(2, 1fr);
  }
}

