/* 全局字体定义：中文思源黑体 + 英文 Inter */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=Noto+Sans+SC:wght@300;400;500;700&display=swap');

:root {
  /* 视觉系统核心变量 */
  --color-accent: #94A3B8; /* 雾霾蓝点缀 */
  --font-main: 'Inter', 'Noto Sans SC', sans-serif;
  --transition-smooth: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 基础重置与排版 */
html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-main);
  background-color: #F9FAFB; /* 高级灰底色 */
  color: #111827;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* 隐藏滚动条但保持功能 (沉浸式体验) */
.scrollbar-hide::-webkit-scrollbar {
    display: none;
}
.scrollbar-hide {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* 导航栏磨砂玻璃效果 */
.glass-nav {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.03);
  transition: all 0.3s ease;
}

/* 瀑布流布局 (Masonry Layout) */
.masonry-grid {
  column-count: 1;
  column-gap: 2rem;
}
@media (min-width: 640px) {
  .masonry-grid {
    column-count: 2;
  }
}
@media (min-width: 1024px) {
  .masonry-grid {
    column-count: 3;
  }
}

.masonry-item {
  break-inside: avoid;
  margin-bottom: 2rem;
  opacity: 0; /* 默认隐藏，通过JS触发动画 */
  animation: fadeInUp 0.8s ease-out forwards;
}

/* 交互动效 */
.hover-zoom-container {
  overflow: hidden;
  position: relative;
}

.hover-zoom-img {
  transition: transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  will-change: transform;
}

.group:hover .hover-zoom-img {
  transform: scale(1.08);
}

/* 遮罩层文字动效 */
.hover-overlay {
  background: rgba(0, 0, 0, 0.2);
  transition: opacity 0.4s ease;
}

/* 灯箱效果 (Lightbox) */
#lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background-color: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

#lightbox.active {
  opacity: 1;
  visibility: visible;
}

#lightbox img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  transform: scale(0.95);
  transition: transform 0.3s ease;
}

#lightbox.active img {
  transform: scale(1);
}

/* 页面入场动画 */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in-up {
  animation: fadeInUp 1s ease-out forwards;
}

/* 延迟类工具 */
.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }
.delay-500 { animation-delay: 0.5s; }

/* 文本选择颜色 */
::selection {
  background-color: var(--color-accent);
  color: white;
}

/* 动态过滤按钮状态 */
.filter-btn.active {
  background-color: #111827;
  color: white;
  border-color: #111827;
}

/* 响应式调整 */
@media (max-width: 768px) {
  .hero-text {
    font-size: 2.5rem;
  }
}