﻿/* =========================================================================
   video-v2.css — 上課專區「影片播放頁」iv2 深色劇院式（scope: .lc）
   - 內嵌 video.js（深色 skin）＋ 本堂資訊卡 ＋ 補充教材 ＋ 右側扁平 playlist
   - 與 reviewlist-iv2（加入複習）整合（[data-rl-fav].is-on）
   - 頁首 / 頁尾由 main.master 提供；本檔僅負責中間劇院區
   ========================================================================= */

.lc {
  --lc-bg: #0b0b0f; --lc-surface: #16161c; --lc-card: #1d1d24; --lc-card-2: #25252e;
  --lc-line: rgba(255,255,255,0.09); --lc-line-strong: rgba(255,255,255,0.16);
  --lc-text: #f4f4f6; --lc-sub: #b6b6bf; --lc-muted: #7d7d88;
  --lc-primary: #7c6cf2; --lc-primary-soft: rgba(124,108,242,0.16); --lc-amber: #f5d75e;
  --lc-r: 16px; --lc-r-sm: 10px; --lc-panel-w: 380px;
  color: var(--lc-text);
  padding: 28px 0 56px;
  font-size: 16px;
  font-family: 'Noto Sans TC', 'Microsoft JhengHei', -apple-system, sans-serif;
  background:
    radial-gradient(920px 520px at 82% -6%, rgba(124,108,242,0.20), transparent 60%),
    radial-gradient(720px 520px at -4% 104%, rgba(245,215,94,0.07), transparent 55%),
    repeating-linear-gradient(45deg, rgba(255,255,255,0.018) 0 1px, transparent 1px 24px),
    repeating-linear-gradient(-45deg, rgba(255,255,255,0.018) 0 1px, transparent 1px 24px),
    var(--lc-bg);
}
.lc a { color: inherit; text-decoration: none; }
.lc * { box-sizing: border-box; }
.lc img, .lc svg { display: block; max-width: 100%; }
.lc-inner { width: 88%; max-width: 1400px; margin: 0 auto; }
.lc-icn { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }

