/* ==========================================================================
 * DTP Mobile UI v1 — streaming-app style para .nu en móvil/tablet
 * Prefijo .dtpm-* para aislar de DooPlay (ambos coexisten en detail page)
 * ========================================================================== */

:root {
    --dtpm-bg:          #0a0a0a;
    --dtpm-surface:     #181818;
    --dtpm-surface-2:   #242424;
    --dtpm-line:        #2a2a2a;
    --dtpm-text:        #e5e5e5;
    --dtpm-text-dim:    #b3b3b3;
    --dtpm-text-muted:  #6e6e6e;
    --dtpm-accent:      #4f8ef7;
    --dtpm-accent-hi:   #6da2ff;
    --dtpm-r-card:      5px;
    --dtpm-r-pill:      999px;
    --dtpm-header-h:    54px;
    --dtpm-bottomnav-h: 56px;
    --dtpm-safe-bottom: env(safe-area-inset-bottom, 0px);
    --dtpm-safe-top:    env(safe-area-inset-top,    0px);
}

/* ---- Reset/base scoped a body.dtpm ---- */
body.dtpm {
    margin: 0 !important;
    padding: 0;
    background: var(--dtpm-bg) !important;
    color: var(--dtpm-text) !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 15px;
    line-height: 1.4;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    padding-bottom: calc(var(--dtpm-bottomnav-h) + var(--dtpm-safe-bottom));
}
body.dtpm * { box-sizing: border-box; }
body.dtpm img { max-width: 100%; display: block; }
body.dtpm button { font: inherit; }
body.dtpm a { color: inherit; text-decoration: none; }

/* Esconder contenido viejo de DooPlay si quedó en el árbol */
body.dtpm > #header,
body.dtpm > #main,
body.dtpm > #footer,
body.dtpm > .copyright,
body.dtpm > #subir,
body.dtpm > #dt-loading,
body.dtpm > #search,
body.dtpm > #dts_sidebar { display: none !important; }

/* Ocultar barra móvil personalizada de DooPlay child theme (WPCode 214157)
   y otros widgets que chocan con nuestro bottom nav */
body.dtpm #dtp-mobile-bar,
body.dtpm .dtp-mobile-bar,
body.dtpm #barra-movil,
body.dtpm .barra-movil,
body.dtpm #dtp-tg-sticky,
body.dtpm .dtp-tg-sticky,
body.dtpm #dtp-nav-li,
body.dtpm #dtp-nav-btn,
body.dtpm #dtp-bubble-nuevo,
body.dtpm #dtp-bubble-top,
body.dtpm #dtp-bubble-quever,
body.dtpm [id^="dtp-bubble-"] { display: none !important; }

/* ---- Header fijo ---- */
.dtpm-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 50;
    padding-top: var(--dtpm-safe-top);
    transition: background .3s;
}
body.dtpm--home .dtpm-header {
    background: linear-gradient(180deg, rgba(0,0,0,.72) 0%, transparent 100%);
}
body.dtpm--detail .dtpm-header {
    background: linear-gradient(180deg, rgba(0,0,0,.55) 0%, transparent 100%);
}
.dtpm-header.is-scrolled,
body.dtpm:not(.dtpm--home):not(.dtpm--detail) .dtpm-header {
    background: rgba(10,10,10,.97);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(255,255,255,.05);
}
.dtpm-header.is-scrolled { background: rgba(10,10,10,.97) !important; }

.dtpm-header-inner {
    height: var(--dtpm-header-h);
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 0 20px;
    max-width: 1600px;
    margin: 0 auto;
}
.dtpm-brand {
    display: inline-flex; align-items: center;
    font-weight: 900; font-size: 20px;
    letter-spacing: -.02em;
    color: var(--dtpm-accent) !important;
    text-shadow: 0 2px 10px rgba(229,9,20,.35);
}
.dtpm-search-icon {
    margin-left: auto;
    color: #fff !important;
    display: inline-flex; align-items: center; justify-content: center;
    width: 40px; height: 40px;
    border-radius: var(--dtpm-r-pill);
    transition: background .15s;
}
.dtpm-search-icon:hover { background: rgba(255,255,255,.1); }

