/* Tailwind CSS 配置 - 提升优先级避免样式冲突 */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@300;400;500;700&display=swap');

/* 全局字体设置 */
body {
  font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  color: #333333;
  overflow-x: hidden;
}

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

/* 轮播图容器 */
.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 800ms ease-in-out;
}

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

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

/* 轮播图控制点 */
.carousel-dots {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 12px;
  z-index: 10;
}

.carousel-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.8);
  cursor: pointer;
  transition: all 300ms ease;
}

.carousel-dot.active {
  background: rgba(255, 255, 255, 0.9);
  transform: scale(1.2);
}

/* 图片悬停效果 */
.hover-scale {
  transition: transform 400ms cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-scale:hover {
  transform: scale(1.02);
}

/* 图片网格布局 */
.grid-masonry {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 32px;
}

/* 图片加载效果 */
.image-wrapper {
  position: relative;
  overflow: hidden;
  background: #fafafa;
}

.image-wrapper::before {
  content: '';
  display: block;
  padding-bottom: 133%;
}

.image-wrapper img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 500ms ease;
}

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

/* 导航栏样式增强 */
nav a {
  position: relative;
  font-weight: 300;
  letter-spacing: 1px;
  transition: color 300ms ease;
}

nav a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: #333333;
  transition: width 300ms ease;
}

nav a:hover::after {
  width: 100%;
}

/* 文字渐入效果 */
.fade-in {
  animation: fadeIn 1000ms ease-in-out;
}

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

/* 图片放大查看遮罩层 */
.lightbox-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 300ms ease;
}

.lightbox-overlay.active {
  opacity: 1;
  visibility: visible;
}

.lightbox-overlay img {
  max-width: 90%;
  max-height: 90vh;
  object-fit: contain;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
  position: absolute;
  top: 30px;
  right: 40px;
  font-size: 36px;
  color: white;
  cursor: pointer;
  transition: transform 300ms ease;
}

.lightbox-close:hover {
  transform: rotate(90deg);
}

/* 面包屑导航 */
.breadcrumb {
  font-size: 14px;
  color: #666666;
  font-weight: 300;
}

.breadcrumb a {
  transition: color 300ms ease;
}

.breadcrumb a:hover {
  color: #333333;
}

/* 按钮样式 */
.btn-elegant {
  display: inline-block;
  padding: 14px 40px;
  border: 1px solid #333333;
  background: transparent;
  color: #333333;
  font-weight: 300;
  letter-spacing: 2px;
  transition: all 400ms ease;
  cursor: pointer;
}

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

/* 响应式设计 */
@media (max-width: 768px) {
  .grid-masonry {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  
  .carousel-dots {
    bottom: 20px;
  }
  
  nav a {
    font-size: 14px;
  }
}

/* 页脚样式 */
footer {
  font-weight: 300;
  letter-spacing: 2px;
  font-size: 14px;
}

/* 标题样式 */
.title-elegant {
  font-weight: 300;
  letter-spacing: 3px;
  line-height: 1.6;
}

/* 分隔线 */
.divider-elegant {
  width: 60px;
  height: 1px;
  background: #d4af37;
  margin: 40px auto;
}

/* 卡片悬停效果 */
.card-hover {
  transition: all 400ms cubic-bezier(0.4, 0, 0.2, 1);
}

.card-hover:hover {
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  transform: translateY(-4px);
}

/* 加载动画 */
.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(51, 51, 51, 0.3);
  border-radius: 50%;
  border-top-color: #333333;
  animation: spin 800ms linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}