/* 定义全局变量 */
:root {
  --rotate-speed: 40;
  --count: 8;
  --easing: cubic-bezier(0.000, 0.37, 1.000, 0.63);
}

/* 设置容器样式 */
.timeline-container {
  width: 100%;
  max-width: 1024px;
  margin: 20px auto;
  position: relative;
  aspect-ratio: 1 / 1;
}

/* 鼠标悬停时暂停动画 */
.timeline-ul:hover * {
  animation-play-state: paused;
}

/* 设置列表样式 */
.timeline-ul {
  list-style-type: none;
  margin: 0;
  padding: 0;
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  z-index: 1;
}

/* 设置列表项样式 */
.timeline-li {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 100%;
  animation: rotateCW calc(var(--rotate-speed) * 1s) var(--easing) infinite;
  /* 移除默认的列表标记 */
  list-style: none;
}

/* 移除列表项的::marker标记 */
.timeline-li::marker {
  content: "";
}

/* 设置卡片样式 */
.timeline-card {
  width: 27%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 16px 24px;
  gap: 8px;
  background: #FFFFFF;
  box-shadow: 0px 4px 12px rgba(70, 0, 255, 0.1), 0px 16px 32px rgba(165, 135, 255, 0.1);
  border-radius: 12px;
  font: 400 14px '';
  color: #535062;
  animation: rotateCCW calc(var(--rotate-speed) * 1s) var(--easing) infinite;
}

/* 设置图片样式 */
.timeline-card img {
  width: 100%;
}

/* 设置链接样式 */
.timeline-card a {
  text-decoration: none;
  color: unset;
  display: block;
  height: 80px;
  overflow: hidden;
}

/* 设置模型名称样式 */
.timeline-model-name {
  font-weight: 500;
  font-size: 18px;
  line-height: 150%;
  color: #3B2ED0;
  display: block;
}

/* 设置SVG样式 */
.timeline-svg {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 0;
}

/* 设置不同列表项的动画延迟 */
.timeline-li:nth-child(2),
.timeline-li:nth-child(2) .timeline-card {
  animation-delay: calc((var(--rotate-speed)/var(--count)) * -1s);
}

.timeline-li:nth-child(3),
.timeline-li:nth-child(3) .timeline-card {
  animation-delay: calc((var(--rotate-speed)/var(--count)) * -2s);
}

.timeline-li:nth-child(4),
.timeline-li:nth-child(4) .timeline-card {
  animation-delay: calc((var(--rotate-speed)/var(--count)) * -3s);
}

.timeline-li:nth-child(5),
.timeline-li:nth-child(5) .timeline-card {
  animation-delay: calc((var(--rotate-speed)/var(--count)) * -4s);
}

.timeline-li:nth-child(6),
.timeline-li:nth-child(6) .timeline-card {
  animation-delay: calc((var(--rotate-speed)/var(--count)) * -5s);
}

/* 定义顺时针旋转动画 */
@keyframes rotateCW {
  from {
    transform: translate3d(0px, -50%, -1px) rotate(-45deg);
  }

  to {
    transform: translate3d(0px, -50%, 0px) rotate(-315deg);
  }
}

/* 定义逆时针旋转动画 */
@keyframes rotateCCW {
  from {
    transform: rotate(45deg);
  }

  to {
    transform: rotate(315deg);
  }
}

/* 设置中心圆样式 */
.timeline-center-circle {
  position: absolute;
  width: 230px;
  aspect-ratio: 1 / 1;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  background: #FFFFFF;
  box-shadow: 0px 18px 36px -18px rgba(12, 5, 46, 0.3),
    0px 30px 60px -12px rgba(12, 5, 46, 0.25);
  border-radius: 50%;
  background-size: cover;
  background-position: -35px 0;
}

/* 设置第二个圆样式 */
.timeline-second-circle {
  position: absolute;
  width: 40%;
  aspect-ratio: 1 / 1;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  background: #F5F4FE;
  opacity: 0.5;
  box-shadow: 0px 18px 36px -18px rgba(12, 5, 46, 0.3),
    0px 30px 60px -12px rgba(12, 5, 46, 0.25);
  border-radius: 50%;
  background-image: url(/images/03.gif);
}

/* 设置最后一个圆样式 */
.timeline-last-circle {
  position: absolute;
  width: 66%;
  aspect-ratio: 1 / 1;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  background: #F5F4FE;
  opacity: 0.25;
  box-shadow: 0px 18px 36px -18px rgba(12, 5, 46, 0.3), 0px 30px 60px -12px rgba(12, 5, 46, 0.25);
  border-radius: 50%;
  background-image: url(/images/03.gif);
}

/* 设置裁剪样式 */
.timeline-crop {
  -webkit-mask-image: linear-gradient(90deg, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0) 50%,
    rgba(0, 0, 0, 1) 50%, rgba(0, 0, 0, 1));
}

/* 设置遮罩样式 */
.timeline-mask {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 50%;
  background-position: 100% 50%;
  background-repeat: no-repeat;
  background-image: radial-gradient(100% 50% at 100% 50%, rgba(60, 26, 229, 0.25) 0%,
    rgba(59, 26, 229, 0.241896) 20%,
    rgba(53, 26, 229, 0.1872) 40%,
    rgba(41, 23, 240, 0.104) 60%,
    rgba(34, 26, 229, 0.0184296) 90%, rgba(32, 26, 229, 0) 100%);
}

/* 设置遮罩样式后的效果 */
.timeline-mask:after {
  content: "";
  position: absolute;
  width: 1px;
  height: 100%;
  right: 0;
  display: block;
  background-image: linear-gradient(180deg, rgba(60, 26, 229, 0) 0%, #3C1AE5 50%,
    rgba(60, 26, 229, 0) 100%);
}