/* ── Player Screen ── */
#screen-player {
  background: #000;
}

.player__video {
  position: absolute;
  top:0;right:0;bottom:0;left:0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* OSD overlay */
.player-osd {
  position: absolute;
  top:0;right:0;bottom:0;left:0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0.7) 0%,
    transparent 25%,
    transparent 60%,
    rgba(0,0,0,0.8) 100%
  );
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}

.player-osd--visible {
  opacity: 1;
}

.player-osd__top {
  display: flex;
  align-items: center;
  padding: 40px 80px 0;
  gap: 24px;
}

.player-osd__channel-logo {
  width: 80px;
  height: 80px;
  object-fit: contain;
  background: rgba(255,255,255,0.1);
  border-radius: 8px;
  padding: 8px;
}

.player-osd__channel-name {
  font-size: 40px;
  font-weight: 700;
}

.player-osd__time {
  display: none;
}

.player-osd__bottom {
  padding: 0 80px 40px;
}

.player-osd__title {
  font-size: 36px;
  font-weight: 700;
  margin-bottom: 8px;
}

.player-osd__epg-info {
  font-size: 24px;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.player-osd__progress {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 20px;
}

.player-osd__progress--controls {
  width: min(880px, calc(100vw - 220px));
  margin: 0 auto 10px;
}

.player-osd__progress--controls .progress-bar {
  flex: 1 1 auto;
  min-width: 420px;
  height: 8px;
  background: rgba(255,255,255,0.34);
  border-radius: 999px;
}

.player-osd__progress--controls .progress-bar__fill {
  background: #E50914;
  border-radius: 999px;
}

.player-osd__progress .progress-bar {
  flex: 1;
  height: 6px;
}

.player-osd__timestamp {
  font-size: 22px;
  color: var(--text-secondary);
  min-width: 120px;
  text-align: right;
}

.player-osd__controls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 18px;
  position: fixed;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  width: auto;
  max-width: calc(100vw - 120px);
  justify-content: center;
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
  backdrop-filter: none;
  z-index: 5;
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}

.player-osd__controls--visible {
  opacity: 1;
}

.player-osd__clock {
  position: fixed;
  top: 26px;
  right: 34px;
  min-width: 112px;
  text-align: center;
  font-size: 34px;
  font-weight: 700;
  color: #f2f2f2;
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(0,0,0,0.52);
  border: 1px solid rgba(255,255,255,0.18);
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
  z-index: 6;
}

.player-osd__clock--visible {
  opacity: 1;
}

.osd-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 120px;
  min-height: 84px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.12);
  font-size: 18px;
  color: #e3e3e3;
  background: rgba(255,255,255,0.06);
  transition: color var(--transition-fast), background var(--transition-fast), transform var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.osd-btn .icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
}

.osd-btn .icon svg {
  width: 30px;
  height: 30px;
  fill: currentColor;
}

.osd-btn .label {
  font-size: 16px;
  letter-spacing: .2px;
  color: #d3d3d3;
}

.osd-btn.is-favorite {
  color: #ffd56a;
  border-color: rgba(255,213,106,0.5);
  background: rgba(255,213,106,0.12);
}

.osd-btn.focused {
  color: #fff;
  background: rgba(229,9,20,0.22);
  border-color: rgba(229,9,20,0.85);
  transform: translateY(-1px) scale(1.03);
  box-shadow: 0 10px 24px rgba(0,0,0,0.45), 0 0 0 2px rgba(229,9,20,0.32);
}

.osd-btn--play .icon {
  width: 42px;
  height: 42px;
}

.osd-btn--play .icon svg {
  width: 36px;
  height: 36px;
}

.osd-btn--play.focused {
  background: linear-gradient(180deg, rgba(229,9,20,0.92) 0%, rgba(181,8,16,0.95) 100%);
  border-color: rgba(255,255,255,0.35);
}

/* Buffer/error indicator */
.player-buffering {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: none;
}

.player-buffering--visible {
  display: block;
}

.player-buffering .spinner {
  width: 100px;
  height: 100px;
  border-width: 8px;
}

.player-error {
  position: absolute;
  top:0;right:0;bottom:0;left:0;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.9);
}

.player-error--visible {
  display: flex;
}

.player-error__icon {
  font-size: 100px;
  margin-bottom: 30px;
  opacity: 0.5;
}

.player-error__msg {
  font-size: 32px;
  color: var(--text-secondary);
  margin-bottom: 40px;
}

.player-error__hint {
  font-size: 24px;
  color: var(--text-muted);
}