/* ---- Bottom nav ---- */
.dtpm-bottomnav {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 60;
    height: calc(var(--dtpm-bottomnav-h) + var(--dtpm-safe-bottom));
    padding-bottom: var(--dtpm-safe-bottom);
    display: flex;
    background: rgba(0,0,0,.95);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-top: 1px solid rgba(255,255,255,.07);
}
.dtpm-bnav-link {
    flex: 1;
    min-width: 0;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    gap: 2px;
    color: rgba(255,255,255,.45) !important;
    font-size: 9px;
    font-weight: 600;
    line-height: 1.1;
    padding: 6px 4px 0;
    text-align: center;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    -webkit-tap-highlight-color: transparent;
    text-decoration: none !important;
}
.dtpm-bnav-link svg { width: 22px; height: 22px; flex-shrink: 0; }
.dtpm-bnav-link span {
    display: block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.dtpm-bnav-link.is-active { color: #fff !important; }
.dtpm-bnav-link.is-active svg { stroke: var(--dtpm-accent); }
.dtpm-bnav-link:active { transform: scale(.92); }
@media (max-width: 360px) {
    .dtpm-bnav-link { font-size: 8.5px; }
}

/* Si el viewport es desktop (>1024px), el mobile-ui no debería estar activo,
   pero por si llega a renderizarse (admin testing en desktop), ocultamos bottom nav */
@media (min-width: 1025px) {
    .dtpm-bottomnav { display: none; }
    body.dtpm { padding-bottom: 0; }
}

/* ---- Main ---- */
.dtpm-main {
    padding-top: calc(var(--dtpm-header-h) + var(--dtpm-safe-top));
    min-height: 100vh;
    padding-bottom: calc(var(--dtpm-bottomnav-h) + var(--dtpm-safe-bottom) + 16px);
}
body.dtpm--home .dtpm-main,
body.dtpm--detail .dtpm-main { padding-top: 0; }
/* Safety: si la home no tiene hero (.dtpm-hero), restaura padding-top para que el header
   no tape el primer carrusel. :has() ampliamente soportado en navegadores modernos. */
body.dtpm--home .dtpm-main:not(:has(> .dtpm-hero)) {
    padding-top: calc(var(--dtpm-header-h) + var(--dtpm-safe-top));
}

/* ---- Hero (home) ---- */
.dtpm-hero {
    position: relative;
    height: 100svh; height: 100vh;
    min-height: 540px;
    overflow: hidden;
    margin-bottom: 8px;
}
.dtpm-hero-bg { position: absolute; inset: 0; background-size: cover; background-position: center 22%; }
.dtpm-hero-bg::after {
    content: ''; position: absolute; inset: 0;
    background:
        linear-gradient(180deg, rgba(0,0,0,.2) 0%, transparent 35%, rgba(0,0,0,.15) 55%, rgba(0,0,0,.8) 82%, var(--dtpm-bg) 100%),
        linear-gradient(90deg, rgba(0,0,0,.9) 0%, rgba(0,0,0,.45) 50%, transparent 100%);
}
.dtpm-hero-content {
    position: absolute; bottom: 16%; left: 24px; right: 24px; z-index: 2; max-width: 640px;
}
.dtpm-hero-eyebrow {
    font-size: 11px; font-weight: 800;
    letter-spacing: .14em; text-transform: uppercase;
    color: var(--dtpm-accent); margin-bottom: 10px;
}
.dtpm-hero-title {
    font-size: 34px; font-weight: 900;
    line-height: 1.0; letter-spacing: -.03em;
    margin: 0 0 12px; color: #fff;
    text-shadow: 0 2px 16px rgba(0,0,0,.5);
}
.dtpm-hero-meta {
    display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 20px;
}
.dtpm-hero-meta .dtpm-pill {
    padding: 3px 10px;
    background: rgba(255,255,255,.12);
    border-radius: 4px;
    font-size: 12px; font-weight: 500; color: var(--dtpm-text-dim);
}
.dtpm-hero-overview {
    color: rgba(255,255,255,.75);
    font-size: 14px; line-height: 1.55;
    margin: 0 0 22px;
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.dtpm-hero-actions { display: flex; gap: 12px; align-items: center; }

/* ---- Buttons ---- */
.dtpm-btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 11px 22px;
    border-radius: 6px;
    font-weight: 700; font-size: 15px;
    border: 0; cursor: pointer;
    transition: transform .1s, background .15s;
    color: var(--dtpm-text);
    background: rgba(255,255,255,.2);
    -webkit-tap-highlight-color: transparent;
    white-space: nowrap; text-decoration: none;
}
.dtpm-btn:hover { background: rgba(255,255,255,.3); }
.dtpm-btn:active { transform: scale(.96); }
.dtpm-btn--primary { background: #fff !important; color: #000 !important; }
.dtpm-btn--primary:hover { background: rgba(255,255,255,.85) !important; }
.dtpm-btn-icon {
    width: 20px; height: 20px;
    display: inline-flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}

/* ---- Rows ---- */
.dtpm-row { margin: 0 0 2px; padding-top: 18px; }
.dtpm-row-title {
    margin: 0 0 10px;
    font-size: 15px; font-weight: 700; letter-spacing: -.01em;
    display: flex; align-items: baseline; gap: 10px;
    padding: 0 20px; color: var(--dtpm-text);
}
.dtpm-row-link {
    margin-left: auto; font-size: 12px; font-weight: 500;
    color: var(--dtpm-text-muted) !important;
}
.dtpm-row-link:hover { color: var(--dtpm-text-dim) !important; }
.dtpm-row-rail {
    display: flex; gap: 6px;
    overflow-x: auto; overflow-y: visible;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scroll-padding-left: 20px;
    padding: 4px 20px 14px;
    scrollbar-width: none;
}
.dtpm-row-rail::-webkit-scrollbar { display: none; }

/* ---- Card ---- */
.dtpm-card {
    flex: 0 0 auto; width: 130px;
    scroll-snap-align: start;
    position: relative;
    border-radius: var(--dtpm-r-card);
    overflow: hidden;
    background: var(--dtpm-surface-2);
    -webkit-tap-highlight-color: transparent;
    transition: transform .22s ease, box-shadow .22s ease;
}
.dtpm-card-poster {
    aspect-ratio: 2 / 3;
    position: relative;
    background: var(--dtpm-surface-2);
    overflow: hidden;
}
.dtpm-card-poster img {
    width: 100%; height: 100%; object-fit: cover; display: block;
    transition: transform .3s ease;
}
.dtpm-card-label {
    position: absolute; bottom: 0; left: 0; right: 0;
    padding: 32px 8px 8px;
    background: linear-gradient(0deg, rgba(0,0,0,.9) 0%, transparent 100%);
    font-size: 11px; font-weight: 700;
    color: #fff; line-height: 1.25;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
    opacity: 0; transition: opacity .2s; pointer-events: none;
}
@media (hover: hover) {
    .dtpm-row .dtpm-card:hover .dtpm-card-label { opacity: 1; }
    .dtpm-row .dtpm-card:hover { transform: scale(1.07); z-index: 10; box-shadow: 0 10px 28px rgba(0,0,0,.65); }
    .dtpm-row .dtpm-card:hover .dtpm-card-poster img { transform: scale(1.04); }
}
.dtpm-grid .dtpm-card-label { opacity: 1; }
.dtpm-cs-badge {
    position: absolute; top: 6px; left: 6px;
    background: var(--dtpm-accent);
    color: #fff;
    font-size: 9px; font-weight: 800;
    padding: 2px 6px; border-radius: 3px;
    text-transform: uppercase; letter-spacing: .06em;
    z-index: 3;
}
.dtpm-cw-progress {
    position: absolute; bottom: 0; left: 0; right: 0; height: 3px;
    background: rgba(255,255,255,.2);
}
.dtpm-cw-progress > i { display: block; height: 100%; background: var(--dtpm-accent); }

/* CW (16:9) */
.dtpm-card--cw { width: 200px; }
.dtpm-card--cw .dtpm-card-poster { aspect-ratio: 16 / 9; }
.dtpm-card--cw .dtpm-cw-info { padding: 8px 8px 10px; }
.dtpm-card--cw .dtpm-cw-title {
    font-size: 12px; font-weight: 600; color: var(--dtpm-text); margin: 0;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* ---- Browse / Grid ---- */
.dtpm-browse-head { padding: 16px 20px 0; }
.dtpm-browse-title {
    font-size: 22px; font-weight: 900; letter-spacing: -.02em; margin: 0 0 14px; color: #fff;
}
.dtpm-filters {
    display: flex; gap: 8px;
    overflow-x: auto;
    padding-bottom: 16px;
    margin: 0 -4px;
    scrollbar-width: none;
}
.dtpm-filters::-webkit-scrollbar { display: none; }
.dtpm-chip {
    flex: 0 0 auto;
    padding: 7px 16px;
    border-radius: var(--dtpm-r-pill);
    font-size: 13px; font-weight: 600;
    border: 1px solid rgba(255,255,255,.14);
    color: var(--dtpm-text-dim) !important;
    background: var(--dtpm-surface);
    white-space: nowrap;
    transition: all .15s;
    -webkit-tap-highlight-color: transparent;
    text-decoration: none !important;
}
.dtpm-chip:hover {
    background: rgba(255,255,255,.14);
    color: var(--dtpm-text) !important;
}
.dtpm-chip.is-active {
    background: #fff !important;
    color: #000 !important;
    border-color: #fff;
}

.dtpm-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    padding: 0 20px;
}
.dtpm-grid .dtpm-card { width: 100%; }
@media (min-width: 480px) { .dtpm-grid { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 720px) { .dtpm-grid { grid-template-columns: repeat(5, 1fr); gap: 10px; padding: 0 40px; } }
@media (min-width: 1024px) { .dtpm-grid { grid-template-columns: repeat(6, 1fr); } }
.dtpm-pagination {
    display: flex; gap: 10px; justify-content: center;
    padding: 28px 20px 12px;
}

/* ---- Search ---- */
.dtpm-search-wrap {
    padding: 16px 20px 8px;
    max-width: 760px; margin: 0 auto;
}
.dtpm-search-bar { position: relative; margin-bottom: 20px; }
.dtpm-search-bar svg.dtpm-search-icon-input {
    position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
    color: var(--dtpm-text-muted); pointer-events: none;
}
.dtpm-search-input {
    width: 100%;
    background: var(--dtpm-surface);
    border: 1px solid var(--dtpm-line);
    border-radius: 12px;
    color: var(--dtpm-text);
    font-size: 16px;
    padding: 14px 14px 14px 46px;
    -webkit-appearance: none; appearance: none;
}
.dtpm-search-input:focus { outline: none; border-color: rgba(255,255,255,.3); }
.dtpm-search-empty {
    padding: 60px 20px; text-align: center;
    color: var(--dtpm-text-muted); font-size: 14px;
}

/* ---- Detail (movie/show) ---- */
.dtpm-detail-hero { position: relative; }
.dtpm-detail-backdrop {
    position: relative; width: 100%;
    aspect-ratio: 16 / 9;
    min-height: 240px; max-height: 520px;
    background-size: cover; background-position: center 20%;
    overflow: hidden;
}
.dtpm-detail-backdrop::after {
    content: ''; position: absolute; inset: 0;
    background:
        linear-gradient(180deg, rgba(0,0,0,.2) 0%, transparent 40%, rgba(0,0,0,.5) 72%, var(--dtpm-bg) 100%),
        linear-gradient(90deg, rgba(0,0,0,.65) 0%, transparent 65%);
}
.dtpm-detail-info { padding: 0 20px; margin-top: -64px; position: relative; z-index: 3; }
.dtpm-detail-title {
    font-size: 26px; font-weight: 900; line-height: 1.05;
    margin: 0 0 10px; letter-spacing: -.03em; color: #fff;
}
.dtpm-detail-meta {
    color: var(--dtpm-text-dim); font-size: 13px;
    display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 18px;
}
.dtpm-detail-meta .dot { color: var(--dtpm-text-muted); }
.dtpm-detail-rating { color: #f5c518; font-weight: 700; }
.dtpm-detail-quality {
    display: inline-block; padding: 1px 5px;
    border: 1px solid rgba(255,255,255,.28); border-radius: 3px;
    font-size: 10px; font-weight: 700; letter-spacing: .04em; color: var(--dtpm-text-dim);
}
.dtpm-detail-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 20px; }
.dtpm-detail-overview {
    color: var(--dtpm-text-dim); font-size: 14px; line-height: 1.65; margin: 0 0 18px;
}
.dtpm-detail-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.dtpm-detail-tag {
    padding: 4px 12px;
    background: var(--dtpm-surface);
    border-radius: var(--dtpm-r-pill);
    font-size: 12px; color: var(--dtpm-text-dim);
    border: 1px solid var(--dtpm-line); text-decoration: none;
}
.dtpm-detail-cast {
    color: var(--dtpm-text-muted); font-size: 13px; margin-bottom: 24px; line-height: 1.55;
}
.dtpm-detail-cast strong { color: var(--dtpm-text-dim); font-weight: 600; }

/* Sección donde renderizamos el reproductor DooPlay */
.dtpm-player-section {
    margin: 8px 0 0;
    padding: 0;
    background: #000;
    scroll-margin-top: var(--dtpm-header-h);
}
.dtpm-player-section .dtpm-section-label {
    font-size: 10px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase;
    color: var(--dtpm-text-muted); padding: 6px 20px 4px;
}
/* DooPlay player wrapping override — el iframe se queda full-bleed, sin padding extra.
   display:flow-root crea un BFC que CONTIENE floats internos del .dooplay_player
   (sin esto, dooplay_player flotaba y el host colapsaba a h=0, rompiendo el scroll). */
.dtpm-player-host {
    position: relative;
    width: 100%;
    display: flow-root;
}
.dtpm-player-host > * { max-width: 100%; }
body.dtpm .dtpm-player-host .dooplay_player {
    float: none !important;
    position: relative !important;
    display: block !important;
    width: 100% !important;
}
body.dtpm .dtpm-player-host .dooplay_player,
body.dtpm .dtpm-player-host .dooplay_player > div,
body.dtpm .dtpm-player-host .play,
body.dtpm .dtpm-player-host #playcontainer {
    margin: 0 !important;
    padding: 0 !important;
    background: #000 !important;
    min-height: 0 !important;
}
/* #playcontainer — altura natural del video, sin recortes */
body.dtpm #playcontainer,
body.dtpm .dooplay_player .play {
    width: 100% !important;
    position: relative !important;
    height: auto !important;
    min-height: 0 !important;
}
/* h2 "FUENTES DE VÍDEO" del player — margin-top compacto */
body.dtpm .dooplay_player h2,
body.dtpm .dtpm-player-host h2 {
    margin: 8px 14px 6px !important;
    font-size: 12px !important;
    padding: 0 !important;
    max-width: calc(100% - 28px) !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
}
body.dtpm .dooplay_player h2 .report-video-error {
    flex-shrink: 0 !important;
    margin-right: 0 !important;
    padding: 4px 10px !important;
    font-size: 10px !important;
}
/* Padding del bloque de opciones más compacto */
body.dtpm .dooplay_player .options,
body.dtpm #playeroptions {
    padding: 0 16px 12px !important;
}

/* ---- Episodios (show) ---- */
.dtpm-seasons-wrap { padding: 24px 20px 0; }
.dtpm-seasons-heading {
    font-size: 18px; font-weight: 800; margin: 0 0 14px; letter-spacing: -.01em;
}
.dtpm-season-tabs {
    display: flex; gap: 8px;
    overflow-x: auto; padding-bottom: 14px;
    margin: 0 -4px; scrollbar-width: none;
}
.dtpm-season-tabs::-webkit-scrollbar { display: none; }
.dtpm-season-tab {
    flex: 0 0 auto;
    padding: 8px 18px;
    background: var(--dtpm-surface);
    border: 1px solid var(--dtpm-line);
    border-radius: var(--dtpm-r-pill);
    font-size: 13px; font-weight: 600;
    color: var(--dtpm-text-muted);
    cursor: pointer; transition: all .15s;
    -webkit-tap-highlight-color: transparent;
}
.dtpm-season-tab.is-active {
    background: #fff; color: #000; border-color: #fff;
}
.dtpm-episode-list { display: flex; flex-direction: column; }
.dtpm-episode-item {
    display: flex; gap: 12px; padding: 12px 0;
    border-bottom: 1px solid rgba(255,255,255,.05);
    align-items: flex-start;
    border-radius: 6px;
    -webkit-tap-highlight-color: transparent;
    text-decoration: none;
}
.dtpm-episode-thumb {
    flex: 0 0 130px;
    aspect-ratio: 16/9;
    border-radius: 5px;
    background: var(--dtpm-surface-2);
    overflow: hidden;
    position: relative;
    flex-shrink: 0;
}
.dtpm-episode-thumb img { width: 100%; height: 100%; object-fit: cover; }
.dtpm-episode-num {
    position: absolute; left: 6px; top: 6px;
    background: rgba(0,0,0,.72);
    border-radius: 3px; padding: 2px 6px;
    font-size: 10px; font-weight: 700;
}
.dtpm-episode-meta { flex: 1; min-width: 0; padding-top: 2px; }
.dtpm-episode-title {
    font-size: 13px; font-weight: 600; margin: 0 0 4px; line-height: 1.3;
    color: var(--dtpm-text);
}
.dtpm-episode-overview {
    color: var(--dtpm-text-dim); font-size: 12px; margin: 0;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
    line-height: 1.45;
}

/* ---- Empty ---- */
.dtpm-empty {
    padding: 80px 20px; text-align: center;
    color: var(--dtpm-text-muted); font-size: 14px;
}

/* ---- Coming Soon enriched sections (override para mobile) ---- */
body.dtpm .dtpm-cs-wrap { padding: 0 20px; }
body.dtpm .dtpnu-cs__statusrow {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 10px !important;
    margin: 16px 0 20px !important;
}
body.dtpm .dtpnu-cs__theatrical,
body.dtpm .dtpnu-cs__streaming {
    padding: 12px !important;
    border-radius: 8px !important;
    background: var(--dtpm-surface) !important;
    border: 1px solid var(--dtpm-line) !important;
    min-height: 0 !important;
}
body.dtpm .dtpnu-cs__box-label {
    font-size: 9px !important;
    letter-spacing: .12em !important;
    text-transform: uppercase !important;
    color: var(--dtpm-text-muted) !important;
    margin-bottom: 6px !important;
}
body.dtpm .dtpnu-cs__box-title {
    font-size: 13px !important;
    font-weight: 700 !important;
    color: var(--dtpm-text) !important;
    margin-bottom: 8px !important;
    line-height: 1.25 !important;
}
body.dtpm .dtpnu-cs__countdown {
    display: flex !important;
    gap: 6px !important;
    flex-wrap: wrap !important;
}
body.dtpm .dtpnu-cs__cd-block {
    flex: 1 1 0 !important;
    min-width: 0 !important;
    padding: 6px 4px !important;
    background: rgba(255,255,255,.06) !important;
    border-radius: 5px !important;
    text-align: center !important;
}
body.dtpm .dtpnu-cs__cd-num {
    display: block !important;
    font-size: 16px !important;
    font-weight: 800 !important;
    color: var(--dtpm-accent) !important;
    line-height: 1.1 !important;
}
body.dtpm .dtpnu-cs__cd-lbl {
    display: block !important;
    font-size: 8px !important;
    letter-spacing: .08em !important;
    text-transform: uppercase !important;
    color: var(--dtpm-text-muted) !important;
    margin-top: 2px !important;
}
body.dtpm .dtpnu-cs__pill {
    font-size: 11px !important;
    padding: 5px 10px !important;
}
body.dtpm .dtpnu-cs__note {
    font-size: 11px !important;
    margin-top: 6px !important;
    color: var(--dtpm-text-muted) !important;
}
body.dtpm .dtpnu-cs__section {
    margin: 24px 0 !important;
}
body.dtpm .dtpnu-cs__section-title {
    font-size: 16px !important;
    font-weight: 800 !important;
    margin: 0 0 12px !important;
    color: var(--dtpm-text) !important;
}

/* Modal de descargas mobile */
body.dtpm #myModal { z-index: 9999 !important; }
body.dtpm #myModal .modal-dialog {
    margin: 80px 16px !important;
    max-width: none !important;
}
body.dtpm #myModal .modal-content {
    background: var(--dtpm-surface) !important;
    color: var(--dtpm-text) !important;
    border: 1px solid var(--dtpm-line) !important;
    border-radius: 10px !important;
}
body.dtpm #myModal .modal-header {
    border-bottom: 1px solid var(--dtpm-line) !important;
    padding: 14px !important;
}
body.dtpm #myModal .modal-title { font-size: 16px !important; color: var(--dtpm-text) !important; }
body.dtpm #myModal .modal-body { padding: 12px !important; }
body.dtpm #myModal .modal-footer { border-top: 1px solid var(--dtpm-line) !important; padding: 12px !important; }
body.dtpm #myModal .table { color: var(--dtpm-text) !important; font-size: 12px !important; margin: 0 !important; }
body.dtpm #myModal .table th,
body.dtpm #myModal .table td { padding: 6px 4px !important; border-color: var(--dtpm-line) !important; }
body.dtpm #myModal .close { color: #fff !important; opacity: .7 !important; font-size: 22px !important; }

