.io-widget-slider .star-slider {
  position: relative;
  width: 100%;
  min-height: 130px;
  overflow: hidden;
  border-radius: 8px;
  background: #f3f5f7;
  isolation: isolate;
  transition: height 0.35s ease;
}

.io-widget-slider .star-slide-track,
.io-widget-slider .star-slide {
  width: 100%;
  height: 100%;
}

.io-widget-slider .star-slide-track {
  position: relative;
}

.io-widget-slider .star-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  background-position: center;
  background-size: cover;
  transition: opacity 0.45s ease, visibility 0.45s ease;
}

/*
 * 当图片过宽或过高，容器会受最小/最大高度限制。
 * 此时用模糊背景填充空余区域，前景图仍完整显示。
 */
.io-widget-slider .star-slide::after {
  content: "";
  position: absolute;
  inset: -24px;
  z-index: 0;
  background-image: var(--star-slide-image, none);
  background-position: center;
  background-size: cover;
  filter: blur(20px);
  opacity: 0.22;
  transform: scale(1.08);
  pointer-events: none;
}

.io-widget-slider .star-slide.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  z-index: 1;
}

/* 即使 JS 尚未执行，第一张图也可见。 */
.io-widget-slider .star-slider:not(.is-ready) .star-slide:first-child {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  z-index: 1;
}

.io-widget-slider .star-slide img {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

/* 图片比例没有触发高度限制时，可刚好铺满容器。 */
.io-widget-slider .star-slide.is-natural-ratio img {
  object-fit: cover;
}

.io-widget-slider .star-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background: rgba(0, 0, 0, 0.28);
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}

.io-widget-slider .star-slide:hover::before {
  opacity: 1;
}

.io-widget-slider .star-slide-description {
  position: absolute;
  left: 50%;
  bottom: 35px;
  z-index: 3;
  max-width: calc(100% - 30px);
  transform: translateX(-50%);
  padding: 4px 10px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 80px;
  background: rgba(255, 255, 255, 0.62);
  color: #0d1a4e;
  font-size: 12px;
  line-height: 1.5;
  text-overflow: ellipsis;
  white-space: nowrap;
  backdrop-filter: blur(10px);
  transition: opacity 0.25s ease;
}

.io-widget-slider .star-slide:hover .star-slide-description {
  opacity: 0;
}

.io-widget-slider .star-slide-buttons {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 4;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transform: translate(-50%, -50%);
}

.io-widget-slider .star-slide-button {
  display: block;
  min-width: 90px;
  padding: 7px 16px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
  text-align: center;
  text-decoration: none;
  opacity: 0;
  transform: translateY(6px);
  backdrop-filter: blur(12px);
  transition: opacity 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.io-widget-slider .star-slide:hover .star-slide-button,
.io-widget-slider .star-slide:focus-within .star-slide-button {
  opacity: 1;
  transform: translateY(0);
}

.io-widget-slider .star-slide-button:hover {
  background: rgba(30, 30, 30, 0.34);
  color: #fff;
}

.io-widget-slider .star-slider-arrow {
  position: absolute;
  top: 50%;
  z-index: 10;
  width: 32px;
  min-width: 32px;
  height: 48px;
  padding: 0;
  transform: translateY(-50%);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 8px;
  background: rgba(207, 207, 207, 0.52);
  color: #fff;
  cursor: pointer;
  opacity: 0;
  backdrop-filter: blur(12px);
  transition: left 0.25s ease, right 0.25s ease, opacity 0.25s ease;
}

.io-widget-slider .star-slider-arrow.is-left {
  left: -34px;
}

.io-widget-slider .star-slider-arrow.is-right {
  right: -34px;
}

.io-widget-slider .star-slider:hover .star-slider-arrow {
  opacity: 1;
}

.io-widget-slider .star-slider:hover .star-slider-arrow.is-left {
  left: 10px;
}

.io-widget-slider .star-slider:hover .star-slider-arrow.is-right {
  right: 10px;
}

.io-widget-slider .star-slider-indicators {
  position: absolute;
  bottom: 10px;
  left: 50%;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 6px;
  transform: translateX(-50%);
}

.io-widget-slider .star-slider-indicator {
  width: 7px;
  height: 7px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(153, 153, 153, 0.75);
  cursor: pointer;
  transition: width 0.25s ease, background 0.25s ease;
}

.io-widget-slider .star-slider-indicator.is-active {
  width: 16px;
  border-radius: 999px;
  background: rgb(70, 103, 240);
}

.io-widget-slider .star-slider.has-one-slide .star-slider-arrow,
.io-widget-slider .star-slider.has-one-slide .star-slider-indicators {
  display: none;
}

@media (max-width: 767px) {
  .io-widget-slider .star-slider {
    min-height: 110px;
  }

  .io-widget-slider .star-slider-arrow {
    opacity: 1;
  }

  .io-widget-slider .star-slider-arrow.is-left {
    left: 8px;
  }

  .io-widget-slider .star-slider-arrow.is-right {
    right: 8px;
  }

  .io-widget-slider .star-slide-button {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .io-widget-slider .star-slider,
  .io-widget-slider .star-slide,
  .io-widget-slider .star-slider-arrow,
  .io-widget-slider .star-slider-indicator {
    transition: none;
  }
}
