/* course-player.css — 英语课课程页的视频播放器 (assets/js/course-player.js 生成的控件)。
   叠在 <video> 上面: 大播放键、进度条 (缓冲 + 章节分段 + 拖动)、时间、倍速、音量、章节跳转、全屏; 播放时几秒不动自动隐藏。 */
.cp { position: absolute; inset: 0; border-radius: inherit; overflow: hidden; font-family: "Helvetica Neue", Arial, "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  color: #fff; user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent; }
.cp:focus-visible { outline: 3px solid #86BFA3; outline-offset: 2px; }
.cp-hit { position: absolute; inset: 0; cursor: pointer; }
.cp-big { position: absolute; left: 50%; top: 50%; width: 68px; height: 68px; margin: -34px 0 0 -34px; border: 0; border-radius: 50%; padding: 0;
  background: rgba(20, 30, 26, .62); color: #fff; display: grid; place-items: center; cursor: pointer; transition: transform .15s, background .15s, opacity .2s; backdrop-filter: blur(2px); }
.cp-big:hover { background: rgba(45, 95, 74, .9); transform: scale(1.06); }
.cp-big svg { width: 30px; height: 30px; margin-left: 4px; }
.cp.playing .cp-big { opacity: 0; pointer-events: none; }
.cp-bar { position: absolute; left: 0; right: 0; bottom: 0; padding: 26px 10px 8px; background: linear-gradient(to top, rgba(0,0,0,.72), rgba(0,0,0,.35) 60%, transparent);
  transition: opacity .25s, transform .25s; }
.cp.idle .cp-bar { opacity: 0; transform: translateY(8px); pointer-events: none; }
.cp.idle { cursor: none; }
.cp.fresh .cp-bar { opacity: 0; pointer-events: none; }     /* 还没播过: 只显示大播放键 */
/* 进度条 */
.cp-prog { position: relative; height: 18px; display: flex; align-items: center; cursor: pointer; touch-action: none; }
.cp-track { position: relative; flex: 1; height: 4px; border-radius: 2px; background: rgba(255,255,255,.25); transition: height .12s; }
.cp-prog:hover .cp-track, .cp-prog.drag .cp-track { height: 6px; }
.cp-buf { position: absolute; left: 0; top: 0; bottom: 0; background: rgba(255,255,255,.4); border-radius: 2px; }
.cp-fill { position: absolute; left: 0; top: 0; bottom: 0; background: #86BFA3; border-radius: 2px; }
.cp-knob { position: absolute; top: 50%; width: 13px; height: 13px; margin: -6.5px 0 0 -6.5px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 3px rgba(134,191,163,.55); transform: scale(0); transition: transform .12s; }
.cp-prog:hover .cp-knob, .cp-prog.drag .cp-knob, .cp-prog:focus-visible .cp-knob { transform: scale(1); }
.cp-mark { position: absolute; top: -1px; bottom: -1px; width: 3px; margin-left: -1.5px; background: rgba(0,0,0,.75); }   /* 章节分界 */
.cp-tip { position: absolute; bottom: 22px; transform: translateX(-50%); padding: 3px 7px; border-radius: 6px; background: rgba(0,0,0,.8); font-size: 12px; white-space: nowrap; pointer-events: none; opacity: 0; transition: opacity .12s; }
.cp-prog:hover .cp-tip, .cp-prog.drag .cp-tip { opacity: 1; }
/* 按钮行 */
.cp-row { display: flex; align-items: center; gap: 2px; margin-top: 2px; }
.cp-btn { height: 34px; min-width: 34px; padding: 0 6px; border: 0; border-radius: 8px; background: none; color: #fff; display: inline-flex; align-items: center; justify-content: center; gap: 4px;
  font: 600 13px/1 inherit; cursor: pointer; }
.cp-btn:hover { background: rgba(255,255,255,.14); }
.cp-btn:focus-visible { outline: 2px solid #86BFA3; outline-offset: 1px; }
.cp-btn svg { width: 20px; height: 20px; flex: none; }
.cp-time { font-size: 12.5px; font-variant-numeric: tabular-nums; padding: 0 6px; white-space: nowrap; opacity: .92; }
.cp-sp { flex: 1; }
.cp-chap { font-size: 12px; padding: 0 8px; border: 1px solid rgba(255,255,255,.35); height: 26px; border-radius: 13px; }
.cp-chap:hover { border-color: #86BFA3; }
.cp-vol { display: inline-flex; align-items: center; }
.cp-vol input { width: 0; opacity: 0; transition: width .15s, opacity .15s; accent-color: #86BFA3; cursor: pointer; }
.cp-vol:hover input, .cp-vol input:focus-visible { width: 64px; opacity: 1; margin-right: 4px; }
/* 倍速菜单 */
.cp-menu { position: absolute; right: 8px; bottom: 54px; min-width: 112px; padding: 6px; border-radius: 10px; background: rgba(18,24,21,.94); box-shadow: 0 8px 24px rgba(0,0,0,.4); display: none; }
.cp-menu.on { display: block; }
.cp-menu b { display: block; padding: 4px 10px 6px; font-size: 12px; font-weight: 600; opacity: .7; }
.cp-menu button { display: flex; width: 100%; justify-content: space-between; gap: 10px; padding: 7px 10px; border: 0; border-radius: 7px; background: none; color: #fff; font: 13px/1.2 inherit; cursor: pointer; text-align: left; }
.cp-menu button:hover, .cp-menu button:focus-visible { background: rgba(255,255,255,.12); outline: none; }
.cp-menu button.on { color: #86BFA3; font-weight: 700; }
.cp-menu button.on::after { content: "✓"; }
/* 双击快进 / 快退的提示 */
.cp-seek { position: absolute; top: 50%; width: 76px; height: 76px; margin-top: -38px; border-radius: 50%; background: rgba(0,0,0,.45); display: grid; place-items: center; text-align: center;
  font-size: 12px; font-weight: 700; line-height: 1.3; opacity: 0; transition: opacity .25s; pointer-events: none; }
.cp-seek.l { left: 10%; } .cp-seek.r { right: 10%; }
.cp-seek.on { opacity: 1; transition: none; }
.cp-toast { position: absolute; left: 50%; top: 14px; transform: translateX(-50%); padding: 5px 12px; border-radius: 14px; background: rgba(0,0,0,.65); font-size: 13px; font-weight: 600; opacity: 0; transition: opacity .3s; pointer-events: none; }
.cp-toast.on { opacity: 1; transition: none; }
.cp-load { position: absolute; left: 50%; top: 50%; width: 38px; height: 38px; margin: -19px 0 0 -19px; border: 3px solid rgba(255,255,255,.3); border-top-color: #fff; border-radius: 50%; animation: cp-spin .8s linear infinite; display: none; pointer-events: none; }
.cp.waiting .cp-load { display: block; }
@keyframes cp-spin { to { transform: rotate(360deg); } }
/* 窄 (手机 / 悬浮小窗): 收起音量条和章节文字 */
.cp.narrow .cp-vol input, .cp.narrow .cp-chap-t { display: none; }
.cp.narrow .cp-time { font-size: 11.5px; padding: 0 3px; }
.cp.narrow .cp-btn { min-width: 30px; padding: 0 4px; }
/* 全屏: 容器铺满, 视频按比例放中间 */
.hvbox:fullscreen { width: 100vw !important; height: 100vh !important; background: #000; border-radius: 0; transform: none !important; }
.hvbox:fullscreen video { object-fit: contain; border-radius: 0; }
.hvbox:-webkit-full-screen { width: 100vw !important; height: 100vh !important; background: #000; }
@media (prefers-reduced-motion: reduce) { .cp-bar, .cp-big, .cp-track, .cp-knob { transition: none; } .cp-load { animation: none; } }
