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

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

body {
  font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: #2C2C2C;
  background-color: #FFFFFF;
  line-height: 1.7;
  overflow-x: hidden;
}

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

/* 导航栏样式 */
nav {
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}

nav a {
  position: relative;
  transition: color 0.25s ease;
}

nav a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background-color: #2C2C2C;
  transition: width 0.3s ease;
}

nav a:hover::after,
nav a.active::after {
  width: 100%;
}

/* 图片悬停效果 */
.image-hover {
  transition: all 0.3s ease;
  overflow: hidden;
}

.image-hover img {
  transition: transform 0.4s ease;
}

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

.image-hover:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

/* 轮播指示器 */
.carousel-indicators {
  display: flex;
  gap: 8px;
  justify-content: center;
  align-items: center;
}

.carousel-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: rgba(44, 44, 44, 0.3);
  cursor: pointer;
  transition: all 0.3s ease;
}

.carousel-indicator.active {
  width: 24px;
  border-radius: 4px;
  background-color: #2C2C2C;
}

/* 轮播图淡入淡出效果 */
.carousel-item {
  opacity: 0;
  transition: opacity 0.6s ease-in-out;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.carousel-item.active {
  opacity: 1;
  position: relative;
}

/* 文字叠加层 */
.text-overlay {
  transition: opacity 0.3s ease;
}

.image-hover:hover .text-overlay {
  opacity: 1;
}

/* 瀑布流网格布局 */
.masonry-grid {
  column-count: 3;
  column-gap: 20px;
}

.masonry-item {
  break-inside: avoid;
  margin-bottom: 20px;
}

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

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

/* 分类标签样式 */
.category-tab {
  position: relative;
  transition: color 0.25s ease;
  cursor: pointer;
}

.category-tab::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: #2C2C2C;
  transition: width 0.3s ease;
}

.category-tab.active::after,
.category-tab:hover::after {
  width: 100%;
}

/* 色块样式 */
.color-block {
  width: 100%;
  aspect-ratio: 1;
  transition: transform 0.3s ease;
  cursor: pointer;
}

.color-block:hover {
  transform: scale(1.05);
}

/* 懒加载图片淡入效果 */
img[loading="lazy"] {
  opacity: 0;
  transition: opacity 0.3s ease;
}

img[loading="lazy"].loaded {
  opacity: 1;
}

/* 背景视频容器 */
.video-container {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
}

.video-container video {
  position: absolute;
  top: 50%;
  left: 50%;
  min-width: 100%;
  min-height: 100%;
  width: auto;
  height: auto;
  transform: translate(-50%, -50%);
  object-fit: cover;
}

/* 滚动指示器 */
.scroll-indicator {
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-10px);
  }
  60% {
    transform: translateY(-5px);
  }
}

/* 页脚样式 */
footer {
  font-size: 14px;
  color: #2C2C2C;
  opacity: 0.6;
}

/* 自定义选择样式 */
::selection {
  background-color: #F8F9FA;
  color: #2C2C2C;
}

/* 移除焦点轮廓并添加自定义样式 */
*:focus {
  outline: none;
}

*:focus-visible {
  outline: 2px solid #2C2C2C;
  outline-offset: 2px;
}

/* 加载动画 */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeIn 0.6s ease-out;
}

/* 响应式文字大小调整 */
@media (max-width: 768px) {
  body {
    font-size: 14px;
  }
  
  h1 {
    font-size: 28px;
  }
  
  h2 {
    font-size: 24px;
  }
}

/* 禁用图片拖拽 */
img {
  -webkit-user-drag: none;
  user-select: none;
}

/* 平滑过渡 */
.smooth-transition {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}