/* ============================================
   Components - Nav / Cards / Buttons / Tags / Footer / Music
   ============================================ */

/* ── 导航栏 ── */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--z-nav);
  padding: var(--space-4) 0;
  background: rgba(250,248,245,0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
  transition: all var(--transition-normal);
}

.navbar.scrolled {
  padding: var(--space-3) 0;
  background: rgba(250,248,245,0.95);
  box-shadow: var(--shadow-soft);
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--accent);
  text-decoration: none;
  letter-spacing: 1px;
}

.nav-logo:hover {
  color: var(--accent);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-8);
}

.nav-link {
  position: relative;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  padding: var(--space-2) 0;
  transition: color var(--transition-fast);
}

.nav-link:hover,
.nav-link.active {
  color: var(--nav-accent, var(--accent));
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--nav-accent, var(--accent));
  border-radius: 1px;
  transform: scaleX(0);
  transition: transform var(--transition-normal);
}

.nav-link:hover::after,
.nav-link.active::after {
  transform: scaleX(1);
}

/* 汉堡菜单 */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: var(--space-2);
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  transition: all var(--transition-normal);
  border-radius: 1px;
}

.nav-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ── 卡片 ── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.card:hover {
  transform: translateY(-4px);
  background: var(--bg-card-hover);
  box-shadow: var(--shadow-card-hover);
}

.card-title {
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  margin-bottom: var(--space-3);
  color: var(--text-primary);
}

.card-desc {
  color: var(--text-secondary);
  font-size: var(--text-sm);
  line-height: 1.6;
  margin-bottom: var(--space-4);
}

.card-meta {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  font-size: var(--text-xs);
  color: var(--text-muted);
}

/* ── 按钮 ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--transition-normal);
  text-decoration: none;
  border: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent);
  color: var(--text-inverse);
}

.btn-primary:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
  color: var(--text-inverse);
  background: #c89660;
}

.btn-outline {
  background: transparent;
  border: 1.5px solid var(--accent);
  color: var(--accent);
}

.btn-outline:hover {
  background: rgba(212,165,116,0.1);
  transform: translateY(-2px);
  color: var(--accent);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
}

.btn-ghost:hover {
  color: var(--accent);
  background: rgba(212,165,116,0.08);
}

.btn-sm {
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-xs);
}

.btn-lg {
  padding: var(--space-4) var(--space-8);
  font-size: var(--text-base);
}

/* ── 标签 ── */
.tag {
  display: inline-flex;
  align-items: center;
  padding: var(--space-1) var(--space-3);
  font-size: var(--text-xs);
  font-weight: 500;
  border-radius: var(--radius-full);
  background: rgba(212,165,116,0.1);
  color: var(--accent);
  border: 1px solid rgba(212,165,116,0.2);
  transition: all var(--transition-fast);
  cursor: pointer;
  white-space: nowrap;
}

.tag:hover,
.tag.active {
  background: rgba(212,165,116,0.2);
  border-color: var(--accent);
}

.tag-green {
  background: rgba(143,185,150,0.1);
  color: var(--accent-green);
  border-color: rgba(143,185,150,0.2);
}

.tag-green:hover,
.tag-green.active {
  background: rgba(143,185,150,0.2);
  border-color: var(--accent-green);
}

.tag-soft {
  background: rgba(168,197,218,0.1);
  color: var(--accent-soft);
  border-color: rgba(168,197,218,0.2);
}

.tag-soft:hover,
.tag-soft.active {
  background: rgba(168,197,218,0.2);
  border-color: var(--accent-soft);
}

/* ── 标签筛选栏 ── */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-bottom: var(--space-8);
  justify-content: center;
}

/* ── 搜索框 ── */
.search-box {
  position: relative;
  max-width: 480px;
  margin: 0 auto var(--space-8);
}

