/* ============================================================
   DORAMAS PLAYER — componente autônomo de vídeo HLS
   Tema: #07100d · acentos pink #F56FA5
   ============================================================ */

.dp {
  --yellow: #F56FA5;
  --ink: #09090D;
  --white: #ffffff;
  --stage-bg: #000000;
  --page-bg: #09090D;

  position: relative;
  box-sizing: border-box;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--stage-bg);
  border: 1px solid rgba(255, 255, 255, 0.10);
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
  font-family: 'Montserrat', system-ui, sans-serif;
  color: var(--white);
  line-height: 1;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.55);
}

/* ---- Stage / vídeo ---- */
.dp-stage {
  position: absolute;
  inset: 0;
  will-change: transform, opacity;
  /* Sem zoom por toque duplo: no mobile o duplo toque pausa/retoma, e o
     navegador não pode transformar isso em zoom da página. Pan e pinch
     continuam livres (manipulation = pan-x pan-y pinch-zoom). */
  touch-action: manipulation;
}

.dp-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: var(--stage-bg);
  border-radius: 0;
}

.dp.has-episode-navigation {
  overscroll-behavior-y: contain;
}

.dp.has-episode-navigation .dp-stage,
.dp.has-episode-navigation .dp-play,
.dp.has-episode-navigation .dp-spinner {
  touch-action: pan-x pinch-zoom;
}

.dp.is-dragging-episode .dp-play {
  opacity: 0;
  pointer-events: none;
}

.dp-swipe-hint {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(9, 9, 13, 0.84);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #f8fafc;
  font-size: 12px;
  font-weight: 700;
  pointer-events: none;
  backdrop-filter: blur(8px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  white-space: nowrap;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}
.dp-swipe-hint[hidden] {
  display: none;
}
.dp-swipe-hint[data-dir="next"] {
  bottom: 72px;
}
.dp-swipe-hint[data-dir="prev"] {
  top: 22px;
}
.dp-swipe-hint[data-dir="prev"] .dp-swipe-arrow svg {
  transform: rotate(180deg);
}
.dp-swipe-arrow svg {
  width: 15px;
  height: 15px;
  display: block;
}
.dp-swipe-hint.is-ready {
  background: rgba(245, 111, 165, 0.94);
  border-color: rgba(245, 111, 165, 1);
  color: #ffffff;
  transform: translateX(-50%) scale(1.04);
}

.dp-episode-nav {
  position: absolute;
  z-index: 5;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  display: grid;
  gap: 5px;
  transition: opacity 0.2s ease;
}

.dp-episode-nav[hidden],
.dp .dp-btn[hidden],
.dp .dp-quality[hidden] {
  display: none;
}

.dp-episode-nav .dp-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.62);
}

.dp.ui-hidden .dp-episode-nav:not(:focus-within) {
  opacity: 0;
  pointer-events: none;
}

/* Reprodutor estilo YouTube: mantém largura total e proporção 16:9 sem deformar com vídeo vertical,
   respeitando a altura útil da janela fora de tela cheia */
.dp:not(:fullscreen) {
  --dp-fit-h: max(220px, calc(100vh - var(--dp-top, 180px) - 14px));
  --dp-fit-h: max(220px, calc(100dvh - var(--dp-top, 180px) - 14px));
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: var(--dp-fit-h);
}

/* ---- Overlay superior ---- */
.dp-top {
  position: absolute;
  top: 0; left: 0; right: 0;
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.75), rgba(0, 0, 0, 0));
  pointer-events: none;
  transition: opacity 0.35s ease;
  z-index: 5;
}

.dp-track {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--yellow);
}

.dp-unmute-pill {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 9;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  padding: 6px 13px;
  border-radius: 999px;
  border: 1px solid rgba(245, 111, 165, 0.55);
  background: rgba(9, 9, 13, 0.86);
  color: var(--white);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.45);
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.dp-unmute-pill[hidden] { display: none; }
.dp-unmute-pill svg { width: 15px; height: 15px; color: var(--yellow); flex-shrink: 0; }
.dp-unmute-pill:hover {
  transform: translateY(-1px);
  border-color: var(--yellow);
  background: rgba(22, 22, 34, 0.94);
}

.dp-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--white);
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.8);
}

