/*
 * Плеер BRB.INK — как на fs.to: чёрное поле, название сверху, на паузе справка поверх кадра,
 * большая круглая кнопка, тонкая полоса прогресса и тёмная панель внизу.
 */
.pl {
  --pl-bar: #0b0c0e;
  --pl-text: #e8ecf1;
  --pl-muted: #9aa3ae;
  --pl-accent: #3d8fe6;
  --pl-tag-border: rgba(255,255,255,.28);
  position: relative; margin: -12px -14px -18px; overflow: hidden; outline: none; border-radius: var(--radius); /* вплотную к краям карточки, без белых полос */
  aspect-ratio: 16 / 10; min-height: 340px; max-height: calc(100vh - 60px);
  background: #000; color: var(--pl-text); user-select: none;
  font-family: Tahoma, Verdana, Arial, sans-serif; box-shadow: 0 2px 6px rgba(0,0,0,.4);
}
.content:has(> .watch .pl) { min-height: 0; }
.pl.is-fullscreen { margin: 0; max-height: none; aspect-ratio: auto; width: 100vw; height: 100vh; }
.pl.is-idle { cursor: none; }

.pl__video { position: absolute; inset: 0 0 38px; width: 100%; height: calc(100% - 38px); background: transparent; object-fit: contain; }
.pl__backdrop {
  position: absolute; inset: -40px; background: center / cover no-repeat;
  filter: blur(28px) brightness(.45) saturate(1.1); transform: scale(1.05);
}
.pl.is-started .pl__backdrop { display: none; }
.pl__shade {
  position: absolute; inset: 0; pointer-events: none; transition: opacity .25s;
  background: linear-gradient(rgba(0,0,0,.75), rgba(0,0,0,.25) 22%, rgba(0,0,0,.25) 70%, rgba(0,0,0,.6));
}
.pl.is-paused .pl__shade { background: rgba(0,0,0,.7); }
.pl.is-idle .pl__shade, .pl.is-playing:not(:hover):not(.has-menu) .pl__shade { opacity: 0; }

