/* 全局字体定义 */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@300;400;500&display=swap');

* {
  font-family: 'Noto Sans SC', 'Helvetica Neue', Arial, sans-serif;
}

/* 平滑滚动 */
html {
  scroll-behavior: smooth;
}

/* 自定义滚动条 */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: #f8f9fa;
}

::-webkit-scrollbar-thumb {
  background: #cccccc;
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: #999999;
}

/* 导航栏悬停效果 */
.nav-link {
  position: relative;
  transition: color 0.3s ease;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 50%;
  width: 0;
  height: 1px;
  background: #1a1a1a;
  transition: width 0.3s ease, left 0.3s ease;
}

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

/* 英雄区图片缩放动画 */
.hero-image {
  animation: zoomIn 20s ease-in-out infinite alternate;
}

@keyframes zoomIn {
  from {
    transform: scale(1);
  }
  to {
    transform: scale(1.05);
  }
}

/* 图片悬停效果 */
.gallery-image {
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.4s ease;
}

.gallery-image:hover {
  transform: scale(1.05);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

/* 模态框动画 */
.modal {
  animation: fadeIn 0.3s ease;
}

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

.modal-content {
  animation: slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideUp {
  from {
    transform: translateY(30px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* 分类筛选器悬停效果 */
.filter-button {
  position: relative;
  transition: color 0.3s ease;
}

.filter-button.active {
  color: #1a1a1a;
  font-weight: 500;
}

.filter-button::before {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: #1a1a1a;
  transition: width 0.3s ease;
}

.filter-button.active::before {
  width: 100%;
}

/* 图片懒加载效果 */
.lazy-image {
  opacity: 0;
  transition: opacity 0.6s ease;
}

.lazy-image.loaded {
  opacity: 1;
}

/* 细节描述文本渐变效果 */
.detail-text {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.detail-text.visible {
  opacity: 1;
  transform: translateY(0);
}

/* 响应式字体大小 */
@media (max-width: 768px) {
  .hero-quote {
    font-size: 1.5rem;
  }
  
  .section-title {
    font-size: 1.75rem;
  }
}

/* 页脚样式 */
.footer-text {
  color: #cccccc;
  font-size: 0.875rem;
  letter-spacing: 0.05em;
}

/* 返回顶部按钮 */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 40px;
  height: 40px;
  background: #1a1a1a;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 1000;
}

.back-to-top.visible {
  opacity: 0.7;
}

.back-to-top:hover {
  opacity: 1;
  transform: translateY(-3px);
}

/* 视频容器 */
.video-container {
  position: relative;
  overflow: hidden;
  border-radius: 2px;
}

.video-container video {
  width: 100%;
  height: auto;
  display: block;
}

/* 网格布局优化 */
.grid-masonry {
  column-gap: 2rem;
  row-gap: 2rem;
}

@media (min-width: 768px) {
  .grid-masonry {
    column-count: 2;
  }
}

@media (min-width: 1024px) {
  .grid-masonry {
    column-count: 3;
  }
}

.grid-masonry > * {
  break-inside: avoid;
  margin-bottom: 2rem;
}

/* 加载动画 */
.loading-spinner {
  border: 2px solid #f8f9fa;
  border-top: 2px solid #1a1a1a;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}