

.slider-container {
  width: 100%;
  text-align: center;
}

.slider {
  position: relative;
  width: 100%;
  height: 400px;
  overflow: hidden;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.slides {
  position: relative;
  width: 100%;
  height: 100%;
}

.slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  visibility: hidden; /* 使用 visibility 控制显示 */
  transition: opacity 1s ease-in-out, visibility 1s ease-in-out; /* 添加 visibility 过渡 */
  object-fit: cover;
}

.slide.active {
  opacity: 1;
  visibility: visible; /* 激活时显示 */
}

video.slide {
  object-fit: cover; /* 视频覆盖整个容器 */
}

/* 确保视频控制条可见 */
video.slide::-webkit-media-controls {
  display: flex !important;
}

.arrow {
  position: absolute;
  top: 50%;
  width: 50px;
  height: 50px;
  transform: translateY(-50%);
  background-color: rgba(0, 0, 0, 0.5);
  color: white;
  border: none;
  padding: 10px;
  cursor: pointer;
  font-size: 18px;
  border-radius: 50%;
  transition: background-color 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.arrow:hover {
  background-color: rgba(0, 0, 0, 0.8);
}

.prev {
  left: 10px;
}

.next {
  right: 10px;
}

.thumbnails {
  display: flex;
  justify-content: center;
  margin-top: 10px;
  gap: 5px; /* 缩略图之间的间距 */
}

.thumbnail {
  width: 80px;
  height: 60px;
  cursor: pointer;
  border: 2px solid transparent;
  border-radius: 5px;
  transition: border-color 0.3s ease;
  flex-shrink: 0; /* 防止缩略图缩小 */
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.thumbnail img, .thumbnail video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.thumbnail.active {
  border-color: #007bff;
}

.thumbnail:hover {
  border-color: #0056b3;
}