/* ---- DooPlay player tabs (Fuentes de vídeo + DESCARGAR) ----
   El theme DooPlay tiene su propio CSS para estos selectores, pero algunos
   contextos no lo cargan completo. Definimos estilos base para que los tabs
   y el botón de descarga se vean bien en la UI mobile. */
body.dtpm .dooplay_player {
    color: var(--dtpm-text);
    font-family: inherit;
    margin: 0;
    padding: 0;
}
body.dtpm .dooplay_player h2 {
    font-size: 14px !important;
    font-weight: 700 !important;
    color: var(--dtpm-text) !important;
    margin: 16px 20px 10px !important;
    padding: 0 !important;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    background: none !important;
    text-transform: uppercase;
    letter-spacing: .04em;
}
body.dtpm .dooplay_player h2 .report-video-error {
    font-size: 11px !important;
    font-weight: 600 !important;
    color: var(--dtpm-text-dim) !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
    background: var(--dtpm-surface) !important;
    border: 1px solid var(--dtpm-line) !important;
    padding: 5px 12px !important;
    border-radius: var(--dtpm-r-pill) !important;
    text-decoration: none !important;
    flex-shrink: 0;
}
body.dtpm .dooplay_player .options,
body.dtpm #playeroptions {
    display: block !important;
    overflow: visible !important;
    padding: 0 16px 12px !important;
    margin: 0 !important;
    background: none !important;
}

