@charset "UTF-8";

/* ==============================================
   VideoPlayerControl - 视频播放器控制组件样式
   依赖：iconfont（icon-play / icon-play-1）
   ============================================== */

/* 播放控制按钮容器 + 进度环 */
.video-control-btn {
  position: absolute;
  bottom: 1.5625vw;
  right: 1.5625vw;
  width: 2.9167vw;
  height: 2.9167vw;
  cursor: pointer;
  z-index: 10;
}
.video-control-btn .progress-ring {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}
.video-control-btn .progress-ring-bg {
  fill: none;
  stroke: rgba(255, 255, 255, 0.5);
  stroke-width: 5;
}
.video-control-btn .progress-ring-fg {
  fill: none;
  stroke: #3967fb;
  stroke-width: 5;
  stroke-linecap: round;
  stroke-dasharray: 213.6283;
  stroke-dashoffset: 213.6283;
}

/* ==============================================
   CSS conic-gradient 圆形进度环（替代 SVG progress-ring）
   结构：.progress-ring-conic（轨道背景）
         ::before（完整360°彩色 + mask裁剪扇形）
         .progress-ring-conic-inner（内层实心圆）
   颜色方案： #B859FD → #3943FF → #30D9FF → #3A43FF → #B859FD
   ============================================== */
.video-control-btn .progress-ring-conic {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  /* 底层：半透明白色完整圆（轨道背景） */
  background: rgba(255, 255, 255, 0.6);
}

/* ::before 伪元素：完整360°彩色圆环 + mask裁剪 */
.video-control-btn .progress-ring-conic::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  /* 完整360°彩色 conic-gradient，颜色均匀分布在整圈 */
  background: conic-gradient(
    from 0deg,
    #B859FD 0deg,
    #3943FF 96.9231deg,
    #30D9FF 188.654deg,
    #3A43FF 276.923deg,
    #B859FD 360deg
  );
  /* mask：从0°到 progress*360° 显示，其余隐藏 */
  mask: conic-gradient(
    from 0deg,
    #000 0deg,
    #000 calc(var(--progress) * 360deg),
    transparent calc(var(--progress) * 360deg),
    transparent 360deg
  );
  -webkit-mask: conic-gradient(
    from 0deg,
    #000 0deg,
    #000 calc(var(--progress) * 360deg),
    transparent calc(var(--progress) * 360deg),
    transparent 360deg
  );
}

/* 内层实心圆：覆盖中间形成环形效果 */
.video-control-btn .progress-ring-conic-inner {
  position: absolute;
  /* 环宽 ≈ 5px → 5/19.20 = 0.2604vw */
  top: 0.2604vw;
  left: 0.2604vw;
  width: calc(100% - 0.5208vw);
  height: calc(100% - 0.5208vw);
  border-radius: 50%;
  background: #333333;
  z-index: 1;
}

/* 播放/暂停按钮 */
.play-pause-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 2.3958vw;
  height: 2.3958vw;
  background: #333;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  z-index: -2;
}
/* iconfont 图标 */
.play-pause-btn .iconfont {
  color: #fff;
  font-size: 1.0417vw;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}
/* 默认：显示播放图标，隐藏暂停图标 */
.play-pause-btn .icon-play {
  display: block;
  margin-left: .2604vw;
}
.play-pause-btn .icon-play-1 {
  display: none;
}

/* 播放状态：显示暂停图标，隐藏播放图标 */
.playing .play-pause-btn .icon-play {
  display: none;
}
.playing .play-pause-btn .icon-play-1 {
  display: block;
}

/* ========== 移动端适配 ========== */
@media (max-width: 768px) {
  .video-control-btn {
    bottom: 4.2667vw;
    right: 4.2667vw;
    width: 13.3333vw;
    height: 13.3333vw;
    display: none;
  }
  .play-pause-btn {
    width: 10.6667vw;
    height: 10.6667vw;
  }
  .play-pause-btn .iconfont {
    font-size: 4.2667vw;
  }
  /* conic 进度环移动端 */
  .video-control-btn .progress-ring-conic-inner {
    /* 环宽 ≈ 4px → 4/3.75 = 1.0667vw */
    top: 1.0667vw;
    left: 1.0667vw;
    width: calc(100% - 2.1334vw);
    height: calc(100% - 2.1334vw);
  }
}