/* DaoPhim v9: watch pages only. Style reference: phim player page supplied by owner.
 * Container caps mirror the v8 film-detail layout. PlayerJS and source plumbing intact.
 */
body.dao-body:has(.dao-watch-v9) {background:#100c09!important;}
body.dao-body .dao-watch-v9.dao-shell {
  box-sizing:border-box;
  width:calc(100% - 32px);
  max-width:1400px;
  margin:0 auto;
  padding:0 16px 48px;
  min-width:0;
  color:#f5f5fa;
  background:transparent;
}
.dao-watch-v9, .dao-watch-v9 * {box-sizing:border-box;}
.dao-watch-v9 [hidden] {display:none!important;}
.dao-watch-v9 button, .dao-watch-v9 a { -webkit-tap-highlight-color:transparent; }
.dao-watch-v9 button:focus-visible, .dao-watch-v9 a:focus-visible {outline:2px solid #f5ae58;outline-offset:3px;}
.dao-watch-v9 .dao-watch-breadcrumb {
  display:flex; flex-wrap:wrap; align-items:center; gap:12px;
  margin:0 0 15px; padding:11px 0 13px; border-bottom:1px solid #2a2522;
  color:#a5a6af;font-size:14px;line-height:1.45;
}
.dao-watch-v9 .dao-watch-breadcrumb a {color:#aeb2bf;text-decoration:none;transition:color .2s;}
.dao-watch-v9 .dao-watch-breadcrumb a:hover {color:#f2bd7f;}
.dao-watch-v9 .dao-watch-breadcrumb span[aria-hidden] {color:#73747d;}
.dao-watch-v9 .dao-watch-breadcrumb [aria-current=page] {color:#d2d4df;}
.dao-watch-v9 .dao-watch-update {margin:0 0 17px;color:#a4a4ad;font-size:14px;line-height:1.5;}
.dao-watch-v9 .dao-watch-update a {color:#f1e0bc;font-weight:700;text-decoration:none;}
.dao-watch-v9 .dao-watch-update a:hover {color:#f9bc76;text-decoration:underline;}
/* The actual responsive PlayerJS/iframe and source selection are rendered by post.header.php. */
.dao-watch-v9 .dao-watch-player-area {margin:0 0 0;min-width:0;}
.dao-watch-v9 .dao-watch-player-frame {position:relative;min-width:0;}
.dao-watch-v9 .dao-watch-player-frame .app-detail-embed {
  display:block!important;width:100%!important;max-width:none!important;
  margin:0!important;padding:0!important;border:0!important;background:#050505!important;
}
.dao-watch-v9 .dao-watch-player-frame .app-detail-embed .embed-col {
  display:block!important;max-width:none!important;width:100%!important;flex:none!important;
  background:#050505!important;
}
.dao-watch-v9 .dao-watch-player-frame .app-detail-embed .embed-play,
.dao-watch-v9 .dao-watch-player-frame .app-detail-embed .embed-code {
  display:block;position:relative;width:100%;border-radius:11px!important;
  overflow:hidden!important;margin:0!important;padding:0!important;
  background:#101010!important;box-shadow:none!important;
}
.dao-watch-v9 .dao-watch-player-frame .app-detail-embed .embed-play::before,
.dao-watch-v9 .dao-watch-player-frame .app-detail-embed .embed-code::before {
  content:"";display:block;padding-top:56.25%;
}
.dao-watch-v9 .dao-watch-player-frame .embed-col .embed-cover {background-position:center;background-size:cover;}
.dao-watch-v9 .dao-watch-player-frame .embed-col .embed-code iframe,
.dao-watch-v9 .dao-watch-player-frame .embed-col .embed-code #khoaiphim-playerjs,
.dao-watch-v9 .dao-watch-player-frame .embed-col .embed-code .khoaiphim-playerjs {
  position:absolute!important;inset:0!important;width:100%!important;height:100%!important;
  max-width:100%!important;border:0!important;
}
.dao-watch-v9 .dao-watch-player-frame .embed-col .embed-lock {position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:20px;text-align:center;}
.dao-watch-v9 .dao-watch-player-frame .app-detail-embed .play-btn {border-radius:50%;background:#b87838!important;transition:transform .2s,box-shadow .2s;}
.dao-watch-v9 .dao-watch-player-frame .app-detail-embed .play-btn:hover {box-shadow:0 6px 30px #d2855680;}
/* Keep alternate video sources usable, but hide the duplicate legacy share/report buttons.
 * The visual share row below the player uses exactly the detail-page implementation. */
.dao-watch-v9 .dao-watch-player-frame .detail-header {
  display:flex!important;align-items:center;justify-content:flex-start!important;
  margin:9px 0 0!important;padding:0!important;border:0!important;
  background:transparent!important;box-shadow:none!important;min-height:0;
}
.dao-watch-v9 .dao-watch-player-frame .detail-header > .d-flex:last-child {
  display:flex!important;align-items:center;margin-left:auto;
}
.dao-watch-v9 .dao-watch-player-frame .detail-header > .d-flex:last-child > .dropdown {display:none!important;}
.dao-watch-v9 .dao-watch-player-frame .detail-header .btn-svg.report {
  display:inline-flex;align-items:center;gap:5px;margin:0!important;padding:5px 9px!important;
  border:0!important;background:transparent!important;color:#b0a8a0!important;
  font-size:12px!important;cursor:pointer;
}
.dao-watch-v9 .dao-watch-player-frame .detail-header .btn-svg.report:hover {color:#e9b883!important;}
.dao-watch-v9 .dao-watch-player-frame .detail-header .btn-svg.report svg {width:15px;height:15px;margin:0;}
.dao-watch-v9 .dao-watch-player-frame .nav-player-select {width:auto;max-width:100%;margin:0;}
.dao-watch-v9 .dao-watch-player-frame .nav-player-select >div {display:flex;flex-wrap:wrap;gap:7px;align-items:center;}
.dao-watch-v9 .dao-watch-player-frame .btn-service {
  min-height:28px;display:inline-flex;justify-content:center;align-items:center;
  margin:0!important;padding:5px 11px!important;border-radius:6px!important;
  background:#1e293b!important;border:1px solid #303743!important;color:#e8e9ed!important;
  font-size:12px!important;line-height:1.25!important;white-space:nowrap;
}
.dao-watch-v9 .dao-watch-player-frame .btn-service.selected,
.dao-watch-v9 .dao-watch-player-frame .btn-service:hover {background:#b9783a!important;border-color:#b9783a!important;color:#18100a!important;}
/* Toolbar: lights on left; the same ten-star control from the detail page on right. */
.dao-watch-v9 .dao-watch-toolbar {display:flex;align-items:flex-start;justify-content:space-between;gap:22px;margin:14px 0 26px;min-width:0;}
.dao-watch-v9 .dao-watch-light-toggle {
  display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;
  min-width:91px;min-height:39px;margin:0;padding:8px 15px;
  border:0;border-radius:999px;background:#b77c39;color:#171009;
  font-size:14px;font-weight:650;cursor:pointer;
  transition:background .2s,transform .2s,box-shadow .2s;
}
.dao-watch-v9 .dao-watch-light-toggle:hover {background:#d4944d;transform:translateY(-1px);box-shadow:0 5px 16px #bc803950;}
.dao-watch-v9 .dao-watch-rating {flex:0 1 auto;min-width:0;max-width:100%;}
.dao-watch-v9 .dao-watch-rating h2 {margin:0 0 6px;font-size:18px;line-height:1.35;color:#fafafa;font-weight:750;}
.dao-watch-v9 .dao-watch-rating .dao-stars-v7 {margin:0!important;gap:5px;justify-content:flex-start;}
.dao-watch-v9 .dao-watch-rating .dao-rating-stars {gap:0;}
.dao-watch-v9 .dao-watch-rating .dao-rating-star {width:30px;height:30px;padding:2px;}
.dao-watch-v9 .dao-watch-rating .dao-rating-star svg {width:26px;height:26px;}
.dao-watch-v9 .dao-watch-rating .dao-rating-summary {font-size:13px;}
.dao-watch-v9 .dao-watch-share {margin:22px 0 23px;gap:17px;min-height:27px;}
/* Light-off effect does not lock scroll or disable player. ESC and the button restore it. */
body.dao-watch-lights-off::before {content:"";position:fixed;inset:0;background:rgba(0,0,0,.91);z-index:1000;pointer-events:auto;}
body.dao-watch-lights-off .dao-watch-v9 .dao-watch-player-frame {z-index:1002;}
body.dao-watch-lights-off .dao-watch-v9 .dao-watch-toolbar .dao-watch-light-toggle {position:relative;z-index:1003;}
body.dao-watch-lights-off .dao-watch-v9 .dao-watch-light-toggle {background:#efbd71;}
.dao-watch-v9 .dao-watch-episodes {margin-top:0;padding:0 0 20px;border-bottom:1px solid #292520;}
.dao-watch-v9 .dao-watch-episodes h2,
.dao-watch-v9 .dao-watch-comment-section h2,
.dao-watch-v9 .dao-watch-synopsis h2 {
  margin:0 0 18px;padding:0;color:#f4f4f8;font-size:20px;line-height:1.45;font-weight:750;letter-spacing:0;text-transform:none;
}
.dao-watch-v9 .dao-watch-seasons {display:flex;flex-wrap:wrap;gap:8px;margin:0 0 13px;}
.dao-watch-v9 .dao-watch-seasons button {border:1px solid #343a45;border-radius:5px;padding:8px 15px;background:#1d2a3c;color:#e1e6f1;cursor:pointer;}
.dao-watch-v9 .dao-watch-seasons button.is-active,
.dao-watch-v9 .dao-watch-seasons button:hover {background:#b87b3a;border-color:#b87b3a;color:#0d0c0b;}
.dao-watch-v9 .dao-watch-episode-grid {display:grid;grid-template-columns:repeat(12,minmax(0,1fr));gap:8px;}
.dao-watch-v9 .dao-watch-episode-grid a {
  display:inline-flex;align-items:center;justify-content:center;min-width:0;min-height:35px;
  padding:7px 8px;border:1px solid #25344a;border-radius:4px;
  background:#1d2b3e;color:#f4f5f8;text-decoration:none;font-size:14px;font-weight:550;
  transition:background .16s,color .16s,transform .16s;
}
.dao-watch-v9 .dao-watch-episode-grid a.is-current,
.dao-watch-v9 .dao-watch-episode-grid a:hover {background:#bf813d;color:#1b140f;border-color:#bf813d;}
.dao-watch-v9 .dao-watch-episode-grid a:hover {transform:translateY(-2px);}
.dao-watch-v9 .dao-watch-empty {color:#adb0bf;font-size:13px;}
/* Comments retain the original AJAX endpoints and moderation rules. */
.dao-watch-v9 .dao-watch-comment-section {padding:23px 0 26px;border-bottom:1px solid #292520;}
.dao-watch-v9 .dao-watch-comment-section h2 {margin-bottom:18px;}
.dao-watch-v9 .dao-watch-guest-composer {display:flex;gap:18px;align-items:flex-start;}
.dao-watch-v9 .dao-watch-guest-composer img {flex:0 0 42px;height:42px;width:42px;border-radius:50%;object-fit:cover;background:#b4b4bb;}
.dao-watch-v9 .dao-watch-guest-composer button {
  min-height:104px;width:100%;flex:1;min-width:0;border:1px solid #42536b;
  border-radius:4px;background:#202c3f;text-align:left;cursor:text;
  color:#acb7c8;padding:12px 14px;font-size:14px;
}
.dao-watch-v9 .dao-watch-guest-composer button:hover {border-color:#bf813d;}
.dao-watch-v9 .dao-watch-comment-login {display:flex;justify-content:flex-end;margin:18px 0 18px;}
.dao-watch-v9 .dao-watch-comment-login button {background:#ff636d;border:0;border-radius:4px;color:white;font-weight:700;font-size:13px;padding:12px 17px;cursor:pointer;}
.dao-watch-v9 .dao-watch-comment-login button:hover {background:#e34c5d;}
.dao-watch-v9 .pc-watch-comments {border:0!important;background:transparent!important;padding:0!important;margin:0!important;max-width:none!important;}
.dao-watch-v9 .pc-watch-comment-head {display:flex;align-items:center;gap:12px;margin:0 0 16px;padding-bottom:10px;border-bottom:1px solid #292d35;}
.dao-watch-v9 .pc-watch-comment-sort {display:flex;gap:15px;}
.dao-watch-v9 .pc-watch-comment-sort button {font-size:12px;}
.dao-watch-v9 .pc-watch-comment-line {height:1px;flex:1;background:#2c303c;}
.dao-watch-v9 .pc-watch-comment-count {font-size:12px;}
.dao-watch-v9 .pc-watch-comments .pc-wc-compose {background:#202c3f;border:1px solid #40516a;border-radius:4px;}
.dao-watch-v9 .pc-watch-comments .pc-wc-compose textarea {background:transparent!important;color:#fff;}
.dao-watch-v9 .pc-watch-comments .pc-wc-list {margin-top:22px;}
.dao-watch-v9 .dao-watch-comment-section:has(.dao-watch-guest-composer) .pc-watch-comment-head,
.dao-watch-v9 .dao-watch-comment-section:has(.dao-watch-guest-composer) .pc-wc-notice {display:none;}
.dao-watch-v9 .dao-watch-synopsis {padding:25px 0 11px;}
.dao-watch-v9 .dao-watch-synopsis h2 {margin-bottom:16px;}
.dao-watch-v9 .dao-watch-synopsis p {margin:0;font-size:15px;line-height:1.85;color:#e1e2e9;overflow-wrap:anywhere;}
/* Same film-card markup/carousel JS as the detail page, with reference watch-page spacing. */
.dao-watch-v9 .dao-watch-similar {margin:37px 0 8px!important;}
.dao-watch-v9 .dao-watch-similar .dao-section-title {display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:16px;}
.dao-watch-v9 .dao-watch-similar .dao-section-title h2 {padding:0 0 7px;border-bottom:2px solid #b9783a;color:#fff;font-size:20px;line-height:1.3;}
.dao-watch-v9 .dao-watch-similar .dao-section-title h2:before {display:none;}
.dao-watch-v9 .dao-watch-similar .dao-detail-recs-track {display:flex;gap:12px;overflow-x:auto;scrollbar-width:none;scroll-snap-type:x mandatory;padding:0 0 9px;}
.dao-watch-v9 .dao-watch-similar .dao-detail-recs-track::-webkit-scrollbar {display:none;}
.dao-watch-v9 .dao-watch-similar .dao-detail-recs-track .dao-card {flex:0 0 clamp(155px,12.7vw,188px);width:clamp(155px,12.7vw,188px);scroll-snap-align:start;}
.dao-watch-v9 .dao-watch-similar .dao-detail-recs-track .dao-card-media {aspect-ratio:2/3;border-radius:9px;}
.dao-watch-v9 .dao-watch-similar .dao-card-name {font-size:14px;font-weight:650;line-height:1.35;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.dao-watch-v9 .dao-watch-similar .dao-card-subtitle {font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
@media (min-width:1280px) and (max-width:1535.98px) {body.dao-body .dao-watch-v9.dao-shell {max-width:1280px;}}
@media (min-width:1024px) and (max-width:1279.98px) {body.dao-body .dao-watch-v9.dao-shell {max-width:1024px;}}
@media (min-width:768px) and (max-width:1023.98px) {
  body.dao-body .dao-watch-v9.dao-shell {max-width:768px;}
  .dao-watch-v9 .dao-watch-episode-grid {grid-template-columns:repeat(8,minmax(0,1fr));}
  .dao-watch-v9 .dao-watch-similar .dao-detail-recs-track .dao-card {flex-basis:158px;width:158px;}
}
@media(max-width:767.98px) {
  body.dao-body .dao-watch-v9.dao-shell {width:100%;padding:0 14px 35px;}
  .dao-watch-v9 .dao-watch-breadcrumb {font-size:12px;gap:8px;padding-top:14px;}
  .dao-watch-v9 .dao-watch-update {font-size:12px;}
  .dao-watch-v9 .dao-watch-player-frame .app-detail-embed .embed-play,
  .dao-watch-v9 .dao-watch-player-frame .app-detail-embed .embed-code {border-radius:7px!important;}
  .dao-watch-v9 .dao-watch-player-frame .app-detail-embed .play-btn {width:60px!important;height:60px!important;}
  .dao-watch-v9 .dao-watch-toolbar {flex-wrap:wrap;gap:16px;margin:13px 0 20px;}
  .dao-watch-v9 .dao-watch-rating {flex-basis:100%;}
  .dao-watch-v9 .dao-watch-rating h2 {font-size:16px;}
  .dao-watch-v9 .dao-watch-rating .dao-rating-star {width:27px;height:29px;}
  .dao-watch-v9 .dao-watch-rating .dao-rating-star svg {width:24px;height:24px;}
  .dao-watch-v9 .dao-watch-share {margin:12px 0 19px;}
  .dao-watch-v9 .dao-watch-episode-grid {grid-template-columns:repeat(4,minmax(0,1fr));gap:7px;}
  .dao-watch-v9 .dao-watch-episodes h2, .dao-watch-v9 .dao-watch-comment-section h2, .dao-watch-v9 .dao-watch-synopsis h2 {font-size:18px;}
  .dao-watch-v9 .dao-watch-guest-composer {gap:10px;}
  .dao-watch-v9 .dao-watch-guest-composer img {width:35px;height:35px;flex-basis:35px;}
  .dao-watch-v9 .dao-watch-synopsis p {font-size:14px;}
  .dao-watch-v9 .dao-watch-similar .dao-detail-recs-track .dao-card {flex-basis:140px;width:140px;}
}
@media(max-width:400px){.dao-watch-v9 .dao-watch-rating .dao-rating-star {width:clamp(24px,7.1vw,27px);padding:1px;}}
@media(prefers-reduced-motion:reduce){.dao-watch-v9 * {scroll-behavior:auto!important;transition:none!important;animation:none!important;}}