.search-input {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  padding-left: var(--space-10);
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-full);
  color: var(--text-primary);
  font-size: var(--text-sm);
  transition: all var(--transition-normal);
}

.search-input::placeholder {
  color: var(--text-muted);
}

.search-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(212,165,116,0.1);
}

.search-icon {
  position: absolute;
  left: var(--space-4);
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

/* ── 页脚 ── */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-subtle);
  padding: var(--space-12) 0 var(--space-6);
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-8);
  margin-bottom: var(--space-8);
}

.footer-brand {
  flex: 1;
}

.footer-brand-name {
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  color: var(--accent);
  margin-bottom: var(--space-3);
}

.footer-brand-desc {
  color: var(--text-muted);
  font-size: var(--text-sm);
  max-width: 280px;
}

.footer-links {
  display: flex;
  gap: var(--space-12);
}

.footer-links-group h4 {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-4);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.footer-links-group a {
  display: block;
  color: var(--text-muted);
  font-size: var(--text-sm);
  margin-bottom: var(--space-2);
  transition: color var(--transition-fast);
}

.footer-links-group a:hover {
  color: var(--accent);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: var(--space-6);
  border-top: 1px solid var(--border-subtle);
  flex-wrap: wrap;
  gap: var(--space-4);
}

.footer-copyright {
  font-size: var(--text-xs);
  color: var(--text-muted);
}

.footer-copyright a {
  color: var(--text-muted);
}

.footer-copyright a:hover {
  color: var(--accent);
}

.footer-social {
  display: flex;
  gap: var(--space-4);
}

.footer-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  background: rgba(0,0,0,0.03);
  color: var(--text-muted);
  transition: all var(--transition-fast);
}

.footer-social a:hover {
  background: rgba(212,165,116,0.1);
  color: var(--accent);
}

/* ── 音乐播放器 ── */
.music-player {
  position: fixed;
  bottom: var(--space-6);
  right: var(--space-6);
  z-index: var(--z-music);
}

.music-toggle {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  cursor: pointer;
  transition: all var(--transition-normal);
  backdrop-filter: blur(10px);
}

.music-toggle:hover {
  transform: scale(1.1);
  box-shadow: var(--shadow-hover);
}

.music-toggle.playing {
  animation: music-pulse 2s ease-in-out infinite;
}

@keyframes music-pulse {
  0%, 100% { box-shadow: var(--shadow-soft); }
  50% { box-shadow: 0 0 0 8px rgba(212,165,116,0.15), var(--shadow-soft); }
}

/* ── 滚动指示器 ── */
.scroll-indicator {
  position: fixed;
  right: 24px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.indicator-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(0,0,0,0.15);
  cursor: pointer;
  transition: all 0.4s ease;
}

.indicator-dot.active {
  background: var(--indicator-accent, var(--accent));
  transform: scale(1.3);
  box-shadow: 0 0 8px var(--indicator-accent, var(--accent));
}

.indicator-dot:hover {
  background: rgba(0,0,0,0.35);
}

/* ── 场景区块（全屏滚动） ── */
.scene-section,
.hero-section,
.about-section,
.footer-section {
  min-height: 100vh;
  width: 100%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.scene-inner {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-6);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-12);
  align-items: center;
}

.scene-text {
  perspective: 1000px;
}

.scene-title {
  font-family: 'Noto Serif SC', serif;
  font-size: clamp(60px, 10vw, 120px);
  font-weight: 700;
  line-height: 1.1;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  margin-bottom: var(--space-6);
}

.scene-subtitle {
  font-family: 'Noto Sans SC', sans-serif;
  font-size: 18px;
  line-height: 1.6;
  color: var(--text-secondary);
  max-width: 400px;
}

.scene-image {
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-card-hover);
  transform-style: preserve-3d;
}

.scene-image img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  aspect-ratio: 4/3;
}