/* ---- шапка: раздел + название ---- */
.pl__top { position: absolute; left: 0; right: 0; top: 0; display: flex; align-items: flex-start; gap: 12px; padding: 18px 22px; transition: opacity .25s; }
.pl__section {
  flex: none; margin-top: 4px; padding: 3px 9px; border-radius: 4px; background: #2d5ea8;
  color: #fff; font-size: 12px; line-height: 16px;
}
.pl__section:hover { background: #3a6fbd; text-decoration: none; color: #fff; }
.pl__heading { min-width: 0; }
.pl__name { margin: 0; font: 400 24px/1.15 Verdana, Tahoma, sans-serif; }
.pl__name a { color: #fff; }
.pl__name a:hover { text-decoration: none; color: #cfe2ff; }
.pl__sub { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 4px; font-size: 12px; color: #d6dce4; }
.pl__sub b { color: #fff; }

/* ---- справка на паузе: постер + год, страна, жанры, актёры ---- */
.pl__info {
  position: absolute; left: 32px; right: 40px; top: 96px; bottom: 120px;
  display: flex; gap: 32px; pointer-events: none; transition: opacity .25s;
}
.pl__info > * { pointer-events: auto; }
.pl__poster { flex: none; align-self: flex-start; height: 100%; max-height: 300px; }
.pl__poster img { display: block; height: 100%; width: auto; box-shadow: 0 4px 18px rgba(0,0,0,.6); }
.pl__facts { margin-left: auto; width: min(40%, 300px); display: flex; flex-direction: column; gap: 18px; padding-top: 6px; }
.pl__tags { display: flex; flex-wrap: wrap; gap: 6px; }
.pl__tags--cast { margin-top: 26px; }
.pl__tag {
  padding: 3px 6px; border: 1px solid var(--pl-tag-border); border-radius: 3px;
  background: rgba(0,0,0,.35); color: #f2f4f7; font-size: 13px; line-height: 17px; white-space: nowrap;
}
a.pl__tag:hover { border-color: rgba(255,255,255,.7); text-decoration: none; color: #fff; }
.pl__tag span { color: var(--pl-muted); }

/* ---- кнопки слева: поделиться, справка ---- */
.pl__side { position: absolute; left: 18px; top: 50%; transform: translateY(-60%); display: flex; flex-direction: column; gap: 14px; transition: opacity .25s; }
.pl__icon { width: 26px; height: 26px; padding: 0; border: 0; background: none; cursor: pointer; opacity: .85; }
.pl__icon:hover { opacity: 1; }
.pl__icon svg { width: 100%; height: 100%; fill: #fff; stroke: #fff; }
.pl__icon text { font: bold 15px Arial, sans-serif; fill: #000; stroke: none; }

/* ---- большая круглая кнопка ---- */
.pl__big {
  position: absolute; left: 50%; top: calc(50% - 19px); width: 100px; height: 100px; padding: 0;
  transform: translate(-50%, -50%); border: 0; background: none; cursor: pointer; transition: opacity .2s, transform .15s;
}
.pl__big svg { width: 100%; height: 100%; }
.pl__big circle { fill: rgba(0,0,0,.25); stroke: rgba(255,255,255,.55); stroke-width: 4; }
.pl__big path { fill: rgba(255,255,255,.8); }
.pl__big:hover circle { stroke: #fff; fill: rgba(0,0,0,.4); }
.pl__big:hover path { fill: #fff; }
.pl.is-playing .pl__big { opacity: 0; pointer-events: none; transform: translate(-50%, -50%) scale(1.15); }

/* во время просмотра справка и шапка прячутся */
.pl.is-playing .pl__info, .pl.is-playing .pl__side { opacity: 0; pointer-events: none; visibility: hidden; }
.pl.is-playing .pl__info > * { pointer-events: none; }
.pl.is-playing:not(:hover):not(.has-menu) .pl__top, .pl.is-idle .pl__top { opacity: 0; }

/* загрузка */
.pl.is-waiting.is-playing::after {
  content: ''; position: absolute; left: 50%; top: calc(50% - 19px); width: 54px; height: 54px; margin: -27px 0 0 -27px;
  border: 4px solid rgba(255,255,255,.25); border-top-color: #fff; border-radius: 50%; animation: pl-spin .8s linear infinite;
}
@keyframes pl-spin { to { transform: rotate(360deg); } }

.pl__notice {
  position: absolute; left: 50%; top: 64px; transform: translateX(-50%); z-index: 4;
  padding: 6px 12px; border-radius: 4px; background: rgba(0,0,0,.8); color: #fff; font-size: 13px;
}
.pl__help {
  position: absolute; left: 56px; top: 50%; transform: translateY(-50%); z-index: 5; padding: 12px 16px;
  background: rgba(14,16,20,.95); border: 1px solid #333a44; border-radius: 4px; font-size: 13px;
}
.pl__help dl { display: grid; grid-template-columns: auto auto; gap: 4px 14px; margin: 8px 0 0; }
.pl__help dt { color: #fff; font-weight: bold; }
.pl__help dd { margin: 0; color: #c3cad3; }
.pl__menu[hidden], .pl__help[hidden], .pl__notice[hidden] { display: none; }

/* ---- нижняя панель ---- */
.pl__bar { position: absolute; left: 0; right: 0; bottom: 0; z-index: 3; transition: transform .25s; }
/* панель уезжает целиком — вместе с ползунком, который выступает над полосой */
.pl.is-idle .pl__bar { transform: translateY(calc(100% + 6px)); }
.pl.is-idle .pl__handle { visibility: hidden; }
.pl__progress { position: relative; height: 10px; margin-bottom: -2px; cursor: pointer; touch-action: none; }
.pl__progress::before, .pl__buffered, .pl__played {
  content: ''; position: absolute; left: 0; bottom: 2px; height: 6px; transition: height .1s;
}
.pl__progress::before { right: 0; background: #5b5f66; }
.pl__buffered { width: 0; background: #8d929a; }
.pl__played { width: 0; background: #d9dde3; }
/* ползунок виден всегда, пока видна полоса прогресса; у краёв не уходит за плеер */
.pl__handle {
  position: absolute; bottom: -2px; left: 9px; width: 18px; height: 14px; margin-left: -9px;
  background: #fff; border: 1px solid #888; border-radius: 3px; box-shadow: 0 1px 3px rgba(0,0,0,.5);
}
.pl__progress:hover::before, .pl__progress:hover .pl__buffered, .pl__progress:hover .pl__played, .pl.is-seeking .pl__played { height: 8px; }
.pl__progress:hover .pl__handle, .pl.is-seeking .pl__handle { background: #f2f6fb; border-color: #5a6470; }
.pl__hover {
  position: absolute; bottom: 14px; transform: translateX(-50%); padding: 2px 6px; border-radius: 3px;
  background: rgba(0,0,0,.85); color: #fff; font-size: 11px; pointer-events: none; white-space: nowrap;
}

.pl__controls { display: flex; align-items: center; gap: 4px; height: 38px; padding: 0 8px; background: var(--pl-bar); font-size: 13px; }
.pl__btn {
  display: inline-flex; align-items: center; justify-content: center; flex: none; width: 32px; height: 32px; padding: 0;
  border: 0; background: none; color: #fff; cursor: pointer; opacity: .9;
}
.pl__btn:hover { opacity: 1; text-decoration: none; }
.pl__btn svg { width: 20px; height: 20px; fill: #fff; stroke: #fff; }
.pl__btn--play svg { width: 18px; height: 18px; }
.pl__i-pause, .pl.is-playing .pl__i-play, .pl__i-muted, .pl.is-muted .pl__i-vol { display: none; }
.pl.is-playing .pl__i-pause, .pl.is-muted .pl__i-muted { display: block; }

.pl__volume {
  --level: 100%; width: 74px; height: 14px; margin: 0 8px 0 0; padding: 0; background: none; cursor: pointer;
  -webkit-appearance: none; appearance: none;
}
.pl__volume::-webkit-slider-runnable-track { height: 4px; border-radius: 2px; background: linear-gradient(90deg, var(--pl-accent) var(--level), #4a4f57 var(--level)); }
.pl__volume::-moz-range-track { height: 4px; border-radius: 2px; background: linear-gradient(90deg, var(--pl-accent) var(--level), #4a4f57 var(--level)); }
.pl__volume::-webkit-slider-thumb { -webkit-appearance: none; width: 10px; height: 12px; margin-top: -4px; border: 1px solid #777; border-radius: 2px; background: #fff; }
.pl__volume::-moz-range-thumb { width: 10px; height: 12px; border: 1px solid #777; border-radius: 2px; background: #fff; }
.pl__time { margin-left: 4px; color: #fff; font-size: 12px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pl__dur { color: var(--pl-muted); }

.pl__mid { flex: 1; display: flex; justify-content: center; min-width: 0; }
.pl__ctl {
  display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border: 0; border-radius: 2px;
  background: none; color: #c9cfd7; font: inherit; font-size: 13px; cursor: pointer; white-space: nowrap;
}
.pl__mid .pl__ctl { background: #24272c; }
.pl__ctl:hover { background: #2f343b; color: #fff; }
.pl__ctl b { color: #fff; }
.pl__ctl svg { width: 14px; height: 14px; fill: #8d949d; }
.pl__ctl--tr span { color: var(--pl-muted); margin-left: 4px; }
.pl__ctl .flag, .pl__row .flag { width: 16px; height: 11px; }

.pl__hd { display: inline-flex; align-items: center; gap: 4px; padding: 0 6px; color: #fff; font-size: 12px; font-weight: bold; }
.pl__hd:hover { text-decoration: none; color: #fff; }
.pl__hd i { width: 16px; height: 16px; border: 2px solid #fff; border-radius: 2px; background: #fff; position: relative; }
.pl__hd.is-on i { background: var(--pl-accent); border-color: var(--pl-accent); }
.pl__hd.is-on i::after {
  content: ''; position: absolute; left: 3px; top: 0; width: 5px; height: 9px;
  border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg);
}
.pl__hd.is-fixed { opacity: .6; cursor: default; }
/* как на fs.to: широкий прямоугольник с тонкой рамкой */
.pl__btn--fs { width: 44px; }
.pl__btn--fs svg { width: 32px; height: 19px; fill: none; }

/* ---- меню над панелью ---- */
.pl__menu {
  position: absolute; bottom: 46px; z-index: 5; max-height: calc(100% - 120px); overflow: auto;
  padding: 10px 12px; background: rgba(14,16,20,.96); border: 1px solid #333a44; border-radius: 4px; font-size: 13px;
}
.pl__menu--episodes { left: 50%; transform: translateX(-50%); width: min(560px, calc(100% - 24px)); }
.pl__menu--right { right: 10px; min-width: 220px; }
.pl__menu-title { margin: 6px 0 6px; color: var(--pl-muted); font-size: 11px; text-transform: uppercase; letter-spacing: .5px; }
.pl__menu-title:first-child { margin-top: 0; }
.pl__row { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 3px; color: #e3e7ec; white-space: nowrap; }
.pl__row:hover { background: #262b32; text-decoration: none; color: #fff; }
.pl__row.is-active { background: #2d5ea8; color: #fff; }
.pl__row span { color: var(--pl-muted); }
.pl__row.is-active span { color: #d4e3f7; }
.pl__seasons, .pl__speeds { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 10px; }
.pl__speeds { margin-bottom: 4px; }
.pl__chip {
  padding: 4px 9px; border: 1px solid #3a414b; border-radius: 3px; background: none;
  color: #e3e7ec; font: inherit; font-size: 12px; cursor: pointer;
}
.pl__chip:hover { border-color: #6c7684; text-decoration: none; color: #fff; }
.pl__chip.is-active { background: #2d5ea8; border-color: #2d5ea8; color: #fff; }
.pl__episodes { display: grid; grid-template-columns: repeat(auto-fill, minmax(40px, 1fr)); gap: 4px; }
.pl__ep {
  height: 30px; line-height: 28px; text-align: center; border: 1px solid #3a414b; border-radius: 3px; color: #e3e7ec; font-size: 12px;
}
.pl__ep:hover { border-color: #6c7684; text-decoration: none; color: #fff; }
.pl__ep.is-watched { color: #7fc283; border-color: #2f5a33; }
.pl__ep.is-active { background: #2d5ea8; border-color: #2d5ea8; color: #fff; }
.pl__check { display: flex; align-items: center; gap: 6px; margin-top: 10px; color: #c9cfd7; cursor: pointer; }

/* ---- узкие экраны ---- */
@media (max-width: 760px) {
  .pl { margin: -10px -10px -14px; aspect-ratio: 16 / 11; min-height: 240px; }
  .pl__top { padding: 10px 12px; }
  .pl__name { font-size: 18px; }
  .pl__info { left: 12px; right: 12px; top: 70px; bottom: 70px; }
  .pl__facts, .pl__side { display: none; }
  .pl__poster { max-height: 160px; }
  .pl__big { width: 72px; height: 72px; }
  .pl__volume, .pl__dur, .pl__ctl--tr span, .pl__mid svg { display: none; }
  .pl__ctl { padding: 0 6px; }
  .pl__menu--right { left: 10px; }
}
@media (max-width: 480px) {
  .pl__poster, .pl__ctl--tr b { display: none; }
  .pl__controls { gap: 0; padding: 0 2px; }
}