/* ---- Botão play central ---- */
.dp-play {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 64px; height: 64px;
  border-radius: 50%;
  border: none;
  background: var(--yellow);
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 6;
  box-shadow: 0 0 30px rgba(245, 111, 165, 0.40);
  transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.3s ease;
  padding: 0;
}
.dp-play svg { width: 26px; height: 26px; display: block; }
.dp-play:hover {
  transform: translate(-50%, -50%) scale(1.08);
  box-shadow: 0 0 46px rgba(245, 111, 165, 0.65);
}
.dp.is-playing .dp-play .dp-ic-play { display: none; }
.dp.is-paused .dp-play .dp-ic-pause { display: none; }
.dp:not(.is-playing):not(.is-paused) .dp-play .dp-ic-pause { display: none; }

/* Botão play/pausa da barra de controles */
.dp.is-playing .dp-btn-play .dp-ic-play { display: none; }
.dp.is-paused .dp-btn-play .dp-ic-pause { display: none; }
.dp:not(.is-playing):not(.is-paused) .dp-btn-play .dp-ic-pause { display: none; }

/* ---- Spinner ---- */
.dp-spinner {
  position: absolute;
  top: 50%; left: 50%;
  width: 42px; height: 42px;
  margin: -21px 0 0 -21px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.20);
  border-top-color: var(--yellow);
  animation: dp-spin 0.9s linear infinite;
  z-index: 7;
  display: none;
}
.dp[data-state="loading"] .dp-spinner { display: block; }
@keyframes dp-spin { to { transform: rotate(360deg); } }

/* ---- Controles inferiores ---- */
.dp-controls {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 8px 18px 12px;
  z-index: 8;
  transition: opacity 0.35s ease, transform 0.35s ease;
}
.dp-controls * { text-shadow: 0 1px 4px rgba(0, 0, 0, 0.7); }

.dp-time {
  font-size: 20px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--white);
  margin-bottom: 6px;
  display: flex;
  justify-content: flex-end;
}

/* Timeline */
.dp-timeline {
  position: relative;
  height: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
}
.dp-timeline-track {
  position: absolute; left: 0; right: 0;
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.25);
  overflow: hidden;
}
.dp-timeline-buffer {
  position: absolute; left: 0; top: 0; bottom: 0;
  width: 0;
  background: rgba(255, 255, 255, 0.35);
}
.dp-timeline-progress {
  position: absolute; left: 0; top: 0; bottom: 0;
  width: 0;
  background: var(--yellow);
}
.dp-timeline-thumb {
  position: absolute;
  top: 50%;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--white);
  transform: translate(-50%, -50%);
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.6);
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}
.dp-timeline:hover .dp-timeline-thumb { opacity: 1; }
.dp-timeline:hover .dp-timeline-track { height: 6px; }

/* Linha de controles */
.dp-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 2px;
}
.dp-group-left, .dp-group-right { display: flex; align-items: center; gap: 14px; min-width: 0; }

.dp-btn {
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  background: transparent;
  border: none;
  color: var(--white);
  cursor: pointer;
  padding: 0;
  transition: transform 0.15s ease, color 0.15s ease, filter 0.15s ease;
}
.dp-btn:hover { transform: scale(1.1); color: var(--yellow); filter: drop-shadow(0 0 8px rgba(245, 111, 165, 0.5)); }
.dp-btn svg { width: 23px; height: 23px; display: block; }

/* Volume: alterna entre ícone de som e mudo */
.dp-btn-mute .dp-ic-muted { display: none; }
.dp-btn-mute.is-muted .dp-ic-volume { display: none; }
.dp-btn-mute.is-muted .dp-ic-muted { display: block; }

/* Volume */
.dp-volume { display: flex; align-items: center; gap: 0; }
.dp-volume-slider {
  width: 0;
  opacity: 0;
  overflow: hidden;
  transition: width 0.25s ease, opacity 0.25s ease, margin-left 0.25s ease;
  margin-left: 0;
  height: 4px;
  -webkit-appearance: none;
  appearance: none;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.25);
  accent-color: var(--yellow);
  cursor: pointer;
}
.dp-volume:hover .dp-volume-slider,
.dp-volume.is-open .dp-volume-slider {
  width: 80px;
  opacity: 1;
  margin-left: 8px;
}
.dp-volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--yellow);
  box-shadow: 0 0 10px rgba(245, 111, 165, 0.5);
  cursor: pointer;
}
.dp-volume-slider::-moz-range-thumb {
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--yellow);
  box-shadow: 0 0 10px rgba(245, 111, 165, 0.5);
  cursor: pointer;
  border: none;
}

