/* 自定义样式文件 - 补充Tailwind.css特定样式 */

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

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

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

/* 导航栏半透明背景 */
.nav-transparent {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* 轮播图容器 */
.carousel-container {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
}

.carousel-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 1s ease-in-out;
}

.carousel-slide.active {
  opacity: 1;
  z-index: 1;
}

.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* 图片悬停效果 */
.hover-zoom {
  transition: transform 0.4s ease, filter 0.4s ease;
  overflow: hidden;
}

.hover-zoom:hover {
  transform: scale(1.05);
  filter: brightness(1.1);
}

/* 图片容器悬停效果 */
.image-wrapper {
  overflow: hidden;
  position: relative;
}

.image-wrapper img {
  transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

/* 文字渐入动画 */
.fade-in {
  animation: fadeIn 1.2s ease-in;
}

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

/* 网格布局优化 */
.grid-masonry {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

/* 视觉灵感墙不规则布局 */
.mood-board {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  grid-auto-rows: 200px;
}

.mood-board .item:nth-child(3n+1) {
  grid-row: span 2;
}

.mood-board .item:nth-child(4n+2) {
  grid-column: span 2;
}

/* 细节聚焦区横向滚动 */
.horizontal-scroll {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.horizontal-scroll::-webkit-scrollbar {
  display: none;
}

.horizontal-scroll > * {
  scroll-snap-align: start;
  flex-shrink: 0;
}

/* 导航链接激活状态 */
.nav-link {
  position: relative;
  transition: color 0.3s ease;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: #000;
  transition: width 0.3s ease;
}

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

/* 页脚样式 */
footer {
  background: #1a1a1a;
  color: #fff;
  padding: 2rem 0;
  text-align: center;
  font-size: 0.875rem;
  letter-spacing: 0.1em;
}

/* 响应式调整 */
@media (max-width: 768px) {
  .carousel-container {
    height: 60vh;
  }
  
  .grid-masonry {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .mood-board {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    grid-auto-rows: 150px;
  }
}

/* 图片加载占位 */
.img-placeholder {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
}

@keyframes loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* 防止内容闪烁 */
.no-flicker {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}