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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: 'Source Han Sans CN', 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  background-color: #fafafa;
  color: #2a2a2a;
  line-height: 1.6;
  overflow-x: hidden;
}

/* 字体定义 */
@font-face {
  font-family: 'Source Han Sans CN';
  font-weight: 300;
  font-display: swap;
}

/* 颜色方案 */
:root {
  --primary-black: #1a1a1a;
  --primary-white: #ffffff;
  --primary-gray: #8a8a8a;
  --secondary-beige: #e8e3d8;
  --secondary-oat: #d9cfc0;
  --accent-blue: #a8b8c4;
  --accent-terracotta: #d8b4a0;
  --overlay-dark: rgba(0, 0, 0, 0.3);
  --overlay-light: rgba(255, 255, 255, 0.85);
}

/* 导航栏样式 */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background-color: var(--overlay-light);
  backdrop-filter: blur(10px);
  padding: 1.5rem 5%;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: all 0.3s ease;
}

.nav-links {
  display: flex;
  gap: 4rem;
  list-style: none;
}

.nav-links a {
  text-decoration: none;
  color: var(--primary-black);
  font-size: 0.95rem;
  font-weight: 300;
  letter-spacing: 0.1em;
  position: relative;
  transition: color 0.3s ease;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 1px;
  background-color: var(--primary-black);
  transition: width 0.4s ease;
}

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

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

.nav-links a.active::after {
  width: 100%;
}

/* 主视觉区域 */
.hero-section {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
}

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;
  transition: opacity 1.5s ease-in-out;
}

.hero-image.active {
  opacity: 1;
}

.hero-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  z-index: 10;
}

.hero-text {
  font-size: 3rem;
  font-weight: 100;
  letter-spacing: 0.15em;
  color: var(--primary-white);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  opacity: 0;
  animation: fadeInText 1.5s ease-in 0.5s forwards;
}

@keyframes fadeInText {
  to {
    opacity: 1;
  }
}

.scroll-indicator {
  position: absolute;
  bottom: 3rem;
  left: 50%;
  transform: translateX(-50%);
  width: 1px;
  height: 40px;
  background-color: var(--primary-white);
  opacity: 0.7;
  animation: scrollDown 2s ease-in-out infinite;
}

@keyframes scrollDown {
  0%, 100% {
    transform: translateX(-50%) translateY(0);
    opacity: 0.7;
  }
  50% {
    transform: translateX(-50%) translateY(10px);
    opacity: 0.3;
  }
}

/* 引语模块 */
.quote-section {
  max-width: 800px;
  margin: 8rem auto;
  padding: 0 5%;
  text-align: center;
}

.quote-text {
  font-size: 1.1rem;
  line-height: 2;
  color: var(--primary-gray);
  font-weight: 300;
  letter-spacing: 0.05em;
}

/* 氛围图组 */
.atmosphere-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 3rem;
  padding: 5rem 8%;
  max-width: 1400px;
  margin: 0 auto;
}

.atmosphere-item {
  position: relative;
  overflow: hidden;
  aspect-ratio: 3/4;
  cursor: pointer;
}

.atmosphere-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.atmosphere-item:hover img {
  transform: scale(1.05);
}

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

/* 筛选标签 */
.filter-tags {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 4rem;
  padding: 0 5%;
}

.filter-tag {
  background: none;
  border: none;
  font-size: 0.9rem;
  font-weight: 300;
  letter-spacing: 0.1em;
  color: var(--primary-gray);
  cursor: pointer;
  padding: 0.5rem 1rem;
  transition: color 0.3s ease;
  position: relative;
}

.filter-tag::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background-color: var(--primary-black);
  transition: width 0.3s ease;
}

.filter-tag:hover, .filter-tag.active {
  color: var(--primary-black);
}

.filter-tag.active::after {
  width: 100%;
}

/* 核心图库 */
.collection-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
  padding: 0 5% 5rem;
  max-width: 1600px;
  margin: 0 auto;
}

.collection-item {
  position: relative;
  overflow: hidden;
  aspect-ratio: 3/4;
  cursor: pointer;
}

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

.collection-item:hover img {
  transform: scale(1.03);
}

.collection-item-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--overlay-dark);
  opacity: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: opacity 0.4s ease;
}

.collection-item:hover .collection-item-overlay {
  opacity: 1;
}

.expand-btn {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background-color: var(--primary-white);
  border: none;
  font-size: 1.5rem;
  color: var(--primary-black);
  cursor: pointer;
  transition: transform 0.3s ease;
}

.expand-btn:hover {
  transform: scale(1.1);
}

/* 灯箱样式 */
.lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2000;
  background-color: rgba(0, 0, 0, 0.95);
  overflow-y: auto;
}