/* ---- Menu de configurações (glassmorphism) ---- */
.dp-settings {
  position: absolute;
  right: 18px;
  bottom: 84px;
  min-width: 280px;
  max-width: 340px;
  z-index: 10;
  background: rgba(10, 14, 22, 0.45);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 16px;
  padding: 18px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6), 0 0 40px rgba(245, 111, 165, 0.18);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px) scale(0.96);
  transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s;
  font-family: 'Montserrat', sans-serif;
}
.dp-settings.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}
.dp-settings-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px;
  font-weight: 700;
  font-size: 14px;
}
.dp-settings-close {
  background: transparent;
  border: none;
  color: var(--white);
  font-size: 16px;
  cursor: pointer;
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 8px;
}
.dp-settings-close:hover { background: rgba(255, 255, 255, 0.12); color: var(--yellow); }

.dp-section-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 8px;
}

/* Qualidade */
.dp-quality { margin-bottom: 16px; }
.dp-quality-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.12);
  margin-bottom: 8px;
}
.dp-quality-badge::before {
  content: '';
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--yellow);
  box-shadow: 0 0 8px var(--yellow);
}
.dp-quality-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}
.dp-quality-option {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: var(--white);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  text-shadow: none;
}
.dp-quality-option:hover { background: rgba(255, 255, 255, 0.10); }
.dp-quality-option .dp-tag {
  font-size: 9px;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 4px;
  letter-spacing: 0.04em;
}
.dp-tag-hd { background: var(--yellow); color: var(--ink); }
.dp-tag-sd { background: rgba(255, 255, 255, 0.15); color: var(--white); }
.dp-quality-option .dp-check {
  color: var(--yellow);
  font-weight: 800;
  display: none;
}
.dp-quality-option.is-active {
  background: linear-gradient(135deg, rgba(245, 111, 165, 0.9), rgba(245, 111, 165, 0.9));
  border-color: var(--yellow);
  font-weight: 800;
  box-shadow: 0 0 18px rgba(245, 111, 165, 0.25);
}
.dp-quality-option.is-active .dp-check { display: inline; }
.dp-quality-option.is-active .dp-tag { background: rgba(20, 32, 13, 0.85); color: var(--white); }

/* Qualidade bloqueada por plano */
.dp-quality-option.dp-quality-locked {
  opacity: 0.72;
  border-color: rgba(245, 111, 165, 0.25);
  background: rgba(245, 111, 165, 0.04);
}
.dp-quality-option.dp-quality-locked:hover {
  opacity: 1;
  background: rgba(245, 111, 165, 0.12);
  border-color: var(--yellow);
}
.dp-tag-lock {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: rgba(245, 111, 165, 0.20);
  color: var(--yellow);
  border: 1px solid rgba(245, 111, 165, 0.35);
}
.dp-tag-lock svg {
  width: 10px;
  height: 10px;
}

/* Velocidade / Idiomas / Legendas */
.dp-speed,
.dp-audio,
.dp-subtitles { margin-bottom: 16px; }
.dp-settings {
  max-height: 75%;
  overflow-y: auto;
}
.dp-btn-cc.is-active { color: var(--yellow); }
.dp-video::cue {
  background: rgba(0, 0, 0, 0.72);
  color: #fff;
  font-family: 'Montserrat', sans-serif;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.9);
}
.dp-captions {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: var(--dp-captions-bottom, 114px);
  z-index: 7;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  pointer-events: none;
  text-align: center;
  transition: opacity 0.2s ease;
}
.dp-captions[hidden] {
  display: none;
}
.dp.is-dragging-episode .dp-captions,
.dp[data-state="error"] .dp-captions {
  opacity: 0;
}
.dp-caption-cue {
  display: inline-block;
  max-width: min(92%, 680px);
  padding: 5px 12px;
  border-radius: 8px;
  background: rgba(9, 9, 13, 0.80);
  color: #ffffff;
  font-family: 'Montserrat', system-ui, sans-serif;
  font-size: clamp(13px, 2.2vw, 18px);
  font-weight: 700;
  line-height: 1.38;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.95);
  white-space: pre-line;
  word-break: break-word;
}
.dp-speed-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.dp-speed-pill {
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.05);
  color: var(--white);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  text-shadow: none;
}
.dp-speed-pill:hover { background: rgba(255, 255, 255, 0.12); }
.dp-speed-pill.is-active {
  background: var(--yellow);
  color: var(--ink);
  border-color: var(--yellow);
  font-weight: 800;
  box-shadow: 0 0 14px rgba(245, 111, 165, 0.3);
}

