.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.library-shell .video-open { display: inline-flex; align-items: center; gap: 13px; min-height: 38px; padding: 3px 0; text-align: left; background: transparent; color: inherit; font-weight: 500; border: 0; }
.video-open::before { content: "▶"; display: grid; place-items: center; flex: 0 0 25px; width: 25px; height: 25px; padding-left: 2px; border: 1px solid #53657a; border-radius: 50%; color: #87b7d8; font-size: 9px; }
.library-shell .video-open:hover { color: #b9d8ef; background: none; }
.player-dialog { width: min(1120px, calc(100% - 48px)); max-width: none; max-height: calc(100svh - 40px); margin: auto; padding: 0; overflow: auto; border: 1px solid #40536a; border-radius: 12px; background: #14202e; color: #edf1f5; box-shadow: 0 24px 100px #0008; }
.player-dialog::backdrop { background: #080f1be8; }
.player-header { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 24px 28px 22px; }
.player-header h2 { font: 400 clamp(20px, 2.8vw, 28px)/1.3 Georgia, serif; margin: 0; overflow-wrap: anywhere; }
.player-header > div { min-width: 0; }
.player-dialog button { width: auto; margin: 0; min-height: 42px; padding: 0 14px; }
.player-dialog .player-icon { display: inline-grid; place-items: center; padding: 9px; width: 42px; height: 42px; min-height: 42px; flex-shrink: 0; border: 0; background: transparent; color: #d2dce6; }
.player-icon svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.player-dialog .player-icon:hover, .player-dialog .player-skip:hover { background: #26384a; color: white; }
.player-dialog .player-primary { background: #edf1f5; color: #14202e; border-radius: 50%; }
.player-dialog .player-primary:hover { background: #b9d8ef; color: #14202e; }
#player-play-icon { fill: currentColor; stroke: none; }
#player-pause-icon { stroke-width: 2.5; }
.player-stage { position: relative; background: #05090e; display: grid; place-items: center; aspect-ratio: 16 / 9; max-height: 65svh; min-height: 160px; overflow: hidden; }
.player-stage video { display: block; width: 100%; height: 100%; max-height: 65svh; min-height: 0; object-fit: contain; cursor: pointer; }
.player-loading { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; background: #05090e80; color: #bbcbd9; font-size: 14px; pointer-events: none; }
.player-spinner { width: 29px; height: 29px; border: 2px solid #304458; border-top-color: #b9d8ef; border-radius: 50%; animation: player-spin .85s linear infinite; }
@keyframes player-spin { to { transform: rotate(360deg); } }
.player-dialog .player-continue { position: absolute; inset: auto; border: 1px solid #87b7d8; background: #14202ef2; color: #edf1f5; padding: 0 24px; min-height: 52px; }
.player-bottom { padding: 17px 28px 20px; }
.player-timeline { position: relative; display: grid; align-items: center; height: 24px; margin-bottom: 9px; }
.player-buffered { position: absolute; width: 100%; height: 4px; background: #2c3e51; overflow: hidden; border-radius: 3px; pointer-events: none; }
.player-buffered span { display: block; position: absolute; height: 100%; background: #7890a4; }
.player-dialog input[type="range"] { appearance: none; -webkit-appearance: none; border: 0; padding: 0; margin: 0; border-radius: 4px; height: 24px; width: 100%; box-shadow: none; background: transparent; cursor: pointer; accent-color: #b9d8ef; }
#player-seek { position: relative; z-index: 1; }
.player-dialog input[type="range"]::-webkit-slider-runnable-track { height: 4px; background: transparent; }
.player-dialog input[type="range"]::-moz-range-track { height: 4px; background: transparent; }
.player-dialog input[type="range"]::-webkit-slider-thumb { appearance: none; -webkit-appearance: none; margin-top: -5px; width: 14px; height: 14px; background: #c7e2f5; border: 0; border-radius: 50%; box-shadow: 0 0 0 3px #14202e; }
.player-dialog input[type="range"]::-moz-range-thumb { width: 14px; height: 14px; background: #c7e2f5; border: 0; border-radius: 50%; box-shadow: 0 0 0 3px #14202e; }
.player-dialog input[type="range"]:focus-visible { outline: 2px solid #87b7d8; outline-offset: 3px; }
.player-dialog input:disabled { opacity: .4; cursor: default; }
.player-controls { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.player-controls button { touch-action: manipulation; }
.player-dialog .player-skip { border: 0; background: transparent; color: #c2cfdb; font-size: 15px; font-weight: 500; padding: 0 8px; font-variant-numeric: tabular-nums; }
.player-skip span { margin-left: 2px; color: #93a6b8; font-size: 11px; }
.player-time { font: 12px/1.4 "Segoe UI", Cantarell, sans-serif; font-variant-numeric: tabular-nums; color: #a6b5c6; margin-left: 7px; white-space: nowrap; }
.player-audio-control { flex: 0 1 190px; min-width: 105px; margin-left: auto; }
.player-audio-control select { width: 100%; min-height: 36px; height: 36px; font-size: 12px; border-color: #34475b; background: #14202e; padding: 0 9px; }
.player-audio-control:not([hidden]) ~ .player-volume-group { margin-left: 0; }
.player-subtitle-control { flex: 0 1 190px; min-width: 130px; }
.player-subtitle-control select { width: 100%; min-height: 36px; height: 36px; font-size: 12px; border-color: #34475b; background: #14202e; padding: 0 9px; }
.player-dialog .player-subtitle-add { font-size: 12px; min-height: 36px; padding: 0 10px; color: #b9d8ef; background: transparent; }
.player-subtitle-upload { border-top: 1px solid #34475b; margin-top: 16px; padding-top: 16px; }
.player-subtitle-upload > p { margin: 0 0 14px; font-size: 14px; }
.player-subtitle-upload > p span { display: block; margin-top: 5px; font-size: 12px; line-height: 1.6; color: #a6b5c6; }
.player-subtitle-fields { display: flex; gap: 12px; align-items: end; flex-wrap: wrap; }
.player-subtitle-fields > div:first-child { flex: 1 1 230px; min-width: 0; }
.player-subtitle-fields > div:nth-child(2) { flex: 0 1 120px; }
.player-subtitle-fields label { display: block; font-size: 12px; margin-bottom: 5px; }
.player-dialog .player-subtitle-fields input { width: 100%; min-height: 42px; font-size: 13px; padding: 9px; }
.player-dialog .player-subtitle-fields button { font-size: 13px; }
.player-subtitle-status { margin: 12px 0 0; font-size: 13px; color: #b9cbdc; overflow-wrap: anywhere; }
.player-subtitle-status[data-error="true"] { color: #f1b4a8; }
.player-stage video::cue { font-family: "Segoe UI", Cantarell, sans-serif; background: #05090ed9; color: #fff; }
.player-volume-group { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.player-volume-group input { max-width: 65px; }
.player-volume-group input::-webkit-slider-runnable-track { background: #53657a !important; }
.player-volume-group input::-moz-range-track { background: #53657a !important; }
.player-speed { width: 70px; min-height: 36px; height: 36px; font-size: 12px; border-color: #34475b; background: transparent; margin-left: 5px; padding: 0 7px; }
.player-error { display: flex; gap: 20px; align-items: center; justify-content: space-between; padding-bottom: 18px; color: #f1b4a8; }
.player-error p { font-size: 14px; line-height: 1.6; margin: 0; }
.player-error button { flex-shrink: 0; font-size: 13px; }
.player-surface:fullscreen { background: #05090e; display: flex; flex-direction: column; height: 100%; }
.player-surface:fullscreen .player-stage { flex: 1; aspect-ratio: auto; max-height: none; min-height: 0; }
.player-surface:fullscreen video { max-height: 100%; }
.player-surface:fullscreen .player-header, .player-surface:fullscreen .player-bottom { background: #14202e; }
@media (max-width: 640px) {
  .player-dialog { width: calc(100% - 16px); max-height: calc(100svh - 16px); border-radius: 8px; }
  .player-header { padding: 18px 15px; gap: 12px; }
  .player-header h2 { font-size: 20px; }
  .player-bottom { padding: 12px 15px 16px; }
  .player-controls { gap: 3px; flex-wrap: wrap; }
  .player-volume-group input { display: none; }
  .player-time { margin-left: 3px; font-size: 11px; }
  .player-dialog .player-skip { padding: 0 5px; }
  .player-speed { margin-left: 0; width: 63px; }
  .player-error { flex-wrap: wrap; gap: 12px; }
}
@media (prefers-reduced-motion: reduce) { .player-spinner { animation: none; } }

.player-next-panel { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding-top: 16px; margin-top: 14px; border-top: 1px solid #34475b; }
.player-next-info { min-width: 0; }
.player-next-info > span { color: #a6b5c6; font-size: 11px; letter-spacing: .06em; }
#player-next-title { margin: 5px 0 0; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#player-next-status { margin: 5px 0 0; color: #b9d8ef; font-size: 12px; }
#player-next-status:empty { display: none; }
.player-next-actions { display: flex; align-items: center; flex-shrink: 0; gap: 12px; flex-wrap: wrap; }
.player-next-actions label { display: flex; align-items: center; gap: 7px; margin: 0; font-size: 12px; color: #b9cbdc; font-weight: 400; cursor: pointer; }
.player-dialog .player-next-actions input { width: 15px; height: 15px; margin: 0; padding: 0; accent-color: #91c7e5; }
.player-dialog .player-next-actions button { min-height: 36px; font-size: 12px; padding: 0 12px; }
@media (max-width: 750px) { .player-next-panel { align-items: flex-start; flex-direction: column; gap: 12px; } .player-next-info { max-width: 100%; } }
