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

:root {
  --color-bg: #FFFFFF;
  --color-text: #2C2C2C;
  --color-accent: #D4AF37;
  --color-overlay: rgba(0, 0, 0, 0.6);
  --transition-smooth: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
  font-family: 'PingFang SC', 'Source Han Sans CN', 'Noto Sans CJK SC', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.8;
  overflow-x: hidden;
}

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

/* 导航栏固定样式 */
.nav-fixed {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  transition: var(--transition-smooth);
}

/* 全屏轮播容器 */
.hero-carousel {
  position: relative;
  height: 100vh;
  overflow: hidden;
}

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

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

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

/* 轮播文案叠加层 */
.carousel-caption {
  position: absolute;
  bottom: 20%;
  left: 50%;
  transform: translateX(-50%);
  color: #FFFFFF;
  font-size: 2rem;
  font-weight: 300;
  text-align: center;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  padding: 0 2rem;
  max-width: 90%;
}

/* 图片悬停效果 */
.image-hover {
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.image-hover img {
  transition: transform 0.6s ease;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

.image-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--color-overlay);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  opacity: 0;
  transition: var(--transition-smooth);
  text-align: center;
}

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

/* 瀑布流布局 */
.masonry-grid {
  column-count: 3;
  column-gap: 1.5rem;
}

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

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

@media (max-width: 640px) {
  .masonry-grid {
    column-count: 1;
  }
  
  .carousel-caption {
    font-size: 1.5rem;
  }
}

/* 导航链接动效 */
.nav-link {
  position: relative;
  transition: var(--transition-smooth);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--color-accent);
  transition: width 0.3s ease;
}

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

/* 标签过滤器 */
.filter-tags {
  display: flex;
  gap: 2rem;
  justify-content: center;
  flex-wrap: wrap;
}

.filter-tag {
  cursor: pointer;
  transition: var(--transition-smooth);
  position: relative;
  padding-bottom: 0.5rem;
}

.filter-tag::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background: var(--color-accent);
  transition: width 0.3s ease;
}

.filter-tag:hover::after,
.filter-tag.active::after {
  width: 100%;
}

/* 往期回顾滑动区域 */
.scroll-container {
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--color-accent) transparent;
}

.scroll-container::-webkit-scrollbar {
  height: 6px;
}

.scroll-container::-webkit-scrollbar-track {
  background: transparent;
}

.scroll-container::-webkit-scrollbar-thumb {
  background: var(--color-accent);
  border-radius: 3px;
}

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

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

/* 加载状态 */
.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(0, 0, 0, 0.1);
  border-radius: 50%;
  border-top-color: var(--color-accent);
  animation: spin 0.8s linear infinite;
}

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

/* 页脚样式 */
footer {
  text-align: center;
  padding: 2rem 0;
  color: #999;
  font-size: 0.875rem;
  font-weight: 300;
}

/* 响应式字体大小 */
@media (max-width: 768px) {
  html {
    font-size: 14px;
  }
}

@media (min-width: 1920px) {
  html {
    font-size: 18px;
  }
}