/* Preferências / toggle */
.dp-pref-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.dp-pref-title { font-size: 13px; font-weight: 600; }
.dp-pref-desc { font-size: 11px; color: rgba(255, 255, 255, 0.55); margin-top: 3px; }

.dp-switch {
  position: relative;
  width: 40px; height: 22px;
  border-radius: 999px;
  border: none;
  background: rgba(255, 255, 255, 0.15);
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.2s ease;
  padding: 0;
}
.dp-switch-knob {
  position: absolute;
  top: 2px; left: 2px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--white);
  transition: transform 0.2s ease;
}
.dp-switch.is-on { background: var(--yellow); box-shadow: 0 0 14px rgba(245, 111, 165, 0.45); }
.dp-switch.is-on .dp-switch-knob { transform: translateX(18px); }

/* ---- Estado de erro ---- */
.dp-error {
  position: absolute;
  inset: 0;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background: rgba(7, 16, 13, 0.9);
  z-index: 20;
  text-align: center;
  padding: 20px;
}
.dp-error p { font-size: 14px; color: rgba(255, 255, 255, 0.85); max-width: 320px; }
.dp-error-retry {
  padding: 10px 22px;
  border-radius: 10px;
  border: none;
  background: var(--yellow);
  color: #fff;
  font-family: 'Montserrat', sans-serif;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 0 20px rgba(245, 111, 165, 0.35);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.dp-error-retry:hover { transform: scale(1.05); box-shadow: 0 0 28px rgba(245, 111, 165, 0.5); }
.dp[data-state="error"] .dp-error { display: flex; }
.dp[data-state="error"] .dp-episode-nav { z-index: 21; }
.dp[data-state="error"] .dp-play,
.dp[data-state="error"] .dp-controls,
.dp[data-state="error"] .dp-top { opacity: 0; pointer-events: none; }

/* ---- Auto-hide ---- */
.dp.ui-hidden .dp-top,
.dp.ui-hidden .dp-controls,
.dp.ui-hidden .dp-play { opacity: 0; pointer-events: none; }
.dp.ui-hidden { cursor: none; }
.dp.ui-hidden .dp-settings.is-open { opacity: 1; visibility: visible; transform: translateY(0) scale(1); pointer-events: auto; }

/* ---- Transmissão (Cast / AirPlay) ---- */
.dp-btn-cast.is-disconnected { opacity: 0.45; }

/* Barra "Transmitindo para <dispositivo>" */
.dp-castbar {
  position: absolute;
  top: 0; left: 0; right: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.85), rgba(0, 0, 0, 0));
  z-index: 12;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.dp.is-casting .dp-castbar { opacity: 1; pointer-events: auto; }
.dp-castbar-icon { color: var(--yellow); display: flex; align-items: center; }
.dp-castbar-icon svg { width: 18px; height: 18px; }
.dp-castbar-text { font-size: 13px; font-weight: 600; flex: 1; text-shadow: 0 1px 6px rgba(0, 0, 0, 0.8); }
.dp-castbar-device { color: var(--yellow); }
.dp-castbar-stop {
  width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, 0.14);
  border: none; border-radius: 50%;
  color: var(--white);
  cursor: pointer;
  padding: 0;
  transition: background 0.15s ease;
}
.dp-castbar-stop:hover { background: rgba(255, 255, 255, 0.28); }
.dp-castbar-stop svg { width: 16px; height: 16px; }