/* ---- 頂部列 ---- */
.lc-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.lc-back { display: inline-flex; align-items: center; gap: 8px; color: var(--lc-sub); font-weight: 500; font-size: 0.92em; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--lc-line); transition: .15s; }
.lc-back:hover { color: #fff; border-color: var(--lc-line-strong); background: var(--lc-surface); box-shadow: inset 0 0 0 1px var(--lc-line-strong); }
.lc-top-title { font-weight: 700; font-size: 1.05em; color: #fff; min-width: 0; flex: 1; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: 'Noto Serif TC', Georgia, serif; }
.lc-top-title:empty { display: none; }

/* ---- 版面 ---- */
.lc-grid { display: grid; grid-template-columns: minmax(0,1fr) 360px; gap: 22px; align-items: start; }
.lc-stage { min-width: 0; }

/* ---- 播放器舞台（video.js 內嵌） ---- */
.lc-video {
  position: relative; aspect-ratio: 16 / 9; background: #000;
  border-radius: var(--lc-r); overflow: hidden;
  border: 1px solid var(--lc-line);
  box-shadow: 0 30px 70px rgba(0,0,0,0.6), 0 0 0 1px var(--lc-line), 0 0 60px rgba(124,108,242,0.14);
}
/* video.js 撐滿舞台 */
.lc-video .video-js { width: 100% !important; height: 100% !important; background-color: #000; }
.lc-video .vjs-tech { width: 100%; height: 100%; object-fit: contain; }
.lc-video video { width: 100%; height: 100%; }

/* 原型樣式：隱藏 video.js 原生控制列／大播放鍵／快進鍵，改用下方自訂控制列 */
.lc-video .vjs-control-bar { display: none !important; }
.lc-video .vjs-big-play-button { display: none !important; }
.lc-video .skip-button { display: none !important; }
.lc-video .vjs-loading-spinner { border-color: rgba(124,108,242,0.65); }

/* ===== 自訂控制列（移植原型 learn-iv2；以 JS 驅動 video.js） ===== */
/* 中央播放浮層（暫停時顯示） */
.lc-video .lc-play { position: absolute; inset: 0; margin: auto; width: 64px; height: 64px; border-radius: 50%; background: rgba(124,108,242,0.92); display: grid; place-items: center; box-shadow: 0 12px 48px rgba(124,108,242,0.6), 0 0 0 8px rgba(124,108,242,0.16); cursor: pointer; transition: transform .15s; z-index: 3; }
.lc-video .lc-play:hover { transform: scale(1.06); }
.lc-video .lc-play svg { width: 26px; height: 26px; fill: #fff; margin-left: 3px; }
/* 脈動改用 ::after 光環以 transform+opacity（合成層），取代動 box-shadow 的逐幀重繪 */
.lc-video .lc-play::after { content: ""; position: absolute; inset: 0; border-radius: 50%; pointer-events: none; box-shadow: 0 0 0 8px rgba(124,108,242,0.18); transform: scale(1); will-change: transform, opacity; animation: lcPlayPulse 2.8s ease-in-out infinite; }
@keyframes lcPlayPulse { 0%,100% { transform: scale(1); opacity: 0.6; } 50% { transform: scale(1.18); opacity: 0; } }

.lc-video .lc-controls { position: absolute; left: 0; right: 0; bottom: 0; padding: 10px 14px 12px; background: linear-gradient(to top, rgba(6,8,18,0.88), transparent); z-index: 4; opacity: 0; pointer-events: none; transition: opacity .2s; }
/* 播放時預設隱藏；點擊畫面／滑鼠移到底部（JS 加上 .lc-show-controls）或暫停（.lc-paused）才顯示 */
.lc-video.lc-show-controls .lc-controls, .lc-video.lc-paused .lc-controls { opacity: 1; pointer-events: auto; }
.lc-video .lc-track { height: 4px; border-radius: 3px; background: rgba(255,255,255,0.22); margin-bottom: 10px; cursor: pointer; transition: height .12s; position: relative; }
.lc-video:hover .lc-track { height: 6px; }
.lc-video .lc-track > span { display: block; height: 100%; width: 0; background: var(--lc-primary); border-radius: 3px; position: relative; box-shadow: 0 0 10px rgba(124,108,242,0.8); }
.lc-video .lc-track > span::after { content: ""; position: absolute; right: -6px; top: 50%; transform: translateY(-50%); width: 12px; height: 12px; border-radius: 50%; background: #fff; opacity: 0; transition: opacity .12s; }
.lc-video:hover .lc-track > span::after { opacity: 1; }
.lc-video .lc-ctrl-row { display: flex; align-items: center; gap: 3px; color: #fff; }
.lc-video .lc-cbtn { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; color: #fff; background-color: rgba(255,255,255,0.09); border: 1px solid rgba(255,255,255,0.1); cursor: pointer; transition: background-color .12s, transform .1s; flex-shrink: 0; padding: 0; }
.lc-video .lc-cbtn:hover { background-color: rgba(255,255,255,0.22); }
.lc-video .lc-cbtn:active { transform: scale(0.9); }
.lc-video .lc-cbtn .lc-icn { width: 22px; height: 22px; }
.lc-video .lc-cbtn-play .lc-icn { width: 24px; height: 24px; }
.lc-video .lc-cbtn-play rect { fill: #fff; }
.lc-video .lc-cbtn-play polygon { fill: #fff; stroke: #fff; }
.lc-video .lc-cbtn-seek .lc-icn { width: 28px; height: 28px; filter: drop-shadow(0.9px 0 0 rgba(0,240,160,0.8)) drop-shadow(-0.9px 0 0 rgba(150,110,255,0.85)); }
.lc-video .lc-time { margin: 0 10px; padding: 6px 12px; border-radius: 999px; background-color: rgba(255,255,255,0.09); border: 1px solid rgba(255,255,255,0.1); font-size: 0.82em; color: rgba(255,255,255,0.9); font-variant-numeric: tabular-nums; white-space: nowrap; }
.lc-video .lc-spacer { flex: 1; }
.lc-video .lc-vol { display: flex; align-items: center; border-radius: 999px; transition: background-color .18s; }
.lc-video .lc-vol:hover { background-color: rgba(255,255,255,0.1); padding-right: 10px; }
.lc-video .lc-vol:hover .lc-cbtn { background-color: transparent; border-color: transparent; }
.lc-video .lc-vol-track { width: 0; height: 6px; border-radius: 999px; background: rgba(255,255,255,0.22); position: relative; transition: width .2s ease, margin .2s ease; cursor: pointer; overflow: visible; }
.lc-video .lc-vol:hover .lc-vol-track,
.lc-video .lc-vol.is-dragging .lc-vol-track { width: 64px; margin-right: 6px; }
.lc-video .lc-vol.is-dragging { background-color: rgba(255,255,255,0.1); padding-right: 10px; }
.lc-video .lc-vol.is-dragging .lc-cbtn { background-color: transparent; border-color: transparent; }
.lc-video .lc-vol-fill { position: relative; display: block; height: 100%; border-radius: 999px; background: #fff; }
/* 音量可拖拉白點：只在展開（hover/拖曳）時顯示，收合時隱藏 */
.lc-video .lc-vol-fill::after { content: ""; position: absolute; right: -5px; top: 50%; transform: translateY(-50%); width: 12px; height: 12px; border-radius: 50%; background: #fff; box-shadow: 0 0 4px rgba(0,0,0,0.5); cursor: grab; opacity: 0; transition: opacity .15s; }
.lc-video .lc-vol:hover .lc-vol-fill::after,
.lc-video .lc-vol.is-dragging .lc-vol-fill::after { opacity: 1; }
.lc-video .lc-vol.is-dragging .lc-vol-fill::after { cursor: grabbing; }
.lc-video .lc-vol.is-muted .lc-vol-fill { background: var(--lc-muted); }
.lc-video .lc-vol.is-muted .lc-vol-fill::after { background: var(--lc-muted); }
.lc-video .lc-speed-wrap { position: relative; flex-shrink: 0; margin-left: 2px; }
.lc-video .lc-speed-btn { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: 999px; background-color: rgba(255,255,255,0.12); color: #fff; font-size: 0.84em; cursor: pointer; border: 1px solid rgba(255,255,255,0.1); transition: background-color .15s; }
.lc-video .lc-speed-btn:hover { background-color: rgba(255,255,255,0.26); }
.lc-video .lc-speed-btn .lc-icn { width: 24px; height: 24px; }
.lc-video .lc-speed-cap { font-weight: 500; opacity: 0.92; }
.lc-video .lc-speed-btn b { font-weight: 800; font-variant-numeric: tabular-nums; }
.lc-video .lc-speed-menu { position: absolute; bottom: 46px; right: 0; background: #22222b; border: 1px solid var(--lc-line-strong); border-radius: 12px; padding: 6px; min-width: 148px; box-shadow: 0 18px 44px rgba(0,0,0,0.55); display: none; z-index: 6; }
.lc-video .lc-speed-menu.is-open { display: block; animation: lcRise .18s ease both; }
.lc-video .lc-speed-opt { padding: 9px 14px; border-radius: 8px; color: var(--lc-sub); font-weight: 600; font-size: 0.88em; cursor: pointer; display: flex; align-items: center; justify-content: space-between; transition: background .12s, color .12s; }
.lc-video .lc-speed-opt:hover { background: var(--lc-card-2); color: #fff; }
.lc-video .lc-speed-opt.is-active { color: #fff; }
.lc-video .lc-speed-opt.is-active::after { content: "✓"; color: var(--lc-primary); font-weight: 800; margin-left: 10px; }
.lc-video .lc-fs-btn.is-on { background-color: rgba(255,255,255,0.22); }

/* 全螢幕（保留原生 :fullscreen 規則作為相容備援；殘留 video.js 原生控制列在全螢幕仍隱藏） */
.lc-video:fullscreen { width: 100vw; height: 100vh; aspect-ratio: auto; border-radius: 0; border: 0; }
.lc-video:fullscreen .video-js, .lc-video:fullscreen video { height: 100% !important; }
.lc-video:-webkit-full-screen { width: 100vw; height: 100vh; aspect-ratio: auto; border-radius: 0; }
.lc-video:-webkit-full-screen .video-js, .lc-video:-webkit-full-screen video { height: 100% !important; }

/* 方案 B：全平台統一 CSS 偽全螢幕（iPhone 不支援元素原生全螢幕，故改用 class 切換；不搬 <video>，自訂控制列/浮水印維持在最上層） */
.lc-video.lc-fs {
  position: fixed; inset: 0; margin: 0;
  width: 100vw; height: 100vh; height: 100dvh; max-width: none;
  aspect-ratio: auto; border-radius: 0; border: 0;
  z-index: 99999;
}
.lc-video.lc-fs .video-js, .lc-video.lc-fs video { height: 100% !important; }
/* 偽全螢幕時鎖背景捲動 */
html.lc-fs-lock, html.lc-fs-lock body { overflow: hidden !important; }

/* ===== 階段二：偽全螢幕左右懸浮收合面板（dock）=====
   平時隱藏；只有進偽全螢幕(.lc-fs)時才顯示。把真實 #dataList／#lcPaneNote 搬入面板本體，退出搬回。 */
.lc-dock { position: absolute; top: 0; bottom: 0; z-index: 7; display: none; align-items: stretch;
  transition: transform .42s cubic-bezier(.16,1,.3,1); pointer-events: none; }
.lc-video.lc-fs .lc-dock,
.lc-video:fullscreen .lc-dock,
.lc-video:-webkit-full-screen .lc-dock { display: flex; bottom: 64px; }
.lc-dock > * { pointer-events: auto; }
.lc-dock-left { left: 0; flex-direction: row; }
.lc-dock-right { right: 0; flex-direction: row-reverse; }
/* 收合：面板滑出、把手露在邊緣（需 .peeked） */
.lc-dock-left.collapsed { transform: translateX(calc(-1 * var(--lc-panel-w))); }
.lc-dock-right.collapsed { transform: translateX(var(--lc-panel-w)); }
/* 收合且未 peek（播放中／滑鼠不在邊緣／行動未點擊）→ 連把手一起藏到畫面外 */
.lc-dock-left.collapsed:not(.peeked) { transform: translateX(calc(-1 * var(--lc-panel-w) - 52px)); }
.lc-dock-right.collapsed:not(.peeked) { transform: translateX(calc(var(--lc-panel-w) + 52px)); }

/* 面板本體（玻璃感） */
.lc-panel { width: var(--lc-panel-w); height: 100%; display: flex; flex-direction: column;
  /* blur 16→10:面板覆在播放器上時,影片播放中每幀重算模糊的成本降低（玻璃感幾乎不變） */
  background: rgba(18,18,24,.78); backdrop-filter: blur(10px) saturate(1.2); -webkit-backdrop-filter: blur(10px) saturate(1.2);
  border-right: 1px solid var(--lc-line-strong); }
.lc-dock-right .lc-panel { border-right: none; border-left: 1px solid var(--lc-line-strong); }
.lc-panel-head { display: flex; align-items: center; gap: 10px; padding: 16px 16px 12px; border-bottom: 1px solid var(--lc-line); flex-shrink: 0; }
.lc-panel-head .t { font-family: 'Noto Serif TC', serif; font-weight: 700; color: #fff; font-size: 1.04em; }
.lc-panel-body { flex: 1; overflow-y: auto; padding: 12px 14px 18px; scrollbar-width: thin; }
.lc-panel-body::-webkit-scrollbar { width: 7px; }
.lc-panel-body::-webkit-scrollbar-thumb { background: rgba(255,255,255,.16); border-radius: 99px; }
/* 搬入面板的筆記分頁強制顯示（原本非 is-active 會被隱藏） */
.lc-panel-body .lc-tabpane { display: block !important; }
/* 搬入面板的章節清單撐滿 */
.lc-panel-body #dataList { max-height: none; }

/* 收合把手（chevron + 直書標籤） */
.lc-handle { align-self: center; width: 34px; min-height: 118px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  background: rgba(124,108,242,.92); color: #fff; border: none; cursor: pointer;
  border-radius: 0 12px 12px 0; box-shadow: 0 8px 24px rgba(124,108,242,.42); transition: .16s; padding: 14px 0; }
.lc-dock-right .lc-handle { border-radius: 12px 0 0 12px; }
.lc-handle:hover { background: var(--lc-primary); filter: brightness(1.08); }
.lc-handle-lbl { writing-mode: vertical-rl; letter-spacing: .18em; font-size: .82em; font-weight: 700; }
.lc-handle .lc-icn { width: 18px; height: 18px; stroke: #fff; fill: none; stroke-width: 2.4; transition: transform .42s cubic-bezier(.16,1,.3,1); }
.lc-dock-left .lc-handle .lc-icn { transform: rotate(180deg); }
.lc-dock-left.collapsed .lc-handle .lc-icn { transform: rotate(0); }
.lc-dock-right.collapsed .lc-handle .lc-icn { transform: rotate(180deg); }

/* 浮水印維持在最上層（蓋過面板） */
.lc-video.lc-fs .vjs-watermark, .lc-video.lc-fs .user-info,
.lc-video:fullscreen .vjs-watermark, .lc-video:fullscreen .user-info,
.lc-video:-webkit-full-screen .vjs-watermark, .lc-video:-webkit-full-screen .user-info { z-index: 30 !important; }

/* 行動裝置：面板改近全寬抽屜 */
@media (max-width: 640px) {
  .lc { --lc-panel-w: 88vw; }
  .lc-handle { min-height: 96px; }
}

/* 控制列 RWD（窄螢幕單行縮小、收起「播放速度」字樣） */
@media (max-width: 560px) {
  .lc-video .lc-controls { padding: 7px 7px 9px; }
  .lc-video .lc-ctrl-row { gap: 2px; }
  .lc-video .lc-spacer { display: none; }
  .lc-video .lc-speed-cap { display: none; }
  .lc-video .lc-cbtn { width: 30px; height: 30px; }
  .lc-video .lc-cbtn .lc-icn { width: 17px; height: 17px; }
  .lc-video .lc-cbtn-seek .lc-icn { width: 21px; height: 21px; }
  .lc-video .lc-time { margin: 0 2px; padding: 3px 6px; font-size: 0.66em; }
  .lc-video .lc-speed-btn { height: 30px; padding: 0 8px; }
  .lc-video .lc-vol:hover .lc-vol-track { width: 44px; }
}

/* 觸控裝置（手機／平板）：無 hover 可觸發，進度軌常駐加粗、滑塊常駐顯示，
   並用隱形熱區擴大垂直可觸範圍，讓手指更好按、好拖曳 */
@media (hover: none), (pointer: coarse) {
  .lc-video .lc-track { height: 6px; }
  /* 隱形觸控熱區：上下各延伸 9px（落在影片區與軌道下方 10px 間距內，不蓋到控制鈕） */
  .lc-video .lc-track::before { content: ""; position: absolute; left: 0; right: 0; top: -9px; bottom: -9px; }
  .lc-video .lc-track > span::after { opacity: 1; width: 14px; height: 14px; right: -7px; }
}

/* 舞台空狀態（尚未選課） */
.lc-stage-empty { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; color: var(--lc-muted); background: radial-gradient(ellipse at 50% 42%, #20202a 0%, #0a0a0e 75%); }
.lc-stage-empty svg { width: 56px; height: 56px; fill: rgba(124,108,242,0.5); }
.lc-stage-empty p { margin: 0; font-size: 0.95em; }

/* ---- 本堂資訊 ---- */
.lc-meta { margin-top: 20px; border: none; border-radius: var(--lc-r); padding: 22px 24px; background: rgba(255,255,255,0.06); box-shadow: 0 8px 24px rgba(0,0,0,0.18); }
.lc-meta .eyebrow { color: var(--lc-primary); font-weight: 700; font-size: 0.78em; letter-spacing: 0.1em; text-transform: uppercase; }
.lc-meta .eyebrow:empty { display: none; }
.lc-meta h1 { font-size: 1.5em; font-weight: 700; color: #fff; margin: 8px 0 0; letter-spacing: -0.01em; font-family: 'Noto Serif TC', Georgia, 'Times New Roman', serif; background: linear-gradient(90deg, #ffffff, #cfc8ff); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.lc-meta-info { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 28px; margin-top: 16px; color: var(--lc-sub); font-size: 0.9em; }
.lc-meta-info .it { display: flex; align-items: center; gap: 9px; min-width: 0; padding-left: 12px; border-left: 2px solid var(--lc-line); }
.lc-meta-info .it .lc-icn { width: 17px; height: 17px; color: var(--lc-muted); flex-shrink: 0; }
.lc-meta-info .it > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.lc-meta-info .it > span#lcMetaTeacher, .lc-meta-info .it > span#lcMetaScope, .lc-meta-info .it > span#lcMetaCourse, .lc-meta-info .it > span#lcMetaDur { font-weight: 600; color: var(--lc-text); }
@media (max-width: 560px) {
  /* 手機：本堂資訊改單欄、完整顯示（取消省略截斷，允許換行） */
  .lc-meta-info { grid-template-columns: 1fr; gap: 10px; }
  .lc-meta-info .it { align-items: flex-start; }
  .lc-meta-info .it > span { white-space: normal; overflow: visible; text-overflow: clip; word-break: break-word; }
}

/* 加入複習主按鈕 */
.lc-fav-main { display: inline-flex; align-items: center; gap: .5em; height: 40px; padding: 0 16px; border-radius: 999px; background: transparent; color: var(--lc-sub); border: 1px solid var(--lc-line-strong); font-weight: 600; font-size: .9em; cursor: pointer; transition: .15s; margin-top: 14px; }
.lc-fav-main:hover { color: #fff; border-color: #fff; }
.lc-fav-main.is-on { background: var(--lc-amber); color: #3a2e00; border-color: var(--lc-amber); box-shadow: 0 8px 22px rgba(245,215,94,0.38); }
.lc-fav-main .rl-on { display: none; }
.lc-fav-main.is-on .rl-on { display: inline; }
.lc-fav-main.is-on .rl-off { display: none; }

/* ---- 補充教材卡 ---- */
.lc-tabcard { margin-top: 20px; border: none; border-radius: var(--lc-r); overflow: hidden; background: rgba(255,255,255,0.06); box-shadow: 0 8px 24px rgba(0,0,0,0.18); }
.lc-tabs { display: flex; gap: 4px; padding: 10px 12px 0; border-bottom: 1px solid var(--lc-line); }
.lc-tab { display: inline-flex; align-items: center; gap: 8px; padding: 12px 18px; border-radius: var(--lc-r-sm) var(--lc-r-sm) 0 0; color: #fff; font-weight: 600; font-size: 0.92em; border: 1px solid var(--lc-line); border-bottom: none; position: relative; top: 1px; background: var(--lc-bg); }
.lc-tab .lc-icn { width: 18px; height: 18px; }
.lc-tab.is-active::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--lc-primary); box-shadow: 0 0 10px rgba(124,108,242,0.7); }
.lc-tab { cursor: pointer; }
.lc-tab:not(.is-active) { color: var(--lc-sub); background: transparent; border-color: transparent; }
.lc-tab:not(.is-active):hover { color: #fff; background: var(--lc-card-2); }
.lc-tabpane { display: none; }
.lc-tabpane.is-active { display: block; }
.lc-matlist:empty::after { content: "本課程沒有補充教材"; display: block; padding: 22px; color: var(--lc-muted); font-size: 0.88em; text-align: center; }

/* ---- 我的筆記分頁 ---- */
.lc-note { padding: 18px 20px 20px; }
.lc-note-empty { padding: 26px 18px; text-align: center; color: var(--lc-sub); font-size: 0.98em; }
.lc-note-area { width: 100%; min-height: 180px; resize: vertical; box-sizing: border-box; padding: 14px 16px; border-radius: var(--lc-r-sm); border: 1px solid var(--lc-line-strong); background: var(--lc-bg); color: var(--lc-text); font-family: inherit; font-size: 1.02em; line-height: 1.7; outline: none; transition: border-color .15s, box-shadow .15s; }
.lc-note-area::placeholder { color: var(--lc-muted); }
.lc-note-area:focus { border-color: var(--lc-primary); box-shadow: 0 0 0 3px var(--lc-primary-soft); }
.lc-note-area:disabled { opacity: .6; cursor: not-allowed; }
.lc-note-foot { display: flex; align-items: center; justify-content: flex-end; gap: 14px; margin-top: 12px; }
.lc-note-status { color: var(--lc-sub); font-size: 0.92em; margin-right: auto; }
.lc-note-save { display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--lc-primary); background: var(--lc-primary); color: #fff; font-weight: 600; font-size: 0.88em; cursor: pointer; transition: .15s; box-shadow: 0 8px 22px rgba(124,108,242,0.4); }
.lc-note-save:hover { filter: brightness(1.08); }
.lc-note-save .lc-icn { width: 16px; height: 16px; }

/* 撰寫框：影片時間戳標記 + 新增 */
.lc-note-compose { background: var(--lc-card-2); border: 1px solid var(--lc-line); border-radius: var(--lc-r-sm); padding: 14px 16px; }
.lc-note-compose-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.lc-note-ts-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; background: var(--lc-primary-soft); color: #b3a8ff; font-weight: 700; font-size: 0.86em; font-variant-numeric: tabular-nums; }
.lc-note-ts-chip .lc-icn { width: 15px; height: 15px; }
.lc-note-ts-sync { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; border: 1px solid var(--lc-line-strong); background: transparent; color: var(--lc-sub); font-size: 0.82em; font-weight: 600; cursor: pointer; transition: .14s; }
.lc-note-ts-sync:hover { color: #fff; border-color: var(--lc-primary); }
.lc-note-ts-sync .lc-icn { width: 14px; height: 14px; }
.lc-note-compose .lc-note-area { min-height: 90px; }

/* 歷史清單（時間戳可點擊跳轉） */
.lc-note-list { margin-top: 16px; display: flex; flex-direction: column; gap: 10px; }
.lc-note-listempty { padding: 22px 18px; text-align: center; color: var(--lc-sub); font-size: 0.95em; border: 1px dashed var(--lc-line-strong); border-radius: var(--lc-r-sm); }
.lc-note-item { display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px; border: 1px solid var(--lc-line); border-radius: var(--lc-r-sm); background: var(--lc-bg); }
.lc-note-ts { flex-shrink: 0; display: inline-flex; align-items: center; gap: 5px; height: 28px; padding: 0 11px; border-radius: 999px; border: 1px solid var(--lc-primary); background: var(--lc-primary-soft); color: #c4bcff; font-weight: 700; font-size: 0.8em; font-variant-numeric: tabular-nums; cursor: pointer; transition: .14s; }
.lc-note-ts:hover { background: var(--lc-primary); color: #fff; }
.lc-note-ts .lc-icn { width: 12px; height: 12px; fill: currentColor; stroke: none; }
.lc-note-item-body { flex: 1; min-width: 0; }
.lc-note-item-text { color: var(--lc-text); font-size: 1.02em; line-height: 1.7; word-break: break-word; }
.lc-note-item-time { color: var(--lc-sub); font-size: 0.85em; margin-top: 6px; font-variant-numeric: tabular-nums; }
.lc-note-del { flex-shrink: 0; width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; border: 1px solid transparent; background: transparent; color: var(--lc-muted); cursor: pointer; transition: .14s; }
.lc-note-del:hover { color: #ff7a7a; background: rgba(255,99,99,0.12); }
.lc-note-del .lc-icn { width: 16px; height: 16px; }

.lc-mat-item { display: flex; align-items: center; gap: 13px; padding: 16px 22px; border-bottom: 1px solid var(--lc-line); transition: background .14s; }
.lc-mat-item:last-child { border-bottom: none; }
.lc-mat-item:hover { background: var(--lc-card-2); }
.lc-mat-ic { width: 38px; height: 38px; border-radius: 9px; background: rgba(255,99,99,0.14); color: #ff7a7a; display: grid; place-items: center; flex-shrink: 0; }
.lc-mat-name { flex: 1; min-width: 0; color: var(--lc-text); font-weight: 500; font-size: 0.94em; }
.lc-mat-name .sz { display: block; color: var(--lc-muted); font-size: 0.8em; font-weight: 400; margin-top: 2px; }
.lc-mat-go { display: inline-flex; align-items: center; gap: 5px; color: var(--lc-sub); font-size: 0.84em; font-weight: 600; white-space: nowrap; }
.lc-mat-item:hover .lc-mat-go { color: #fff; }

/* ---- 右側章節清單（扁平 playlist） ---- */
.lc-playlist { border: none; border-radius: var(--lc-r); overflow: hidden; position: sticky; top: 92px; background: rgba(255,255,255,0.06); box-shadow: 0 8px 24px rgba(0,0,0,0.18); }
.lc-pl-head { padding: 18px 20px; border-bottom: 1px solid var(--lc-line); }
.lc-pl-head .t { font-weight: 700; color: #fff; font-size: 1.02em; font-family: 'Noto Serif TC', Georgia, serif; }
.lc-pl-head .s { font-size: 0.82em; color: var(--lc-muted); margin-top: 4px; }
.lc-pl-list { max-height: 640px; overflow-y: auto; }

/* 群組標頭 */
.lc-pl-group { padding: 13px 20px 7px; font-size: 0.78em; font-weight: 700; letter-spacing: .04em; color: var(--lc-muted); background: rgba(0,0,0,0.18); border-bottom: 1px solid var(--lc-line); }
.lc-pl-group-ex .lc-pl-tag { display: inline-block; margin-right: 8px; padding: 1px 8px; border-radius: 999px; background: var(--lc-primary-soft); color: #b3a8ff; font-size: 0.92em; }

/* 課程列 */
.lc-pl-item { display: flex; gap: 13px; padding: 14px 18px; border-bottom: 1px solid var(--lc-line); transition: background .14s; cursor: pointer; align-items: center; }
.lc-pl-item:hover { background: var(--lc-card-2); }
.lc-pl-item.is-active { background: var(--lc-primary-soft); box-shadow: inset 3px 0 0 var(--lc-primary), inset 0 0 30px rgba(124,108,242,0.12); }
.lc-pl-item.lc-pl-locked { cursor: default; opacity: 0.6; }
.lc-pl-idx { width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0; display: grid; place-items: center; background: rgba(255,255,255,0.08); color: var(--lc-sub); font-size: 0.82em; font-weight: 700; }
.lc-pl-item.is-active .lc-pl-idx { background: var(--lc-primary); color: #fff; }
/* 已完課列（E1：studylog 交叉標記） */
.lc-pl-item.lc-pl-done .lc-pl-idx { background: rgba(86,200,135,0.18); color: #56c887; }
.lc-pl-item.lc-pl-done .lc-pl-check { width: 17px; height: 17px; fill: none; stroke: #56c887; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.lc-pl-item.lc-pl-done.is-active .lc-pl-idx { background: var(--lc-primary); }
.lc-pl-item.lc-pl-done.is-active .lc-pl-check { stroke: #fff; }
/* 章節清單頂部完課進度條 */
.lc-pl-prog { margin-top: 10px; }
.lc-pl-prog-bar { height: 6px; border-radius: 999px; background: rgba(255,255,255,0.1); overflow: hidden; }
.lc-pl-prog-bar > i { display: block; height: 100%; width: 0; border-radius: 999px; background: linear-gradient(90deg, #56c887, #7c6cf2); transition: width .5s ease; }
.lc-pl-prog-txt { margin-top: 6px; font-size: 0.76em; color: var(--lc-sub); }
.lc-pl-body { min-width: 0; flex: 1; }
.lc-pl-title { font-size: 0.9em; color: var(--lc-text); font-weight: 500; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.lc-pl-item.is-active .lc-pl-title { color: #fff; font-weight: 600; }
.lc-pl-dur { font-size: 0.76em; color: var(--lc-muted); margin-top: 4px; }
/* 播放小鈕（純視覺；點整列即播） */
.lc-pl-play { width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0; display: grid; place-items: center; background: rgba(255,255,255,0.06); color: var(--lc-sub); transition: .14s; }
.lc-pl-play svg { width: 13px; height: 13px; fill: currentColor; stroke: none; }
.lc-pl-item:hover .lc-pl-play { background: var(--lc-primary); color: #fff; }
/* 複習星標 */
.lc-pl-fav { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; color: var(--lc-muted); cursor: pointer; flex-shrink: 0; transition: color .15s, background .15s; }
.lc-pl-fav:hover { background: rgba(255,255,255,0.1); color: #fff; }
.lc-pl-fav svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.lc-pl-fav.is-on { color: var(--lc-amber); }
.lc-pl-fav.is-on svg { fill: var(--lc-amber); stroke: var(--lc-amber); }
.lc-pl-empty { padding: 30px 18px; text-align: center; color: var(--lc-muted); font-size: 0.9em; }

/* ---- 結束浮層（重新播放 / 下一則；video.js ShowReplay 動態插入） ---- */
.lc-end { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; background: rgba(8,8,14,0.86); z-index: 5; animation: lcRise .25s ease both; }
.lc-end-btns { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.lc-end-btn { display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 20px; border-radius: 999px; border: 1px solid var(--lc-line-strong); background: transparent; color: #fff; font-weight: 600; font-size: 0.92em; cursor: pointer; transition: .15s; }
.lc-end-btn:hover { border-color: #fff; background: rgba(255,255,255,0.06); }
.lc-end-btn.primary { background: var(--lc-primary); border-color: var(--lc-primary); box-shadow: 0 8px 22px rgba(124,108,242,0.45); }
.lc-end-btn.primary:hover { filter: brightness(1.08); }
.lc-end-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; }

/* ---- 入場動態 ---- */
@keyframes lcRise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.lc-video, .lc-meta, .lc-tabcard, .lc-playlist { animation: lcRise .5s cubic-bezier(.16,1,.3,1) both; }
.lc-meta { animation-delay: .06s; }
.lc-tabcard { animation-delay: .12s; }
.lc-playlist { animation-delay: .10s; }

/* ---- RWD ---- */
@media (max-width: 1024px) {
  .lc-grid { grid-template-columns: 1fr; }
  .lc-playlist { position: static; }
  .lc-pl-list { max-height: 440px; }
}
@media (max-width: 560px) {
  .lc { padding: 16px 0 40px; }
  .lc-inner { width: 92%; }
  .lc-meta { padding: 18px 16px; }
  .lc-meta h1 { font-size: 1.25em; }
}

@media (prefers-reduced-motion: reduce) {
  .lc-video, .lc-meta, .lc-tabcard, .lc-playlist, .lc-end, .lc-video .lc-play, .lc-video .lc-play::after { animation: none !important; }
}

/* =========================================================================
   IPBAN 學生端提醒：常駐防盜載聲明列 / 封鎖友善覆蓋層 / 首次聲明彈窗
   ========================================================================= */

/* ---- 常駐防盜載聲明列（#lcStage 下方、#lcMeta 前方；不干擾互動） ---- */
.lc-guard {
  display: flex; align-items: center; gap: 10px;
  margin-top: 12px; padding: 10px 14px;
  border-radius: var(--lc-r-sm);
  border: 1px solid var(--lc-line);
  background: rgba(245, 215, 94, 0.06);
  color: var(--lc-sub); font-size: 0.9em; line-height: 1.65;
}
.lc-guard .lc-icn { width: 18px; height: 18px; stroke: var(--lc-amber); flex-shrink: 0; }
.lc-guard span { min-width: 0; }

/* ---- 播放被封鎖時的友善覆蓋層（蓋在播放器舞台上） ---- */
/* z-index 需高於 video.js 浮水印（player.css .vjs-watermark=2000、全螢幕=2005），
   否則封鎖說明會被浮水印／學員資訊蓋住 */
.lc-video .lc-ban {
  position: absolute; inset: 0; z-index: 2100;
  display: grid; place-items: center; padding: 24px;
  background: rgba(6, 8, 18, 0.92);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
}
.lc-ban-box { max-width: 460px; text-align: center; color: var(--lc-text); }
.lc-ban-ic { width: 54px; height: 54px; margin: 0 auto 14px; stroke: var(--lc-amber); fill: none; stroke-width: 1.7; }
.lc-ban-box h3 { margin: 0 0 10px; font-size: 1.25em; font-weight: 800; color: #fff; font-family: 'Noto Serif TC', Georgia, serif; }
.lc-ban-box p { margin: 0; font-size: 0.98em; line-height: 1.85; color: var(--lc-sub); }

/* ---- 首次防盜載聲明彈窗（每台裝置只彈一次） ---- */
.lc-modal {
  position: fixed; inset: 0; z-index: 100000;
  display: none; place-items: center; padding: 24px;
  background: rgba(4, 5, 12, 0.72);
  -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
}
.lc-modal.is-open { display: grid; }
.lc-modal-box {
  width: 100%; max-width: 480px;
  background: var(--lc-card);
  border: 1px solid var(--lc-line-strong);
  border-radius: var(--lc-r);
  padding: 28px 26px 24px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
}
.lc-modal-ic { width: 48px; height: 48px; margin: 0 auto 14px; stroke: var(--lc-amber); fill: none; stroke-width: 1.7; }
.lc-modal-box h3 { margin: 0 0 12px; text-align: center; font-size: 1.25em; font-weight: 800; color: #fff; font-family: 'Noto Serif TC', Georgia, serif; }
.lc-modal-box p { margin: 0 0 10px; font-size: 0.96em; line-height: 1.9; color: var(--lc-sub); }
.lc-modal-ok {
  display: block; width: 100%; margin-top: 18px; padding: 12px;
  border: none; border-radius: 999px;
  background: var(--lc-primary); color: #fff;
  font-size: 1.02em; font-weight: 700; cursor: pointer;
  font-family: inherit; transition: filter .15s, box-shadow .15s;
}
.lc-modal-ok:hover { filter: brightness(1.08); box-shadow: 0 8px 28px rgba(124, 108, 242, 0.5); }

@media (prefers-reduced-motion: reduce) {
  .lc-modal-ok { transition: none; }
}
