@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@100;300;400;500&display=swap');

:root {
  --color-primary: #fafafa;
  --color-secondary: #f5f5f5;
  --color-accent: #d4c5b9;
  --color-text: #333333;
  --color-text-light: #666666;
  --color-border: #e5e5e5;
  --transition-base: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Noto Sans SC', sans-serif;
  font-weight: 300;
  line-height: 1.6;
  color: var(--color-text);
  background-color: var(--color-primary);
  overflow-x: hidden;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* 导航栏样式 */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  transition: var(--transition-base);
}

.navbar-transparent {
  background-color: transparent;
}

.navbar-solid {
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.nav-list {
  display: flex;
  justify-content: center;
  align-items: center;
  list-style: none;
  padding: 1.5rem 0;
}

.nav-item {
  margin: 0 2rem;
}

.nav-link {
  color: var(--color-text);
  text-decoration: none;
  font-weight: 300;
  font-size: 0.95rem;
  letter-spacing: 0.05em;
  position: relative;
  transition: var(--transition-base);
}

.nav-link::after {
  content: '';
  position: absolute;
  width: 0;
  height: 1px;
  bottom: -5px;
  left: 0;
  background-color: var(--color-text);
  transition: width 0.3s ease;
}

.nav-link:hover::after {
  width: 100%;
}

.navbar-solid .nav-link {
  color: var(--color-text);
}

.navbar-transparent .nav-link {
  color: #ffffff;
}

.navbar-transparent .nav-link::after {
  background-color: #ffffff;
}

/* 汉堡菜单 */
.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
}

.hamburger span {
  width: 20px;
  height: 1px;
  background-color: var(--color-text);
  margin: 3px 0;
  transition: var(--transition-base);
}

/* 页面标题 */
.page-title {
  text-align: center;
  font-weight: 100;
  font-size: 2.5rem;
  letter-spacing: 0.1em;
  margin: 6rem 0 3rem;
  color: var(--color-text);
}

/* 图片容器 */
.image-container {
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.image-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.image-container:hover img {
  transform: scale(1.05);
}

/* 懒加载淡入效果 */
.lazyload,
.lazyloading {
  opacity: 0;
}

.lazyloaded {
  opacity: 1;
  transition: opacity 0.3s;
}

/* 分类过滤按钮 */
.filter-buttons {
  display: flex;
  justify-content: center;
  margin-bottom: 3rem;
  flex-wrap: wrap;
}

.filter-btn {
  background: none;
  border: none;
  padding: 0.5rem 1.5rem;
  margin: 0.5rem;
  cursor: pointer;
  color: var(--color-text);
  font-weight: 300;
  font-size: 0.9rem;
  letter-spacing: 0.05em;
  position: relative;
  transition: var(--transition-base);
}

.filter-btn.active {
  color: var(--color-text);
}

.filter-btn::after {
  content: '';
  position: absolute;
  width: 0;
  height: 1px;
  bottom: 0;
  left: 50%;
  background-color: var(--color-accent);
  transition: width 0.3s ease, left 0.3s ease;
}

.filter-btn.active::after {
  width: 100%;
  left: 0;
}

/* 系列页面网格 */
.series-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-bottom: 5rem;
}

.series-item {
  aspect-ratio: 3/4;
}

/* 故事页面样式 */
.story-section {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 1rem;
}

.story-text {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--color-text-light);
  margin-bottom: 2rem;
}

.story-image {
  width: 100%;
  max-width: 600px;
  margin: 3rem auto;
  display: block;
}

/* 画廊瀑布流 */
.gallery-grid {
  column-count: 3;
  column-gap: 1rem;
}

.gallery-item {
  break-inside: avoid;
  margin-bottom: 1rem;
}

.gallery-item img {
  width: 100%;
  display: block;
}

/* 灯箱 */
.lightbox {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  animation: fadeIn 0.3s;
}

.lightbox-content {
  position: relative;
  margin: auto;
  padding: 0;
  width: 90%;
  max-width: 1200px;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-content img {
  width: 100%;
  height: auto;
  display: block;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 35px;
  color: #ffffff;
  font-size: 40px;
  font-weight: 300;
  cursor: pointer;
}

.lightbox-prev,
.lightbox-next {
  cursor: pointer;
  position: absolute;
  top: 50%;
  width: auto;
  padding: 16px;
  margin-top: -50px;
  color: white;
  font-weight: 300;
  font-size: 30px;
  transition: 0.3s;
}

.lightbox-next {
  right: 0;
}

/* 页脚 */
.footer {
  text-align: center;
  padding: 3rem 0;
  color: #999999;
  font-size: 0.8rem;
  letter-spacing: 0.05em;
}

/* 动画 */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* 响应式设计 */
@media screen and (max-width: 768px) {
  .nav-list {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 0;
  }

  .nav-list.active {
    display: flex;
  }

  .nav-item {
    margin: 0;
    text-align: center;
    padding: 1rem 0;
    border-top: 1px solid var(--color-border);
  }

  .hamburger {
    display: flex;
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
  }

  .navbar-transparent .hamburger span {
    background-color: #ffffff;
  }

  .gallery-grid {
    column-count: 2;
  }

  .series-grid {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
  }

  .page-title {
    font-size: 2rem;
    margin: 5rem 0 2rem;
  }
}

@media screen and (max-width: 480px) {
  .gallery-grid {
    column-count: 1;
  }

  .filter-btn {
    padding: 0.4rem 1rem;
    font-size: 0.85rem;
  }
}