/* Дополнение к style.css: стили новых функций плеера и главной.
   Подключается ПОСЛЕ style.css. */

/* ── Storyboard-превью над таймлайном ─────────────────── */
.seek-story {
  position: absolute;
  bottom: 22px;
  transform: translateX(-50%);
  pointer-events: none;
  z-index: 6;
  text-align: center;
}
.seek-story-img {
  width: 160px;
  height: 90px;
  background-color: #000;
  background-repeat: no-repeat;
  border: 2px solid #fff;
  border-radius: 8px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .55);
}
.seek-story-time {
  display: inline-block;
  margin-top: 5px;
  padding: 1px 7px;
  border-radius: 4px;
  background: rgba(0, 0, 0, .8);
  color: #fff;
  font: 600 12px/1.5 system-ui, sans-serif;
}

/* ── Маркеры повтора A–B на таймлайне ─────────────────── */
.ab-marker {
  position: absolute;
  top: -5px;
  width: 4px;
  height: 14px;
  border-radius: 2px;
  background: #3ea6ff;
  transform: translateX(-50%);
  z-index: 5;
  box-shadow: 0 0 4px rgba(0, 0, 0, .6);
}
.ab-marker.b { background: #ff5252; }

/* ── Индикатор удержания 2× ───────────────────────────── */
.hold-2x {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 16px;
  border-radius: 20px;
  background: rgba(0, 0, 0, .72);
  color: #fff;
  font: 600 14px system-ui, sans-serif;
  z-index: 7;
  pointer-events: none;
}

/* ── Панель статистики ────────────────────────────────── */
.stats-panel {
  position: absolute;
  top: 14px;
  left: 14px;
  min-width: 240px;
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(0, 0, 0, .78);
  color: #fff;
  font: 12px/1.7 ui-monospace, "Cascadia Mono", Consolas, monospace;
  z-index: 7;
  backdrop-filter: blur(4px);
}
.stats-panel b { color: #9fd0ff; font-weight: 600; }

/* ── Усиление громкости: слайдер краснеет выше 100% ───── */
.vol input.boost { accent-color: #ff5252; }

/* ── Кнопки навигации между матчами ───────────────────── */
.cbtn:disabled { opacity: .35; cursor: default; }

/* защита от системного long-press на видео (удержание = 2×) */
.video-wrap video {
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

/* ── Театральный режим ────────────────────────────────── */
body.theater .player-layout {
  max-width: none;
  padding-left: 0;
  padding-right: 0;
}
body.theater .video-wrap {
  border-radius: 0;
}
body.theater .video-wrap video {
  width: 100%;
  max-height: calc(100vh - 120px);
}
body.theater .player-info {
  max-width: 1100px;
  margin: 0 auto;
  padding: 12px 16px;
}

/* ── Главная: карточки матчей (переработанные бейджи) ─── */
.card-thumb { position: relative; overflow: hidden; }

/* канал — плашка сверху слева */
.card-thumb .ch {
  position: absolute;
  top: 6px;
  left: 6px;
  right: auto;
  bottom: auto;
  padding: 1px 7px;
  border-radius: 4px;
  background: rgba(0, 0, 0, .72);
  color: #fff;
  font: 600 11px/1.6 system-ui, sans-serif;
  text-transform: uppercase;
  letter-spacing: .04em;
  z-index: 2;
}

/* длительность записи — снизу справа, как в YouTube */
.card-dur {
  position: absolute;
  right: 6px;
  bottom: 8px;
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(0, 0, 0, .85);
  color: #fff;
  font: 600 12px/1.5 system-ui, sans-serif;
  font-variant-numeric: tabular-nums;
  z-index: 2;
}

/* строка под названием: дата · начало */
.card-meta {
  display: flex;
  align-items: center;
  gap: 4px;
}
.card-meta .meta-ic {
  width: 13px;
  height: 13px;
  fill: currentColor;
  flex: none;
}
.card-progress-track {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 4px;
  background: rgba(255, 255, 255, .25);
  z-index: 1;
}
.card-progress {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  background: #1258cc;
  border-radius: 0 2px 2px 0;
}

/* ── Hover-скраб кадров на карточке ───────────────────── */
.card-thumb.scrub .play { opacity: 0; }
.card-thumb.scrub .card-dur { display: none; }  /* вместо длительности — таймкод кадра */
.card-thumb.scrub { cursor: ew-resize; }
.card-scrub-time {
  position: absolute;
  right: 6px;
  bottom: 8px;
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(37, 99, 235, .92);   /* синий = «живой» таймкод, не длительность */
  color: #fff;
  font: 600 12px/1.5 system-ui, sans-serif;
  font-variant-numeric: tabular-nums;
  z-index: 3;
  pointer-events: none;
}

/* ── Блок «Продолжить просмотр» ───────────────────────── */
.cw { margin: 0 0 24px; }
.cw h2 { margin: 0 0 12px; }
@media (max-width: 640px), (pointer: coarse) and (max-width: 900px) {
  #btnBack, #btnFwd,         /* ±10 с — есть двойной тап по краям видео */
  #btnShot,                  /* скриншот — редкое действие */
  #btnTheater {              /* театральный режим на телефоне бессмыслен */
    display: none;
  }
  .vol input { display: none; }  /* громкость — кнопками телефона, mute остаётся */
}
