/* PhimHDC V4.1 – independent watch-page presentation.
   Reference: owner-provided mflix page HTML and desktop screenshots.
   Original source resolver, PlayerJS and XpfWatch dynamic attributes are preserved. */
.phdc-watch-page {background:#191a22;color:#f0f0f3;font-family:Arial,Helvetica,sans-serif;font-size:14px;}
.phdc-watch-page *, .phdc-watch-page *::before,.phdc-watch-page *::after {box-sizing:border-box}
.phdc-watch-page [hidden] {display:none!important}
.phdc-watch-page .phdc-page {background:#191a22;overflow:visible;min-height:100vh}
.phdc-watch-page .phdc-header,.phdc-watch-page .phdc-header.is-scrolled{background:linear-gradient(180deg,#15161c,#171820)!important;box-shadow:none!important;backdrop-filter:none!important}
.phdc-watch-page .phdc-header::before,.phdc-watch-page .phdc-header::after{display:none!important;content:none!important}
.phdc-watch-page .phdc-sidebar,.phdc-watch-page .phdc-sidebar.is-solid{background:linear-gradient(90deg,#15161c 0%,#181921 85%,rgba(25,26,34,.96) 100%)!important;box-shadow:none;top:65px}
.phdc-watch-page .phdc-nav-link,.phdc-watch-page .phdc-nav-label{opacity:1!important;filter:none!important;text-shadow:none!important}
.phdc-watch-page .phdc-nav-link:not(.phdc-nav-disabled) .phdc-nav-label{opacity:1!important;color:#e2e2e7}
.phdc-watch-page .phdc-nav-link.is-current .phdc-nav-label{color:#fff}
.phdc-watch-page .phdc-watch-shell{padding-top:65px;display:flex;flex-direction:column}
.phdc-watch-main{flex:1;min-width:0;margin:75px 12px 28px calc(var(--phdc-nav,215px) + 1px);}
.phdc-watch-page .phdc-detail-footer{margin-top:auto}
.phdc-watch{background:transparent!important;color:#f5f5f6;min-width:0;min-height:0;line-height:1.45}
/* Single grid: original page uses a 360px fixed control column at desktop. */
.phdc-watch .phdc-watch-player-grid{width:100%;max-width:none!important;padding:0!important;display:grid;grid-template-columns:minmax(0,1fr) 355px;align-items:stretch;gap:0;background:#111216;scroll-margin-top:72px}
.phdc-watch .phdc-watch-player{min-width:0;border:0!important;border-radius:0!important;background:#000;display:flex;flex-direction:column;box-shadow:none}
.phdc-watch .xpf-w-stage{position:relative;display:block;width:100%;aspect-ratio:16/9;height:auto;min-height:0;background:#000!important;overflow:hidden}
.phdc-watch .xpf-w-placeholder{background:#000!important;position:absolute;inset:0;display:block}
.phdc-watch .xpf-w-start{position:absolute;inset:0;display:flex;justify-content:center;align-items:center;text-align:center;gap:10px}
.phdc-watch .phdc-watch-play{display:flex!important;justify-content:center;align-items:center;min-width:0;width:86px;height:86px;padding:0;margin:0;background:#f22e41;border:0;border-radius:50%;color:#fff;box-shadow:0 8px 25px rgba(233,34,53,.18);cursor:pointer;transition:transform .2s,background .2s}
.phdc-watch .phdc-watch-play:hover{background:#fa364b;transform:scale(1.05)}
.phdc-watch .phdc-watch-play svg{width:34px!important;height:34px!important;fill:currentColor;color:#fff;stroke:#fff}
.phdc-watch .xpf-w-host,.phdc-watch .xpf-w-host iframe,.phdc-watch .xpf-w-host video{position:absolute;inset:0;width:100%;height:100%;border:0}
.phdc-watch .phdc-watch-actions{display:flex;align-items:center;justify-content:space-between;gap:10px;min-height:48px;flex-wrap:nowrap;background:#000!important;border:0!important;padding:4px 14px!important}
.phdc-watch-actions-left,.phdc-watch-actions-right{display:flex;align-items:center;gap:2px;min-width:0}
.phdc-watch-actions-right{margin-left:auto}
.phdc-watch .phdc-watch-actions .xpf-w-action{display:inline-flex;flex:0 0 auto;align-items:center;justify-content:center;gap:6px;min-height:36px;background:transparent!important;border:0!important;box-shadow:none!important;color:#fafafa!important;padding:5px 8px!important;font:600 14px/1.2 Arial,Helvetica,sans-serif!important;border-radius:5px!important;text-shadow:none!important}
.phdc-watch .phdc-watch-actions .xpf-w-action:hover:not(:disabled){color:#ffe199!important}
.phdc-watch .phdc-watch-actions .xpf-w-action svg{width:17px;height:17px;flex:none}
.phdc-watch .phdc-watch-actions .xpf-w-action:disabled{opacity:.45;cursor:default}
.phdc-watch .phdc-watch-actions .xpf-w-action[data-xhd-save].is-saved{color:#ffe098!important}
.phdc-watch .phdc-watch-actions-right .xpf-w-action + .xpf-w-action{border-left:1px solid #313138!important;border-radius:0!important}
.phdc-watch .phdc-watch-engine-controls{display:none!important}
/* Right information column: stable 100%-height, independent scrolling episode list. */
.phdc-watch .phdc-watch-side{min-width:0;min-height:0;height:100%;max-height:100%;display:flex;flex-direction:column;background:#16171c;overflow:hidden}
.phdc-watch .phdc-watch-side-heading{flex:none;min-height:119px;padding:20px 18px 17px 22px;background:#25262d}
.phdc-watch .phdc-watch-side-heading h1{margin:0 0 17px;font:400 22px/1.3 Arial,Helvetica,sans-serif;color:#e6e6e9;position:relative;min-width:0;max-height:58px;overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2}
.phdc-watch .phdc-watch-side-heading h1::before{content:"";position:absolute;left:-22px;top:0;width:4px;height:29px;border-radius:2px;background:#ff671e}
.phdc-watch .phdc-watch-side-heading h1>a{color:inherit!important;text-decoration:none!important}
.phdc-watch .phdc-watch-side-tags{display:flex;flex-wrap:nowrap;gap:7px;align-items:center;min-width:0}
.phdc-watch .phdc-watch-side-tags span{display:block;max-width:100%;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;background:#303139;border:1px solid #35363e;color:#e6e6ec;padding:6px 12px;border-radius:8px;font-size:14px;line-height:1.2}
.phdc-watch .phdc-watch-side-tags span:last-child{flex:1 1 auto}
.phdc-watch .phdc-watch-side-body{flex:1 1 auto;min-height:0;border:0!important;padding:0!important;display:flex;flex-direction:column;gap:0!important;background:#15161b;overflow:hidden}
.phdc-watch .phdc-watch-server-buttons{display:flex!important;flex:none;justify-content:center;gap:6px;align-items:center;flex-wrap:wrap;padding:12px 10px 8px;min-height:57px}
.phdc-watch .phdc-watch-server-buttons .xpf-w-source{display:inline-flex;flex-direction:row;align-items:center;gap:6px;flex:0 1 auto;min-width:0;max-width:100%;min-height:36px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;background:#38333a;border:1px solid #55515a;border-radius:5px;padding:7px 12px;box-shadow:none;font-size:12px;line-height:1.2;color:#fff}
.phdc-watch .phdc-watch-server-buttons .xpf-w-source.is-active{background:#bc2026;border-color:#e8494c;color:#fff}
.phdc-watch .phdc-watch-server-buttons .xpf-w-source>svg{width:15px;height:15px;flex:none}
.phdc-watch .phdc-watch-server-buttons .xpf-w-source strong{font-size:12px;font-weight:700}
.phdc-watch .phdc-watch-episode-header{flex:none;padding:0 8px 8px;background:#17181d}
.phdc-watch .phdc-watch-episode-name{display:flex;align-items:center;justify-content:space-between;gap:4px;flex-wrap:wrap;margin-bottom:12px}
.phdc-watch .phdc-watch-episode-name h2{font:700 18px/1.35 Arial,Helvetica,sans-serif!important;margin:0;color:#e9e9ed;white-space:nowrap}
.phdc-watch .phdc-watch-search{display:flex;align-items:center;position:relative;min-width:125px;max-width:146px;height:32px;border:1px solid #404147;border-radius:5px;color:#92939c;background:#1d1e24}
.phdc-watch .phdc-watch-search>span{display:flex;align-items:center;justify-content:center;margin-left:7px}
.phdc-watch .phdc-watch-search svg{width:17px;height:17px}
.phdc-watch .phdc-watch-search input{width:100%;min-width:0;height:100%;border:0!important;background:transparent!important;outline:none!important;box-shadow:none!important;padding:4px 7px;color:#fff;font-size:13px}
.phdc-watch .phdc-watch-search input::placeholder{color:#797b83}
.phdc-watch .phdc-watch-server-caption{display:flex;justify-content:flex-end;align-items:center;gap:6px;padding:1px 9px;color:#b9ff35;font-weight:700;font-size:12px;min-height:20px}
.phdc-watch .phdc-watch-server-caption svg{width:12px;height:12px}
.phdc-watch .phdc-watch-episode-scroll{flex:1 1 auto;min-height:40px;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;scrollbar-color:#60616a transparent;scrollbar-width:thin;padding:9px 10px 16px;background:#16171c}
.phdc-watch .phdc-watch-episode-scroll .xpf-w-episode-section{margin:0!important;min-height:0;padding:0}
.phdc-watch .xpf-w-season-row{display:flex;gap:8px;align-items:center;justify-content:flex-start;margin:0 0 12px;font-size:12px}
.phdc-watch .xpf-w-season-row select{max-width:180px;font-size:12px;min-height:28px;background:#27282f;color:#e4e5ed;border:1px solid #45464c;border-radius:5px}
.phdc-watch .phdc-watch-episodes{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:10px!important;padding:0 5px!important;max-height:none!important;overflow:visible!important}
.phdc-watch .phdc-watch-episodes .xpf-w-episode{display:flex;align-items:center;justify-content:center;position:relative;min-width:0;height:39px;border:1px solid #282a31!important;border-radius:8px!important;padding:0 7px!important;background:#1e2025!important;box-shadow:none!important;color:#f2f3f7!important;font-size:13px;font-weight:600;line-height:1.1;text-decoration:none}
.phdc-watch .phdc-watch-episodes .xpf-w-episode:hover{color:#ffe297!important;background:#292b31!important}
.phdc-watch .phdc-watch-episodes .xpf-w-episode.is-active{color:#2bbcff!important;border-color:#343941!important;background:#24252c!important}
.phdc-watch .phdc-watch-episodes .xpf-w-episode i{display:none}
.phdc-watch .phdc-watch-movie-episode-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;padding:2px 4px}
.phdc-watch .phdc-watch-movie-full{display:flex;align-items:center;justify-content:center;height:41px;background:#24252c;border:1px solid #2c2e35;border-radius:8px;color:#25bffa!important;font-weight:700;text-decoration:none!important}
.phdc-watch .phdc-watch-movie-full:hover{background:#343640}
.phdc-watch .phdc-watch-empty{margin:6px;font-size:12px;text-align:center;color:#abaeb8}
/* Comments below the full width watch panel. */
.phdc-watch-comment-section{padding:26px 2px 55px;background:#191a22}
.phdc-watch-comment-container{max-width:none;margin:0;min-width:0}
.phdc-watch .phdc-watch-comment-container .xpf-w-comments{margin:0!important;padding:0!important;background:transparent}
.phdc-watch .xpf-w-comment-head h2{font:700 30px/1.4 Arial,Helvetica,sans-serif!important;margin:0 0 12px;color:#e9e9ed}
.phdc-watch .xpf-w-comment-invite{font-size:14px;color:#bcbcc5}
.phdc-watch .pc-watch-comments{max-width:none}
.phdc-watch-status{padding:10px 14px;color:#ffd68e;font-size:13px}
/* Watch engine overlays use the original form validation, CSRF and endpoints. */
.phdc-watch-page .xhd-overlay{position:fixed;inset:0;z-index:3000;align-items:center;justify-content:center;background:rgba(31,33,45,.78);padding:20px}
.phdc-watch-page .xhd-overlay:not([hidden]){display:flex}
.phdc-watch-page .xhd-backdrop{position:absolute;inset:0;border:0;background:transparent;cursor:default}
.phdc-watch-page .xpf-w-modal .xhd-dialog{position:relative;width:100%;max-width:480px;border:0;border-radius:20px;background:#17181d;box-shadow:0 20px 60px #0009;color:#fff;max-height:calc(100svh - 32px);overflow-y:auto}
.phdc-watch-page .xpf-w-modal .xhd-dialog>header{position:relative!important;background:transparent!important;padding:24px 30px 15px!important;height:auto!important;display:flex;justify-content:center;align-items:center;box-shadow:none!important}
.phdc-watch-page .xpf-w-modal .xhd-dialog>header h2{color:#f1f1f4;font-size:23px;margin:0;text-align:center}
.phdc-watch-page .xpf-w-modal .xpf-w-close{position:absolute;right:13px;top:13px;background:#282a32;border-radius:50%;width:40px;height:40px;border:0;color:#fff;cursor:pointer}
.phdc-watch-page .xpf-w-modal-body{padding:14px 30px 28px}
.phdc-watch-page .xpf-w-report-send{background:#22b7e7;border-radius:24px;min-height:45px;font-weight:700}
.phdc-watch-page .xpf-w-report-send:disabled{background:#477787;color:#e6e6e6}
.phdc-watch-page .phdc-watch-sort[aria-pressed=true]{color:#ffe299!important}
.phdc-watch-page .phdc-watch-search:focus-within{border-color:#7c858f}
.phdc-watch-page .phdc-watch-main a:focus-visible,.phdc-watch-page .phdc-watch-main button:focus-visible{outline:2px solid #f5cf73;outline-offset:2px}
@media(min-width:1700px){.phdc-watch .phdc-watch-player-grid{grid-template-columns:minmax(0,1fr) 375px}.phdc-watch-main{margin-right:18px}}
@media(max-width:1300px) and (min-width:801px){.phdc-watch .phdc-watch-player-grid{grid-template-columns:minmax(0,1fr) 330px}.phdc-watch .phdc-watch-side-heading{padding:16px 12px 13px 18px;min-height:104px}.phdc-watch .phdc-watch-side-heading h1{font-size:20px;margin-bottom:10px}.phdc-watch .phdc-watch-side-heading h1::before{left:-18px}.phdc-watch .phdc-watch-side-tags span{font-size:12px;padding:6px 8px}.phdc-watch .phdc-watch-episode-name h2{font-size:16px!important}.phdc-watch .phdc-watch-episodes{gap:7px!important}}
@media(max-width:1040px) and (min-width:801px){.phdc-watch .phdc-watch-player-grid{grid-template-columns:minmax(0,1fr) 295px}.phdc-watch .phdc-watch-side-heading h1{font-size:18px}.phdc-watch .phdc-watch-side-tags span{font-size:11px}.phdc-watch .phdc-watch-server-buttons{padding:7px 5px}.phdc-watch .phdc-watch-episode-scroll{padding:6px}.phdc-watch .phdc-watch-episodes{gap:5px!important}.phdc-watch .phdc-watch-episodes .xpf-w-episode{height:34px}}
@media(max-width:800px){
 .phdc-watch-page .phdc-watch-shell{padding-top:65px}
 .phdc-watch-main{margin:0 0 20px;width:100%;padding:8px 12px 0}
 .phdc-watch-page .phdc-sidebar{z-index:95;background:#171820!important}
 .phdc-watch-page .phdc-header{z-index:92}
 .phdc-watch .phdc-watch-player-grid{grid-template-columns:minmax(0,1fr);background:#17181d}
 .phdc-watch .phdc-watch-player{width:100%}
 .phdc-watch .phdc-watch-side{height:auto;max-height:none;overflow:visible}
 .phdc-watch .phdc-watch-side-heading{min-height:0;padding:14px 16px;background:#25262d}
 .phdc-watch .phdc-watch-side-heading h1{font-size:21px;margin-bottom:10px}
 .phdc-watch .phdc-watch-side-heading h1::before{left:-16px}
 .phdc-watch .phdc-watch-side-body{overflow:visible}
 .phdc-watch .phdc-watch-episode-scroll{max-height:320px;overflow-y:auto}
 .phdc-watch .phdc-watch-actions{padding:6px 8px!important;min-height:50px}
 .phdc-watch .phdc-watch-actions .xpf-w-action{font-size:12px!important;padding:4px 6px!important}
 .phdc-watch .phdc-watch-actions .xpf-w-action svg{width:15px;height:15px}
 .phdc-watch-comment-section{padding:20px 8px 25px}
 .phdc-watch .xpf-w-comment-head h2{font-size:24px!important}
 .phdc-watch-page .phdc-detail-footer{margin-left:0}
}
@media(max-width:470px){
 .phdc-watch-main{padding:0}
 .phdc-watch .phdc-watch-play{width:62px;height:62px}
 .phdc-watch .phdc-watch-play svg{width:25px!important;height:25px!important}
 .phdc-watch .phdc-watch-actions{gap:0;min-height:46px}
 .phdc-watch-actions-left,.phdc-watch-actions-right{gap:0}
 .phdc-watch .phdc-watch-actions .xpf-w-action{gap:3px;font-size:11px!important;padding:5px 4px!important}
 .phdc-watch .phdc-watch-actions .xpf-w-action svg{width:14px;height:14px}
 .phdc-watch .phdc-watch-actions .phdc-watch-sort{font-size:10px!important}
 .phdc-watch .phdc-watch-side-heading h1{font-size:19px}
 .phdc-watch .phdc-watch-server-caption{font-size:11px}
 .phdc-watch .phdc-watch-episodes{gap:8px!important}
 .phdc-watch .phdc-watch-episode-scroll{max-height:300px}
 .phdc-watch .phdc-watch-comment-container{padding:0 12px}
 .phdc-watch-page .xpf-w-modal .xhd-dialog{border-radius:14px}
}
@media(prefers-reduced-motion:reduce){.phdc-watch .phdc-watch-play{transition:none!important}}

/* The reference draws the orange title marker outside the clipped h1 text. */
.phdc-watch .phdc-watch-side-heading{position:relative}
.phdc-watch .phdc-watch-side-heading::before{content:"";position:absolute;left:0;top:22px;width:4px;height:30px;border-radius:0 3px 3px 0;background:#f26524}
.phdc-watch .phdc-watch-side-heading h1::before{display:none}