.lightbox.active {
  display: flex;
  justify-content: center;
  align-items: center;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.lightbox-content {
  display: flex;
  max-width: 1200px;
  width: 90%;
  gap: 3rem;
  margin: 3rem 0;
}

.lightbox-image-section {
  flex: 1;
}

.lightbox-main-image {
  width: 100%;
  height: auto;
  margin-bottom: 1rem;
}

.lightbox-thumbnails {
  display: flex;
  gap: 1rem;
}

.lightbox-thumbnail {
  width: 80px;
  height: 100px;
  object-fit: cover;
  cursor: pointer;
  opacity: 0.6;
  transition: opacity 0.3s ease;
}

.lightbox-thumbnail:hover, .lightbox-thumbnail.active {
  opacity: 1;
}

.lightbox-text-section {
  flex: 0 0 400px;
  color: var(--primary-white);
  padding: 2rem 0;
}

.lightbox-description {
  font-size: 1rem;
  line-height: 1.8;
  font-weight: 300;
  letter-spacing: 0.05em;
}

.lightbox-close {
  position: absolute;
  top: 2rem;
  right: 2rem;
  background: none;
  border: none;
  color: var(--primary-white);
  font-size: 2rem;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.lightbox-close:hover {
  transform: rotate(90deg);
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--primary-white);
  font-size: 3rem;
  cursor: pointer;
  opacity: 0.5;
  transition: opacity 0.3s ease;
}

.lightbox-nav:hover {
  opacity: 1;
}

.lightbox-nav.prev {
  left: 2rem;
}

.lightbox-nav.next {
  right: 2rem;
}

/* 叙事页面布局 */
.story-container {
  max-width: 900px;
  margin: 8rem auto 5rem;
  padding: 0 5%;
}

.story-opening {
  width: 100%;
  height: 80vh;
  object-fit: cover;
  margin-bottom: 4rem;
}

.story-intro {
  text-align: center;
  max-width: 700px;
  margin: 4rem auto;
  font-size: 1rem;
  line-height: 2;
  color: var(--primary-gray);
  font-weight: 300;
}

.story-module {
  margin-bottom: 6rem;
}

.story-image {
  width: 100%;
  height: auto;
  margin-bottom: 2rem;
}

.story-text {
  font-size: 1rem;
  line-height: 2;
  color: var(--primary-gray);
  font-weight: 300;
  letter-spacing: 0.03em;
  margin-bottom: 2rem;
}

.story-double-image {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

.story-video-wrapper {
  position: relative;
  width: 100%;
  height: 70vh;
  margin: 4rem 0;
}

.story-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.story-ending {
  text-align: center;
  margin: 6rem 0;
}

.story-ending-quote {
  font-size: 1.3rem;
  font-weight: 100;
  letter-spacing: 0.1em;
  color: var(--primary-gray);
  margin-bottom: 3rem;
}

.story-ending-image {
  width: 60%;
  height: auto;
  margin: 0 auto;
  display: block;
}

/* 页脚 */
.footer {
  text-align: center;
  padding: 3rem 0;
  font-size: 0.85rem;
  font-weight: 100;
  letter-spacing: 0.2em;
  color: var(--primary-gray);
}

/* 响应式设计 */
@media (max-width: 768px) {
  .navbar {
    padding: 1rem 5%;
  }

  .nav-links {
    gap: 2rem;
  }

  .nav-links a {
    font-size: 0.85rem;
  }

  .hero-text {
    font-size: 2rem;
  }

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

  .atmosphere-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 3rem 5%;
  }

  .collection-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .lightbox-content {
    flex-direction: column;
    width: 95%;
  }

  .lightbox-text-section {
    flex: 1;
  }

  .story-double-image {
    grid-template-columns: 1fr;
  }

  .story-ending-image {
    width: 100%;
  }

  .filter-tags {
    gap: 1rem;
    flex-wrap: wrap;
  }

  .quote-section {
    margin: 5rem auto;
  }

  .quote-text {
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  .hero-text {
    font-size: 1.5rem;
  }

  .nav-links {
    gap: 1.5rem;
  }

  .nav-links a {
    font-size: 0.75rem;
  }

  .lightbox-nav {
    font-size: 2rem;
  }

  .lightbox-nav.prev {
    left: 1rem;
  }

  .lightbox-nav.next {
    right: 1rem;
  }
}

/* 加载动画 */
.loading {
  opacity: 0;
  animation: fadeInElement 0.8s ease forwards;
}

@keyframes fadeInElement {
  to {
    opacity: 1;
  }
}

/* 无障碍增强 */
:focus-visible {
  outline: 2px solid var(--accent-blue);
  outline-offset: 3px;
}

button:focus-visible {
  outline: 2px solid var(--primary-black);
}