/* 播放器外框（player.js、playerStage.js、playerBackdrop.js）。 */

.player { aspect-ratio: 16 / 9; flex: none; background: var(--c-player-platform); border-radius: var(--r-4); box-shadow: var(--shadow-player); overflow: hidden; position: relative; }
.player iframe, .player__video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: var(--c-black); }
/* 模糊延伸背景（playerBackdrop.js）：畫布蓋滿播放器最底層，放大、模糊、壓暗；<video> 背景改透明讓它透出來 */
.player-backdrop { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scale(1.25); filter: blur(18px) brightness(.55); pointer-events: none; }
.player.has-backdrop .player__video { background: transparent; }
.player-stage.is-fullscreen .player-backdrop { display: none; }
.player-stage.is-fullscreen .player.has-backdrop .player__video { background: var(--c-black); }
.player-error { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--sp-16); color: var(--c-white); text-align: center; padding: 0 var(--sp-16); }
.player-error__icon { width: 36px; height: 36px; border-radius: 50%; border: 2px solid var(--c-white); display: flex; align-items: center; justify-content: center; font-size: var(--fs-18); font-weight: 700; }
.player-error__text { font-size: var(--fs-16); font-weight: 500; }
.player-error__back { display: inline-flex; align-items: center; min-height: 44px; padding: 0 var(--sp-16); color: var(--c-white); font-size: var(--fs-15); font-weight: 500; text-decoration: underline; }
/* 播放器外框與標註列（設計稿「共筆 標註」畫面 12、15；add-video-canvas-annotations）。
   add-custom-player-controls：標註列平常隱藏，只在畫圖模式放繪圖工具列；畫圖與全螢幕在控制列上 */
.player-stage { display: flex; flex-direction: column; gap: var(--sp-12); flex: none; }
/* 網站全螢幕：播放器填滿繪圖工具列以外的空間，影片在其中 contain 置中 */
.player-stage.is-fullscreen { width: 100%; height: 100%; gap: 0; background: var(--c-black); }
.player-stage.is-fullscreen .player { flex: 1; min-height: 0; aspect-ratio: auto; border-radius: 0; background: var(--c-black); }
.player.is-controls-hidden { cursor: none; }
.player.is-drawing { box-shadow: 0 0 0 3px var(--c-brand); }

@media (max-width: 899.98px) {
  .video-header__share, .video-header__back { --size: 44px; }
  .player { border-radius: 0; }
  .player-stage { gap: 0; }
  .player-error { gap: var(--sp-12); }
  .player-error__icon { width: 30px; height: 30px; font-size: var(--fs-15); }
  .player-error__text { font-size: var(--fs-15); }
}
