/* Playback: player frame, theater controls and watch-mode surfaces. */
.apx-player-shell{isolation:isolate}
.apx-player-branding{position:absolute;z-index:45;display:block;width:min(var(--apx-brand-width,120px),28%);max-height:18%;opacity:var(--apx-brand-opacity,.9);pointer-events:auto;filter:drop-shadow(0 2px 6px rgba(0,0,0,.65));transition:opacity .18s ease,transform .18s ease}
.apx-player-branding:hover{opacity:1;transform:translateY(-1px)}
.apx-player-branding img{display:block;width:100%;height:auto;max-height:100%;object-fit:contain}
.apx-player-branding--top-left{top:var(--apx-brand-offset,14px);left:var(--apx-brand-offset,14px)}
.apx-player-branding--top-right{top:var(--apx-brand-offset,14px);right:var(--apx-brand-offset,14px)}
.apx-player-branding--bottom-left{bottom:var(--apx-brand-offset,14px);left:var(--apx-brand-offset,14px)}
.apx-player-branding--bottom-right{right:var(--apx-brand-offset,14px);bottom:var(--apx-brand-offset,14px)}
@media (max-width:639px){.apx-player-branding{width:min(var(--apx-brand-width,120px),32%)}}
.apx-player-shell{border:1px solid rgba(255,255,255,.09);border-radius:16px!important;background:#070a0f!important;box-shadow:0 22px 60px -28px rgba(0,0,0,.92),0 0 0 1px rgba(65,218,125,.035);transition:width .25s ease,box-shadow .25s ease,transform .25s ease}
.apx-player-shell:fullscreen,.apx-player-shell:-webkit-full-screen{width:100vw!important;height:100vh!important;aspect-ratio:auto!important;border-radius:0!important;background:#000!important}
.apx-player-shell:fullscreen #player-wrapper,.apx-player-shell:-webkit-full-screen #player-wrapper{width:100%!important;height:100%!important}
.apx-player-shell.is-theater{width:min(96vw,1540px)!important;max-width:none;margin-left:50%;transform:translateX(-50%);box-shadow:0 28px 90px -30px #000;z-index:70}
.apx-theater-active{background:#090c11!important}
.apx-player-modes{position:absolute;z-index:70;right:12px;bottom:12px;display:flex;gap:5px;padding:5px;border:1px solid rgba(255,255,255,.10);border-radius:12px;background:rgba(9,13,19,.82);backdrop-filter:blur(14px);box-shadow:0 10px 26px -16px #000}
.apx-player-modes button{display:flex;align-items:center;gap:6px;height:32px;padding:0 10px;border:0;border-radius:8px;background:transparent;color:#aab4c1;font-size:11px;font-weight:800;cursor:pointer}
.apx-player-modes button:hover{background:rgba(255,255,255,.07);color:#fff}
.apx-player-modes button.is-active{background:rgba(56,216,119,.14);color:#78efa7}
.apx-player-modes button[data-player-mode=fullscreen].is-active{background:rgba(61,179,255,.16);color:#8bd2ff}
.apx-player-shell:fullscreen .apx-player-branding{z-index:75!important}
@media (max-width:640px){.apx-player-shell{border-radius:10px!important}.apx-player-modes{right:7px;bottom:7px;padding:4px}.apx-player-modes button{width:32px;padding:0;justify-content:center}.apx-player-modes button em{display:none}.apx-player-shell.is-theater{width:100vw!important;border-radius:0!important}}
.apx-layout--theater{gap:0!important}
.apx-layout--theater [data-apx-sidebar-column]{display:none!important}
.apx-layout--theater [data-apx-main-column]{flex:1 1 100%!important;width:100%!important;max-width:100%!important}
.apx-player-shell.is-theater{width:100%!important;max-width:none!important;margin-left:0!important;transform:none!important;z-index:70}
.apx-theater-active{background:#090c11!important}
.apx-player-modes{position:absolute!important;z-index:82!important;top:50%!important;right:14px!important;bottom:auto!important;transform:translateY(-50%);display:flex!important;flex-direction:column;gap:4px!important;padding:5px!important;border:1px solid rgba(255,255,255,.12)!important;border-radius:14px!important;background:rgba(8,12,18,.82)!important;backdrop-filter:blur(14px);box-shadow:0 14px 34px -20px #000!important}
.apx-player-modes button{position:relative;display:grid!important;place-items:center;width:40px!important;height:40px!important;padding:0!important;border:0;border-radius:10px!important;background:transparent!important;color:#aeb8c5!important;cursor:pointer;transition:background .18s ease,color .18s ease,transform .18s ease!important}
.apx-player-modes button svg{width:20px;height:20px;display:block}
.apx-player-modes button:hover,.apx-player-modes button:focus-visible{background:rgba(255,255,255,.08)!important;color:#fff!important;transform:translateX(-1px);outline:none}
.apx-player-modes button.is-active{background:rgba(28,199,73,.14)!important;color:#77eca0!important;box-shadow:inset 0 0 0 1px rgba(74,224,125,.18)}
.apx-player-modes button[data-player-mode="fullscreen"].is-active{background:rgba(56,166,255,.16)!important;color:#8bd2ff!important;box-shadow:inset 0 0 0 1px rgba(88,185,255,.2)}
.apx-player-modes button::after{content:attr(data-tooltip);position:absolute;right:calc(100% + 10px);top:50%;transform:translate(5px,-50%);padding:7px 9px;border:1px solid rgba(255,255,255,.1);border-radius:8px;background:rgba(7,10,15,.94);color:#eef3f8;font-size:11px;font-weight:750;line-height:1;white-space:nowrap;opacity:0;visibility:hidden;pointer-events:none;transition:opacity .14s ease .18s,transform .14s ease .18s,visibility 0s linear .32s;box-shadow:0 8px 24px -14px #000}
.apx-player-modes button:hover::after,.apx-player-modes button:focus-visible::after{opacity:1;visibility:visible;transform:translate(0,-50%);transition-delay:.28s,.28s,0s}
.apx-player-shell:fullscreen .apx-player-modes,.apx-player-shell:-webkit-full-screen .apx-player-modes{z-index:90!important}
.apx-player-shell:fullscreen .apx-player-branding,.apx-player-shell:-webkit-full-screen .apx-player-branding{z-index:88!important}
@media (max-width:767px){.apx-player-modes{top:auto!important;right:8px!important;bottom:8px!important;transform:none;flex-direction:row}.apx-player-modes button{width:36px!important;height:36px!important}.apx-player-modes button::after{display:none}}
.apx-player-stage{position:relative;width:100%}
.apx-player-stage .apx-player-shell{border-radius:14px 14px 10px 10px!important;border:1px solid rgba(163,180,199,.17)!important;box-shadow:0 16px 40px -28px #000!important}
.apx-player-modes,.apx-player-modes--bar{position:static!important;z-index:auto!important;top:auto!important;right:auto!important;bottom:auto!important;left:auto!important;
  transform:none!important;display:flex!important;flex-direction:row!important;justify-content:flex-end;align-items:center;gap:7px!important;
  width:100%!important;margin:7px 0 0!important;padding:7px!important;border:1px solid var(--detail-border)!important;border-radius:11px!important;
  background:linear-gradient(180deg,rgba(21,29,39,.98),rgba(14,20,28,.98))!important;backdrop-filter:blur(12px);
  box-shadow:0 10px 24px -20px #000!important;}
.apx-player-modes button{position:relative!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;gap:8px!important;
  width:auto!important;min-width:44px!important;height:44px!important;padding:0 13px!important;border:1px solid transparent!important;border-radius:9px!important;
  background:transparent!important;color:#aeb9c7!important;font-size:12px!important;font-weight:800!important;cursor:pointer;
  transition:background .18s ease,border-color .18s ease,color .18s ease,transform .18s ease!important;}
.apx-player-modes button svg{width:19px!important;height:19px!important;flex:0 0 auto}
.apx-player-modes button::after{display:none!important}
.apx-player-modes button:hover,.apx-player-modes button:focus-visible{background:rgba(255,255,255,.055)!important;border-color:rgba(255,255,255,.12)!important;color:#fff!important;transform:translateY(-1px)!important;outline:none!important}
.apx-player-modes button.is-active{background:rgba(34,197,94,.13)!important;border-color:rgba(61,226,118,.28)!important;color:#78eda2!important;box-shadow:inset 0 0 0 1px rgba(34,197,94,.05)!important}
.apx-player-modes button[data-player-mode="fullscreen"].is-active{background:rgba(59,130,246,.13)!important;border-color:rgba(96,165,250,.27)!important;color:#a9d3ff!important}
.apx-player-mode-label{display:inline-block;white-space:nowrap}
@media (max-width:767px){.apx-player-modes,.apx-player-modes--bar{justify-content:stretch!important;gap:6px!important;padding:6px!important;border-radius:10px!important}.apx-player-modes button{flex:1 1 0!important;width:auto!important;min-width:0!important;height:44px!important;padding:0 8px!important;gap:0!important}.apx-player-mode-label{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}.apx-player-modes button svg{width:20px!important;height:20px!important}}

/* v1.9.19 small-screen hardening */
@media (max-width:1023px){
  .apx-player-stage,.apx-player-shell,#player-wrapper{width:100%!important;max-width:100%!important;min-width:0!important;box-sizing:border-box!important}
  .apx-player-shell{overflow:hidden!important}
  .apx-player-shell iframe,.apx-player-shell video,.apx-player-shell embed,.apx-player-shell object{display:block!important;width:100%!important;max-width:100%!important;height:100%!important;border:0!important}
  .apx-player-shell.is-theater{max-width:100%!important;margin-inline:0!important;transform:none!important}
  .apx-player-branding{max-width:32%!important}
}
@media (max-width:767px){
  .apx-player-shell{border-radius:10px!important}
  .apx-player-modes,.apx-player-modes--bar{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:6px!important}
  .apx-player-modes button{width:100%!important;min-width:0!important;min-height:44px!important;touch-action:manipulation}
  .apx-player-branding{width:min(var(--apx-brand-width,120px),30%)!important;max-height:15%!important}
}
@media (max-width:360px){
  .apx-player-modes,.apx-player-modes--bar{grid-template-columns:1fr 1fr!important}
  .apx-player-modes button{height:42px!important;min-height:42px!important}
}

/* XemPhim v1.9.42 — centered player rail + compact screen mode control */
.apx-movie-layout .apx-player-stage{
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
  margin-left:auto!important;
  margin-right:auto!important;
  box-sizing:border-box!important;
}
.apx-movie-layout .apx-player-stage .apx-player-shell{
  width:100%!important;
  max-width:100%!important;
  margin-left:auto!important;
  margin-right:auto!important;
}
.apx-player-modes.apx-player-modes--bar{
  display:grid!important;
  grid-template-columns:repeat(3,40px)!important;
  align-items:center!important;
  justify-content:center!important;
  width:max-content!important;
  max-width:100%!important;
  margin:10px auto 0!important;
  padding:4px!important;
  gap:4px!important;
  border:1px solid rgba(148,163,184,.13)!important;
  border-radius:999px!important;
  background:linear-gradient(180deg,rgba(22,29,39,.88),rgba(14,19,27,.92))!important;
  backdrop-filter:blur(10px)!important;
  box-shadow:inset 0 1px rgba(255,255,255,.028),0 10px 24px -22px rgba(0,0,0,.9)!important;
}
.apx-player-modes--bar button{
  display:grid!important;
  place-items:center!important;
  width:40px!important;
  min-width:40px!important;
  max-width:40px!important;
  height:40px!important;
  min-height:40px!important;
  padding:0!important;
  border:1px solid transparent!important;
  border-radius:999px!important;
  background:transparent!important;
  color:#8e99a8!important;
  box-shadow:none!important;
  transform:none!important;
}
.apx-player-modes--bar button svg{width:18px!important;height:18px!important}
.apx-player-modes--bar button:hover,.apx-player-modes--bar button:focus-visible{
  border-color:rgba(148,163,184,.18)!important;
  background:rgba(148,163,184,.07)!important;
  color:#d9e0e8!important;
  transform:none!important;
  outline:none!important;
}
.apx-player-modes--bar button.is-active{
  border-color:rgba(245,200,75,.18)!important;
  background:rgba(245,200,75,.075)!important;
  color:#d8c27f!important;
  box-shadow:inset 0 0 0 1px rgba(245,200,75,.025)!important;
}
.apx-player-modes--bar button[data-player-mode="fullscreen"].is-active{
  border-color:rgba(245,200,75,.18)!important;
  background:rgba(245,200,75,.075)!important;
  color:#d8c27f!important;
  box-shadow:inset 0 0 0 1px rgba(245,200,75,.025)!important;
}
.apx-player-modes--bar .apx-player-mode-label{
  position:absolute!important;
  width:1px!important;
  height:1px!important;
  padding:0!important;
  margin:-1px!important;
  overflow:hidden!important;
  clip:rect(0,0,0,0)!important;
  white-space:nowrap!important;
  border:0!important;
}
@media (max-width:767px){
  .apx-movie-layout{padding-left:16px!important;padding-right:16px!important}
  .apx-player-modes.apx-player-modes--bar{grid-template-columns:repeat(3,40px)!important;width:max-content!important;margin:10px auto 0!important;padding:4px!important;gap:4px!important}
  .apx-player-modes--bar button{width:40px!important;min-width:40px!important;max-width:40px!important;height:40px!important;min-height:40px!important}
}
@media (max-width:360px){
  .apx-movie-layout{padding-left:12px!important;padding-right:12px!important}
  .apx-player-modes.apx-player-modes--bar{grid-template-columns:repeat(3,38px)!important}
  .apx-player-modes--bar button{width:38px!important;min-width:38px!important;max-width:38px!important;height:38px!important;min-height:38px!important}
}


/* XemPhim v1.9.49 — Mobile player size control compact mode */
@media (max-width:767px){
  .apx-player-modes.apx-player-modes--bar{
    display:grid!important;grid-template-columns:repeat(3,34px)!important;
    width:max-content!important;max-width:100%!important;margin:6px auto 0!important;
    padding:3px!important;gap:3px!important;border-radius:999px!important;
  }
  .apx-player-modes--bar button{
    width:34px!important;min-width:34px!important;max-width:34px!important;
    height:34px!important;min-height:34px!important;padding:0!important;border-radius:999px!important;
  }
  .apx-player-modes--bar button svg{width:17px!important;height:17px!important}
}
@media (max-width:360px){
  .apx-player-modes.apx-player-modes--bar{grid-template-columns:repeat(3,32px)!important;padding:3px!important;gap:2px!important}
  .apx-player-modes--bar button{width:32px!important;min-width:32px!important;max-width:32px!important;height:32px!important;min-height:32px!important}
  .apx-player-modes--bar button svg{width:16px!important;height:16px!important}
}

/* XemPhim v1.9.50 — mobile fullscreen reliability fallback */
body.apx-player-css-fullscreen-active{overscroll-behavior:none!important}
.apx-player-stage.apx-css-fullscreen-stage{position:fixed!important;inset:0!important;z-index:2147483000!important;display:flex!important;flex-direction:column!important;justify-content:center!important;width:100vw!important;height:100vh!important;height:100dvh!important;margin:0!important;padding:0!important;background:#000!important;overflow:hidden!important}
.apx-player-stage.apx-css-fullscreen-stage .apx-player-shell.apx-css-fullscreen{flex:1 1 auto!important;width:100vw!important;max-width:none!important;height:auto!important;min-height:0!important;aspect-ratio:auto!important;margin:0!important;border:0!important;border-radius:0!important;background:#000!important;box-shadow:none!important;transform:none!important}
.apx-player-stage.apx-css-fullscreen-stage .apx-player-shell.apx-css-fullscreen #player-wrapper{width:100%!important;height:100%!important;aspect-ratio:auto!important}
.apx-player-stage.apx-css-fullscreen-stage .apx-player-shell.apx-css-fullscreen iframe,.apx-player-stage.apx-css-fullscreen-stage .apx-player-shell.apx-css-fullscreen video,.apx-player-stage.apx-css-fullscreen-stage .apx-player-shell.apx-css-fullscreen embed,.apx-player-stage.apx-css-fullscreen-stage .apx-player-shell.apx-css-fullscreen object{width:100%!important;height:100%!important;max-width:none!important;max-height:none!important;object-fit:contain!important}
.apx-player-stage.apx-css-fullscreen-stage .apx-player-modes.apx-player-modes--bar{flex:0 0 auto!important;margin:4px auto 6px!important;z-index:2147483001!important}
.apx-player-stage.apx-css-fullscreen-stage .apx-player-branding{z-index:2147483002!important}