.player-nextup {
  position: absolute;
  right: 48px;
  bottom: 88px;
  min-width: 360px;
  max-width: 460px;
  background: rgba(0,0,0,0.82);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 14px;
  padding: 16px 18px;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity .22s ease, transform .22s ease;
  pointer-events: none;
  z-index: 25;
}

.player-nextup--visible {
  opacity: 1;
  transform: translateY(0);
}

.player-nextup__title {
  font-size: 21px;
  color: #f2f2f2;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.player-nextup__countdown {
  margin-top: 6px;
  font-size: 30px;
  color: #E50914;
  font-weight: 900;
}

.player-nextup__hint {
  margin-top: 8px;
  font-size: 16px;
  color: #b7b7b7;
}

.player-pause-mask {
  position: absolute;
  top:0;right:0;bottom:0;left:0;
  display: flex;
  align-items: flex-end;
  justify-content: stretch;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  z-index: 4;
}

.player-pause-mask--visible {
  opacity: 1;
}

.player-pause-mask__content {
  width: 100%;
  min-height: 50vh;
  padding: 46px 80px 72px;
  background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.74) 16%, rgba(0,0,0,0.9) 100%);
  box-sizing: border-box;
}

.player-pause-mask__play {
  font-size: 76px;
  color: #f1f1f1;
  line-height: 1;
  margin-bottom: 14px;
  animation: playerPlayFade 1.15s ease-in-out infinite;
}

.player-pause-mask__title {
  font-size: 64px;
  font-weight: 900;
  color: #ffffff;
  line-height: 1.05;
  margin-bottom: 24px;
  max-width: min(1240px, 100%);
}

.player-pause-mask__block {
  max-width: min(1240px, 100%);
}

.player-pause-mask__label {
  font-size: 18px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: #a9a9a9;
  margin-bottom: 6px;
}

.player-pause-mask__series-desc {
  font-size: 27px;
  color: #d7d7d7;
  line-height: 1.35;
  margin-bottom: 18px;
}

.player-pause-mask__episode-desc {
  font-size: 25px;
  color: #bdbdbd;
  line-height: 1.4;
}

@keyframes playerPlayFade {
  0%, 100% { opacity: 0.35; transform: scale(0.96); }
  50% { opacity: 1; transform: scale(1.03); }
}

/* Channel zap indicator */
.channel-zap {
  position: absolute;
  top: 50%;
  right: 80px;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.85);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 12px;
  padding: 24px 36px;
  text-align: center;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.channel-zap--visible {
  opacity: 1;
}

.channel-zap__logo {
  width: 100px;
  height: 60px;
  object-fit: contain;
  margin: 0 auto 12px;
}

.channel-zap__name {
  font-size: 28px;
  font-weight: 700;
}

.channel-zap__number {
  font-size: 22px;
  color: var(--text-muted);
  margin-top: 6px;
}

/* ── OSD v2: progresso largo com tempos nas pontas, botões centralizados ──
   (Chrome 68: sem flex gap/inset — espaçamentos com margin) */
.player-osd__controls {
  left: 80px;
  right: 80px;
  width: auto;
  max-width: none;
  transform: none;
  bottom: 30px;
  display: block;
}
.player-osd__progress--controls {
  width: auto;
  margin: 0 0 18px;
  display: flex;
  align-items: center;
}
.player-osd__progress--controls .progress-bar {
  flex: 1 1 auto;
  min-width: 0;
  height: 8px;
  margin: 0 22px;
}
.player-osd__time-cur,
.player-osd__progress--controls .player-osd__timestamp {
  font-size: 24px;
  color: #e6e6e6;
  min-width: 110px;
  font-variant-numeric: tabular-nums;
}
.player-osd__time-cur { text-align: left; }
.player-osd__progress--controls .player-osd__timestamp { text-align: right; }
.player-osd__btns {
  display: flex;
  justify-content: center;
  align-items: center;
}
.player-osd__btns .osd-btn { margin: 0 10px; }
.osd-btn .icon { margin-bottom: 6px; }
.player-osd__top > * + * { margin-left: 24px; }
/* Título de baixo duplicava o de cima e passava por cima da barra */
.player-osd__bottom { padding: 0 80px 210px; }
.player-osd__bottom .player-osd__title { display: none; }