/* 季节背景色 */
.scene-spring { background: linear-gradient(135deg, #fdf6f0 0%, #fce4ec 100%); }
.scene-summer { background: linear-gradient(135deg, #f0f7ff 0%, #e3f2fd 100%); }
.scene-autumn { background: linear-gradient(135deg, #fff8f0 0%, #ffe0b2 100%); }
.scene-winter { background: linear-gradient(135deg, #f8fafc 0%, #eceff1 100%); }

/* ── Hero 沉浸背景层 ── */
.hero-section {
  position: relative;
  overflow: hidden;
}

.hero-bg-layer {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  will-change: transform;
  transition: opacity 1.5s ease;
  z-index: 0;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(58,58,58,0.35) 0%,
    rgba(58,58,58,0.20) 40%,
    rgba(58,58,58,0.15) 70%,
    rgba(58,58,58,0.30) 100%
  );
  z-index: 1;
}

body[data-page="home"] .hero-section .hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
  padding: 0 var(--space-6);
}

body[data-page="home"] .hero-section .hero-title {
  font-family: 'Noto Serif SC', serif;
  font-size: clamp(48px, 8vw, 120px);
  font-weight: 700;
  line-height: 1.1;
  color: #ffffff;
  text-shadow: 0 2px 20px rgba(0,0,0,0.3);
  letter-spacing: -0.02em;
  margin-bottom: var(--space-6);
}

body[data-page="home"] .hero-section .hero-subtitle {
  font-size: var(--text-xl);
  color: rgba(255,255,255,0.85);
  margin-bottom: var(--space-8);
  text-shadow: 0 1px 10px rgba(0,0,0,0.25);
}

/* Hero badge */
.hero-badge {
  display: inline-block;
  padding: 6px 18px;
  font-size: var(--text-xs);
  font-weight: 500;
  color: #ffffff;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: var(--radius-full);
  letter-spacing: 3px;
  margin-bottom: var(--space-6);
  backdrop-filter: blur(8px);
}

body[data-page="home"] .hero-section .hero-cta {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-4) var(--space-10);
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 600;
  border-radius: var(--radius-full);
  background: rgba(255,255,255,0.18);
  color: #ffffff;
  text-decoration: none;
  border: 1.5px solid rgba(255,255,255,0.3);
  transition: all var(--transition-normal);
  backdrop-filter: blur(8px);
}

body[data-page="home"] .hero-section .hero-cta:hover {
  background: rgba(255,255,255,0.28);
  border-color: rgba(255,255,255,0.5);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0,0,0,0.2);
  color: #ffffff;
}

/* ── Hero 滚动提示 ── */
.hero-scroll-hint {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: rgba(255,255,255,0.6);
  font-size: var(--text-xs);
  letter-spacing: 2px;
  animation: hint-bounce 2s ease-in-out infinite;
}

.scroll-arrow {
  width: 20px;
  height: 20px;
  border-right: 2px solid rgba(255,255,255,0.5);
  border-bottom: 2px solid rgba(255,255,255,0.5);
  transform: rotate(45deg);
  animation: arrow-move 2s ease-in-out infinite;
}

@keyframes hint-bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(6px); }
}

@keyframes arrow-move {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

/* ── 场景背景层（视差） ── */
.scene-section {
  position: relative;
  overflow: hidden;
}

.scene-bg-layer {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0.08;
  will-change: transform;
  z-index: 0;
  pointer-events: none;
}

.scene-inner {
  position: relative;
  z-index: 1;
}

/* ── 季节标签 ── */
.scene-season-label {
  display: inline-block;
  font-family: 'Noto Sans SC', sans-serif;
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 4px;
  color: var(--accent);
  margin-bottom: var(--space-2);
  text-transform: uppercase;
}

/* ── 场景描述 ── */
.scene-desc {
  font-size: var(--text-sm);
  line-height: 1.8;
  color: var(--text-secondary);
  max-width: 420px;
  margin-top: var(--space-4);
  margin-bottom: var(--space-6);
}

/* ── 场景信息卡片 ── */
.scene-meta {
  display: flex;
  gap: var(--space-6);
  flex-wrap: wrap;
}

.scene-meta-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-5);
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  backdrop-filter: blur(10px);
  transition: all var(--transition-normal);
}

.scene-meta-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-soft);
  border-color: var(--accent-light);
}

