/* 全局样式 - 补充Tailwind.css的定制样式 */

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

:root {
  --primary-bg: #ffffff;
  --secondary-bg: #f5f5f5;
  --text-primary: #2c2c2c;
  --text-secondary: #666666;
  --accent-color: #8b8b8b;
  --hover-overlay: rgba(0, 0, 0, 0.1);
}

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

body {
  font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text-primary);
  background-color: var(--primary-bg);
  line-height: 1.6;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Noto Serif SC', Georgia, serif;
  font-weight: 400;
  letter-spacing: 0.05em;
}

/* 导航栏样式 */
.nav-link {
  position: relative;
  transition: all 0.3s ease;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 50%;
  width: 0;
  height: 1px;
  background-color: var(--text-primary);
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

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

/* 图片容器 */
.image-container {
  position: relative;
  overflow: hidden;
  background-color: var(--secondary-bg);
}

.image-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

/* 图片蒙层 */
.image-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.3), transparent);
  opacity: 0;
  transition: opacity 0.4s ease;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 2rem;
}

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

.overlay-text {
  color: white;
  font-size: 0.875rem;
  letter-spacing: 0.1em;
  text-align: center;
  transform: translateY(10px);
  transition: transform 0.4s ease;
}

.image-container:hover .overlay-text {
  transform: translateY(0);
}

/* 轮播图样式 */
.carousel-container {
  position: relative;
  height: 100vh;
  min-height: 600px;
}

.carousel-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1s ease-in-out;
}

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

.carousel-caption {
  position: absolute;
  bottom: 20%;
  left: 50%;
  transform: translateX(-50%);
  color: white;
  font-size: 2.5rem;
  font-family: 'Noto Serif SC', serif;
  letter-spacing: 0.15em;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  white-space: nowrap;
}

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

.masonry-grid {
  column-count: 3;
  column-gap: 1.5rem;
}

.masonry-item {
  break-inside: avoid;
  margin-bottom: 1.5rem;
}

/* 风格分类卡片 */
.style-card {
  position: relative;
  height: 400px;
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.3s ease;
}

.style-card:hover {
  transform: translateY(-5px);
}

.style-card-title {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 2rem;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
  color: white;
  font-size: 1.5rem;
  letter-spacing: 0.1em;
}

/* 滚动容器 */
.scroll-container {
  display: flex;
  overflow-x: auto;
  scroll-behavior: smooth;
  gap: 1.5rem;
  padding: 2rem 0;
  scrollbar-width: none;
}

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

.scroll-item {
  flex: 0 0 auto;
  width: 350px;
}

/* 返回顶部按钮 */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 50px;
  height: 50px;
  background-color: var(--text-primary);
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  opacity: 0;
  transition: all 0.3s ease;
  z-index: 1000;
}

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

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

/* 加载动画 */
.lazy-loading {
  background: linear-gradient(90deg, var(--secondary-bg) 25%, #e0e0e0 50%, var(--secondary-bg) 75%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
}

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

/* 响应式设计 */
@media (max-width: 1024px) {
  .masonry-grid {
    column-count: 2;
  }
  
  .carousel-caption {
    font-size: 2rem;
  }
}

@media (max-width: 768px) {
  .masonry-grid {
    column-count: 1;
  }
  
  .gallery-grid {
    grid-template-columns: 1fr;
  }
  
  .scroll-item {
    width: 280px;
  }
  
  .carousel-caption {
    font-size: 1.5rem;
  }
  
  .style-card {
    height: 300px;
  }
}

/* 页面过渡动画 */
.fade-in {
  animation: fadeIn 0.6s ease-in;
}

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

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

/* 选中文本样式 */
::selection {
  background-color: var(--text-primary);
  color: white;
}