/* 全局样式变量 */
:root {
  --color-bg: #fdfdfd;
  --color-text: #333333;
  --color-text-light: #666666;
  --color-accent: #e0e0e0;
  --color-nav-bg: rgba(255, 255, 255, 0.95);
  --font-serif: "Source Han Serif CN", "Noto Serif SC", SimSun, serif;
  --font-sans: "Source Han Sans CN", "Noto Sans SC", "Microsoft YaHei", sans-serif;
}

/* 基础样式 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-sans);
  color: var(--color-text);
  background-color: var(--color-bg);
  line-height: 1.6;
  overflow-x: hidden;
}

/* 标题样式 */
h1, h2, h3 {
  font-family: var(--font-serif);
  font-weight: 300;
  margin-bottom: 1rem;
}

h1 {
  font-size: 2.5rem;
}

h2 {
  font-size: 2rem;
}

h3 {
  font-size: 1.5rem;
}

/* 导航栏样式 */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background-color: var(--color-nav-bg);
  backdrop-filter: blur(10px);
  z-index: 1000;
  border-bottom: 1px solid var(--color-accent);
}

nav ul {
  display: flex;
  justify-content: center;
  list-style: none;
  padding: 1.5rem;
  gap: 3rem;
}

nav a {
  text-decoration: none;
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: 1rem;
  transition: color 0.3s ease;
  position: relative;
}

nav a:hover {
  color: var(--color-text-light);
}

nav a.active {
  font-weight: 500;
}

nav a.active::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  right: 0;
  height: 2px;
  background-color: var(--color-text);
}

/* 主内容区域 */
main {
  min-height: 100vh;
  padding-top: 80px;
}

/* 图片样式 */
img {
  max-width: 100%;
  height: auto;
  display: block;
  transition: transform 0.3s ease;
}

img:hover {
  transform: scale(1.02);
}

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

.carousel-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 1s ease-in-out;
}

.carousel-slide.active {
  opacity: 1;
}

.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.carousel-caption {
  position: absolute;
  bottom: 10%;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  color: white;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.carousel-caption h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
  color: white;
}

/* 网格布局 */
.grid-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  padding: 3rem;
  max-width: 1200px;
  margin: 0 auto;
}

.grid-item {
  background-color: var(--color-bg);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
}

.grid-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 12px rgba(0, 0, 0, 0.15);
}

.grid-item img {
  width: 100%;
  height: 400px;
  object-fit: cover;
}

.grid-item-content {
  padding: 1.5rem;
}

.grid-item h3 {
  margin: 0;
  font-size: 1.25rem;
}

/* 不对称布局 */
.asymmetric-container {
  padding: 3rem;
  max-width: 1400px;
  margin: 0 auto;
}

.asymmetric-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  grid-template-rows: auto auto;
  gap: 2rem;
}

.feature-item {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.feature-item.large {
  grid-column: 1;
  grid-row: 1 / 3;
}

.feature-item.small {
  grid-column: 2;
}

.feature-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.feature-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
  color: white;
  padding: 2rem;
}

.feature-overlay h3 {
  margin: 0;
  color: white;
}

/* 幕后故事布局 */
.story-container {
  padding: 3rem;
  max-width: 1200px;
  margin: 0 auto;
}

.story-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 3rem;
}

.story-item {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.story-item img {
  width: 100%;
  height: 300px;
  object-fit: cover;
}

.story-content {
  padding: 2rem;
  background-color: var(--color-bg);
}

.story-content h3 {
  margin-bottom: 1rem;
}

.story-content p {
  color: var(--color-text-light);
  line-height: 1.8;
}

/* 页脚样式 */
footer {
  background-color: var(--color-bg);
  text-align: center;
  padding: 2rem;
  color: var(--color-text-light);
  border-top: 1px solid var(--color-accent);
  margin-top: 4rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
  nav ul {
    gap: 1.5rem;
    padding: 1rem;
  }
  
  h1 {
    font-size: 2rem;
  }
  
  .carousel-caption h1 {
    font-size: 2rem;
  }
  
  .grid-container {
    padding: 1.5rem;
    grid-template-columns: 1fr;
  }
  
  .asymmetric-grid {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }
  
  .feature-item.large {
    grid-column: 1;
    grid-row: 1;
  }
  
  .feature-item.small {
    grid-column: 1;
  }
  
  .story-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

/* 加载动画 */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeIn 0.8s ease-out;
}

/* 滚动条样式 */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--color-bg);
}

::-webkit-scrollbar-thumb {
  background: var(--color-accent);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-text-light);
}