/* PhimHDC Watch V4.2. Based on the supplied mflix full-page screenshot and saved HTML.
   Isolated to watch pages; underlying player/episode resolver are unchanged. */
.phdc-watch-page{--phdc-watch-bg:#191a22;background:var(--phdc-watch-bg)}
.phdc-watch-page .phdc-watch-main{
  margin:35px 20px 0 calc(var(--phdc-nav,215px) + 8px)!important;
  padding:0!important;min-width:0;
}
.phdc-watch-page .phdc-watch .phdc-watch-player-grid{
  grid-template-columns:minmax(0,1fr) 360px!important;
  width:100%;align-items:stretch;background:#16161a;
}
.phdc-watch-page .phdc-watch .phdc-watch-player,
.phdc-watch-page .phdc-watch .phdc-watch-side{min-height:0;box-shadow:none}
.phdc-watch-page .phdc-watch .xpf-w-stage{
  position:relative;width:100%;aspect-ratio:16/9;height:auto!important;
  min-height:0;background:#000!important;
}
.phdc-watch-page .phdc-watch .phdc-watch-play{
  width:80px;height:80px;background:#ef2c40;border-radius:50%;
  box-shadow:0 10px 26px rgba(211,35,53,.23)
}
.phdc-watch-page .phdc-watch .phdc-watch-play svg{fill:#fff!important;stroke:none!important;width:31px!important;height:31px!important;margin-left:4px}
.phdc-watch-page .phdc-watch .phdc-watch-actions{
  height:62px;min-height:62px;flex-wrap:nowrap;
  padding:9px 13px!important;align-items:center;background:#000!important;
}
.phdc-watch-page .phdc-watch .phdc-watch-actions .xpf-w-action{
  color:#f9f9fb!important;font:600 15px/1.13 Arial,Helvetica,sans-serif!important;
  min-height:38px;gap:9px;padding:6px 10px!important;
}
.phdc-watch-page .phdc-watch .phdc-watch-actions .xpf-w-action svg{width:18px;height:18px}
.phdc-watch-page .phdc-watch .phdc-watch-actions .phdc-watch-sort{gap:7px}
.phdc-watch-page .phdc-watch .phdc-watch-actions .phdc-watch-sort span{max-width:45px;white-space:normal;line-height:1.05;text-align:left}
.phdc-watch-page .phdc-watch .phdc-watch-actions-right .xpf-w-action + .xpf-w-action{border-left:1px solid #33333a!important}
.phdc-watch-page .phdc-watch .phdc-watch-side{background:#16161a;max-height:100%;height:auto}
.phdc-watch-page .phdc-watch .phdc-watch-side-heading{min-height:124px;padding:18px 20px 18px 22px;background:#25252b}
.phdc-watch-page .phdc-watch .phdc-watch-side-heading::before{top:18px;height:31px;background:#ff6f24}
.phdc-watch-page .phdc-watch .phdc-watch-side-heading h1{font-size:22px;font-weight:400;line-height:1.35;margin-bottom:16px;max-height:59px}
.phdc-watch-page .phdc-watch .phdc-watch-side-tags span{background:#303039;border-color:#303039;padding:6px 12px;border-radius:7px;font-size:14px}
.phdc-watch-page .phdc-watch .phdc-watch-side-body{background:#16161a}
.phdc-watch-page .phdc-watch .phdc-watch-server-buttons{min-height:61px;padding:11px 10px 7px;background:#16161a;gap:7px}
.phdc-watch-page .phdc-watch .phdc-watch-server-buttons .xpf-w-source{
  background:#aa2128;border:1px solid #d63740;color:#fff;
  border-radius:3px;min-height:34px;padding:6px 10px
}
.phdc-watch-page .phdc-watch .phdc-watch-server-buttons .xpf-w-source.is-active{background:#c32830;border-color:#e2494e}
.phdc-watch-page .phdc-watch .phdc-watch-episode-header{position:relative;min-height:73px;padding:3px 9px 6px;background:#16161a}
.phdc-watch-page .phdc-watch .phdc-watch-episode-name{
  display:block;margin:0;min-height:57px;padding:0;
}
.phdc-watch-page .phdc-watch .phdc-watch-episode-name h2{
  font-size:17px!important;line-height:1.45;margin:0 0 4px!important;font-weight:700;
}
.phdc-watch-page .phdc-watch .phdc-watch-search{height:29px;min-width:0;max-width:143px;width:143px;border-color:#383940;background:#1c1d22;border-radius:4px}
.phdc-watch-page .phdc-watch .phdc-watch-search input{font-size:12px;padding:3px 5px}
.phdc-watch-page .phdc-watch .phdc-watch-server-caption{
  position:absolute;right:7px;top:25px;min-height:23px;
  display:flex;align-items:center;justify-content:flex-end;color:#b6ff31;
  padding:0 0 0 5px;font-size:12px;white-space:nowrap;
}
.phdc-watch-page .phdc-watch .phdc-watch-source-count{
  position:absolute;right:0;top:-13px;min-width:17px;height:17px;
  display:flex;align-items:center;justify-content:center;
  border-radius:50%;background:#fc8618;color:#fff;
  font-size:10px;font-weight:700;line-height:1;padding:0 3px;
}
.phdc-watch-page .phdc-watch .phdc-watch-episode-scroll{background:#16161a;padding:14px 15px 18px;overflow-x:hidden}
.phdc-watch-page .phdc-watch .phdc-watch-episodes{gap:9px!important;padding:0!important}
.phdc-watch-page .phdc-watch .phdc-watch-episodes .xpf-w-episode{
  height:37px!important;border-radius:8px!important;background:#1c1e23!important;
  border-color:#292b31!important;color:#f4f4f6!important;font-size:13px!important;
}
.phdc-watch-page .phdc-watch .phdc-watch-episodes .xpf-w-episode.is-active{
  background:#25262e!important;color:#27b8f2!important;
}
.phdc-watch-page .phdc-watch .phdc-watch-movie-episode-grid{padding:0 4px;gap:8px}
.phdc-watch-page .phdc-watch .phdc-watch-movie-full{
  width:100%;max-width:100%;height:39px;background:#26272f;
  border:1px solid #292b33;border-radius:7px;color:#28b8f0!important;
  font-weight:700;font-size:14px;position:relative;
}
.phdc-watch-page .phdc-watch .phdc-watch-movie-full.is-active::after,
.phdc-watch-page .phdc-watch .phdc-watch-episodes .xpf-w-episode.is-active::after{
  content:"▂▅▃";display:block;position:absolute;left:50%;bottom:-3px;
  transform:translateX(-50%);font-size:10px;line-height:1;color:#19bbff;letter-spacing:1px;
}
/* Comment area is deliberately watch-specific: the original /comments API and auth policy remain intact. */
.phdc-watch-page .phdc-watch-comment-section{padding:35px 0 0!important;margin:0;background:transparent}
.phdc-watch-page .phdc-watch-comment-container{width:100%;max-width:none;margin:0}
.phdc-watch-page .phdc-watch-comments-widget{color:#f4f4f6;font-size:15px}
.phdc-watch-page .phdc-watch-comment-title{
  margin:0 0 17px;font:700 28px/1.22 Arial,Helvetica,sans-serif;color:#e0e0e6;
}
.phdc-watch-page .phdc-watch-comment-form{
  margin:0 8px 0;padding:12px 12px 12px;
  background:#2a2a32;border-radius:10px;min-width:0;
}
.phdc-watch-page .phdc-watch-comment-editor{
  padding:0;background:transparent;border:0;
}
.phdc-watch-page .phdc-watch-comment-editor textarea{
  display:block;width:100%;min-height:109px;max-height:250px;
  resize:vertical;border:1px solid #101015;border-radius:6px;
  outline:0;box-shadow:none;background:#101116;
  padding:10px 12px;color:#e5e6ed;font:400 14px/1.5 Arial,Helvetica,sans-serif;
}
.phdc-watch-page .phdc-watch-comment-editor textarea:focus{border-color:#777a85}
.phdc-watch-page .phdc-watch-comment-editor textarea::placeholder{color:#8f9099;opacity:1}
.phdc-watch-page .phdc-watch-comment-emoji-row{min-height:39px;position:relative;display:flex;align-items:center;padding:4px 3px}
.phdc-watch-page .phdc-watch-comment-emoji{padding:0;border:0;background:transparent;font-size:23px;line-height:1.2;cursor:pointer}
.phdc-watch-page .phdc-watch-emoji-picker{
  position:absolute;left:0;bottom:38px;z-index:3;
  display:grid;grid-template-columns:repeat(4,40px);gap:4px;
  padding:7px;background:#24262f;border:1px solid #484950;border-radius:9px;box-shadow:0 9px 22px #0006;
}
.phdc-watch-page .phdc-watch-emoji-picker[hidden]{display:none!important}
.phdc-watch-page .phdc-watch-emoji-picker button{border:0;background:transparent;border-radius:5px;font-size:22px;cursor:pointer;min-height:34px}
.phdc-watch-page .phdc-watch-emoji-picker button:hover{background:#393a45}
.phdc-watch-page .phdc-watch-comment-actions{
  margin:0;display:flex;align-items:center;justify-content:space-between;
  gap:12px;min-height:58px;background:#2a2a33;
  padding:9px 8px 4px;border-radius:10px;
}
.phdc-watch-page .phdc-watch-comment-spoiler{display:flex;align-items:center;gap:9px;color:#f5f6f8;font:400 13px/1 Arial,Helvetica,sans-serif;cursor:pointer}
.phdc-watch-page .phdc-watch-comment-spoiler input{position:absolute;width:1px;height:1px;opacity:0;overflow:hidden}
.phdc-watch-page .phdc-watch-comment-switch{position:relative;width:35px;height:18px;background:#55565b;border-radius:15px;transition:background .18s}
.phdc-watch-page .phdc-watch-comment-switch::before{content:"";position:absolute;width:14px;height:14px;left:2px;top:2px;border-radius:50%;background:#fff;transition:transform .18s}
.phdc-watch-page .phdc-watch-comment-spoiler input:checked + .phdc-watch-comment-switch{background:#27a4da}
.phdc-watch-page .phdc-watch-comment-spoiler input:checked + .phdc-watch-comment-switch::before{transform:translateX(17px)}
.phdc-watch-page .phdc-watch-comment-spoiler input:focus-visible + .phdc-watch-comment-switch{outline:2px solid #e9c071;outline-offset:3px}
.phdc-watch-page .phdc-watch-comment-send{
  display:flex;align-items:center;justify-content:center;gap:7px;
  border:1px solid #484953;background:#292a33;
  color:#ffda8b;border-radius:7px;min-width:87px;height:41px;
  padding:0 12px;font:600 14px/1 Arial,Helvetica,sans-serif;cursor:pointer;
}
.phdc-watch-page .phdc-watch-comment-send:hover{background:#383a43}
.phdc-watch-page .phdc-watch-comment-send svg{width:21px;height:21px}
.phdc-watch-page .phdc-watch-comment-closed{padding:15px;color:#d0d0d5}
.phdc-watch-page .phdc-watch-comment-sort{display:flex;justify-content:flex-end;gap:12px;margin:12px 8px 0}
.phdc-watch-page .phdc-watch-comment-sort button{border:0;background:none;color:#a8abb4;font-size:12px;cursor:pointer}
.phdc-watch-page .phdc-watch-comment-sort button[aria-pressed=true]{color:#e5e6ef}
.phdc-watch-page .phdc-watch-comments-widget .pc-wc-list{margin:7px 8px 0}
.phdc-watch-page .phdc-watch-comments-widget .pc-wc-pagination{margin:8px}
.phdc-watch-page .phdc-watch-comments-widget .pc-wc-status{margin:9px 8px}
.phdc-watch-page .phdc-watch-after-comment{margin:16px 0 0;height:8px;border-radius:4px;background:#16171d}
/* Related movies: poster strip with real data returned by AhaWatch::load(). */
.phdc-watch-page .phdc-watch-related{min-width:0;padding:46px 0 54px;margin:0}
.phdc-watch-page .phdc-watch-related h2{margin:0 0 27px;font:700 28px/1.28 Arial,Helvetica,sans-serif;color:#e1e2e7}
.phdc-watch-page .phdc-watch-related-track{display:flex;gap:17px;align-items:flex-start;width:100%;overflow-x:auto;overflow-y:hidden;scrollbar-width:none;scroll-snap-type:x proximity;cursor:grab;user-select:none;-webkit-overflow-scrolling:touch;touch-action:pan-y pan-x;padding:0 3px 7px}
.phdc-watch-page .phdc-watch-related-track::-webkit-scrollbar{display:none}
.phdc-watch-page .phdc-watch-related-track.is-dragging{cursor:grabbing;scroll-snap-type:none}
.phdc-watch-page .phdc-watch-related-card{display:block;flex:0 0 clamp(160px,13.8vw,235px);min-width:0;color:#f2f2f4;text-decoration:none!important;scroll-snap-align:start;cursor:pointer}
.phdc-watch-page .phdc-watch-related-cover{display:block;position:relative;width:100%;aspect-ratio:2/3;border-radius:7px;overflow:hidden;background:#22232b}
.phdc-watch-page .phdc-watch-related-cover img{display:block;width:100%;height:100%;object-fit:cover;pointer-events:none;transition:filter .2s}
.phdc-watch-page .phdc-watch-related-card:hover .phdc-watch-related-cover img{filter:brightness(1.08)}
.phdc-watch-page .phdc-watch-related-badges{position:absolute;bottom:0;left:50%;transform:translateX(-50%);max-width:92%;display:flex;justify-content:center;pointer-events:none}
.phdc-watch-page .phdc-watch-related-badges b{font-size:12px;font-weight:500;white-space:nowrap;background:#168a54;color:#fff;padding:5px 9px;border-radius:4px 4px 0 0;overflow:hidden;text-overflow:ellipsis;max-width:100%}
.phdc-watch-page .phdc-watch-related-name{display:block;margin-top:12px;font-size:14px;line-height:1.35;text-align:center;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#e7e7e9}
.phdc-watch-page .phdc-watch-related-empty{color:#aeb0b6;font-size:14px;margin:16px 0}
.phdc-watch-page .phdc-detail-footer{background:#222225}
@media (max-width:1200px) and (min-width:801px){
 .phdc-watch-page .phdc-watch-main{margin-right:12px!important}
 .phdc-watch-page .phdc-watch .phdc-watch-player-grid{grid-template-columns:minmax(0,1fr) 315px!important}
 .phdc-watch-page .phdc-watch .phdc-watch-side-heading{padding-left:17px}
 .phdc-watch-page .phdc-watch .phdc-watch-side-tags span{padding:5px 8px;font-size:12px}
 .phdc-watch-page .phdc-watch .phdc-watch-actions .xpf-w-action{font-size:12px!important;gap:5px;padding:6px!important}
 .phdc-watch-page .phdc-watch-related-card{flex-basis:185px}
}
@media (max-width:800px){
 .phdc-watch-page .phdc-watch-main{margin:0!important;padding:8px 12px 0!important}
 .phdc-watch-page .phdc-watch .phdc-watch-player-grid{grid-template-columns:minmax(0,1fr)!important}
 .phdc-watch-page .phdc-watch .phdc-watch-side{max-height:none;height:auto}
 .phdc-watch-page .phdc-watch .phdc-watch-side-heading{min-height:0;padding:16px 18px}
 .phdc-watch-page .phdc-watch .phdc-watch-side-heading::before{top:17px}
 .phdc-watch-page .phdc-watch .phdc-watch-actions{height:auto;min-height:54px;padding:6px!important}
 .phdc-watch-page .phdc-watch .phdc-watch-actions .xpf-w-action{font-size:12px!important;gap:4px;padding:5px!important}
 .phdc-watch-page .phdc-watch .phdc-watch-server-caption{top:25px}
 .phdc-watch-page .phdc-watch-comment-section{padding-top:26px!important}
 .phdc-watch-page .phdc-watch-comment-title,.phdc-watch-page .phdc-watch-related h2{font-size:23px}
 .phdc-watch-page .phdc-watch-comment-form{margin:0;padding:9px}
 .phdc-watch-page .phdc-watch-related{padding:32px 0 42px}
 .phdc-watch-page .phdc-watch-related-track{gap:12px}
 .phdc-watch-page .phdc-watch-related-card{flex-basis:155px}
}
@media(max-width:470px){
 .phdc-watch-page .phdc-watch-main{padding:0!important}
 .phdc-watch-page .phdc-watch .phdc-watch-play{width:64px;height:64px}
 .phdc-watch-page .phdc-watch .phdc-watch-play svg{width:25px!important;height:25px!important}
 .phdc-watch-page .phdc-watch .phdc-watch-actions{min-height:49px;gap:4px}
 .phdc-watch-page .phdc-watch .phdc-watch-actions .xpf-w-action{font-size:10px!important;gap:3px;padding:4px 3px!important}
 .phdc-watch-page .phdc-watch .phdc-watch-actions .xpf-w-action svg{width:15px;height:15px}
 .phdc-watch-page .phdc-watch .phdc-watch-actions .phdc-watch-sort span{max-width:31px}
 .phdc-watch-page .phdc-watch-comment-section{padding-left:12px!important;padding-right:12px!important}
 .phdc-watch-page .phdc-watch-related{padding-left:12px;padding-right:12px}
 .phdc-watch-page .phdc-watch-comment-title{font-size:22px}
 .phdc-watch-page .phdc-watch-related h2{font-size:22px}
 .phdc-watch-page .phdc-watch-related-card{flex-basis:134px}
 .phdc-watch-page .phdc-watch-related-name{font-size:12px}
 .phdc-watch-page .phdc-watch-comment-editor textarea{min-height:95px}
}
@media(prefers-reduced-motion:reduce){.phdc-watch-page .phdc-watch-related-cover img{transition:none}}
