theme-interactive-timeline {
  display: block;
}

.timeline-container {
  width: 100%;
  background-color: rgb(var(--color-background));
}

.timeline-container .timeline-main {
  width: 100%;
  max-width: calc(var(--page-padding) * 2 + var(--page-width));
  margin: 0 auto;
  padding-inline: var(--page-padding);
  box-sizing: border-box;
  font-weight: initial;
  color: rgb(var(--color-foreground));
  flex-shrink: 0;
}

/* 时间轴内容包装器 */
.timeline-content-wrapper {
  position: relative;
  margin-bottom: 0;
  min-height: 500px;
}

/* 单个时间轴项目 - 移除容器动画 */
.timeline-item {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  display: flex;
}

.timeline-item.active {
  opacity: 1;
}

/* 图片容器样式 */
.timeline-item .timeline-images {
  flex: 1;
  position: relative;
  overflow: hidden;
}

.timeline-item .timeline-image {
  width: 100%;
  height: 100%;
}

.timeline-item .timeline-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* 图片在容器内进行视差效果 - 不离开容器 */
  opacity: 0;
  transform: scale(1.05) translateX(-15px); /* 轻微放大+少量左移，保持在容器内 */
  transition: all 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* 激活状态：图片淡入到正确位置 */
.timeline-item.active .timeline-image img {
  opacity: 1;
  transform: scale(1) translateX(0); /* 回到正常大小和位置 */
}

/* 文本内容样式 - 保持原有动画 */
.timeline-item .timeline-text {
  flex: 1;
  background: white;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

/* 文本内容垂直对齐控制 */
.timeline-item .timeline-text.align-start {
  justify-content: flex-start;
}

.timeline-item .timeline-text.align-center {
  justify-content: center;
}

.timeline-item .timeline-text.align-end {
  justify-content: flex-end;
}

.timeline-item .timeline-info {
  padding: 48px;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.3s ease 0.3s, transform 0.3s ease 0.3s;
}

.timeline-item.active .timeline-info {
  opacity: 1;
  transform: translateY(0);
}

.timeline-item .timeline-title {
  font-size: 12px;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.3s ease 0.4s;
  font-weight: initial;
  letter-spacing: 2px;
  color: rgb(var(--color-foreground));
}

.timeline-item .timeline-subtitle {
  font-size: 28px;
  margin: 20px 0px;
  opacity: 0;
  transform: translateY(10px);
  font-weight: initial;
  transition: all 0.3s ease 0.3s;
  letter-spacing: 5px;
  color: rgb(var(--color-foreground));
}

.timeline-item .timeline-description {
  font-size: 14px;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.3s ease 0.4s;
  color: rgb(var(--color-foreground));
}

.timeline-item.active .timeline-title,
.timeline-item.active .timeline-subtitle,
.timeline-item.active .timeline-description {
  opacity: 1;
  transform: translateY(0);
}

/* 年份导航容器 */
.timeline-years-wrapper {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 10px;
  padding-top: 20px;
}

.timeline-years {
  display: inline-flex;
  justify-content: center;
  gap: 40px;
  position: relative;
  min-width: 100%;
  padding: 0 20px;
}

.year-item {
  cursor: pointer;
  text-align: center;
  position: relative;
  padding-bottom: 2px;
  flex-shrink: 0;
}

.year-text {
  font-size: 14px;
  transition: all 0.3s ease;
  letter-spacing: 3px;
  color: rgb(var(--color-foreground));
}

.year-item.active .year-text {
  font-size: 18px;
}

.year-underline {
  position: absolute;
  left: 0;
  width: 0;
  height: 2px;
  background-color: #333;
  transition: width 0.3s ease;
}

.year-item.active .year-underline {
  width: 95%;
}

/* 响应式设计 - 移动端 */
@media (max-width: 768px) {
  .timeline-container .timeline-main {
    padding: 0; /* 从 padding: 0 15px; 改为 padding: 0; */
  }
  
  .timeline-content-wrapper {
    margin-bottom: 40px; /* 从0px改为40px，为年份导航留出空间 */
  }
  
  .year-item {
    padding-bottom: 10px;
  }
  
  .timeline-item {
    flex-direction: column;
    min-height: auto;
  }
  
  .timeline-item .timeline-images {
    width: 100%;
    height: 596px;
    flex: none;
    background-color: rgba(0,0,0,0.2);
  }

  .timeline-item .timeline-images:before {
    content: "";
    background: #0006;
    border-radius: inherit;
    z-index: 1;
    pointer-events: none;
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
  }

  .timeline-years-wrapper {
    background-color: white;
    -ms-overflow-style: none;
    scrollbar-width: none;
    position: relative; /* 确保年份导航在最上层 */
    z-index: 10; /* 添加更高的z-index */
  }

  .timeline-years-wrapper::-webkit-scrollbar {
    display: none;
  }
  
  .timeline-item .timeline-text {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    background-color: transparent;
    padding: 20px;
    margin: 0;
    text-align: center;
    z-index: 1;
  }
  
  .timeline-item .timeline-info {
    padding: 0px;
    background-color: transparent;
  }
  
  .timeline-item .timeline-title {
    font-size: 12px;
    margin-bottom: 15px;
    color: white;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
  }
  
  .timeline-item .timeline-subtitle {
    font-size: 20px;
    margin-bottom: 20px;
    color: white;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
  }

  .timeline-item .timeline-description {
    font-size: 14px;
    color: white;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
  }
  
  .timeline-years {
    column-gap: 2.25rem;
    padding: 0 15px;
  }
  
  .year-text {
    font-size: 14px;
    opacity: 0.65;
  }

  .year-item.active .year-text {
    font-size: 16px;
    opacity: 1;
  }
  
  .desktop-only {
    display: none;
  }
}

@media (min-width: 769px) {
  .mobile-only {
    display: none;
  }
}