/* ============================================================
   自定义播放器皮肤（YT 风格）— 所有页面共用
   结构：.vp-shell（flex column）> video（flex 1，object-fit:contain）+ .vp-controls（贴视频底部）
   ============================================================ */
.vp-shell {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  background: #000;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
}
.vp-shell video {
  display: block;
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  outline: none;
}

/* ---------- 控制条 ---------- */
.vp-controls {
  position: relative;
  flex: 0 0 auto;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 12px 10px;
  background: linear-gradient(0deg, rgba(0,0,0,.78) 0%, rgba(0,0,0,.45) 55%, transparent 100%);
  opacity: 0;
  transition: opacity .22s ease;
  pointer-events: none;
  z-index: 5;
}
.vp-shell.vp-show .vp-controls,
.vp-shell.vp-paused .vp-controls,
.vp-shell:hover .vp-controls { opacity: 1; pointer-events: auto; }

/* 进度条行 */
.vp-seek {
  position: relative;
  height: 18px;
  display: flex;
  align-items: center;
  cursor: pointer;
}
.vp-seek::before { /* 轨道 */
  content: "";
  position: absolute;
  left: 0; right: 0;
  height: 4px;
  border-radius: 99px;
  background: rgba(255,255,255,.25);
}
.vp-seek .vp-buf { /* 缓冲 */
  position: absolute;
  left: 0;
  height: 4px;
  border-radius: 99px;
  background: rgba(255,255,255,.35);
  width: 0%;
  pointer-events: none;
}
.vp-seek input {
  -webkit-appearance: none;
  appearance: none;
  position: relative;
  width: 100%;
  height: 18px;
  margin: 0;
  background: transparent;
  cursor: pointer;
  z-index: 2;
}
.vp-seek input::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 99px;
  background: linear-gradient(to right, #ff6b35 0%, #e63946 var(--prog, 0%), transparent var(--prog, 0%));
}
.vp-seek input::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: #ff6b35;
  border: none;
  margin-top: -5px;
  box-shadow: 0 1px 4px rgba(0,0,0,.5);
  opacity: 0;
  transition: opacity .15s;
}
.vp-shell.vp-show .vp-seek input::-webkit-slider-thumb,
.vp-shell:hover .vp-seek input::-webkit-slider-thumb,
.vp-seek:hover input::-webkit-slider-thumb { opacity: 1; }
.vp-seek input::-moz-range-track {
  height: 4px; border-radius: 99px; background: transparent;
}
.vp-seek input::-moz-range-progress {
  height: 4px; border-radius: 99px;
  background: linear-gradient(90deg, #ff6b35, #e63946);
}
.vp-seek input::-moz-range-thumb {
  width: 14px; height: 14px; border-radius: 50%; background: #ff6b35; border: none;
}

/* 按钮行 */
.vp-bar {
  display: flex;
  align-items: center;
  gap: 6px;
}
.vp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 34px;
  padding: 0 8px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: #fff;
  font-size: 15px;
  font-family: inherit;
  cursor: pointer;
  transition: background .15s, transform .1s;
}
.vp-btn:hover { background: rgba(255,255,255,.16); }
.vp-btn:active { transform: scale(.94); }
.vp-btn.vp-on { color: #ff8a5c; }
.vp-time {
  font-size: 12.5px;
  color: #e8ecf3;
  font-variant-numeric: tabular-nums;
  margin: 0 6px 0 2px;
  white-space: nowrap;
}
.vp-flex { flex: 1; }

/* 音量 */
.vp-vol-wrap { display: flex; align-items: center; gap: 4px; }
.vp-vol-wrap input {
  -webkit-appearance: none;
  appearance: none;
  width: 70px;
  height: 4px;
  border-radius: 99px;
  background: rgba(255,255,255,.35);
  cursor: pointer;
}
.vp-vol-wrap input::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px; height: 12px; border-radius: 50%;
  background: #fff; border: none;
}
.vp-vol-wrap input::-moz-range-thumb {
  width: 12px; height: 12px; border-radius: 50%; background: #fff; border: none;
}

/* 倍速 */
.vp-rate { font-size: 13px; font-weight: 700; letter-spacing: .3px; }
.vp-rate:hover { color: #ff8a5c; }

/* 画中画（不支持时隐藏） */
.vp-pip { font-size: 16px; }

/* 学习入口（练习 / 笔记） */
.vp-extra { display: flex; align-items: center; gap: 6px; margin-right: 4px; }
.vp-learn {
  font-size: 12.5px;
  font-weight: 600;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.22);
  white-space: nowrap;
}
.vp-learn:hover { background: linear-gradient(135deg, var(--accent, #ff6b35), var(--accent2, #e63946)); border-color: transparent; }

/* 视频上的提示（暂停时居中按钮等，暂不用） */

/* ---------- 触屏设备：点按切换控制条，不误触播放 ---------- */
@media (pointer: coarse) {
  .vp-shell .vp-controls { padding-bottom: calc(10px + env(safe-area-inset-bottom)); }
  .vp-btn { min-width: 40px; height: 36px; font-size: 14px; padding: 0 6px; }
  .vp-time { font-size: 12px; }
  .vp-vol-wrap { display: none; }   /* 移动端隐藏音量滑块，保留静音按钮 */
  .vp-rate { display: none; }        /* 移动端隐藏倍速（设置菜单可调） */
  .vp-pip { display: none; }         /* iOS/移动端画中画支持有限 */
  .vp-extra { flex-shrink: 0; }
  .vp-learn { font-size: 11.5px; padding: 0 6px; height: 32px; }
}