/* Aviso transitório */
.dp-notice {
  position: absolute;
  left: 50%; bottom: 84px;
  transform: translateX(-50%) translateY(8px);
  max-width: 90%;
  padding: 10px 16px;
  border-radius: 10px;
  background: rgba(10, 14, 22, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.15);
  font-size: 12px; font-weight: 600; color: var(--white);
  opacity: 0; pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 14;
  text-align: center;
}
.dp-notice.is-visible { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---- Modal de Upgrade de Qualidade ---- */
.dp-quality-modal {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 25;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
}
.dp-quality-modal::-webkit-scrollbar,
.dp-quality-modal *::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}
.dp-quality-modal.is-open {
  opacity: 1;
  pointer-events: auto;
}
.dp-qm-card {
  position: relative;
  width: 100%;
  max-width: 360px;
  background: #0f141c;
  border: 1px solid rgba(245, 111, 165, 0.35);
  border-radius: 18px;
  padding: 24px 20px;
  text-align: center;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8), 0 0 30px rgba(245, 111, 165, 0.15);
  transform: scale(0.94);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
}
.dp-qm-card::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}
.dp-quality-modal.is-open .dp-qm-card {
  transform: scale(1);
}
.dp-qm-close {
  position: absolute;
  top: 14px;
  right: 14px;
  background: rgba(255, 255, 255, 0.08);
  border: none;
  color: var(--white);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease;
  padding: 0;
}
.dp-qm-close:hover {
  background: rgba(255, 255, 255, 0.18);
}
.dp-qm-close svg {
  width: 14px;
  height: 14px;
}
.dp-qm-icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: rgba(245, 111, 165, 0.15);
  border: 1px solid rgba(245, 111, 165, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--yellow);
}
.dp-qm-icon svg {
  width: 24px;
  height: 24px;
}
.dp-qm-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--white);
  margin-bottom: 8px;
}
.dp-qm-desc {
  font-size: 12px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.65);
  margin-bottom: 20px;
}
.dp-qm-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.dp-qm-upgrade {
  display: block;
  width: 100%;
  padding: 12px 18px;
  border-radius: 12px;
  background: linear-gradient(135deg, #F56FA5, #D83B7E);
  color: var(--white);
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 0 20px rgba(245, 111, 165, 0.35);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.dp-qm-upgrade:hover {
  transform: scale(1.02);
  box-shadow: 0 0 28px rgba(245, 111, 165, 0.5);
}
.dp-qm-dismiss {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.5);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  padding: 6px;
  transition: color 0.15s ease;
}
.dp-qm-dismiss:hover {
  color: var(--white);
}

/* ---- Modal de Free Preview (Dentro do Reprodutor / Mobile-First) ---- */
.dp-preview-modal {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  overflow-y: auto;
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
}
.dp-preview-modal::-webkit-scrollbar,
.dp-preview-modal *::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}
.dp-preview-modal.is-open,
.dp-preview-modal.flex:not(.hidden) {
  opacity: 1;
  pointer-events: auto;
  display: flex !important;
}
.dp-preview-modal.hidden {
  display: none !important;
  opacity: 0;
  pointer-events: none;
}
.dp-preview-card {
  position: relative;
  width: 100%;
  max-width: 320px;
  background: #12121A;
  border: 1px solid rgba(245, 111, 165, 0.4);
  border-radius: 20px;
  padding: 16px 14px;
  text-align: center;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.9), 0 0 25px rgba(245, 111, 165, 0.2);
  margin: auto;
  max-height: 94%;
  overflow-y: auto;
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
  transform: scale(0.95);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.dp-preview-card::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}
.dp-preview-modal.is-open .dp-preview-card,
.dp-preview-modal.flex:not(.hidden) .dp-preview-card {
  transform: scale(1);
}
.dp-preview-glow {
  position: absolute;
  top: -40px; right: -40px;
  width: 100px; height: 100px;
  border-radius: 50%;
  background: rgba(245, 111, 165, 0.2);
  filter: blur(30px);
  pointer-events: none;
}
.dp-preview-icon {
  width: 40px; height: 40px;
  margin: 0 auto 8px;
  border-radius: 12px;
  background: rgba(245, 111, 165, 0.15);
  border: 1px solid rgba(245, 111, 165, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #F56FA5;
  box-shadow: 0 0 15px rgba(245, 111, 165, 0.25);
}
.dp-preview-icon svg { width: 20px; height: 20px; }
.dp-preview-title {
  font-size: 14px;
  font-weight: 900;
  color: var(--white);
  margin-bottom: 5px;
  line-height: 1.2;
}
.dp-preview-desc {
  font-size: 11px;
  line-height: 1.35;
  color: rgba(226, 232, 240, 0.85);
  margin-bottom: 12px;
  padding: 0 2px;
}
.dp-preview-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 9px 12px;
  border-radius: 12px;
  background: linear-gradient(135deg, #F56FA5, #D83B7E);
  color: var(--white);
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 0 20px rgba(245, 111, 165, 0.35);
  margin-bottom: 7px;
  transition: transform 0.15s ease, opacity 0.15s ease;
}
.dp-preview-cta svg { width: 14px; height: 14px; }
.dp-preview-cta:hover, .dp-preview-cta:active {
  transform: scale(1.02);
  opacity: 0.95;
}
.dp-preview-close-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 7px 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.dp-preview-close-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--white);
}