/* Cada idioma se agrupa por player-label.js en una .lang-player-row.
   El span .lang-row-label arriba (LAT/SUB/CAST) + ul de opciones debajo. */
body.dtpm .lang-player-row {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    margin: 0 0 12px !important;
    padding: 0 44px 0 0 !important;   /* reserva 44px (DESCARGAR + gap visual) */
    background: none !important;
    position: relative !important;
}
body.dtpm .lang-row-label {
    flex: 0 0 auto !important;
    display: inline-flex !important;
    align-items: center !important;
    padding: 5px 10px !important;
    border-radius: var(--dtpm-r-pill) !important;
    font-size: 10px !important;
    font-weight: 800 !important;
    letter-spacing: .08em !important;
    margin: 0 !important;
    color: #fff !important;
    text-transform: uppercase !important;
    line-height: 1 !important;
}
body.dtpm .lang-player-row > ul {
    flex: 1 1 0 !important;
    min-width: 0 !important;
}
body.dtpm .lang-row-label.lat { background: #d4af37 !important; color: #1a1a1a !important; }
body.dtpm .lang-row-label.sub { background: #1e9d54 !important; }
body.dtpm .lang-row-label.cas { background: #c0392b !important; }

body.dtpm .dooplay_player .options ul,
body.dtpm #playeroptionsul,
body.dtpm .lang-player-row > ul {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 5px !important;
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    background: none !important;
    width: auto !important;
    min-width: 0 !important;
    overflow: visible !important;       /* sin scroll — ahora todo cabe */
    scrollbar-width: none !important;
}
body.dtpm .dooplay_player .options ul::-webkit-scrollbar,
body.dtpm #playeroptionsul::-webkit-scrollbar,
body.dtpm .lang-player-row > ul::-webkit-scrollbar { display: none !important; }
body.dtpm .dooplay_player .options ul li,
body.dtpm #playeroptionsul li {
    flex: 1 1 0 !important;             /* OPCIONs reparten el ancho equitativamente */
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0 !important;
    padding: 9px 8px !important;
    background: var(--dtpm-surface) !important;
    border: 1px solid var(--dtpm-line) !important;
    border-radius: var(--dtpm-r-pill) !important;
    color: var(--dtpm-text) !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    transition: all .15s !important;
    margin: 0 !important;
    min-height: 0 !important;
    height: auto !important;
    line-height: 1 !important;
    -webkit-tap-highlight-color: transparent;
    white-space: nowrap !important;
}
/* CSS counter per-UL: cada idioma reinicia 1, 2, 3, 4, 5 (sin esto data-nume usa contador global 1-10) */
body.dtpm .dooplay_player .options ul,
body.dtpm #playeroptionsul,
body.dtpm .lang-player-row > ul {
    counter-reset: opt;
}
body.dtpm li.dooplay_player_option { counter-increment: opt; }
/* OPCIONs: ocultar texto "Opcion N" largo + ícono play, mostrar "Op N" compacto vía counter */
body.dtpm li.dooplay_player_option .title,
body.dtpm li.dooplay_player_option i { display: none !important; }
body.dtpm li.dooplay_player_option::before {
    content: "Op " counter(opt);
    font-size: 11px;
    font-weight: 700;
    color: inherit;
    line-height: 1;
    letter-spacing: .02em;
}
body.dtpm .dooplay_player .options ul li:hover,
body.dtpm #playeroptionsul li:hover {
    background: rgba(255,255,255,.14) !important;
    color: var(--dtpm-text) !important;
}
body.dtpm .dooplay_player .options ul li.selected,
body.dtpm #playeroptionsul li.selected {
    background: #fff !important;
    color: #000 !important;
    border-color: #fff !important;
}
/* Botón Descargar — icon-only ABSOLUTE FUERA del UL (no solapa con OPCION 5).
   El padre .lang-player-row tiene position:relative + padding-right:44px reservado. */
