/* ===== CpPlayer - B站风格 ArtPlayer 主题 ===== */

/* --- 播放器容器 --- */
.cp-video-player-shell {
  width: 100%;
  height: 100%;
  border-radius: 12px;
  overflow: hidden;
  background: #000;
  position: relative;
}

.cp-video-player-shell .art-video-player {
  width: 100% !important;
  height: 100% !important;
  border-radius: inherit;
  overflow: hidden;
  background: #000;
  --art-theme: var(--cp-player-theme, #00a1d6);
}

.cp-video-player-shell .art-video-player .art-video {
  border-radius: inherit;
  background: #000;
}

/* --- 底部控制栏（使用 ArtPlayer 默认渐变，不做覆盖） --- */

.cp-video-player-shell .art-control {
  opacity: .9;
  transition: opacity .15s;
}

.cp-video-player-shell .art-control:hover {
  opacity: 1;
}

/* --- 进度条 --- */
.cp-video-player-shell .art-progress {
  height: 12px !important;
}

.cp-video-player-shell .art-progress .art-control-progress-inner {
  height: 3px;
  transition: height .15s;
}

.cp-video-player-shell .art-progress:hover .art-control-progress-inner {
  height: 6px;
}

.cp-video-player-shell .art-progress .art-progress-loaded {
  background: rgba(255, 255, 255, .3);
}

.cp-video-player-shell .art-progress .art-progress-played {
  background: var(--cp-player-theme, #00a1d6);
}

.cp-video-player-shell .art-progress .art-progress-indicator {
  width: 14px;
  height: 14px;
  border: 2px solid var(--cp-player-theme, #00a1d6);
  background: #fff;
  border-radius: 50%;
  transform: scale(0);
  transition: transform .15s;
}

.cp-video-player-shell .art-progress:hover .art-progress-indicator {
  transform: scale(1);
}

.cp-video-player-shell .art-progress .art-progress-tip {
  background: rgba(0, 0, 0, .75);
  border-radius: 4px;
  padding: 4px 8px;
  font-size: 12px;
}

/* --- 播放/暂停按钮（使用 ArtPlayer 默认尺寸） --- */

/* --- 音量 --- */
.cp-video-player-shell .art-control-volume .art-volume-panel {
  background: rgba(0, 0, 0, .75);
  border-radius: 6px;
}

/* --- 清晰度切换按钮 --- */
.cp-video-player-shell .art-control-quality {
  font-size: 13px;
  font-weight: 500;
  padding: 0 8px;
  height: 24px;
  line-height: 24px;
  border-radius: 4px;
  color: #fff;
  transition: background .15s;
}

.cp-video-player-shell .art-control-quality:hover {
  background: rgba(255, 255, 255, .12);
}

/* --- 清晰度面板 --- */
.cp-video-player-shell .art-qualitys {
  background: rgba(21, 21, 21, .92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 8px;
  padding: 8px 0;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .4);
  border: 1px solid rgba(255, 255, 255, .08);
  min-width: 90px;
}

.cp-video-player-shell .art-qualitys a {
  display: block;
  padding: 8px 20px;
  font-size: 13px;
  color: rgba(255, 255, 255, .8);
  text-align: center;
  transition: background .15s, color .15s;
  text-decoration: none;
}

.cp-video-player-shell .art-qualitys a:hover {
  background: rgba(255, 255, 255, .08);
  color: #fff;
}

.cp-video-player-shell .art-qualitys a.art-current {
  color: var(--cp-player-theme, #00a1d6);
  font-weight: 600;
}

/* --- 倍速面板 --- */
.cp-video-player-shell .art-control-playbackRate {
  font-size: 13px;
  font-weight: 500;
}

.cp-video-player-shell .art-playbacks {
  background: rgba(21, 21, 21, .92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 8px;
  padding: 8px 0;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .4);
  border: 1px solid rgba(255, 255, 255, .08);
  min-width: 80px;
}

.cp-video-player-shell .art-playbacks a {
  display: block;
  padding: 8px 20px;
  font-size: 13px;
  color: rgba(255, 255, 255, .8);
  text-align: center;
  transition: background .15s, color .15s;
  text-decoration: none;
}

.cp-video-player-shell .art-playbacks a:hover {
  background: rgba(255, 255, 255, .08);
  color: #fff;
}

.cp-video-player-shell .art-playbacks a.art-current {
  color: var(--cp-player-theme, #00a1d6);
  font-weight: 600;
}

/* --- 设置面板 --- */
.cp-video-player-shell .art-settings {
  background: rgba(21, 21, 21, .92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 8px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .4);
  border: 1px solid rgba(255, 255, 255, .08);
}

/* --- 通知文字（只针对内层，不影响外层全宽容器） --- */
.cp-video-player-shell .art-notice .art-notice-inner {
  font-size: 13px;
}

/* --- 弹幕样式 --- */
.cp-video-player-shell .art-danmuku {
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
}

.cp-video-player-shell .art-danmuku .art-danmu {
  font-weight: 500;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, .5);
  line-height: 1.3;
}

/* 弹幕输入框 */
.cp-video-player-shell .art-danmuku-input {
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .15);
  border-radius: 6px;
  color: #fff;
  font-size: 13px;
  padding: 0 10px;
  height: 28px;
  transition: border-color .2s, background .2s;
}

.cp-video-player-shell .art-danmuku-input:focus {
  border-color: var(--cp-player-theme, #00a1d6);
  background: rgba(255, 255, 255, .12);
  outline: none;
}

.cp-video-player-shell .art-danmuku-input::placeholder {
  color: rgba(255, 255, 255, .35);
}

/* 弹幕发送按钮 */
.cp-video-player-shell .art-danmuku-emit {
  background: var(--cp-player-theme, #00a1d6);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 0 12px;
  height: 28px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background .15s;
}

.cp-video-player-shell .art-danmuku-emit:hover {
  filter: brightness(1.1);
}

/* --- 右侧功能按钮（使用 ArtPlayer 默认尺寸） --- */

/* --- 锁定按钮 --- */
.cp-video-player-shell .art-lock {
  background: rgba(0, 0, 0, .5);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* --- 遮罩层（backdrop: false 已在 JS 中设置，无需额外覆盖） --- */

/* --- 加载 loading --- */
.cp-video-player-shell .art-loading {
  opacity: .8;
}

/* --- 播放图标 (中间大的暂停/播放) --- */
.cp-video-player-shell .art-state {
  opacity: .85;
}

/* --- 续播提示 --- */
.cp-video-player-shell .art-auto-playback {
  background: rgba(21, 21, 21, .88);
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 13px;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, .1);
}

.cp-video-player-shell .art-auto-playback .art-auto-playback-jump {
  color: var(--cp-player-theme, #00a1d6);
  font-weight: 500;
}

/* --- 右键菜单 --- */
.cp-video-player-shell .art-contextmenus {
  background: rgba(21, 21, 21, .92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, .3);
  border: 1px solid rgba(255, 255, 255, .06);
}

.cp-video-player-shell .art-contextmenus .art-contextmenu a {
  color: rgba(255, 255, 255, .8);
  font-size: 13px;
  padding: 8px 16px;
}

.cp-video-player-shell .art-contextmenus .art-contextmenu a:hover {
  background: rgba(255, 255, 255, .08);
  color: #fff;
}

/* ===== Loading overlay ===== */
.cp-video-player-loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: rgba(255, 255, 255, .7);
  background: rgba(0, 0, 0, .35);
  z-index: 1400;
  pointer-events: none;
  transition: opacity .3s;
}

.cp-video-player-loading i {
  font-size: 22px;
  margin-right: 6px;
}

/* ===== Fallback video ===== */
.cp-video-player-fallback {
  width: 100%;
  height: 100%;
  display: block;
  background: #000;
  object-fit: contain;
}

/* ===== 弹幕计数 ===== */
.cp-dm-author-badge {
  display: inline-block;
  margin-right: 6px;
  padding: 0 6px;
  border-radius: 10px;
  line-height: 18px;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  background: var(--cp-player-theme, #00a1d6);
  vertical-align: middle;
}

/* ===== 移动端适配 ===== */
@media (max-width: 768px) {
  .cp-video-player-shell {
    border-radius: 0;
  }

  .cp-video-player-shell .art-video-player {
    border-radius: 0;
  }

  .cp-video-player-shell .art-control-quality {
    font-size: 12px;
    padding: 0 6px;
    height: 22px;
    line-height: 22px;
  }

  .cp-video-player-shell .art-control-playbackRate {
    font-size: 12px;
  }

  .cp-video-player-shell .art-danmuku-input {
    font-size: 12px;
    height: 26px;
    padding: 0 8px;
  }

  .cp-video-player-shell .art-danmuku-emit {
    height: 26px;
    font-size: 12px;
    padding: 0 10px;
  }

  .cp-video-player-shell .art-lock {
    width: 32px;
    height: 32px;
  }

  .cp-video-player-shell .art-notice .art-notice-inner {
    font-size: 12px;
  }

  .cp-video-player-shell .art-progress .art-progress-indicator {
    width: 12px;
    height: 12px;
  }

  .cp-video-player-shell .art-qualitys a,
  .cp-video-player-shell .art-playbacks a {
    padding: 7px 16px;
    font-size: 12px;
  }

  .cp-video-player-shell .art-auto-playback {
    font-size: 12px;
    padding: 6px 10px;
    border-radius: 6px;
  }
}

/* ===== 暗色主题兼容 ===== */
html[data-theme-mode="dark"] .cp-video-player-shell {
  border: 1px solid rgba(255, 255, 255, .06);
}
