/* Tailwind CSS 配置 */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&display=swap');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background-color: #fafaf8;
  color: #1a1a1a;
  overflow-x: hidden;
}

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

/* 导航栏样式 */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}

.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: all 0.3s ease;
  transform: translateX(-50%);
}

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

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

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

/* 图片悬停效果 */
.img-hover {
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.img-hover img {
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* 文字浮现效果 */
.text-overlay {
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.4s ease;
}

.img-hover:hover .text-overlay {
  opacity: 1;
  transform: translateY(0);
}

/* 轮播指示器 */
.carousel-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  transition: all 0.3s ease;
  cursor: pointer;
}

.carousel-indicator.active {
  width: 24px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.9);
}

/* 分类筛选按钮 */
.filter-btn {
  position: relative;
  transition: all 0.3s ease;
  background: transparent;
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.filter-btn:hover {
  border-color: #1a1a1a;
  background: #1a1a1a;
  color: #fff;
}

.filter-btn.active {
  background: #1a1a1a;
  color: #fff;
  border-color: #1a1a1a;
}

/* 瀑布流布局 */
.masonry-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
  padding: 24px;
}

@media (min-width: 768px) {
  .masonry-grid {
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 32px;
    padding: 32px;
  }
}

/* 懒加载占位 */
.lazy-img {
  opacity: 0;
  transition: opacity 0.4s ease;
}

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

/* 页脚样式 */
footer {
  text-align: center;
  padding: 48px 0;
  color: #666;
  font-size: 0.875rem;
  letter-spacing: 0.05em;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
}

/* 滚动条样式 */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

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

::-webkit-scrollbar-thumb {
  background: #d0d0d0;
  border-radius: 4px;
}

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

/* 响应式间距 */
.section-padding {
  padding: 80px 24px;
}

@media (min-width: 768px) {
  .section-padding {
    padding: 120px 48px;
  }
}

/* 加载动画 */
@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

.loading {
  animation: pulse 1.5s ease-in-out infinite;
}

/* 标题样式 */
.title-main {
  font-size: 3rem;
  font-weight: 300;
  letter-spacing: 0.1em;
  line-height: 1.2;
}

@media (min-width: 768px) {
  .title-main {
    font-size: 4.5rem;
  }
}

/* 副标题样式 */
.subtitle {
  font-size: 0.875rem;
  font-weight: 400;
  letter-spacing: 0.15em;
  color: #666;
}

/* 分隔线 */
.divider {
  width: 60px;
  height: 1px;
  background: #1a1a1a;
  margin: 32px auto;
}

/* 图片容器 */
.img-container {
  position: relative;
  overflow: hidden;
  background: #f5f5f5;
}

.img-container::before {
  content: '';
  display: block;
  padding-bottom: 133.33%;
}

.img-container img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 按钮基础样式 */
.btn-primary {
  padding: 12px 32px;
  background: #1a1a1a;
  color: #fff;
  border: none;
  font-size: 0.875rem;
  letter-spacing: 0.1em;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-primary:hover {
  background: #333;
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

/* 禁用选中高亮 */
.no-select {
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
}