/* 轮播图动画 */
.carousel-item {
  transition: opacity 1.5s ease-in-out;
}

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

.carousel-item:not(.active) {
  opacity: 0;
}

/* 图片悬停效果 */
.hover-zoom {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-zoom:hover {
  transform: scale(1.05);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

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

/* 渐显动画 */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* 导航下划线动画 */
.nav-link {
  position: relative;
  transition: color 0.3s ease;
}

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

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

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

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

/* 标签过滤动画 */
.filter-item {
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.filter-item.hidden {
  opacity: 0;
  transform: scale(0.9);
  display: none;
}

/* 时间轴样式 */
.timeline-item {
  position: relative;
  padding-left: 40px;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: #f43f5e;
}

.timeline-line {
  position: absolute;
  left: 5px;
  top: 20px;
  bottom: 0;
  width: 2px;
  background-color: #e5e7eb;
}

/* 图片覆盖文字动画 */
.image-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
  transform: translateY(100%);
  transition: transform 0.3s ease;
  padding: 20px;
  color: white;
}

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

/* 自定义强调色 */
:root {
  --rose-50: #fff1f2;
  --rose-100: #ffe4e6;
  --rose-500: #f43f5e;
  --rose-600: #e11d48;
}

/* 响应式布局 */
@media (max-width: 1024px) {
  .masonry {
    column-count: 2;
  }
}

@media (max-width: 640px) {
  .masonry {
    column-count: 1;
  }
  
  .timeline-item {
    padding-left: 30px;
  }
}

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

.loading {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* 文字渐入效果 */
.text-gradient {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* 返回顶部按钮 */
.back-to-top {
  position: fixed;
  bottom: 20px;
  right: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.back-to-top.show {
  opacity: 1;
  visibility: visible;
}

/* 细节放大镜效果 */
.magnifier {
  overflow: hidden;
  position: relative;
}

.magnifier img {
  transition: transform 0.5s ease;
}

.magnifier:hover img {
  transform: scale(1.5);
}

/* 标签选中状态 */
.tag-active {
  background-color: #f43f5e;
  color: white;
}

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

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

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

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

/* 选择动画 */
@keyframes slideInLeft {
  from {
    transform: translateX(-100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.slide-in-left {
  animation: slideInLeft 0.8s ease-out;
}

/* 浮动动画 */
@keyframes float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

.float-animation {
  animation: float 3s ease-in-out infinite;
}