body.dtpm .dooplay_player .options ul li[onclick*="AbrirEnlaces"],
body.dtpm .lang-player-row ul li[onclick*="AbrirEnlaces"],
body.dtpm #playeroptionsul li[onclick*="AbrirEnlaces"] {
    flex: 0 0 auto !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0 !important;
    padding: 6px 10px !important;
    background: var(--dtpm-accent) !important;
    background-color: var(--dtpm-accent) !important;
    border: 1px solid var(--dtpm-accent) !important;
    border-radius: var(--dtpm-r-pill) !important;
    color: #fff !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    margin: 0 !important;
    min-height: 0 !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
    width: auto !important;
    position: absolute !important;
    right: 0 !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    z-index: 5 !important;
    box-shadow: none !important;
}
body.dtpm .dooplay_player .options ul li[onclick*="AbrirEnlaces"]:hover,
body.dtpm .lang-player-row ul li[onclick*="AbrirEnlaces"]:hover,
body.dtpm #playeroptionsul li[onclick*="AbrirEnlaces"]:hover {
    background: var(--dtpm-accent-hi) !important;
    background-color: var(--dtpm-accent-hi) !important;
}
/* DESCARGAR: ocultar el texto "Descargar" y la bandera, mostrar solo el ícono download */
body.dtpm .dooplay_player .options ul li[onclick*="AbrirEnlaces"] .flag,
body.dtpm .lang-player-row ul li[onclick*="AbrirEnlaces"] .flag,
body.dtpm #playeroptionsul li[onclick*="AbrirEnlaces"] .flag,
body.dtpm .dooplay_player .options ul li[onclick*="AbrirEnlaces"] .title,
body.dtpm .lang-player-row ul li[onclick*="AbrirEnlaces"] .title,
body.dtpm #playeroptionsul li[onclick*="AbrirEnlaces"] .title { display: none !important; }
body.dtpm .dooplay_player .options ul li[onclick*="AbrirEnlaces"] i,
body.dtpm .lang-player-row ul li[onclick*="AbrirEnlaces"] i,
body.dtpm #playeroptionsul li[onclick*="AbrirEnlaces"] i {
    color: #fff !important;
    font-size: 14px !important;
    line-height: 1 !important;
    margin: 0 !important;
    display: inline-flex !important;
}
body.dtpm .dooplay_player .options ul li i {
    font-size: 14px !important;
    line-height: 1 !important;
    margin: 0 !important;
}
body.dtpm .dooplay_player .options ul li .title {
    font-weight: 600 !important;
}
body.dtpm .dooplay_player .options ul li .server {
    display: none !important; /* el server sub-text rompe el layout pill, lo ocultamos */
}
/* Bandera redundante — la etiqueta SUB/LAT/CAST arriba ya indica el idioma */
body.dtpm .dooplay_player .options ul li .flag,
body.dtpm #playeroptionsul li .flag,
body.dtpm .lang-player-row ul li .flag { display: none !important; }
body.dtpm .dooplay_player .options ul li .loader { display: none !important; }

/* Player container fix */
body.dtpm .dooplay_player #playcontainer,
body.dtpm .dooplay_player .play {
    background: #000 !important;
    margin: 0 !important;
    padding: 0 !important;
}
body.dtpm .dooplay_player .pframe {
    position: relative;
    padding-top: 0 !important;       /* DooPlay ya usa padding-bottom: 56.29% — sumar padding-top duplica la altura a 440px */
    padding-bottom: 56.25% !important;
    height: 0 !important;
    overflow: hidden;
    background: #000;
}
body.dtpm .dooplay_player .pframe iframe,
body.dtpm .dooplay_player .pframe video {
    position: absolute !important;
    top: 0; left: 0;
    width: 100% !important;
    height: 100% !important;
    border: 0 !important;
}

/* Iconos play overlay */
.dtpm-play-overlay {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(180deg, transparent 50%, rgba(0,0,0,.5) 100%);
    opacity: 0; transition: opacity .15s;
}
.dtpm-card--cw:hover .dtpm-play-overlay { opacity: 1; }
.dtpm-play-overlay svg {
    width: 44px; height: 44px; color: #fff;
    filter: drop-shadow(0 2px 8px rgba(0,0,0,.7));
}
