/* 视频列表，自动切换播放 */
.swiper-video-list {
  width: 100%;
}

.swiper-video-list .swiper-slide {
  width: 140px;
  height: 260px;
  border-radius: 10px;
  margin-right: 15px;
  overflow: hidden;
}

.swiper-video-list .swiper-btn-box .swiper-btn {
  background: white;
  width: 25px;
  height: 25px;
  text-align: center;
  line-height: 20px;
  border-radius: 50%;
}

.swiper-video-list .swiper-btn-box .swiper-btn.swiper-button-disabled {
  display: none;
}

.swiper-video-list .swiper-btn-box .swiper-btn:after {
  color: var(--color-primary);
  font-size: 12px;
  font-weight: bold;
}

.swiper-video-list .swiper-slide .video-box:hover {
  opacity: 0.9;
}

/* 视频无限切换 */
.swiper-video-switch-box {
  position: relative;
}

.swiper-video-switch-box .back-btn {
  padding: 0;
  margin: 10px;
  width: 40px;
  height: 40px;
  background-color: rgba(0, 0, 0, 0.5);
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  border: none;
  outline: none;
  cursor: pointer;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 100;
}

.swiper-video-switch-box .back-btn .icon {
  color: white;
  font-size: 20px;
}

.swiper-video-switch,
.swiper-video-switch .swiper,
.swiper-video-switch .swiper-slide {
  width: 400px;
  height: 800px;
  max-width: 100vw;
  max-height: 100vh;
  border-radius: 10px;
}

.swiper-video-switch-box .swiper-btn-box {
  position: absolute;
  right: -70px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 150px;
  z-index: 100;
}

.swiper-video-switch-box .swiper-btn-box .swiper-btn {
  position: static;
  display: block;
  margin-top: 0;
  transform: rotate(90deg);
  background: white;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.swiper-video-switch-box .swiper-btn-box .swiper-btn:after {
  font-size: 20px;
  color: black;
  font-weight: bold;
}

/****************** 视频样式 *******************/
.video-box {
  position: relative;
  width: 100%;
  height: 100%;
  cursor: pointer;
}

.video-box video {
  position: absolute;
  z-index: 1;
  background-color: black;
}

/* 裁剪处理 */
.video-box.video-cover video {
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  min-width: 100%;
  min-height: 100%;
  object-fit: cover;
}

.video-box .video-info {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 10;
  width: 100%;
  height: 100%;
  color: white;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-decoration: none;
}

.video-box .video-info .top-play-btn {
  margin: 5px;
  display: inline-block;
}

.video-box .video-info .top-play-btn .icon {
  color: white;
  font-size: 24px;
}

.video-box .video-info .info-bottom {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding-top: 20px;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0) 40%, rgba(0, 0, 0, 0.6) 100%);
}

.info-box {
  flex: 1;
  overflow: hidden;
  color: white;
}

.video-box .video-info .info-bottom-text {
  font-size: 14px;
  font-weight: bold;
  margin: 5px;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-decoration: none;
}

.video-box .video-info .info-bottom-text-2 {
  flex: 1;
  font-size: 14px;
  font-weight: bold;
  margin: 0 10px 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  text-decoration: none;
}

.video-box .video-info .info-bottom-other {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  margin: 0 10px 10px;
  color: #ccc;
  text-decoration: none;
}

.video-box .video-info .info-bottom-other .author-name {
  max-width: 230px;
  display: inline-block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.video-box .video-info .info-bottom-other:hover {
  color: white;
  text-decoration: underline !important;
}

.video-box .video-info .info-bottom-other .icon-twitter {
  background-color: rgba(0, 0, 0, 0.5);
  border-radius: 50%;
  width: 20px;
  height: 20px;
  text-align: center;
  line-height: 20px;
  font-size: 14px;
}

/* 点赞、分享 */
.video-box .handle-box {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 10px;
  margin-right: 10px;
}

.video-box .handle-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 14px;
  position: relative;
}

.video-box .handle-item .handle-btn {
  padding: 0;
  background-color: rgba(0, 0, 0, 0.5);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  justify-content: center;
  align-items: center;
  pointer-events: auto;
  color: #fff;
  font-weight: bold;
  border: none;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
  cursor: pointer;
}

.video-box .handle-item .handle-btn .icon {
  color: inherit;
  font-size: 24px;
}

.video-box .handle-item .handle-btn.like-btn.like-active .icon {
  color: red;
}

.video-box .handle-item .handle-btn.like-btn.active .icon {
  color: red;
  animation-name: like;
  animation-duration: 1s;
}

/* like动画 */
@keyframes like {
  0% {
    font-size: 16px;
  }
  25% {
    font-size: 28px;
  }
  50% {
    font-size: 20px;
  }
  100% {
    font-size: 24px;
  }
}

.video-box .share-box {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  right: calc(100% + 15px);
  background-color: white;
  padding: 0 10px;
  display: flex;
  align-items: center;
  border-radius: 4px;
}

.video-box .share-box .share-btn {
  padding: 10px;
  text-decoration: none;
}

.video-box .share-box .share-btn .icon {
  color: black;
  font-size: 18px;
}

.video-box .share-box::after {
  content: '';
  display: block;
  border: 10px solid white;
  border-top-color: transparent;
  border-left-color: transparent;
  transform: rotate(-45deg);
  margin-right: -18px;
}

/* 进度条 */
.video-box .progress-bar {
  position: absolute;
  z-index: 10;
  bottom: 0;
  left: 0;
  width: 100%;
  flex: 1;
  height: 3px;
  background-color: rgba(255, 255, 255, 0.2);
  overflow: hidden;
  cursor: pointer;
}

/* 已缓冲部分 */
.video-box .progress-bar .progress-bar-buffered {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
  width: 0%;
  height: 100%;
  background: #ffffff;
  opacity: 0.3;
}

/* 已播放部分 */
.video-box .progress-bar .progress-bar-played {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 10;
  width: 0%;
  height: 100%;
  background: #ffffff;
}

/* 播放按钮 */
.video-box .play-pause-btn {
  position: absolute;
  z-index: 10;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  border: none;
  outline: none;
  width: 70px;
  height: 70px;
  border-radius: 50%;
  cursor: pointer;
  padding: 0;
  margin: 0;
  background: rgba(0, 0, 0, 0.4);
  overflow: hidden;
  display: none;
  opacity: 0.8;
  text-align: center;
}

.video-box .play-pause-btn .icon {
  font-size: 36px;
  color: rgba(255, 255, 255, 0.8);
}

/* 小屏幕(手机端) */
@media screen and (max-width: 767px) {
  .logo-box {
    display: none;
  }

  .swiper-video-list .swiper-btn-box .swiper-btn {
    display: none;
  }

  .swiper-video-switch,
  .swiper-video-switch .swiper-slide {
    border-radius: 0;
    max-height: 100vh !important;
    height: 100vh;
    width: 100vw;
  }

  .swiper-video-switch-box .swiper-btn-box {
    display: none;
  }
}