@media (min-width: 640px) {
  .dp-preview-card {
    max-width: 380px;
    padding: 22px 20px;
    border-radius: 24px;
  }
  .dp-preview-icon {
    width: 48px; height: 48px;
    border-radius: 16px;
    margin-bottom: 10px;
  }
  .dp-preview-icon svg { width: 24px; height: 24px; }
  .dp-preview-title { font-size: 17px; margin-bottom: 6px; }
  .dp-preview-desc { font-size: 12px; margin-bottom: 16px; }
  .dp-preview-cta { padding: 11px 16px; font-size: 13px; margin-bottom: 8px; }
  .dp-preview-close-btn { padding: 9px 12px; font-size: 12px; }
}

/* ---- Fullscreen ---- */
.dp:fullscreen {
  background: #000;
  border: none;
  max-width: none !important;
  max-height: none !important;
  width: 100% !important;
  height: 100% !important;
}
.dp:fullscreen .dp-video { object-fit: contain; }

/* ---- Responsivo ---- */
@media (max-width: 820px) {
  .dp-volume-slider { display: none; }
  .dp-volume:hover .dp-volume-slider { width: 0; opacity: 0; margin-left: 0; }
  .dp-btn-pip { display: none; }
  .dp-group-left, .dp-group-right { gap: 6px; }
}
@media (max-width: 680px) {
  .dp-settings {
    left: 8px; right: 8px;
    bottom: 80px;
    min-width: 0;
    max-width: none;
  }
  .dp-time { font-size: 16px; }
  .dp-controls { padding: 6px 12px 10px; }
  .dp-caption-cue { font-size: clamp(12px, 3.4vw, 15px); padding: 4px 10px; }
}
@media (max-width: 520px) {
  .dp-controls { padding: 6px 10px 10px; }
  .dp-group-left, .dp-group-right { gap: 2px; }
  .dp-controls .dp-btn {
    width: 34px;
    height: 36px;
    flex: 0 1 34px;
  }
  .dp-controls .dp-btn svg { width: 19px; height: 19px; }
}
@media (max-width: 390px) {
  .dp-controls .dp-btn {
    width: 31px;
    height: 34px;
    flex: 0 1 31px;
  }
  .dp-controls .dp-btn svg { width: 18px; height: 18px; }
}

/* ---- Overlay de anúncios (foco mobile responsivo 9:16) ---- */
@media (max-width: 768px), (orientation: portrait) {
  .dp.dp-promo-active:not(:fullscreen) {
    width: min(100%, calc(82dvh * 9 / 16));
    max-width: 420px;
    aspect-ratio: 9 / 16;
    max-height: 82dvh;
    margin-inline: auto;
  }
}

@media (max-width: 480px) and (orientation: portrait) {
  .dp.dp-promo-active:not(:fullscreen) {
    width: 100%;
    max-width: 100%;
    height: auto;
    aspect-ratio: 9 / 16;
    max-height: 82dvh;
    margin-inline: auto;
  }
}

.dp-promo-layer {
  position: absolute;
  inset: 0;
  z-index: 40;
  background: #050507;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  color: #fff;
  font-family: 'Montserrat', system-ui, sans-serif;
}

.dp:fullscreen .dp-promo-layer {
  position: absolute;
  inset: 0;
}

.dp-promo-stage {
  position: relative;
  width: 100%;
  height: 100%;
  background: #000;
  overflow: hidden;
}

@supports (container-type: size) {
  .dp-promo-layer {
    container-type: size;
  }
  .dp-promo-stage {
    width: min(100cqw, calc(100cqh * 9 / 16));
    height: min(100cqh, calc(100cqw * 16 / 9));
  }
}

@media (max-width: 480px) and (orientation: portrait) {
  .dp-promo-stage {
    width: 100%;
    height: 100%;
  }
}

.dp:fullscreen .dp-promo-stage {
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}