/* ── Tela de pausa v2 ── */
.player-pause-mask {
  align-items: stretch;
  background: linear-gradient(90deg, rgba(0,0,0,0.92) 0%, rgba(0,0,0,0.82) 45%, rgba(0,0,0,0.35) 100%);
}
.player-pause-mask__content {
  min-height: 0;
  background: none;
  padding: 0 110px;
  display: flex;
  align-items: center;
  width: 100%;
}
.player-pause-mask__poster {
  flex: 0 0 auto;
  width: 330px;
  height: 495px;
  margin-right: 64px;
  border-radius: 14px;
  overflow: hidden;
  background: #1a1a1a;
  box-shadow: 0 24px 60px rgba(0,0,0,0.7), 0 0 0 1px rgba(255,255,255,0.08);
}
.player-pause-mask__poster img { width: 100%; height: 100%; object-fit: cover; display: block; }
.player-pause-mask__text { flex: 1 1 auto; min-width: 0; max-width: 1150px; }
.player-pause-mask__kicker {
  display: inline-flex; align-items: center;
  font-size: 22px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase;
  color: #fff; background: rgba(229,9,20,0.9); padding: 8px 18px 8px 12px; border-radius: 999px;
  margin-bottom: 22px;
}
.player-pause-mask__icon { width: 24px; height: 24px; margin-right: 10px; }
.player-pause-mask__icon svg { width: 24px; height: 24px; fill: #fff; display: block; }
.player-pause-mask__title {
  font-size: 66px; margin-bottom: 14px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.player-pause-mask__meta { font-size: 26px; color: #b9b9b9; margin-bottom: 22px; }
.player-pause-mask__progress { margin-bottom: 28px; }
.player-pause-mask__bar { height: 8px; max-width: 760px; background: rgba(255,255,255,0.22); border-radius: 999px; overflow: hidden; margin-bottom: 10px; }
.player-pause-mask__bar span { display: block; height: 100%; width: 0; background: #E50914; }
.player-pause-mask__time { font-size: 24px; color: #e2e2e2; font-variant-numeric: tabular-nums; }
.player-pause-mask__episode-desc,
.player-pause-mask__series-desc {
  font-size: 26px; color: #d0d0d0; line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden;
}
.player-pause-mask__hints { margin-top: 34px; font-size: 21px; color: #a9a9a9; }
.player-pause-mask__hints span { margin-right: 40px; }
.player-pause-mask__hints b { color: #fff; margin-right: 8px; }

/* ── Próximo episódio v2 (cartão com miniatura e botões) ── */
.player-nextup {
  right: 64px;
  bottom: 64px;
  min-width: 0;
  max-width: none;
  width: 640px;
  padding: 0;
  display: flex;
  overflow: hidden;
  border-radius: 16px;
  background: rgba(12,12,12,0.94);
  box-shadow: 0 20px 50px rgba(0,0,0,0.6);
}
.player-nextup__thumb { flex: 0 0 auto; width: 240px; height: 180px; background: #1a1a1a; }
.player-nextup__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.player-nextup__body { flex: 1 1 auto; min-width: 0; padding: 18px 22px; }
.player-nextup__kicker { font-size: 16px; letter-spacing: 1.5px; text-transform: uppercase; color: #aaa; margin-bottom: 6px; }
.player-nextup__title { font-size: 24px; color: #fff; font-weight: 700; margin-bottom: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player-nextup__bar { height: 5px; background: rgba(255,255,255,0.18); border-radius: 999px; overflow: hidden; margin-bottom: 16px; }
.player-nextup__bar span { display: block; height: 100%; width: 100%; background: #E50914; }
.player-nextup__btns { display: flex; }
.player-nextup__btn {
  font-size: 20px; font-weight: 700; color: #ddd; padding: 10px 18px; border-radius: 10px;
  border: 2px solid rgba(255,255,255,0.18); background: rgba(255,255,255,0.06); margin-right: 12px; white-space: nowrap;
}
.player-nextup__btn.focused { color: #fff; border-color: #fff; background: #E50914; }

/* ── Pular abertura ── */
.player-skipintro {
  position: absolute; right: 64px; bottom: 120px; z-index: 24;
  display: flex; align-items: center;
  font-size: 26px; font-weight: 700; color: #fff;
  padding: 16px 26px; border-radius: 12px;
  background: rgba(20,20,20,0.88); border: 2px solid rgba(255,255,255,0.8);
  opacity: 0; transition: opacity .2s ease; pointer-events: none;
}
.player-skipintro--visible { opacity: 1; }
.player-skipintro__key { font-size: 16px; margin-left: 16px; padding: 3px 8px; border-radius: 6px; background: rgba(255,255,255,0.18); }