.scene-meta-icon {
  font-size: 1.3rem;
  line-height: 1;
}

.scene-meta-label {
  display: block;
  font-size: 0.65rem;
  color: var(--text-muted);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 2px;
}

.scene-meta-value {
  display: block;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-primary);
}

/* 关于区居中 */
.about-section {
  background: var(--bg-primary);
}

.about-section .about-content {
  text-align: center;
  max-width: 700px;
  margin: 0 auto;
  padding: 0 var(--space-6);
}

.about-section .about-title {
  font-family: 'Noto Serif SC', serif;
  font-size: clamp(36px, 6vw, 72px);
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-primary);
  margin-bottom: var(--space-6);
}

.about-section .about-desc {
  font-size: var(--text-lg);
  color: var(--text-secondary);
  line-height: 1.8;
}

/* Footer 全屏 */
.footer-section {
  background: var(--bg-secondary);
  min-height: 60vh;
  flex-direction: column;
  padding: var(--space-16) 0 var(--space-8);
}

.footer-section .footer-content {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-8);
  margin-bottom: var(--space-8);
  width: 100%;
  max-width: 1200px;
  padding: 0 var(--space-6);
}

.footer-section .footer-bottom {
  width: 100%;
  max-width: 1200px;
  padding: 0 var(--space-6);
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--border-subtle);
  padding-top: var(--space-6);
  flex-wrap: wrap;
  gap: var(--space-4);
}

/* 响应式 */
@media (max-width: 768px) {
  .scene-inner {
    grid-template-columns: 1fr;
    gap: var(--space-8);
    text-align: center;
  }

  /* 奇偶交替在移动端改为文字在上、图片在下 */
  .scene-section:nth-child(even) .scene-inner {
    direction: ltr;
  }
  .scene-inner > .scene-text {
    order: 1;
  }
  .scene-inner > .scene-image {
    order: 2;
  }

  .scene-title {
    font-size: clamp(48px, 15vw, 60px);
  }

  .scene-subtitle {
    font-size: 16px;
    margin: 0 auto;
  }

  .scene-desc {
    font-size: var(--text-sm);
    margin: var(--space-4) auto 0;
    max-width: 100%;
  }

  .scene-image {
    max-width: 400px;
    margin: 0 auto;
  }

  .scene-meta {
    justify-content: center;
  }

  .scroll-indicator {
    display: none;
  }

  .hero-scroll-hint {
    display: none;
  }

  .about-section .about-title {
    font-size: clamp(28px, 10vw, 36px);
  }

  .footer-section .footer-content {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .footer-section .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
}

/* ── 空状态 ── */
.empty-state {
  text-align: center;
  padding: var(--space-16) 0;
  color: var(--text-muted);
}

.empty-state svg {
  width: 64px;
  height: 64px;
  margin-bottom: var(--space-4);
  opacity: 0.3;
}

/* ── 网格布局 ── */
.grid {
  display: grid;
  gap: var(--space-6);
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* ── 响应式 ── */
@media (max-width: 1024px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    flex-direction: column;
    justify-content: center;
    background: rgba(250,248,245,0.98);
    backdrop-filter: blur(20px);
    transition: right var(--transition-normal);
    gap: var(--space-6);
    padding: var(--space-8);
  }

  .nav-links.open {
    right: 0;
  }

  .nav-link {
    font-size: var(--text-lg);
  }

  .nav-toggle {
    display: flex;
  }

  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }

  .footer-content {
    flex-direction: column;
  }

  .footer-links {
    gap: var(--space-8);
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
}