.dp-promo-media-wrap {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dp-promo-media {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: cover;
  display: block;
}

.dp-promo-media.is-landscape {
  object-fit: contain;
}

.dp-promo-skip,
.dp-promo-layer [role="status"] {
  position: absolute;
  top: max(12px, env(safe-area-inset-top));
  min-height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(0, 0, 0, .62);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

.dp-promo-skip {
  left: max(12px, env(safe-area-inset-left));
  cursor: pointer;
}

.dp-promo-skip:hover {
  background: rgba(245, 111, 165, 0.85);
  border-color: #F56FA5;
}

.dp-promo-layer [role="status"] {
  right: max(12px, env(safe-area-inset-right));
  pointer-events: none;
}

@keyframes dpPromoCtaPulse {
  0%, 100% {
    transform: translateX(-50%) scale(1);
    box-shadow: 0 8px 22px rgba(22, 163, 74, 0.45), 0 4px 12px rgba(0, 0, 0, 0.55);
  }
  50% {
    transform: translateX(-50%) scale(1.028);
    box-shadow: 0 10px 28px rgba(34, 197, 94, 0.78), 0 6px 16px rgba(0, 0, 0, 0.62);
  }
}

@keyframes dpPromoCtaShine {
  0% { transform: translateX(-140%) skewX(-20deg); }
  55%, 100% { transform: translateX(260%) skewX(-20deg); }
}

@keyframes dpPromoCtaArrow {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(4px); }
}

.dp-promo-cta {
  position: absolute;
  left: 50%;
  bottom: calc(max(var(--dp-captions-bottom, 104px), 96px) + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  width: 90%;
  min-width: 0;
  max-width: 90%;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 12px;
  border: 1px solid rgba(74, 222, 128, 0.55);
  background: linear-gradient(135deg, #16A34A 0%, #15803D 100%);
  color: #FFFFFF;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.01em;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.28);
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  z-index: 2;
  box-shadow: 0 8px 22px rgba(22, 163, 74, 0.45), 0 4px 12px rgba(0, 0, 0, 0.55);
  animation: dpPromoCtaPulse 2.1s ease-in-out infinite;
  transition: transform 0.15s ease, filter 0.15s ease;
}

.dp-promo-cta::after {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: 42%;
  background: linear-gradient(110deg, transparent 15%, rgba(255, 255, 255, 0.36) 50%, transparent 85%);
  pointer-events: none;
  animation: dpPromoCtaShine 2.6s ease-in-out infinite;
}

.dp-promo-cta:hover {
  filter: brightness(1.06);
}

.dp-promo-cta:active {
  animation: none;
  transform: translateX(-50%) scale(0.97);
}

.dp-promo-cta svg {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
  animation: dpPromoCtaArrow 1.4s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
  .dp-promo-cta,
  .dp-promo-cta::after,
  .dp-promo-cta svg {
    animation: none;
  }
}

.dp-promo-unmute {
  position: absolute;
  top: max(12px, env(safe-area-inset-top));
  left: max(12px, env(safe-area-inset-left));
  min-height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(9, 9, 13, 0.86);
  border: 1px solid rgba(245, 111, 165, 0.65);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.55);
}

.dp-promo-unmute:hover {
  border-color: #F56FA5;
  background: rgba(22, 22, 34, 0.94);
}

.dp-promo-error {
  position: absolute;
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-width: 340px;
  width: calc(100% - 24px);
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.9);
  z-index: 2;
}

.dp-promo-stage > .dp-promo-retry,
.dp-promo-layer > .dp-promo-retry {
  position: absolute;
  top: 56%;
  left: 50%;
  transform: translate(-50%, -50%);
  min-height: 44px;
  padding: 0 20px;
  border-radius: 12px;
  border: none;
  background: #F56FA5;
  color: #09090D;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  z-index: 2;
}

.dp-promo-audio-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 24px;
  text-align: center;
  max-width: 380px;
}

.dp-promo-audio-badge {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #F56FA5;
}

.dp-promo-audio-title {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
}

.dp-promo-layer [hidden] { display: none !important; }

.dp-promo-layer :focus-visible {
  outline: 3px solid #fff;
  outline-offset: 3px;
}

.field-invalid {
  border-color: #f2555a !important;
  box-shadow: 0 0 0 2px rgba(242, 85, 90, .28);
}
