/* 导入字体 */
@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+SC:wght@400;500;600&display=swap');

/* 全局变量 */
:root {
  --primary-color: #8b7355;
  --secondary-color: #d4c5b9;
  --background-color: #f5f5f0;
  --text-color: #333333;
  --light-gray: #e8e8e3;
  --transition: all 0.3s ease;
}

/* 基础样式 */
body {
  font-family: 'Noto Serif SC', serif;
  background-color: var(--background-color);
  color: var(--text-color);
  margin: 0;
  padding: 0;
  line-height: 1.6;
}

/* 导航栏样式 */
header {
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(10px);
}

nav {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--primary-color);
  text-decoration: none;
}

.nav-links {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 2rem;
}

.nav-links a {
  color: var(--text-color);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition);
  position: relative;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--primary-color);
}

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

/* 主要内容区域 */
main {
  margin-top: 80px;
  min-height: calc(100vh - 80px);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

/* 轮播图样式 */
.carousel {
  position: relative;
  height: 80vh;
  overflow: hidden;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

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

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

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

.carousel-caption {
  position: absolute;
  bottom: 20%;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  color: white;
  background: rgba(0, 0, 0, 0.5);
  padding: 2rem;
  border-radius: 8px;
  backdrop-filter: blur(5px);
}

.carousel-caption h2 {
  font-size: 2.5rem;
  margin: 0 0 1rem 0;
  font-weight: 600;
}

.carousel-caption p {
  font-size: 1.2rem;
  margin: 0;
}

/* 筛选按钮样式 */
.filter-buttons {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  justify-content: center;
}

.filter-btn {
  padding: 0.5rem 1.5rem;
  border: 1px solid var(--secondary-color);
  background: white;
  color: var(--text-color);
  border-radius: 25px;
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
}

.filter-btn:hover,
.filter-btn.active {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

/* 瀑布流网格 */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.gallery-item {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  transition: var(--transition);
  cursor: pointer;
}

.gallery-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

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

.gallery-item h3 {
  padding: 1rem;
  margin: 0;
  font-size: 1.2rem;
  color: var(--primary-color);
}

/* 详情页样式 */
.detail-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

.detail-images {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.detail-images img {
  width: 100%;
  border-radius: 12px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.detail-content h1 {
  font-size: 2.5rem;
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.detail-content p {
  font-size: 1.1rem;
  line-height: 1.8;
  margin-bottom: 1.5rem;
  color: #666;
}

/* 系法教程样式 */
.tutorial-item {
  background: white;
  border-radius: 12px;
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.tutorial-item h3 {
  color: var(--primary-color);
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.tutorial-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.step-item {
  text-align: center;
}

.step-item img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 0.5rem;
}

.step-item p {
  font-size: 0.9rem;
  color: #666;
  margin: 0;
}

/* 故事页面样式 */
.story-content {
  max-width: 800px;
  margin: 0 auto;
  background: white;
  padding: 3rem;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.story-content h1 {
  font-size: 2.5rem;
  color: var(--primary-color);
  margin-bottom: 2rem;
  text-align: center;
}

.story-content p {
  font-size: 1.1rem;
  line-height: 1.9;
  margin-bottom: 1.5rem;
  text-align: justify;
}

/* 按钮样式 */
.btn {
  display: inline-block;
  padding: 0.8rem 2rem;
  background: var(--primary-color);
  color: white;
  text-decoration: none;
  border-radius: 25px;
  transition: var(--transition);
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 1rem;
}

.btn:hover {
  background: #6d5d48;
  transform: translateY(-2px);
}

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

footer p {
  margin: 0;
  color: #999;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .nav-links {
    gap: 1rem;
    font-size: 0.9rem;
  }

  .carousel {
    height: 60vh;
  }

  .carousel-caption h2 {
    font-size: 1.8rem;
  }

  .carousel-caption p {
    font-size: 1rem;
  }

  .detail-container {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
  }

  .tutorial-steps {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  }

  .container {
    padding: 1rem;
  }

  main {
    margin-top: 70px;
  }
}

@media (max-width: 480px) {
  nav {
    padding: 1rem;
  }

  .logo {
    font-size: 1.2rem;
  }

  .carousel {
    height: 50vh;
  }

  .story-content {
    padding: 2rem 1.5rem;
  }
}