:root{
    --sidebar-open:282px;
    --sidebar-closed:72px;
    --sidebar:var(--sidebar-open);
    --topbar:58px;
    --bg:#242424;
    --bg-deep:#1a1a1a;
    --chrome:#1a1a1a;
    --panel:#2a2a2a;
    --panel-hover:#333333;
    --line:#2c2c2c;
    --text:#e8e8e8;
    --muted:#929292;
    --accent:#e5a00d;
    --accent-hover:#f3b21c;
    --poster-size:175px
}
*{box-sizing:border-box}
[x-cloak]{display:none!important}
html,body{margin:0;min-height:100%;background:var(--bg);color:var(--text);font-family:Inter,system-ui,-apple-system,"Segoe UI",sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-rendering:optimizeLegibility}
body{overflow-x:hidden}
a{color:inherit;text-decoration:none}
button,input,select{font:inherit}
button{cursor:pointer}
.lucide{width:19px;height:19px;stroke-width:1.8}
.plex-app{height:100dvh;display:flex;flex-direction:column;overflow:hidden}
.plex-topbar{
    height:var(--topbar);flex:0 0 auto;position:relative;z-index:80;background:var(--chrome);
    display:flex;align-items:center;padding:0 20px;gap:8px
}
.sidebar-toggle,.mobile-burger{
    width:40px;height:40px;min-width:40px;border:0;border-radius:8px;background:transparent;color:#aaa;
    display:grid;place-items:center
}
.sidebar-toggle:hover,.mobile-burger:hover{background:#242424;color:#fff}
.mobile-burger{display:none}
.plex-body{flex:1;display:flex;min-height:0}
.plex-sidebar{
    width:var(--sidebar);flex:0 0 var(--sidebar);
    background:var(--chrome);
    display:flex;flex-direction:column;overflow:hidden;
    transition:width .2s ease
}
.sidebar-nav{padding:16px 16px 16px;display:grid;gap:4px;overflow-y:auto;overflow-x:hidden}
.nav-link{
    min-height:42px;padding:0 12px;border-radius:6px;display:flex;align-items:center;
    gap:16px;color:#a7a7a7;font-size:14px;white-space:nowrap;position:relative;transition:background .12s ease,color .12s ease
}
.nav-link:hover{background:#2e2e2e;color:white}
.nav-link.active{color:var(--accent)}
.nav-link.active:before{content:"";position:absolute;left:-16px;top:0;bottom:0;width:3px;background:var(--accent)}
.nav-link .lucide{width:20px;min-width:20px}
.nav-separator{height:1px;background:#333;margin:12px 8px}
.sidebar-bottom{margin-top:auto;padding:14px 16px 20px;border-top:1px solid var(--line)}
.plex-shell{flex:1;min-width:0;position:relative;display:flex;flex-direction:column;overflow:hidden}
.global-search{
    position:relative;height:38px;flex:0 0 auto;width:min(560px,42vw);border-radius:8px;background:#3a3a3f;border:1px solid #444449;
    display:flex;align-items:center;gap:10px;padding:0 13px
}
.global-search .lucide{width:16px;min-width:16px;color:#aaa}
.global-search input{flex:1;min-width:0;border:0;outline:0;background:none;color:white;font-size:13px}
.global-search input::placeholder{color:#777}
.global-search kbd{border:0;background:#333;color:#999;border-radius:4px;padding:2px 6px;font-size:10px}
.topbar-spacer{flex:1;min-width:16px}
.user-menu{position:relative}
.user-button{height:44px;border:0;background:transparent;color:white;display:flex;align-items:center;gap:8px}
.user-button>strong{font-size:12px}
.user-button>.lucide:last-child{width:13px;color:#888}
.user-avatar{width:34px;height:34px;border-radius:50%;display:grid;place-items:center;background:var(--avatar);color:#fff;font-size:12px;font-weight:700}
.user-dropdown{position:absolute;right:0;top:47px;width:210px;padding:6px;background:#2c2c30;border:1px solid #444449;border-radius:5px;box-shadow:0 18px 60px #000c;z-index:150}
.user-dropdown a{display:flex;align-items:center;gap:10px;padding:10px;border-radius:4px;font-size:12px}
.user-dropdown a:hover{background:#383838}
.ajax-stage{flex:1;overflow-y:auto;overflow-x:hidden;scroll-behavior:smooth}
.route-loader{display:none;position:absolute;top:0;left:0;right:0;height:3px;z-index:90;background:transparent;overflow:hidden}
.route-loader.active{display:block}
.route-loader__bar{position:absolute;top:0;left:0;height:100%;width:20%;background:var(--accent);border-radius:0 2px 2px 0;animation:routeLoad 1s ease-in-out infinite}
@keyframes routeLoad{
    0%{left:0;width:20%}
    55%{left:40%;width:50%}
    100%{left:100%;width:20%}
}

html.sidebar-collapsed{--sidebar:var(--sidebar-closed)}
html.sidebar-collapsed .nav-link span,html.sidebar-collapsed .nav-separator{display:none}
html.sidebar-collapsed .nav-link{justify-content:center;padding:0}

.plex-page{padding:28px 32px 60px}
.content-header{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:20px;flex-wrap:wrap}
/* Grid instead of flex space-between so the middle tabs sit truly centered
   on the row regardless of whether there's a matching-width element (like an
   admin link) on the right to balance them out. */
.content-header--with-tabs{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:20px}
.content-header--with-tabs .content-title{justify-self:start;min-width:0}
.content-header--with-tabs .page-tabs-wrap{justify-self:center}
.content-header--with-tabs .head-action{justify-self:end}
@media(max-width:820px){
    .content-header--with-tabs{grid-template-columns:1fr;justify-items:start;gap:10px}
    .content-header--with-tabs .page-tabs-wrap,.content-header--with-tabs .head-action{justify-self:start}
}
.content-title{display:flex;align-items:center;gap:10px}
.content-title h1{font-size:16px;line-height:1.3;margin:0;font-weight:600}
.content-title__text p{margin:1px 0 0;color:#8a8a8a;font-size:11px}
.page-tabs-wrap{position:relative;display:flex;align-items:center;min-width:0}
.page-tabs{display:flex;align-items:center;gap:28px;overflow-x:auto;scrollbar-width:none;-ms-overflow-style:none;scroll-behavior:smooth}
.page-tabs::-webkit-scrollbar{display:none;height:0;width:0}
.page-tab{padding:8px 0;color:#8a8a8a;font-size:14px;font-weight:700;text-transform:uppercase;letter-spacing:.04em;white-space:nowrap;border-bottom:2px solid transparent;cursor:pointer}
.page-tab:hover{color:#ddd}
.page-tab.active{color:var(--accent);border-color:var(--accent)}
.page-tab__count{margin-left:5px;display:inline-block;font-size:10px;font-weight:600;letter-spacing:0;text-transform:none;color:#888;background:#2b2b2b;border-radius:9px;padding:1px 6px;vertical-align:1px}
.page-tab.active .page-tab__count{color:var(--accent);background:rgba(229,160,13,.14)}
.page-tabs-scroll{
    display:none;position:absolute;top:0;bottom:0;width:32px;align-items:center;justify-content:center;
    border:0;padding:0;cursor:pointer;color:#ddd;z-index:2
}
.page-tabs-scroll .lucide{width:17px;height:17px}
.page-tabs-scroll--left{left:0;background:linear-gradient(to right,var(--bg) 85%,transparent)}
.page-tabs-scroll--right{right:0;background:linear-gradient(to left,var(--bg) 85%,transparent)}
.page-tabs-wrap.is-scrollable .page-tabs{padding-left:34px;padding-right:34px}
.page-tabs-wrap.has-scroll-left .page-tabs-scroll--left,
.page-tabs-wrap.has-scroll-right .page-tabs-scroll--right{display:flex}
.page-head{display:flex;align-items:center;justify-content:space-between;gap:25px;margin-bottom:28px}
.page-head h1{font-size:23px;line-height:1.2;margin:0;font-weight:600}
.page-head p{margin:5px 0 0;color:#737373;font-size:11px}
.head-action{height:38px;padding:0 13px;border-radius:4px;display:flex;align-items:center;gap:8px;background:#242424;color:#c7c7c7;font-size:12px}
.head-action:hover{background:#303030;color:white}
.media-shelf{margin-bottom:36px}
.shelf-title{display:flex;align-items:center;justify-content:space-between;margin-bottom:14px}
.shelf-title h2{font-size:16px;margin:0;font-weight:600}
.shelf-title h2 a{color:inherit;text-decoration:none;transition:color .15s ease}
.shelf-title h2 a:hover{color:var(--accent)}
.shelf-title__right{display:flex;align-items:center;gap:18px}
.shelf-title a{display:flex;align-items:center;gap:2px;color:#8e8e8e}
.shelf-nav{display:flex;align-items:center;gap:4px}
.shelf-nav__btn{width:28px;height:28px;border:0;border-radius:6px;background:transparent;color:#8a8a8a;display:grid;place-items:center}
.shelf-nav__btn:hover{background:#333;color:#fff}
.shelf-nav__btn:disabled{opacity:.35;cursor:default;pointer-events:none}
.shelf-nav__btn .lucide{width:18px}
.shelf-scroll{
    display:grid;grid-auto-flow:column;grid-auto-columns:var(--poster-size);gap:21px;
    overflow-x:auto;padding:4px 3px 6px;scrollbar-width:none;scroll-snap-type:x proximity
}
.shelf-scroll::-webkit-scrollbar{display:none;width:0;height:0}
.media-card{min-width:0;display:block;scroll-snap-align:start}
.media-poster{aspect-ratio:2/3;position:relative;overflow:hidden;border-radius:4px;background:#252525;box-shadow:0 4px 16px #0007}
.media-poster img{width:100%;height:100%;object-fit:cover;display:block;transition:transform .18s}
.media-card:hover img{transform:scale(1.025)}
.type-badge{position:absolute;right:6px;top:6px;padding:4px 6px;border-radius:3px;background:rgba(12,12,12,.88);font-size:9px;font-weight:700;text-transform:uppercase;letter-spacing:.03em}
.poster-play{position:absolute;inset:0;margin:auto;width:48px;height:48px;border-radius:50%;display:grid;place-items:center;background:rgba(255,255,255,.93);color:#111;opacity:0;transform:scale(.82);transition:.18s}
.poster-play .lucide{fill:#111}
.media-card:hover .poster-play,.media-card:focus .poster-play{opacity:1;transform:scale(1)}
.media-card>strong{display:block;margin-top:9px;font-size:14px;font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.media-card>small{display:block;margin-top:4px;color:#8a8a8a;font-size:12px}

.library-toolbar{display:flex;align-items:flex-start;gap:0;flex-wrap:wrap;margin-bottom:20px}
.library-toolbar .native-filters{flex:1;min-width:280px;margin-bottom:0!important}
.view-actions{display:flex;align-items:center;gap:2px;flex:0 0 auto}
.icon-action{width:32px;height:32px;border:0;border-radius:6px;background:transparent;color:#aaa;display:grid;place-items:center}
.icon-action:hover{background:#292929;color:white}
#posterSize{width:90px;margin:0 4px;accent-color:var(--accent)}
.library-filters{
    display:flex;align-items:end;gap:9px;padding:13px;margin-bottom:25px;
    background:#1d1d1d;border:1px solid #292929;border-radius:5px
}
.library-filters label{display:grid;gap:6px}
.library-filters label>span{font-size:9px;text-transform:uppercase;letter-spacing:.08em;color:#686868}
.library-filters select,.library-filters input{
    height:37px;border:1px solid #333;border-radius:4px;background:#242424;color:#ccc;outline:0;padding:0 10px
}
.library-filters select:focus,.library-filters input:focus{border-color:#686868}
.library-filters select{min-width:145px}
.filter-search{flex:1}.filter-search input{width:100%}
.year-filter input{width:88px}
.filter-submit{height:37px;padding:0 14px;border:0;border-radius:4px;background:var(--accent);color:#111;font-weight:700;display:flex;align-items:center;gap:7px}
.filter-submit:hover{background:var(--accent-hover)}
.poster-library{display:grid;grid-template-columns:repeat(auto-fill,minmax(var(--poster-size),1fr));gap:31px 25px;align-items:start;margin-bottom:28px}
.empty-library{margin:50px auto;padding:70px 25px;text-align:center;color:#858585}
.empty-library>.lucide{width:46px;height:46px}
.empty-library h2{color:#ddd;margin:15px 0 5px}.empty-library p{margin:0}

.watch-page{padding-bottom:55px}
.watch-poster{width:100%;border-radius:5px;box-shadow:0 25px 65px #000b}
.content-type{color:var(--accent);font-size:10px;text-transform:uppercase;letter-spacing:.12em;font-weight:800}
.player-frame{position:relative;aspect-ratio:16/9;background:#000;border-radius:5px;overflow:hidden;border:1px solid #292929}
.player-frame iframe{width:100%;height:100%;border:0}
.player-loading{display:none;position:absolute;inset:0;background:#080808;text-align:center}
.player-loading.active{display:block;align-content:center}.player-loading span{width:36px;height:36px;border:3px solid #333;border-top-color:var(--accent);border-radius:50%;animation:spin .8s linear infinite;display:inline-block}
.player-unavailable{display:none;position:absolute;inset:0;background:#0c0c0c;text-align:center;padding:24px;box-sizing:border-box}
.player-unavailable.active{display:block;align-content:center;justify-items:center}
.player-unavailable .lucide{width:36px;height:36px;color:#666;margin:0 auto 12px}
.player-unavailable strong{display:block;color:#ddd;font-size:14px;margin-bottom:6px}
.player-unavailable p{margin:0;color:#888;font-size:12px;max-width:320px}
@keyframes spin{to{transform:rotate(360deg)}}

.protocol-warning{margin-bottom:24px;padding:40px 28px;background:#1c1c1c;border:1px solid #2c2c2c;border-radius:10px;text-align:center;box-sizing:border-box}
.protocol-warning__icon{width:52px;height:52px;margin:0 auto 16px;border-radius:50%;background:rgba(220,63,69,.12);display:grid;place-items:center;color:#f2777a}
.protocol-warning__icon .lucide{width:26px;height:26px}
.protocol-warning h2{margin:0 0 10px;font-size:18px;color:#f0f0f0}
.protocol-warning p{margin:0 auto 8px;max-width:480px;color:#999;font-size:13px;line-height:1.6}
.protocol-warning code{padding:2px 6px;border-radius:4px;background:#242424;color:#e2e2e2;font-size:12px}
.protocol-warning__copy{display:flex;align-items:center;gap:8px;margin:14px auto 0;max-width:480px;box-sizing:border-box}
.protocol-warning__copy-input{flex:1;min-width:0;width:0;height:42px;padding:0 14px;border:1px solid #3a3a3a;border-radius:6px;background:#1a1a1a;color:#ccc;font-size:13px;outline:0;box-sizing:border-box;-webkit-appearance:none;appearance:none}
.protocol-warning__copy-input:focus{border-color:#666}
.protocol-warning__copy-btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;flex:none;height:42px;padding:0 16px;border:1px solid #3a3a3a;border-radius:6px;background:#242424;color:#e8e8e8;font-weight:600;font-size:13px;box-sizing:border-box;white-space:nowrap}
.protocol-warning__copy-btn:hover{background:#2c2c2c;border-color:#555}
.protocol-warning__copy-btn .lucide{width:16px;height:16px;flex:none}
@media(max-width:520px){
    .protocol-warning{padding:28px 16px}
    .protocol-warning__copy{flex-direction:column;align-items:stretch;max-width:100%}
    .protocol-warning__copy-input,.protocol-warning__copy-btn{width:100%;flex:none}
    /* 16px stops iOS/Android Chrome from auto-zooming the page when the
       (readonly, tap-to-select) field is focused — anything smaller triggers it. */
    .protocol-warning__copy-input{font-size:16px}
}

.drawer-overlay{display:none}
.focusable:focus-visible{outline:2px solid var(--accent);outline-offset:3px}
.auth-page{background:#111}

@media(max-width:1050px){
    .library-filters{flex-wrap:wrap}.filter-search{min-width:240px}
}
@media(max-width:820px){
    :root{--sidebar:0px}
    html.sidebar-collapsed{--sidebar:0px}
    .plex-sidebar{position:fixed;top:var(--topbar);bottom:0;left:0;width:280px;z-index:75;transform:translateX(-105%);box-shadow:22px 0 65px rgba(0,0,0,.5)}
    body.drawer-open .plex-sidebar{transform:translateX(0)}
    .mobile-burger{display:grid}
    .sidebar-toggle{display:none}
    .plex-topbar{padding:0 10px}
    .user-button strong,.user-button>.lucide:last-child{display:none}
    body.drawer-open .drawer-overlay{display:block;position:fixed;inset:var(--topbar) 0 0 0;background:rgba(0,0,0,.65);z-index:65}
    .plex-page{padding:24px 14px 45px}.head-action{display:none}
    .page-head{margin-bottom:22px}
    .shelf-scroll{grid-auto-columns:145px;gap:12px}
    .library-filters{padding:10px}.library-filters label{flex:1;min-width:140px}.filter-search{width:100%;flex-basis:100%}
    .poster-library{grid-template-columns:repeat(3,minmax(0,1fr));gap:23px 10px}
}
@media(max-width:520px){
    .poster-library{grid-template-columns:repeat(2,minmax(0,1fr))}
    .global-search kbd{display:none}
}

/* V7.1 - authentication and user administration */
.auth-page{overflow:hidden;background:#0b0b0b}
.auth-screen{position:relative;min-height:100vh;display:grid;place-items:center;padding:32px;isolation:isolate}
.auth-backdrop{position:absolute;inset:0;z-index:-2;background:
    radial-gradient(circle at 18% 20%,rgba(229,160,13,.18),transparent 32%),
    radial-gradient(circle at 82% 75%,rgba(67,95,146,.13),transparent 34%),
    linear-gradient(135deg,#0b0b0b,#151515 55%,#0c0c0c)}
.auth-backdrop:after{content:"";position:absolute;inset:0;background-image:linear-gradient(rgba(255,255,255,.018) 1px,transparent 1px),linear-gradient(90deg,rgba(255,255,255,.018) 1px,transparent 1px);background-size:36px 36px;mask-image:linear-gradient(to bottom,black,transparent)}
.auth-panel{width:min(430px,100%);padding:38px;background:rgba(27,27,27,.94);border:1px solid #343434;border-radius:12px;box-shadow:0 35px 100px rgba(0,0,0,.65);backdrop-filter:blur(20px)}
.auth-kicker{display:block;margin-top:26px;color:var(--accent);font-size:10px;font-weight:800;letter-spacing:.14em;text-transform:uppercase}
.auth-panel h1{margin:8px 0 8px;font-size:30px;line-height:1.1;letter-spacing:-.035em}
.auth-panel>p{margin:0;color:#898989;font-size:13px;line-height:1.6}
.auth-form{display:grid;gap:17px;margin-top:27px}
.field{display:grid;gap:8px}
.field>span,.compact-field>span{font-size:10px;font-weight:700;text-transform:uppercase;letter-spacing:.08em;color:#777}
.field-control{height:46px;display:flex;align-items:center;gap:10px;padding:0 12px;border:1px solid #383838;border-radius:6px;background:#242424;transition:border-color .16s,box-shadow .16s}
.field-control:focus-within{border-color:#777;box-shadow:0 0 0 3px rgba(255,255,255,.04)}
.field-control>.lucide{width:17px;color:#777}
.field-control input{min-width:0;flex:1;border:0;outline:0;background:none;color:white}
.field-control input::placeholder{color:#646464}
.password-toggle{width:32px;height:32px;border:0;border-radius:4px;background:transparent;color:#777;display:grid;place-items:center}
.password-toggle:hover{background:#333;color:white}
.auth-submit{height:46px;margin-top:3px;border:0;border-radius:6px;background:var(--accent);color:#111;font-weight:800;display:flex;align-items:center;justify-content:center;gap:9px;transition:background .15s,transform .15s}
.auth-submit:hover{background:var(--accent-hover);transform:translateY(-1px)}
.form-message{display:flex;align-items:flex-start;gap:9px;padding:12px 13px;margin-top:18px;border-radius:6px;font-size:12px;line-height:1.5}
.form-message .lucide{width:17px;min-width:17px}
.form-message--error{background:#442323;border:1px solid #683333;color:#ffb5b5}

.users-page{max-width:1500px}
.users-head{align-items:flex-end}
.primary-action,.save-action,.secondary-action,.danger-action{height:39px;padding:0 14px;border-radius:5px;border:0;display:inline-flex;align-items:center;justify-content:center;gap:8px;font-weight:700;font-size:12px}
.primary-action,.save-action{background:#242424;color:#e8e8e8;border:1px solid #3a3a3a}
.primary-action:hover,.save-action:hover{background:#2c2c2c;border-color:#555}
.secondary-action{background:#303030;color:#ddd}.secondary-action:hover{background:#3a3a3a}
.danger-action{background:transparent;color:#c98989}.danger-action:hover{background:#422525;color:#ffc0c0}
.users-summary{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,220px));gap:12px;margin-bottom:22px}
.users-summary>div{min-height:78px;padding:15px;border:1px solid #2e2e2e;border-radius:7px;background:#1d1d1d;display:flex;align-items:center;gap:13px}
.users-summary>div>.lucide{width:24px;height:24px;color:var(--accent)}
.users-summary span{display:grid;gap:3px;color:#777;font-size:10px}.users-summary strong{color:#eee;font-size:20px}
.users-list{display:grid;gap:12px}

.admin-sections{display:grid;grid-template-columns:repeat(auto-fit,minmax(300px,1fr));gap:16px}
.admin-section-card{display:flex;align-items:center;gap:18px;padding:22px;background:#1c1c1c;border:1px solid #2c2c2c;border-radius:10px;transition:border-color .15s,background .15s}
.admin-section-card:hover{border-color:#444;background:#212121}
.admin-section-card__icon{width:52px;height:52px;min-width:52px;border-radius:10px;background:rgba(229,160,13,.1);display:grid;place-items:center}
.admin-section-card__icon .lucide{width:24px;height:24px;color:var(--accent)}
.admin-section-card__body{min-width:0;flex:1}
.admin-section-card__body h2{margin:0 0 3px;font-size:16px;color:#f0f0f0;display:flex;align-items:center;gap:7px}
.admin-section-card__body>p{margin:0 0 12px;font-size:12px;color:#888}
.admin-section-card__stats{display:flex;flex-wrap:wrap;gap:16px}
.admin-section-card__stats span{display:flex;flex-direction:column;gap:2px;font-size:10px;color:#777}
.admin-section-card__stats strong{font-size:16px;color:#eee}
.admin-section-card__arrow{width:18px;height:18px;color:#666;flex:none}
.admin-section-card__warning{display:inline-flex;color:#f2777a}
.admin-section-card__warning .lucide{width:15px;height:15px}
@media(max-width:600px){.admin-sections{grid-template-columns:1fr}}
.user-card{padding:18px;background:#1d1d1d;border:1px solid #2e2e2e;border-radius:8px;transition:border-color .16s,background .16s}
.user-card:hover{border-color:#3b3b3b;background:#202020}
.user-card__identity{display:flex;align-items:center;gap:12px;padding-bottom:15px;border-bottom:1px solid #2d2d2d}
.user-card__avatar{width:44px;height:44px;border-radius:50%;display:grid;place-items:center;background:var(--avatar);color:white;box-shadow:inset 0 0 0 1px rgba(255,255,255,.12)}
.user-card__avatar .lucide{width:21px;height:21px}
.user-card__identity>div{display:grid;gap:3px}.user-card__identity strong{font-size:14px}.user-card__identity small{color:#707070;font-size:10px}
.role-badge{margin-left:auto;padding:6px 8px;border-radius:4px;font-size:9px;font-weight:800;text-transform:uppercase;letter-spacing:.05em}
.role-badge--admin{background:rgba(229,160,13,.13);color:#f1bd49}.role-badge--user{background:#2a2a2a;color:#999}
.role-badge--ok{background:rgba(139,195,74,.14);color:#8bc34a}.role-badge--error{background:rgba(220,63,69,.16);color:#f2777a;cursor:help}
.user-card__fields{display:grid;grid-template-columns:1.25fr 1.1fr 1.2fr 130px 75px;gap:10px;padding:16px 0}
.compact-field{display:grid;gap:7px}
.compact-field input,.compact-field select{width:100%;height:38px;padding:0 10px;border:1px solid #343434;border-radius:5px;background:#252525;color:#ddd;outline:0}
.compact-field input:focus,.compact-field select:focus{border-color:#666}
.compact-field input:disabled,.compact-field select:disabled{opacity:.55;cursor:not-allowed}
.compact-field--color input{padding:4px;cursor:pointer}
.user-card__footer{display:flex;align-items:center;justify-content:space-between;gap:15px;padding-top:13px;border-top:1px solid #2d2d2d}
.last-login{display:flex;align-items:center;gap:7px;color:#6f6f6f;font-size:10px}.last-login .lucide{width:14px}
.user-card__actions{display:flex;gap:6px}
.app-modal{max-height:calc(100vh - 40px);overflow-y:auto;overflow-x:hidden;padding:0;border:1px solid #3a3a3a;border-radius:9px;background:#1c1c1c;color:#eee;box-shadow:0 35px 120px #000}
@media(max-width:600px){.app-modal{max-width:calc(100vw - 28px)}}
.field-control input:-webkit-autofill,.compact-field input:-webkit-autofill{-webkit-text-fill-color:#fff;box-shadow:0 0 0 1000px #242424 inset;caret-color:#fff}
.app-modal::backdrop{background:rgba(0,0,0,.72);backdrop-filter:blur(5px)}
.modal-panel{display:block}
.modal-head{padding:20px 21px 16px;border-bottom:1px solid #303030;display:flex;justify-content:space-between;gap:20px}
.modal-head h2{font-size:18px;margin:0}.modal-head p{font-size:11px;color:#777;margin:5px 0 0}
.modal-close{border:0;background:transparent;color:#888;border-radius:4px}.modal-close:hover{background:#303030;color:white}
.modal-body{padding:20px;display:grid;gap:15px}
.modal-actions{padding:15px 20px;border-top:1px solid #303030;display:flex;justify-content:flex-end;gap:8px}

@media(max-width:1050px){.user-card__fields{grid-template-columns:repeat(2,minmax(0,1fr))}.compact-field--color{max-width:110px}.users-summary{grid-template-columns:repeat(2,1fr)}}
@media(max-width:700px){.auth-screen{padding:18px}.auth-panel{padding:27px 22px}.users-head{align-items:flex-start}.users-head .primary-action{width:100%;margin-top:12px}.users-summary{grid-template-columns:1fr}.user-card__fields{grid-template-columns:1fr}.user-card__footer{align-items:flex-start;flex-direction:column}.user-card__actions{width:100%}.user-card__actions button{flex:1}.role-badge{font-size:8px}.modal-actions{display:grid;grid-template-columns:1fr 1fr}}

/* V7.2 logo */
.plex-brand{display:flex;align-items:center;gap:10px;min-width:0}
.plex-brand--sidebar{display:none;padding:16px 16px 6px}
.plex-brand strong{font-size:20px;letter-spacing:-1px}
.plex-brand strong span{color:var(--accent)}

/* Hide poster size tools on mobile and remove unused square */
@media(max-width:820px){
    .view-actions{display:none}
}

/* Home title */
.page-head h1{font-size:24px}
.page-head p{font-size:12px;color:#858585}

/* List menu */
.list-menu{position:relative;margin-top:22px;display:inline-block}
.list-menu__toggle{height:43px;padding:0 14px;border:0;border-radius:4px;background:#343434;color:#fff;display:flex;align-items:center;gap:9px;font-weight:700}
.list-menu__toggle:hover{background:#414141}
.list-menu__toggle .lucide:last-child{width:14px}
.list-menu__dropdown{display:none;position:absolute;left:0;top:49px;width:220px;padding:6px;background:#282828;border:1px solid #414141;border-radius:5px;box-shadow:0 18px 55px #000c;z-index:20}
.list-menu__dropdown.open{display:grid}
.list-menu__dropdown button{border:0;background:transparent;color:#ddd;padding:10px;border-radius:4px;display:flex;align-items:center;gap:9px;text-align:left}
.list-menu__dropdown button:hover{background:#383838}

/* V7.3 text-only logo */
.plex-brand{margin-left:2px}
.plex-brand strong{font-size:21px}

/* Poster hover without play circle */
.poster-play{display:none!important}
.media-poster{transition:transform .2s ease,box-shadow .2s ease}
.media-card:hover .media-poster{
    transform:scale(1.045);
    box-shadow:0 12px 34px rgba(0,0,0,.55);
    z-index:3;
}
.media-card:hover img{transform:scale(1.015)}

/* Pagination / infinite load */
.load-more-wrap{display:grid;place-items:center;padding:38px 0 10px}
.load-more-button{
    min-width:180px;height:42px;padding:0 18px;border:1px solid #3a3a3a;border-radius:5px;
    background:#242424;color:#ddd;display:flex;align-items:center;justify-content:center;gap:8px
}
.load-more-button:hover{background:#303030;border-color:#555}
.load-more-button.loading{opacity:.65;pointer-events:none}
.infinite-sentinel{height:1px;width:100%}

/* Cleaner player */
.player-frame{
    border-radius:6px;
    border:1px solid #303030;
    box-shadow:0 14px 36px rgba(0,0,0,.35);
}
.watch-page{padding-bottom:28px}
.head-action{display:none!important}

/* V7.4 uppercase text logo */
.plex-brand strong{
    font-size:19px;
    letter-spacing:.02em;
    font-weight:900;
}
.plex-brand strong span{color:var(--accent)}

/* Full information page */
.original-title{margin:0 0 13px!important;color:#999!important}
.summary-description{max-width:850px;color:#bbb;line-height:1.68}

/* Information tables */
.media-details{
    padding:0 38px 50px;
    display:grid;grid-template-columns:minmax(0,1fr) minmax(260px,390px);
    gap:18px
}
.details-main{
    background:#1d1d1d;border:1px solid #2e2e2e;border-radius:6px;padding:20px
}
.media-details h2{font-size:16px;margin:0 0 16px}
.facts-list{margin:0;display:grid}
.facts-list>div{
    display:grid;grid-template-columns:145px minmax(0,1fr);
    gap:12px;padding:10px 0;border-bottom:1px solid #2b2b2b
}
.facts-list>div:last-child{border-bottom:0}
.facts-list dt{font-size:11px;color:#858585}
.facts-list dd{margin:0;font-size:12px;color:#ddd;line-height:1.55}

@media(max-width:820px){
    .summary-description{
        display:-webkit-box;-webkit-line-clamp:5;-webkit-box-orient:vertical;overflow:hidden;
        font-size:13px
    }
    .watch-player-section{padding:0 0 20px}
    .media-details{padding:0 12px 32px;grid-template-columns:1fr}
    .facts-list>div{grid-template-columns:105px minmax(0,1fr)}
}

/* V7.5 - unified content page */
.watch-page{
    padding-bottom:48px;
    background:var(--bg);
}
.summary-description{
    font-size:13px;
    max-width:780px;
}
.list-menu__toggle{
    background:#292929;
    border:1px solid #383838;
    box-shadow:none;
}
.list-menu__toggle:hover{
    background:#333;
    border-color:#4b4b4b;
}
.watch-player-section{
    width:min(1480px,calc(100% - 56px));
    margin:0 auto;
    padding:26px 0 22px;
}
.media-details{
    width:min(1480px,calc(100% - 56px));
    margin:0 auto;
    padding:0 0 18px;
    grid-template-columns:minmax(0,1fr) minmax(280px,380px);
}
.details-main{
    background:#1c1c1c;
    border-color:#303030;
    box-shadow:none;
}
.facts-list>div{
    min-height:42px;
}
.facts-list dt{
    color:#777;
}
.facts-list dd{
    color:#d3d3d3;
}
@media(max-width:1100px){
    .watch-player-section,
    .media-details{
        width:min(100% - 32px,1480px);
    }
    .media-details{
        grid-template-columns:1fr;
    }
}
@media(max-width:820px){
    .watch-player-section{
        width:100%;
        padding:14px 0 20px;
    }
    .media-details{
        width:100%;
        padding:0 12px 20px;
    }
}

/* V7.6 search */
.search-clear{
    width:26px;height:26px;border:0;border-radius:50%;
    background:transparent;color:#777;display:none;place-items:center
}
.search-clear.visible{display:grid}
.search-clear:hover{background:#393939;color:#fff}
.search-clear .lucide{width:14px}

/* V7.6 filters */
.mobile-filter-bar{display:none}
.library-filters{
    display:grid;
    grid-template-columns:repeat(5,minmax(130px,1fr)) minmax(210px,1.35fr);
    align-items:end;
    gap:10px;
    padding:14px;
}
.library-filters label{min-width:0}
.library-filters select{
    width:100%;min-width:0;
}
.filter-reset{
    height:37px;padding:0 13px;border:1px solid #383838;border-radius:4px;
    background:#242424;color:#aaa;display:flex;align-items:center;gap:7px;font-size:12px
}
.filter-reset:hover{background:#303030;color:#fff}
.filter-reset .lucide{width:15px}

/* Only one active sidebar item */
.nav-link.active{color:var(--accent)}

/* Player uses the natural content width, not a centered max-width card */
.watch-player-section{
    width:auto!important;
    max-width:none!important;
    margin:0!important;
    padding:24px 38px 28px!important;
}

@media(max-width:1180px){
    .library-filters{
        grid-template-columns:repeat(3,minmax(150px,1fr));
    }
}
@media(max-width:820px){
    .global-search kbd{display:none}
    .mobile-filter-bar{
        display:flex;align-items:center;width:100%;flex:0 0 100%;
        margin-bottom:14px
    }
    .mobile-filter-toggle{
        position:relative;width:100%;height:46px;padding:0 40px;border:0;border-radius:8px;
        background:#43435f;color:#fff;display:flex;align-items:center;justify-content:center;gap:9px;font-size:14px;font-weight:600
    }
    .mobile-filter-toggle:active{background:#4c4c6a}
    .mobile-filter-toggle .lucide:first-child{color:#fff;width:18px}
    .mobile-filter-toggle span{white-space:nowrap}
    .mobile-filter-toggle__chevron{position:absolute;right:14px;top:50%;width:16px;color:rgba(255,255,255,.7);transform:translateY(-50%);transition:transform .2s}
    .mobile-filter-toggle.active{background:#4c4c6a}
    .mobile-filter-toggle.active .mobile-filter-toggle__chevron{transform:translateY(-50%) rotate(180deg);color:#fff}
    .mobile-filter-count{font-size:10px;color:#888}
    .library-filters{
        display:none;
        grid-template-columns:repeat(2,minmax(0,1fr));
        padding:11px;margin-bottom:18px
    }
    .library-filters.open{display:grid}
    .sort-filter{grid-column:1/-1}
    .filter-actions{grid-column:1/-1}
    .filter-submit,.filter-reset{flex:1;justify-content:center}
    .watch-player-section{
        padding:14px 0 22px!important;
    }
    .provider-tabs{padding:0 12px}
}
@media(max-width:500px){
    .library-filters{grid-template-columns:1fr}
    .sort-filter,.filter-actions{grid-column:1}
}

/* V7.7 - compact filters without duplicate rating selectors */
.library-filters{
    grid-template-columns:minmax(150px,1fr) minmax(150px,1fr) minmax(130px,.8fr) minmax(240px,1.5fr);
}
@media(max-width:1180px){
    .library-filters{
        grid-template-columns:repeat(2,minmax(150px,1fr));
    }
    .sort-filter{grid-column:auto}
}
@media(max-width:500px){
    .library-filters{grid-template-columns:1fr}
}

/* V7.8 - content page aligned to the site grid */
.watch-summary__inner{
    width:auto!important;
    max-width:none!important;
    margin:0!important;
    padding:72px 38px 34px!important;
    grid-template-columns:190px minmax(0,820px)!important;
}
.watch-player-section{
    width:auto!important;
    max-width:none!important;
    margin:0!important;
    padding:24px 38px 28px!important;
}
.media-details{
    width:auto!important;
    max-width:none!important;
    margin:0!important;
    padding:0 38px 42px!important;
}
.watch-player-grid{
    display:grid;
    grid-template-columns:minmax(0,1fr) 300px;
    gap:16px;
    align-items:start;
    width:100%;
}
.player-main{
    min-width:0;
}
.player-main .player-frame{
    width:100%;
    aspect-ratio:16/9;
    max-height:calc(90vh - 105px);
    overflow:hidden;
    border:1px solid #303030;
    border-radius:6px;
    background:#000;
    box-shadow:0 16px 42px rgba(0,0,0,.32);
}
.player-main .player-frame iframe{
    display:block;
    width:100%;
    height:100%;
    border:0;
}
.provider-panel{
    width:300px;
    min-width:0;
    background:#1c1c1c;
    border:1px solid #303030;
    border-radius:6px;
    overflow:hidden;
    position:sticky;
    top:76px;
}
.provider-panel__head{
    padding:16px;
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:12px;
    border-bottom:1px solid #303030;
}
.provider-panel__head h2{
    margin:0;
    font-size:15px;
}
.provider-panel__head p{
    margin:4px 0 0;
    color:#777;
    font-size:10px;
}
.provider-panel__head>span{
    width:26px;
    height:26px;
    border-radius:50%;
    background:#292929;
    display:grid;
    place-items:center;
    font-size:10px;
    color:#bbb;
}
.provider-list{
    display:grid;
    gap:5px;
    padding:7px;
}
@media(max-width:1150px){
    .watch-player-grid{
        grid-template-columns:minmax(0,1fr) 260px;
    }
    .provider-panel{
        width:260px;
    }
}

@media(max-width:820px){
    .watch-player-section{
        padding:0 0 22px!important;
    }
    .watch-player-grid{
        display:flex;
        flex-direction:column;
        gap:10px;
    }
    .player-main{
        width:100%;
        order:1;
    }
    .player-main .player-frame{
        width:100%;
        aspect-ratio:16/9;
        max-height:none;
        border-left:0;
        border-right:0;
        border-radius:0;
        box-shadow:none;
    }
    .provider-panel{
        order:2;
        position:static;
        width:calc(100% - 24px);
        margin:0 12px;
    }
    .provider-panel__head{
        padding:13px;
    }
    .provider-list{
        grid-template-columns:repeat(2,minmax(0,1fr));
    }
    .media-details{
        width:100%!important;
        padding:0 12px 28px!important;
    }
}

@media(max-width:500px){
    .provider-list{
        grid-template-columns:1fr;
    }
}

/* V7.9 search cleanup */
.global-search input::-webkit-search-cancel-button{
    display:none;
}
.global-search kbd{
    display:none!important;
}
.search-clear{
    flex:0 0 26px;
}

/* Instant filters */
.library-filters{
    grid-template-columns:minmax(150px,1fr) minmax(150px,1fr) minmax(130px,.8fr) minmax(240px,1.5fr);
}
.filter-actions{
    grid-column:1/-1;
    justify-content:flex-end;
}
.filter-submit{
    display:none!important;
}
.filter-reset{
    min-width:116px;
    justify-content:center;
}
@media(max-width:820px){
    .global-search{
        border-radius:7px!important;
    }
}

/* V7.10 - real responsive watch page */

/* Medium desktop / small laptop: player first, providers below */
@media(max-width:1280px){
    .watch-player-grid{
        grid-template-columns:1fr!important;
        gap:12px!important;
    }

    .provider-panel{
        position:static!important;
        width:100%!important;
        max-width:none!important;
    }

    .provider-list{
        display:grid!important;
        grid-template-columns:repeat(auto-fit,minmax(220px,1fr))!important;
    }

    .player-main .player-frame{
        width:100%!important;
        max-height:none!important;
        aspect-ratio:16/9!important;
    }

    .media-details{
        grid-template-columns:1fr!important;
    }
}

/* Narrow laptop / tablet: sidebar becomes a drawer and content uses full viewport */
@media(max-width:1080px){
    :root{
        --sidebar:0px!important;
    }

    html.sidebar-collapsed{
        --sidebar:0px!important;
    }

    :root{
        --sidebar:0px!important;
    }

    .plex-sidebar{
        position:fixed!important;
        top:var(--topbar)!important;
        bottom:0!important;
        left:0!important;
        width:280px!important;
        z-index:75!important;
        transform:translateX(-105%)!important;
        box-shadow:22px 0 65px rgba(0,0,0,.72)!important;
    }

    body.drawer-open .plex-sidebar{
        transform:translateX(0)!important;
    }

    .mobile-burger{
        display:grid!important;
    }

    .sidebar-toggle{
        display:none!important;
    }

    .plex-topbar{
        padding:0 10px!important;
    }

    body.drawer-open .drawer-overlay{
        display:block!important;
        position:fixed!important;
        inset:var(--topbar) 0 0 0!important;
        z-index:65!important;
        background:rgba(0,0,0,.68)!important;
    }

    .watch-summary__inner{
        width:100%!important;
        max-width:none!important;
        margin:0!important;
        padding:46px 22px 28px!important;
        grid-template-columns:170px minmax(0,1fr)!important;
    }

    .watch-player-section{
        width:100%!important;
        max-width:none!important;
        margin:0!important;
        padding:18px 18px 24px!important;
    }

    .watch-player-grid{
        width:100%!important;
        display:grid!important;
        grid-template-columns:1fr!important;
    }

    .player-main,
    .player-main .player-frame{
        width:100%!important;
        min-width:0!important;
    }

    .provider-panel{
        width:100%!important;
        margin:0!important;
    }

    .media-details{
        width:100%!important;
        max-width:none!important;
        padding:0 18px 28px!important;
    }
}

/* Phone / portrait tablet */
@media(max-width:720px){
    .watch-summary{
        padding-top:155px!important;
        min-height:0!important;
    }

    .watch-summary__inner{
        display:block!important;
        padding:24px 14px 18px!important;
        background:linear-gradient(0deg,var(--bg) 76%,transparent)!important;
    }

    .summary-poster{
        display:none!important;
    }

    .summary-copy h1{
        font-size:28px!important;
        line-height:1.12!important;
    }

    .summary-description{
        font-size:13px!important;
        display:-webkit-box!important;
        -webkit-line-clamp:5!important;
        -webkit-box-orient:vertical!important;
        overflow:hidden!important;
    }

    .watch-player-section{
        padding:0 0 20px!important;
    }

    .player-main .player-frame{
        width:100%!important;
        aspect-ratio:16/9!important;
        max-height:none!important;
        border-left:0!important;
        border-right:0!important;
        border-radius:0!important;
        box-shadow:none!important;
    }

    .provider-panel{
        width:calc(100% - 24px)!important;
        margin:0 12px!important;
        border-radius:6px!important;
    }

    .provider-list{
        grid-template-columns:repeat(2,minmax(0,1fr))!important;
    }

    .provider-tab{
        min-height:58px!important;
    }

    .provider-copy small{
        display:none!important;
    }

    .media-details{
        padding:0 12px 26px!important;
    }

    .facts-list>div{
        grid-template-columns:105px minmax(0,1fr)!important;
    }
}

@media(max-width:460px){
    .provider-list{
        grid-template-columns:1fr!important;
    }

    .watch-meta{
        gap:6px!important;
    }

    .genre-chips{
        gap:5px!important;
    }

    .list-menu,
    .list-menu__toggle{
        width:100%!important;
    }

    .list-menu__toggle{
        justify-content:center!important;
    }
}

/* V7.11 - remove mobile left shadow/gutter */
@media(max-width:1080px){
    html,
    body{
        width:100%;
        max-width:100%;
        overflow-x:hidden;
    }

    .plex-app,
    .plex-shell,
    .ajax-stage{
        width:100%;
        max-width:100%;
        margin-left:0!important;
    }

    .plex-sidebar{
        left:0!important;
        right:auto!important;
        box-shadow:none!important;
        border-right:1px solid #2b2b2b!important;
        visibility:hidden;
        pointer-events:none;
    }

    body.drawer-open .plex-sidebar{
        visibility:visible;
        pointer-events:auto;
        box-shadow:18px 0 55px rgba(0,0,0,.72)!important;
    }

    .drawer-overlay{
        display:none!important;
        opacity:0;
        pointer-events:none;
    }

    body.drawer-open .drawer-overlay{
        display:block!important;
        opacity:1;
        pointer-events:auto;
        background:rgba(0,0,0,.62)!important;
    }

    .plex-topbar{
        width:100%;
        max-width:100%;
    }

    .plex-page,
    .library-view{
        width:100%;
        max-width:100%;
        margin:0!important;
    }
}

@media(max-width:720px){
    .plex-page,
    .library-view{
        padding-left:12px!important;
        padding-right:12px!important;
    }
}

/* V7.12 - polished poster placeholders */
.poster-placeholder{
    position:absolute;
    inset:0;
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    gap:9px;
    padding:20px;
    text-align:center;
    background:
        radial-gradient(circle at 50% 38%,rgba(229,160,13,.16),transparent 34%),
        linear-gradient(145deg,#20242b,#111317);
    color:#aeb4bd;
}
.poster-placeholder:after{
    content:"";
    position:absolute;
    inset:0;
    border:1px solid rgba(255,255,255,.035);
    border-radius:inherit;
    pointer-events:none;
}
.poster-placeholder__icon{
    width:66px;
    height:66px;
    border-radius:50%;
    background:#2a2f37;
    color:var(--accent);
    display:grid;
    place-items:center;
    box-shadow:0 10px 28px rgba(0,0,0,.28);
}
.poster-placeholder__icon .lucide{
    width:29px;
    height:29px;
}
.poster-placeholder>strong{
    font-size:11px;
    color:#c7ccd3;
    font-weight:700;
}
.poster-placeholder>small{
    font-size:9px;
    letter-spacing:.16em;
    color:#6f7680;
}
.poster-placeholder--fallback{
    z-index:1;
}
.media-card:hover .poster-placeholder{
    transform:scale(1.015);
    transition:transform .2s ease;
}
.summary-poster--placeholder{
    aspect-ratio:2/3;
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    gap:10px;
    background:
        radial-gradient(circle at 50% 38%,rgba(229,160,13,.16),transparent 34%),
        linear-gradient(145deg,#20242b,#111317);
    color:#aeb4bd;
}
.summary-poster--placeholder>span{
    width:68px;
    height:68px;
    border-radius:50%;
    background:#2a2f37;
    color:var(--accent);
    display:grid;
    place-items:center;
}
.summary-poster--placeholder>strong{
    font-size:12px;
}
.summary-poster--placeholder>small{
    font-size:9px;
    letter-spacing:.15em;
    color:#6f7680;
}
.search-poster-placeholder{
    width:42px;
    height:58px;
    border-radius:3px;
    display:grid;
    place-items:center;
    color:#8f96a0;
    background:
        radial-gradient(circle at 50% 40%,rgba(229,160,13,.14),transparent 40%),
        linear-gradient(145deg,#252a31,#15181c);
}
.search-poster-placeholder svg{
    width:21px;
    height:21px;
}
.search-suggestion-loading{
    min-height:54px;
    display:flex;
    align-items:center;
    justify-content:center;
    gap:9px;
    color:#8f969f;
    font-size:12px;
}
.search-suggestion-loading span{
    width:16px;
    height:16px;
    border:2px solid #3d4249;
    border-top-color:var(--accent);
    border-radius:50%;
    animation:spin .7s linear infinite;
}

/* Slight card polish */
.media-card>strong{
    line-height:1.35;
}
.media-poster{
    background:#15181d;
}

/* V7.13 - clean poster placeholder */
.poster-placeholder,
.summary-poster--placeholder{
    background:#171a1f!important;
    box-shadow:none!important;
    border:0!important;
}

.poster-placeholder:after{
    display:none!important;
}

.poster-placeholder__icon,
.summary-poster--placeholder>span{
    background:#24282f!important;
    box-shadow:none!important;
}

.media-poster{
    border:0!important;
    box-shadow:none;
}

.media-card:hover .media-poster{
    box-shadow:0 10px 26px rgba(0,0,0,.34)!important;
}

/* Poster size sets a minimum card width; cards stretch to fill the row
   evenly (no ragged gap on the right), capped at 12 columns max. */
.poster-library{
    grid-template-columns:repeat(auto-fill,minmax(max(var(--poster-size),calc(100%/13)),1fr))!important;
    align-items:start;
}

.poster-library .media-card{
    width:auto;
    max-width:none;
}

.poster-library .media-poster{
    width:100%;
}

@media(max-width:820px){
    .poster-library{
        grid-template-columns:repeat(3,minmax(0,1fr))!important;
    }

    .poster-library .media-card{
        width:auto;
        max-width:none;
    }
}

@media(max-width:520px){
    .poster-library{
        grid-template-columns:repeat(2,minmax(0,1fr))!important;
    }
}

/* V8 */
.poster-placeholder-image{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}.poster-placeholder--overlay{background:transparent!important}
.form-alert{max-width:720px;padding:12px;margin-bottom:12px;border-radius:5px}.form-alert.error{background:#452222}.form-alert.success{background:#173822}.library-filters{overflow:visible!important}.library-filters label{min-width:0!important}.library-filters select{max-width:100%!important}
@media(max-width:820px){.library-filters.open{display:flex!important;flex-direction:column!important;width:100%!important}.library-filters.open label,.library-filters.open select,.filter-actions{width:100%!important}}

/* V8.3 multi filters */
.library-filters{grid-template-columns:minmax(150px,.8fr) repeat(3,minmax(170px,1fr)) minmax(240px,1.25fr)!important}

.account-page{max-width:none!important;width:100%!important}

@media(max-width:1200px){.library-filters{grid-template-columns:repeat(3,minmax(160px,1fr))!important}}
@media(max-width:820px){.library-filters.open{display:grid!important;grid-template-columns:1fr 1fr!important;overflow:visible!important}.filter-actions,.sort-filter{grid-column:auto!important}}
@media(max-width:520px){.library-filters.open{grid-template-columns:1fr!important}.filter-actions,.sort-filter{grid-column:1!important}}

/* V8.4 poster: only the configured image, no CSS overlay */
.poster-placeholder--overlay,
.poster-placeholder,
.poster-placeholder__icon,
.summary-poster--placeholder{display:none!important}
.poster-placeholder-image,
.summary-poster--placeholder-image{display:block;width:100%;height:100%;object-fit:cover;background:#17191d}

/* Unified filter controls */
.filter-field select,
.multi-filter__toggle{
    appearance:none;
    -webkit-appearance:none;
    height:38px!important;
    border:1px solid #393939!important;
    border-radius:5px!important;
    background:#242424!important;
    color:#d4d4d4!important;
    padding:0 34px 0 11px!important;
    font-size:11px!important;
}
.filter-field{position:relative}
.filter-field:after{
    content:"";position:absolute;right:12px;bottom:14px;width:6px;height:6px;
    border-right:1px solid #999;border-bottom:1px solid #999;transform:rotate(45deg);pointer-events:none
}
.multi-filter__toggle{padding-right:10px!important}
.multi-filter__menu{min-width:260px}
.multi-filter__options{max-height:265px}
.anime-extra-filter .multi-filter__menu{min-width:230px}

/* Media actions */
.media-actions{display:flex;align-items:flex-start;gap:9px;flex-wrap:wrap;margin-top:17px}
.subscribe-button,.list-menu__toggle{
    min-height:42px!important;border-radius:5px!important;font-size:12px!important;font-weight:400!important
}
.subscribe-button span,.list-menu__toggle span{font-weight:400!important}
.subscribe-button.active{border-color:var(--accent)!important;background:rgba(229,160,13,.1)!important;color:#f0b429!important}
.list-menu__dropdown button{font-weight:400!important}
.description-box.is-collapsible:not(.expanded) .summary-description{
    display:-webkit-box;-webkit-line-clamp:5;-webkit-box-orient:vertical;overflow:hidden
}
.description-toggle{
    margin-top:7px;padding:0;border:0;background:transparent;color:var(--accent);
    display:flex;align-items:center;gap:5px;font-size:10px
}
.description-toggle .lucide{width:14px;transition:transform .2s}

.form-alert{padding:11px 13px;border-radius:5px;font-size:11px}.form-alert.error{background:#5a2929;color:#ffb5b5}.form-alert.success{background:#23472f;color:#a6e8b8}

.form-message{display:flex;align-items:flex-start;gap:8px;margin-bottom:16px}.form-message .lucide{width:16px;min-width:16px}
.lucide{width:20px;height:20px;display:block}

/* V8.6 - configured image is the only poster placeholder */
.media-poster .poster-placeholder-image,
.summary-poster--placeholder-image{
 display:block!important;width:100%!important;height:100%!important;object-fit:cover!important;
 border:0!important;box-shadow:none!important;background:transparent!important;
}
.media-poster>.poster-placeholder,
.media-poster>.poster-placeholder--overlay,
.media-poster>.poster-placeholder__icon{display:none!important}

/* V8.7 */
.profile-card-head{display:flex;align-items:center;gap:14px;padding:20px;border-bottom:1px solid #303030}.profile-large-avatar{width:58px;height:58px;border-radius:50%;display:grid;place-items:center;background:var(--avatar);color:#fff}.profile-card-head h2{margin:0;font-size:20px}.profile-card-head p{margin:4px 0 0;color:#777}.profile-form-grid{padding:18px;display:grid;grid-template-columns:1fr 1fr;gap:14px}.profile-form-grid label{display:grid;gap:7px}.profile-form-grid label span{font-size:9px;color:#777;text-transform:uppercase}.profile-form-grid input{height:42px;border:1px solid #3a3a3a;border-radius:5px;background:#242424;color:#fff;padding:0 12px}.profile-form-grid .wide{grid-column:1/-1}
.provider-panel{background:#1d1d1d!important}.provider-list{gap:7px!important}
@media(max-width:820px){.plex-topbar{overflow:hidden}.global-search{max-width:100%;height:38px;flex:1;min-width:0}.global-search input{font-size:16px!important}.user-button strong{display:none}.profile-form-grid{grid-template-columns:1fr}.profile-form-grid .wide{grid-column:1}.provider-panel{width:calc(100% - 24px)!important}}

.single-filter{position:relative;display:grid;gap:6px;min-width:0}.single-filter__menu{min-width:250px}.single-option{width:100%;min-height:36px;border:0;border-radius:4px;background:transparent;color:#bbb;padding:0 9px;display:flex;align-items:center;justify-content:space-between;text-align:left}.single-option:hover{background:#333;color:#fff}.single-option .lucide{width:15px;opacity:0;color:var(--accent)}.single-option.active{background:rgba(229,160,13,.09);color:#fff}.single-option.active .lucide{opacity:1}

/* V8.8 clean authentication */
.simple-auth-screen{background:#101216}
.simple-auth-screen .auth-backdrop{background:radial-gradient(circle at 30% 15%,rgba(229,160,13,.10),transparent 35%),linear-gradient(135deg,#111318,#0d1014)}
.auth-panel--setup{width:min(460px,100%)}
.auth-wordmark{margin-bottom:26px;font-size:20px;font-weight:800;letter-spacing:.02em}.auth-wordmark span{color:var(--accent)}
.simple-auth-screen .auth-panel{padding:38px;border-radius:10px;box-shadow:0 28px 80px rgba(0,0,0,.45)}
.simple-auth-screen .auth-panel h1{margin:6px 0 8px;font-size:28px}.simple-auth-screen .auth-panel>p{margin:0 0 25px;color:#858585}
.simple-auth-screen .auth-submit{margin-top:6px}

/* V8.8 clean empty states */
.empty-library--clean{min-height:420px}.empty-library--clean>i{display:none!important}

/* Account page */
.account-page--centered{width:min(1200px,100%)!important;max-width:1200px!important;margin:0 auto!important;padding:28px 32px!important}
.account-grid{display:grid;grid-template-columns:minmax(0,1fr) 360px;gap:16px;align-items:start}
.account-card{background:#1c1c1c;border:1px solid #2c2c2c;border-radius:10px;overflow:hidden}
.account-card--security{display:flex;flex-direction:column;min-height:100%}
.profile-card-head{display:flex;align-items:center;gap:14px;padding:22px 24px;border-bottom:1px solid #2c2c2c}
.profile-large-avatar{width:58px;height:58px;min-width:58px;border-radius:50%;display:grid;place-items:center;background:var(--avatar);color:#fff}
.profile-card-head h2{margin:0;font-size:18px;color:#f0f0f0}
.profile-card-head p{margin:4px 0 0;color:#888;font-size:12px}
.profile-section{padding:22px 24px}
.profile-section h3{margin:0 0 15px;font-size:13px;color:#eee}
.account-card__hint{margin:-8px 0 16px;font-size:11px;color:#777}
.profile-form-grid{padding:0;display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:14px}
.profile-form-grid label,.profile-form-grid .field-control,.profile-form-grid .compact-field,.profile-form-grid .color-picker{min-width:0}
.profile-form-grid--single{grid-template-columns:1fr}
.profile-form-grid label{display:grid;gap:7px}
.profile-form-grid label span{font-size:10px;color:#777;text-transform:uppercase;letter-spacing:.05em}
.profile-form-grid input{height:42px;border:1px solid #3a3a3a;border-radius:5px;background:#242424;color:#fff;padding:0 12px;box-sizing:border-box}
.profile-form-grid .field-control input{height:auto;border:0;background:none;padding:0;color:white}
.profile-form-grid .compact-field input{height:38px;border:1px solid #343434;background:#252525;color:#ddd}
.profile-form-grid .wide{grid-column:1/-1}
.account-card__footer{margin-top:auto;padding:0 24px 24px;display:flex}
.account-save{width:100%;height:44px;border:1px solid #3a3a3a;border-radius:6px;background:#242424;color:#e8e8e8;font-weight:600;font-size:13px;display:flex;align-items:center;justify-content:center;gap:8px;cursor:pointer}
.account-save:hover{border-color:#555;background:#2a2a2a}

@media(max-width:900px){
 .account-grid{grid-template-columns:1fr}
}
@media(max-width:820px){
 .simple-auth-screen .auth-panel{padding:26px 20px}
 .account-page--centered{padding:16px!important}
 .profile-section,.profile-card-head{padding:18px}
 .profile-form-grid{grid-template-columns:1fr}
 .account-card__footer{padding:0 18px 18px}
}


/* V8.9 error page */
.error-page{min-height:calc(100vh - var(--topbar));display:grid;place-items:center;padding:28px!important}
.error-card{width:min(520px,100%);padding:48px 40px;text-align:center;background:#1c1c1c;border:1px solid #2c2c2c;border-radius:14px;box-shadow:0 25px 75px rgba(0,0,0,.35)}
.error-code{font-size:58px;font-weight:900;letter-spacing:-.02em;color:#3a3a3a;line-height:1}
.error-icon{width:64px;height:64px;margin:16px auto 22px;border-radius:16px;display:grid;place-items:center;background:#242424;border:1px solid #333;color:#888}.error-icon .lucide{width:28px;height:28px}
.error-card h1{margin:0 0 10px;font-size:22px;color:#f0f0f0}.error-card p{margin:0;color:#8a8a8a;font-size:13px;line-height:1.5}
.error-actions{margin-top:28px;display:flex;justify-content:center;gap:10px}.error-actions>*{height:42px;padding:0 18px;border-radius:7px;display:flex;align-items:center;gap:8px;font-size:13px;font-weight:600}
.error-primary{background:#242424;border:1px solid #3a3a3a;color:#e8e8e8}.error-primary:hover{background:#2a2a2a;border-color:#555}
.error-secondary{border:1px solid #3a3a3a;background:transparent;color:#ccc}.error-secondary:hover{border-color:#555;color:#fff}

/* V8.9 clean contextual empty states */
.empty-library--clean{min-height:360px;display:grid;place-items:center;align-content:center;gap:8px;text-align:center}
.empty-state-icon{width:58px;height:58px;border-radius:50%;display:grid;place-items:center;background:#232323;color:#777;margin-bottom:4px}.empty-state-icon .lucide{width:26px;height:26px}
.empty-library--clean h2{margin:0;font-size:19px}.empty-library--clean p{margin:0;color:#777;font-size:11px}.empty-state-action{margin-top:9px;height:36px;padding:0 13px;border-radius:5px;background:#292929;border:1px solid #3a3a3a;display:flex;align-items:center;color:#ddd;font-size:10px}

/* V8.9 no artwork media page */
.watch-summary--no-art{min-height:340px!important;background:linear-gradient(135deg,#191919,#121212)!important}
.watch-summary--no-art .watch-summary__overlay{background:radial-gradient(circle at 15% 30%,rgba(229,160,13,.07),transparent 34%)}
.watch-summary--no-art .summary-poster--placeholder-image{object-fit:cover!important;background:#17191d!important}

/* V8.9 filter search and mobile layout */
.multi-option[hidden]{display:none!important}.multi-filter__search{position:sticky;top:0;z-index:2;background:#252525}.multi-filter__search input{display:block!important;opacity:1!important;pointer-events:auto!important}
@media(max-width:820px){
 .library-view{padding-left:12px!important;padding-right:12px!important}
 .library-titlebar{align-items:flex-start}.view-actions{display:none!important}
 .mobile-filter-bar{display:flex!important;margin-bottom:10px}
 .library-filters{display:none!important;grid-template-columns:1fr!important;gap:10px!important;padding:12px!important;overflow:visible!important}
 .library-filters.open{display:grid!important}
 .library-filters .single-filter,.library-filters .multi-filter,.library-filters .sort-filter{width:100%!important;grid-column:1!important}
 .multi-filter__menu,.single-filter__menu{position:fixed!important;left:10px!important;right:10px!important;top:72px!important;width:auto!important;min-width:0!important;max-height:calc(100vh - 90px)!important;border-radius:8px!important;z-index:500!important}
 .multi-filter__options{max-height:calc(100vh - 180px)!important}
 .filter-actions{grid-column:1!important;width:100%}.filter-reset{width:100%;justify-content:center}
 .watch-summary--no-art{padding-top:0!important}
 .watch-summary--no-art .watch-summary__inner{padding-top:22px!important}
 .watch-summary--no-art .summary-poster--placeholder-image{display:block!important;width:132px!important;height:198px!important;margin:0 0 18px!important;border-radius:6px!important}
 .error-page{padding:14px!important}.error-card{padding:30px 20px}
}

/* V9.0 mobile search */
@media(max-width:820px){
 .plex-topbar{padding:0 8px!important;gap:6px!important;overflow:visible!important}
 .plex-topbar .plex-brand{display:none!important}
 .plex-brand--sidebar{display:flex!important}
 .topbar-spacer{flex:0 0 0!important;min-width:0!important}
 .global-search{width:auto!important;flex:1!important;min-width:0!important;height:34px!important;padding:0 10px!important}
 .global-search input{font-size:13px!important}
 .user-button{width:38px!important;padding:0!important;justify-content:center!important}.user-button>strong,.user-button>.lucide:last-child{display:none!important}
}

/* V9.0 explicit filter apply */
.filter-reset{border:1px solid #3a3a3a!important;background:#262626!important;color:#bbb!important;height:38px!important;border-radius:5px!important;padding:0 15px!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;gap:7px!important;font-size:11px!important}
.filter-reset .lucide{width:15px!important;height:15px!important}

/* V9.0 icon alignment */
.empty-state-icon{display:grid!important;place-items:center!important}
.empty-state-icon .lucide,.popover-empty>.lucide{margin:0!important}

/* V9.0 player source selector */
.provider-panel{background:#1b1b1b!important;border:1px solid #303030!important;border-radius:8px!important;padding:0!important;overflow:hidden!important}
.provider-panel__head{min-height:68px!important;padding:14px 15px!important;border-bottom:1px solid #303030!important;display:flex!important;align-items:center!important;justify-content:space-between!important}
.provider-panel__head h2{margin:0!important;font-size:14px!important}
.provider-list{display:grid!important;gap:8px!important;padding:10px!important}
@media(max-width:1280px){.provider-list{grid-template-columns:repeat(auto-fit,minmax(220px,1fr))!important}}
@media(max-width:720px){.provider-panel{width:calc(100% - 20px)!important;margin:10px!important}.provider-list{grid-template-columns:1fr!important}.provider-panel__head{min-height:58px!important}}

/* V9.0 mobile filters */
@media(max-width:820px){
 .library-filters.open{display:grid!important;grid-template-columns:1fr!important;gap:10px!important;padding:12px!important}
 .filter-actions{grid-column:1!important;display:grid!important;grid-template-columns:1fr 1fr!important;width:100%!important}
 .filter-apply,.filter-reset{width:100%!important}
 .multi-filter__menu,.single-filter__menu{top:64px!important;left:8px!important;right:8px!important;max-height:calc(100dvh - 78px)!important}
}

/* V9.1 unified media header */
.watch-summary{min-height:405px!important;background-color:#151515!important}
.watch-summary--no-art{min-height:405px!important;background:radial-gradient(circle at 18% 28%,rgba(229,160,13,.10),transparent 34%),linear-gradient(115deg,#202020 0%,#151515 58%,#111 100%)!important}
.watch-summary--no-art .watch-summary__overlay{background:linear-gradient(90deg,rgba(15,15,15,.18),rgba(15,15,15,.3))!important}
.watch-summary__inner{max-width:1400px!important;margin:0 auto!important;width:100%!important;align-items:center!important}
.summary-poster,.summary-poster--placeholder-image{width:190px!important;height:285px!important;min-width:190px!important;object-fit:cover!important;border-radius:6px!important;box-shadow:0 18px 55px rgba(0,0,0,.42)!important}
.summary-copy{max-width:900px!important;padding-top:8px!important}
.genre-chips{margin-top:15px!important;margin-bottom:8px!important;display:flex!important;flex-wrap:wrap!important;gap:7px!important}
.genre-chips a{min-height:27px!important;padding:0 10px!important;display:inline-flex!important;align-items:center!important;border-radius:4px!important}
.description-toggle{margin-top:10px!important;min-height:34px!important;padding:0 12px!important;border:1px solid #393939!important;border-radius:5px!important;background:#252525!important;color:#ddd!important;font-size:11px!important;cursor:pointer!important}
.description-toggle:hover{border-color:#555!important;background:#2c2c2c!important;color:#fff!important}
.description-toggle .lucide{width:15px!important;height:15px!important}.description-toggle.expanded .lucide{transform:rotate(180deg)!important}.media-actions{margin-top:18px!important}
.sidebar-nav .nav-link[data-nav-path="/subscriptions"]{margin-top:2px}
.users-page{max-width:1280px!important;margin:0 auto!important;padding:28px!important}.user-card{border-radius:8px!important;overflow:hidden!important}.user-card__identity{padding:18px 20px!important}.user-card__fields.profile-form-grid{padding:18px 20px!important;display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:12px!important}.user-card__fields label{display:grid!important;gap:6px!important}.user-card__fields label span{font-size:9px!important;color:#777!important;text-transform:uppercase!important}.user-card__fields input,.user-card__fields select{height:40px!important;border:1px solid #393939!important;border-radius:5px!important;background:#252525!important;color:#fff!important;padding:0 10px!important}.app-modal .modal-panel{width:min(720px,calc(100vw - 24px))!important;border-radius:8px!important}.app-modal .modal-body.profile-form-grid{display:grid!important;grid-template-columns:1fr 1fr!important;gap:13px!important;padding:18px!important}
@media(max-width:820px){.watch-summary,.watch-summary--no-art{min-height:0!important}.watch-summary__inner{display:grid!important;grid-template-columns:108px minmax(0,1fr)!important;gap:14px!important;padding:18px 12px 16px!important;align-items:start!important}.summary-poster,.summary-poster--placeholder-image{width:108px!important;height:162px!important;min-width:108px!important;margin:0!important}.summary-copy{min-width:0!important;padding:0!important}.summary-copy h1{font-size:25px!important;line-height:1.06!important}.summary-description{font-size:12px!important;line-height:1.55!important}.description-box,.genre-chips,.media-actions{grid-column:1/-1!important}.description-toggle{width:100%!important;justify-content:center!important;min-height:40px!important}.media-actions{display:grid!important;grid-template-columns:1fr!important;width:100%!important}.list-menu,.list-menu__toggle{width:100%!important}.users-page{padding:14px!important}.user-card__fields.profile-form-grid{grid-template-columns:1fr!important;padding:14px!important}.app-modal .modal-body.profile-form-grid{grid-template-columns:1fr!important}}

/* V9.2 compact single-select mobile filters */
.desktop-filter-grid{display:grid;grid-template-columns:minmax(140px,.8fr) repeat(3,minmax(165px,1fr)) minmax(220px,1.25fr) auto;gap:10px;align-items:end;width:100%}.library-filters--single{display:block!important;padding:12px!important}.library-filters--single .filter-actions{display:flex;gap:8px;align-items:center}.mobile-filter-sheet{display:none}
@media(max-width:820px){.view-actions{display:none!important}.library-filters--single{display:block!important;padding:0!important;background:transparent!important;border:0!important}.desktop-filter-grid{display:none!important}.mobile-filter-bar{display:flex!important;margin:0 0 10px}.mobile-filter-toggle{height:38px!important;padding:0 13px!important;border-radius:6px!important;background:#292929!important;border:1px solid #3b3b3b!important;color:#fff!important;display:flex!important;align-items:center!important;gap:8px!important}.mobile-filter-toggle .lucide{width:16px;height:16px}.mobile-filter-sheet{display:block;position:fixed;inset:0;z-index:1200;background:rgba(0,0,0,.58);opacity:0;visibility:hidden;transition:.18s}.mobile-filter-sheet.open{opacity:1;visibility:visible}.mobile-filter-panel{display:none;position:absolute;left:10px;right:10px;top:max(10px,env(safe-area-inset-top));max-height:calc(100dvh - 20px);background:#fff;color:#171717;border-radius:12px;overflow:hidden;box-shadow:0 24px 80px rgba(0,0,0,.5);grid-template-rows:auto minmax(0,1fr) auto}.mobile-filter-panel.active{display:grid}.mobile-filter-panel header{height:52px;padding:0 12px;border-bottom:1px solid #eee;display:grid;grid-template-columns:36px 1fr 36px;align-items:center}.mobile-filter-panel--main header{grid-template-columns:1fr 36px}.mobile-filter-panel header strong{font-size:15px}.mobile-filter-panel header button{width:34px;height:34px;border:0;border-radius:50%;background:#f0f0f0;color:#777;display:grid;place-items:center}.mobile-filter-panel header .lucide{width:18px;height:18px}.mobile-filter-rows{padding:4px 0}.mobile-filter-rows>button{width:100%;min-height:48px;padding:0 14px;border:0;background:#fff;color:#171717;display:grid;grid-template-columns:110px minmax(0,1fr) 18px;align-items:center;text-align:left;border-bottom:1px solid #f2f2f2}.mobile-filter-rows span{font-size:14px}.mobile-filter-rows em{font-style:normal;color:#777;font-size:13px;text-align:right;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mobile-filter-rows .lucide{width:17px;color:#999}.mobile-filter-panel footer{padding:10px 12px calc(10px + env(safe-area-inset-bottom));border-top:1px solid #eee;display:grid;grid-template-columns:1fr 1.4fr;gap:9px;background:#fff}.mobile-filter-reset,.mobile-filter-apply{height:44px;border-radius:7px;display:grid;place-items:center;font-size:14px;font-weight:600}.mobile-filter-reset{border:1px solid #ddd;color:#555;background:#fff}.mobile-filter-apply{border:0;background:var(--accent);color:#111}.mobile-filter-options{overflow-y:auto;overscroll-behavior:contain;padding:4px 0;max-height:calc(100dvh - 72px)}.mobile-filter-option{width:100%;min-height:44px;padding:0 14px;border:0;background:#fff;color:#222;display:flex;align-items:center;justify-content:space-between;text-align:left;border-bottom:1px solid #f5f5f5;font-size:14px}.mobile-filter-option .lucide{width:18px;height:18px;color:#ff5a1f;opacity:0}.mobile-filter-option.active .lucide{opacity:1}.mobile-filter-option.active{font-weight:600}body.filter-sheet-open{overflow:hidden}}
@media(min-width:821px){.mobile-filter-bar{display:none!important}}


/* MEDIAX V9.3 - left aligned hero and redesigned source selector */
.watch-summary__inner{
    max-width:none!important;
    margin:0!important;
    width:100%!important;
    padding-left:32px!important;
    padding-right:32px!important;
    justify-content:flex-start!important;
}
.summary-copy{
    max-width:min(980px,calc(100vw - 520px))!important;
    margin:0!important;
}
.watch-summary__overlay{
    background:
      linear-gradient(90deg,rgba(15,15,15,.98) 0%,rgba(15,15,15,.91) 35%,rgba(15,15,15,.52) 67%,rgba(15,15,15,.2) 100%),
      linear-gradient(0deg,var(--bg) 0%,transparent 38%)!important;
}
.watch-summary--no-art .watch-summary__overlay{
    background:linear-gradient(90deg,rgba(15,15,15,.25),rgba(15,15,15,.05))!important;
}
.watch-player-grid{
    grid-template-columns:minmax(0,1fr) 250px!important;
    gap:14px!important;
    align-items:start!important;
}
.provider-panel{
    background:#191919!important;
    border:1px solid #303030!important;
    border-radius:6px!important;
    box-shadow:none!important;
    overflow:hidden!important;
}
.provider-panel__head{
    min-height:58px!important;
    padding:11px 12px!important;
    border-bottom:1px solid #2d2d2d!important;
    background:#1d1d1d!important;
}
.provider-panel__title{
    display:flex!important;
    align-items:center!important;
    gap:9px!important;
}
.provider-panel__title>.lucide{
    width:17px!important;
    height:17px!important;
    color:var(--accent)!important;
}
.provider-panel__title h2{
    margin:0!important;
    font-size:12px!important;
    line-height:1.15!important;
}
.provider-panel__title span{
    display:block!important;
    margin-top:3px!important;
    font-size:8px!important;
    color:#737373!important;
}
.provider-count{
    width:24px!important;
    height:24px!important;
    font-size:9px!important;
    background:#292929!important;
}
.provider-list{
    display:grid!important;
    grid-template-columns:1fr!important;
    gap:0!important;
    padding:5px!important;
}
.provider-tab{
    width:100%!important;
    min-height:52px!important;
    padding:7px 8px!important;
    border:0!important;
    border-radius:4px!important;
    background:transparent!important;
    display:grid!important;
    grid-template-columns:34px minmax(0,1fr) 22px!important;
    gap:9px!important;
    box-shadow:none!important;
}
.provider-tab+.provider-tab{
    border-top:1px solid #292929!important;
    border-radius:0!important;
}
.provider-tab:hover{
    background:#242424!important;
}
.provider-tab.active{
    background:#28251d!important;
    box-shadow:inset 2px 0 0 var(--accent)!important;
}
.provider-logo{
    width:34px!important;
    height:34px!important;
    border-radius:4px!important;
    background:#2c2c2c!important;
    font-size:12px!important;
}
.provider-copy strong{
    font-size:10px!important;
    letter-spacing:.02em!important;
}
.provider-copy small{
    font-size:8px!important;
    color:#707070!important;
}
.provider-radio{
    width:17px!important;
    height:17px!important;
    border-radius:50%!important;
    border:1px solid #555!important;
    display:grid!important;
    place-items:center!important;
}
.provider-radio span{
    width:7px!important;
    height:7px!important;
    border-radius:50%!important;
    background:transparent!important;
}
.provider-tab.active .provider-radio{
    border-color:var(--accent)!important;
}
.provider-tab.active .provider-radio span{
    background:var(--accent)!important;
}
.provider-state{display:none!important}

@media(max-width:1180px){
    .watch-player-grid{grid-template-columns:1fr!important}
    .provider-panel{order:-1!important}
    .provider-list{grid-template-columns:repeat(auto-fit,minmax(180px,1fr))!important;gap:5px!important}
    .provider-tab+.provider-tab{border-top:0!important;border-radius:4px!important}
}
@media(max-width:820px){
    .watch-summary__inner{
        padding-left:12px!important;
        padding-right:12px!important;
    }
    .summary-copy{max-width:none!important}
    .watch-player-section{padding-left:0!important;padding-right:0!important}
    .provider-panel{width:calc(100% - 20px)!important;margin:10px!important}
    .provider-list{grid-template-columns:1fr!important}
}


/* MEDIAX V9.5 */
:root{--native-panel:#202020;--native-border:#393939;--native-text:#e7e7e7}
*{scrollbar-width:thin;scrollbar-color:#747474 #1b1b1b}
*::-webkit-scrollbar{width:9px;height:9px}*::-webkit-scrollbar-track{background:#1b1b1b}*::-webkit-scrollbar-thumb{background:#707070;border:2px solid #1b1b1b;border-radius:8px}

/* Native filters only */
.native-filters{display:flex!important;flex-wrap:wrap;gap:10px!important;align-items:center!important;padding:0!important;background:transparent!important;border:0!important;overflow:visible!important}
.native-filter-head{display:none}

/* Authoritative override: this file has decades of clashing !important rules
   from older filter layouts (.library-filters.open, .desktop-filter-grid, etc.)
   that also match this same <form id="libraryFilters" class="library-filters native-filters">.
   An ID selector outranks all of them regardless of source order, so pin the
   real layout here instead of chasing every legacy rule that might collide. */
#libraryFilters.native-filters{display:flex!important;flex-wrap:wrap!important;grid-template-columns:none!important}
#libraryFilters.native-filters .filter-pill{display:flex!important;width:190px!important;flex:0 0 190px!important;height:auto!important;min-height:0!important}
#libraryFilters.native-filters .filter-pill__menu{position:absolute!important}
@media(max-width:820px){
    #libraryFilters.native-filters{display:none!important}
    #libraryFilters.native-filters.open{display:grid!important;grid-template-columns:1fr 1fr!important;gap:10px!important}
    #libraryFilters.native-filters.open .filter-pill{width:100%!important;flex:none!important}
    #libraryFilters.native-filters.open .filter-pill--wide,
    #libraryFilters.native-filters.open .native-filter-actions{grid-column:1/-1!important}
}

/* Custom searchable filter dropdown */
.filter-pill{position:relative;display:flex;align-items:center;width:190px;flex:0 0 190px}
.filter-pill__btn{
    width:100%;height:42px;min-width:0;padding:0 34px 0 16px;
    border:1px solid #3a3a3a;border-radius:7px;background:#242424;color:#ddd;
    font-size:14px;font-weight:500;display:flex;align-items:center
}
.filter-pill__btn span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.filter-pill__btn:hover,.filter-pill__btn.is-open{border-color:#555;background:#292929}
.filter-pill__btn .lucide{position:absolute;right:12px;width:16px;height:16px;color:#8a8a8a;transition:transform .15s}
.filter-pill__btn.is-open .lucide{transform:rotate(180deg)}
.filter-pill__menu{
    position:absolute;top:48px;left:0;z-index:120;width:100%;
    background:#242428;border:1px solid #3d3d42;border-radius:8px;
    box-shadow:0 18px 45px rgba(0,0,0,.5);overflow:hidden
}
.filter-pill__search{display:flex;align-items:center;gap:8px;padding:10px 12px;border-bottom:1px solid #333338}
.filter-pill__search .lucide{width:15px;height:15px;color:#8a8a8a}
.filter-pill__search input{flex:1;min-width:0;border:0;outline:0;background:transparent;color:#eee;font-size:14px}
.filter-pill__search input::placeholder{color:#777}
.filter-pill__options{max-height:260px;overflow-y:auto;padding:6px}
.filter-pill__option{width:100%;min-height:38px;padding:0 10px;border:0;border-radius:5px;background:transparent;color:#c9c9c9;font-size:14px;text-align:left;display:flex;align-items:center;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.filter-pill__option:hover{background:#323238;color:#fff}
.filter-pill__option.active{background:rgba(229,160,13,.12);color:var(--accent)}
.filter-pill__empty{padding:16px 12px;text-align:center;color:#777;font-size:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

.native-filter-actions{display:flex!important;gap:8px!important}
.native-filter-actions .filter-reset,.native-filter-actions .filter-apply{height:42px!important;padding:0 16px!important;border-radius:7px!important;display:inline-flex!important;align-items:center!important;gap:6px!important;font-size:14px!important;font-weight:500!important}
.native-filter-actions .filter-reset{border:1px solid #3b3b3b!important;background:transparent!important;color:#aaa!important}
.native-filter-actions .filter-reset:hover{border-color:#555!important;color:#fff!important}
.native-filter-actions .filter-apply{border:0!important;background:var(--accent)!important;color:#111!important;font-weight:700!important;justify-content:center!important}
.native-filter-actions .filter-apply:hover{background:var(--accent-hover)!important}
.native-filter-actions .filter-reset .lucide,.native-filter-actions .filter-apply .lucide{width:14px!important;height:14px!important}

/* Same hero layout with and without real poster */
.watch-summary,.watch-summary--placeholder{min-height:405px!important;background-color:#151515!important;background-image:linear-gradient(90deg,rgba(16,16,16,.96) 0%,rgba(16,16,16,.78) 42%,rgba(16,16,16,.25) 100%),var(--hero)!important;background-size:cover!important;background-position:center!important}
.watch-summary--placeholder{background-image:linear-gradient(90deg,#171717 0%,#171717 48%,#121212 100%)!important}
.watch-summary__inner{max-width:none!important;width:100%!important;margin:0!important;padding:44px 54px!important;display:grid!important;grid-template-columns:180px minmax(0,860px)!important;gap:28px!important;align-items:center!important;justify-content:start!important}
.summary-poster,.summary-poster--placeholder-image{width:180px!important;height:270px!important;min-width:180px!important;object-fit:cover!important;border-radius:6px!important;margin:0!important;box-shadow:0 14px 34px rgba(0,0,0,.42)!important}
.summary-copy{min-width:0!important}.summary-copy h1{font-size:34px!important;line-height:1.08!important}.genre-chips{margin-top:14px!important}.media-actions{margin-top:18px!important}

/* Neutral player selector */
.watch-player-section{padding:18px 26px 28px!important;overflow:hidden!important}.watch-player-grid{width:100%!important;max-width:none!important;margin:0!important;display:grid!important;grid-template-columns:minmax(0,1fr) 240px!important;gap:14px!important;align-items:stretch!important}.player-main{min-width:0!important}.player-frame{width:100%!important;aspect-ratio:16/9!important;border:1px solid #303030!important;border-radius:7px!important;overflow:hidden!important;background:#000!important}
.provider-panel{width:240px!important;min-width:0!important;border:1px solid #323232!important;border-radius:7px!important;background:#1d1d1d!important;overflow:hidden!important}.provider-panel__head{min-height:62px!important;padding:12px 13px!important;border-bottom:1px solid #303030!important;display:flex!important;align-items:center!important;justify-content:space-between!important}.provider-panel__head h2{margin:0!important;font-size:13px!important;font-weight:600!important;color:#eee!important}.provider-panel__head span{display:block!important;margin-top:3px!important;font-size:9px!important;color:#777!important}.provider-count{width:24px!important;height:24px!important;margin:0!important;border-radius:50%!important;background:#2b2b2b!important;color:#aaa!important;display:grid!important;place-items:center!important;font-size:9px!important}.provider-list{max-height:calc(100% - 62px)!important;padding:7px!important;overflow:auto!important}.provider-tab{width:100%!important;min-height:54px!important;padding:7px 9px!important;border:1px solid transparent!important;border-radius:6px!important;background:transparent!important;color:#d5d5d5!important;display:grid!important;grid-template-columns:34px minmax(0,1fr) 18px!important;align-items:center!important;gap:9px!important;text-align:left!important}.provider-tab:hover{background:#292929!important}.provider-tab.active{border-color:#505050!important;background:#303030!important;box-shadow:none!important}.provider-logo{width:34px!important;height:34px!important;border-radius:6px!important;background:#242424!important;color:#ddd!important;display:grid!important;place-items:center!important;font-size:12px!important;font-weight:700!important}.provider-copy{min-width:0!important}.provider-copy strong{display:block!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;font-size:10px!important;font-weight:600!important;color:#eee!important}.provider-copy small{display:block!important;margin-top:3px!important;font-size:8px!important;font-weight:400!important;color:#777!important}.provider-tab>.lucide{width:16px!important;color:#bbb!important;opacity:0!important}.provider-tab.active>.lucide{opacity:1!important}

@media(max-width:1100px){.native-filters{grid-template-columns:repeat(3,minmax(0,1fr))!important}.native-filter-actions{grid-column:span 1!important}.watch-player-grid{grid-template-columns:minmax(0,1fr)!important}.provider-panel{width:100%!important}.provider-list{display:flex!important;overflow-x:auto!important;overflow-y:hidden!important}.provider-tab{min-width:170px!important;flex:0 0 170px!important}}
@media(max-width:820px){.mobile-filter-bar{display:flex!important}.native-filters{display:none!important;flex-wrap:wrap!important;gap:10px!important;padding:14px!important;margin:0 0 16px!important;background:#1a1a1a!important;border:1px solid #2c2c2c!important;border-radius:10px!important}.native-filters.open{display:flex!important}.native-filter-head{display:none!important}.native-filters>.native-filter-actions{width:100%!important;display:flex!important;gap:10px!important;margin-top:2px!important}.watch-summary,.watch-summary--placeholder{min-height:0!important;background-position:center top!important}.watch-summary__inner{padding:18px 12px 16px!important;grid-template-columns:105px minmax(0,1fr)!important;gap:13px!important;align-items:start!important}.summary-poster,.summary-poster--placeholder-image{width:105px!important;height:158px!important;min-width:105px!important}.summary-copy h1{font-size:23px!important}.description-box,.genre-chips,.media-actions{grid-column:1/-1!important}.watch-player-section{padding:9px 7px 16px!important}.provider-panel{order:-1!important}.provider-list{padding:6px!important}.player-frame{border-radius:5px!important}.plex-sidebar{scrollbar-color:#777 #191919!important}}

/* ==========================================================
   MEDIAX V9.6 - independent content scrolling within the shell
   ========================================================== */
html,body{
    height:100%;
    overflow:hidden!important;
}
.ajax-stage{
    scrollbar-gutter:stable;
}

/* V9.7 fixes */
.watch-summary{min-height:430px!important;background-image:linear-gradient(90deg,rgba(12,12,12,.98) 0%,rgba(12,12,12,.82) 46%,rgba(12,12,12,.35) 100%),var(--hero)!important;background-size:cover!important;background-position:center!important}
.watch-summary--placeholder{background-image:linear-gradient(90deg,rgba(12,12,12,.98),rgba(12,12,12,.78)),var(--hero)!important}
.watch-summary__inner,.watch-player-section,.media-details{width:100%!important;max-width:1600px!important;margin-inline:auto!important}
.watch-player-section{padding:16px 22px 24px!important}
.watch-player-grid{grid-template-columns:minmax(0,1fr) 220px!important;gap:12px!important}
.media-details{padding-left:22px!important;padding-right:22px!important;box-sizing:border-box!important}
.provider-panel{width:220px!important}.provider-panel__head{justify-content:flex-start!important}.provider-panel__head>div{width:100%!important}
.provider-tab>.lucide{display:none!important}
.native-filters{grid-template-columns:repeat(5,minmax(130px,1fr)) auto!important;max-width:100%!important;overflow:visible!important}
.native-filter-field select{width:100%!important;min-width:0!important;font-size:12px!important;font-weight:400!important}
.native-filter-actions{white-space:nowrap!important}
@media(max-width:1200px) and (min-width:821px){.native-filters{grid-template-columns:repeat(3,minmax(0,1fr))!important}.native-filter-actions{grid-column:1/-1!important;justify-content:flex-end!important}}
@media(max-width:820px){
 .filter-pill__menu{max-height:60vh!important}
 .filter-pill__options{max-height:calc(60vh - 50px)!important}
 .native-filter-actions .filter-reset,.native-filter-actions .filter-apply{width:100%!important;height:46px!important;justify-content:center!important;font-size:13px!important}
 .watch-summary{min-height:0!important;background-position:center top!important}
 .watch-summary__inner{display:grid!important;grid-template-columns:112px minmax(0,1fr)!important;gap:14px!important;padding:18px 12px!important;align-items:start!important}
 .summary-poster,.summary-poster--placeholder-image{display:block!important;width:112px!important;height:168px!important;min-width:112px!important;object-fit:cover!important;grid-row:1!important;grid-column:1!important}
 .summary-copy{grid-column:2!important;min-width:0!important}
 .summary-copy h1{font-size:22px!important;line-height:1.05!important}
 .description-box,.genre-chips,.media-actions{grid-column:1/-1!important}
 .watch-player-section{padding:0!important;width:100%!important;max-width:none!important}
 .watch-player-grid{display:flex!important;flex-direction:column!important;gap:0!important}
 .player-main{order:1!important;width:100%!important}
 .player-frame{width:100%!important;border-left:0!important;border-right:0!important;border-radius:0!important}
 .provider-panel{order:2!important;width:100%!important;margin:0!important;border-left:0!important;border-right:0!important;border-radius:0!important}
 .provider-list{display:flex!important;overflow-x:auto!important;overflow-y:hidden!important;padding:7px!important}
 .provider-tab{min-width:150px!important;flex:0 0 150px!important}
 .media-details{padding:12px 8px!important;width:100%!important}
 .mobile-filter-toggle span{font-size:12px!important}
}

/* ============================================================
   WATCH PAGE — clean redesign, scoped to #watchPage so it wins
   over every legacy V7-V9 rule above regardless of source order.
   ============================================================ */
#watchPage{width:100%!important;max-width:none!important;margin:0!important;padding:24px 32px 48px!important;box-sizing:border-box!important}

/* --- info card: poster + facts --- */
#watchPage .watch-card{display:flex!important;gap:24px!important;align-items:flex-start!important;background:#1c1c1c!important;border:1px solid #2c2c2c!important;border-radius:6px!important;padding:24px!important}
#watchPage .watch-card__poster-col{display:flex!important;flex-direction:column!important;gap:10px!important;width:220px!important;flex:0 0 220px!important}
#watchPage .watch-poster{display:block!important;width:220px!important;height:330px!important;object-fit:cover!important;border-radius:7px!important;border:1px solid #2f2f2f!important;box-shadow:0 12px 30px rgba(0,0,0,.4)!important}
#watchPage .watch-cta{
    height:42px!important;padding:0 14px!important;border:1px solid #3a3a3a!important;border-radius:6px!important;width:100%!important;box-sizing:border-box!important;
    background:#242424!important;color:#e8e8e8!important;font-weight:600!important;font-size:13px!important;white-space:nowrap!important;
    display:flex!important;align-items:center!important;justify-content:center!important;gap:8px!important;text-decoration:none!important;
}
#watchPage .watch-cta:hover{border-color:#555!important;background:#2a2a2a!important}
#watchPage .watch-cta .lucide{width:15px!important;height:15px!important}
#watchPage .list-menu.list-menu--block{margin:0!important;display:block!important;width:100%!important}
#watchPage .list-menu--block .list-menu__toggle{width:100%!important;box-sizing:border-box!important;height:42px!important;padding:0 14px!important;border:1px solid #3a3a3a!important;border-radius:6px!important;background:#242424!important;color:#e8e8e8!important;font-weight:600!important;font-size:13px!important;display:flex!important;align-items:center!important;justify-content:center!important;gap:8px!important}
#watchPage .list-menu--block .list-menu__toggle span{flex:none!important}
#watchPage .list-menu--block .list-menu__toggle:hover{border-color:#555!important;background:#2a2a2a!important}
#watchPage .list-menu--block .list-menu__toggle .lucide:last-child{width:14px!important;margin-left:2px!important}
#watchPage .list-menu--block .list-menu__dropdown{left:0!important;right:0!important;width:auto!important;background:#282828!important;border:1px solid #3a3a3a!important;border-radius:7px!important}
#watchPage .list-menu.has-selection .list-menu__toggle{border-color:var(--accent)!important;background:rgba(229,160,13,.1)!important;color:#fff!important}
#watchPage .list-menu.has-selection .list-menu__toggle .lucide:first-child{color:var(--accent)!important}
.list-menu__dropdown button span{white-space:nowrap}
.list-menu__check{width:15px;flex:none;opacity:0;color:var(--accent);margin-left:auto}
.list-menu__dropdown button.active .list-menu__check{opacity:1}
.list-menu__remove-group{display:none}
.list-menu.has-selection .list-menu__remove-group{display:block}
.list-menu__divider{height:1px;background:#383838;margin:6px 4px}
.list-menu__remove-group button{width:100%!important;box-sizing:border-box!important;color:#c98989!important}
.list-menu__remove-group button:hover{background:#3a2626!important;color:#ffb3b3!important}

#watchPage .watch-card__info{min-width:0!important;flex:1!important}
#watchPage .watch-card__info h1{font-size:24px!important;line-height:1.2!important;margin:0 0 4px!important;font-weight:800!important;color:#f2f2f2!important}
#watchPage .original-title{margin:0 0 14px!important;color:#8f8f8f!important;font-size:13px!important}
#watchPage .watch-badges{display:flex!important;flex-wrap:wrap!important;gap:8px!important;margin-bottom:16px!important}
#watchPage .watch-badges span{font-size:12px!important;font-weight:700!important;color:#ccc!important;background:transparent!important;border:1px solid #3a3a3a!important;padding:5px 11px!important;border-radius:6px!important}
#watchPage .watch-badges span.rating{border-color:rgba(155,227,123,.35)!important;color:#9be37b!important}
#watchPage .watch-facts{margin:0!important;display:grid!important}
#watchPage .watch-facts>div{display:grid!important;grid-template-columns:150px minmax(0,1fr)!important;gap:12px!important;padding:11px 0!important;border-top:1px solid #262626!important}
#watchPage .watch-facts>div:first-child{border-top:0!important}
#watchPage .watch-facts dt{font-size:13px!important;color:#7f7f7f!important;margin:0!important}
#watchPage .watch-facts dd{margin:0!important;font-size:14px!important;color:#d3d3d3!important;line-height:1.6!important}
#watchPage .watch-facts dd a{color:var(--accent)!important;text-decoration:none!important}
#watchPage .watch-facts dd a:hover{text-decoration:underline!important}

/* --- description --- */
#watchPage .watch-description{margin-top:16px!important;background:#1c1c1c!important;border:1px solid #2c2c2c!important;border-radius:6px!important;padding:20px 24px!important}
#watchPage .watch-description blockquote{margin:0 0 12px!important;padding-left:14px!important;border-left:3px solid var(--accent)!important;color:#a9a9a9!important;font-style:italic!important;font-size:13px!important}
#watchPage .summary-description{max-width:none!important;margin:0!important;color:#bbb!important;line-height:1.7!important;font-size:14px!important}
#watchPage .description-box.is-collapsible:not(.expanded) .summary-description{display:-webkit-box!important;-webkit-line-clamp:3!important;-webkit-box-orient:vertical!important;overflow:hidden!important}
#watchPage .description-toggle{margin-top:14px!important;height:36px!important;padding:0 14px!important;border:1px solid #3a3a3a!important;border-radius:6px!important;background:#242424!important;color:#ddd!important;font-size:12px!important;font-weight:600!important;display:inline-flex!important;align-items:center!important;gap:7px!important;cursor:pointer!important;transition:background .15s ease,border-color .15s ease,color .15s ease!important}
#watchPage .description-toggle:hover{border-color:#555!important;background:#2a2a2a!important;color:#fff!important}
#watchPage .description-toggle[hidden]{display:none!important}
#watchPage .description-toggle .lucide{width:14px!important;height:14px!important;transition:transform .2s!important}
#watchPage .description-toggle.expanded .lucide{transform:rotate(180deg)!important}

/* --- player --- */
#watchPage .watch-player-section{width:100%!important;max-width:none!important;margin:0 0 16px!important;margin-inline:0!important;padding:0!important;scroll-margin-top:16px!important}
#watchPage .watch-player-grid{display:grid!important;grid-template-columns:minmax(0,1fr) 260px!important;gap:16px!important;align-items:start!important}
#watchPage .player-main{min-width:0!important;width:100%!important;order:1!important}
#watchPage .player-frame{position:relative!important;display:block!important;width:100%!important;aspect-ratio:16/9!important;background:#000!important;border:0!important;border-radius:8px!important;overflow:hidden!important;box-shadow:none!important}
#watchPage .player-frame iframe,#watchPage .player-frame video{display:block!important;width:100%!important;height:100%!important;border:0!important}
#watchPage .provider-panel{position:static!important;top:auto!important;margin:0!important;width:100%!important;min-width:0!important;background:#1c1c1c!important;border:1px solid #2c2c2c!important;border-radius:6px!important;overflow:hidden!important;box-sizing:border-box!important;order:2!important;display:flex!important;flex-direction:column!important}
#watchPage .provider-panel__head{padding:14px 16px!important;border-bottom:1px solid #2c2c2c!important;flex:none!important}
#watchPage .provider-panel__head h2{margin:0!important;font-size:13px!important;font-weight:700!important;color:#eee!important}
#watchPage .provider-list{display:flex!important;flex-direction:column!important;gap:8px!important;padding:12px!important;flex:1!important;min-height:0!important;overflow-y:auto!important;scrollbar-width:none!important}
#watchPage .provider-list::-webkit-scrollbar{display:none!important;width:0!important}
#watchPage .provider-scroll{display:none;flex:none;height:26px;border:0;background:#1c1c1c;color:#888;align-items:center;justify-content:center;cursor:pointer}
#watchPage .provider-scroll:hover{color:#fff;background:#242424}
#watchPage .provider-scroll:disabled{opacity:.3;cursor:default;pointer-events:none}
#watchPage .provider-scroll .lucide{width:15px;height:15px}
#watchPage .provider-panel.has-scroll .provider-scroll{display:flex}
#watchPage .source-chip{
    width:100%!important;height:auto!important;min-height:56px!important;padding:10px 16px!important;border-radius:6px!important;border:1px solid #333!important;
    background:#242424!important;color:#ccc!important;font-size:13px!important;letter-spacing:.03em!important;
    display:flex!important;align-items:center!important;justify-content:space-between!important;gap:10px!important;cursor:pointer!important;text-align:left!important;
    transition:background .15s ease,border-color .15s ease,color .15s ease!important;
}
#watchPage .source-chip:hover{border-color:#555!important;background:#282828!important;color:#eee!important}
#watchPage .source-chip.active{background:#2c2c2c!important;border-color:#666!important;color:#fff!important}
#watchPage .source-chip .lucide{width:16px!important;height:16px!important;color:#8bc34a!important;opacity:0!important;flex:none!important}
#watchPage .source-chip.active .lucide{opacity:1!important}
#watchPage .source-chip__info{display:flex!important;flex-direction:column!important;gap:4px!important;min-width:0!important}
#watchPage .source-chip__name{white-space:nowrap!important}
#watchPage .source-chip__episode{font-size:11px!important;color:#888!important;white-space:nowrap!important;letter-spacing:.02em!important}
#watchPage .source-chip.active .source-chip__episode{color:#999!important}

/* --- extra details --- */
#watchPage .media-details{width:100%!important;max-width:none!important;margin:16px 0 0!important;margin-inline:0!important;padding:0!important;display:block!important}
#watchPage .details-main{background:#1c1c1c!important;border:1px solid #2c2c2c!important;border-radius:6px!important;padding:20px 24px!important}
#watchPage .media-details h2{font-size:15px!important;margin:0 0 12px!important;font-weight:700!important;color:#eee!important}
#watchPage .facts-list{margin:0!important;display:grid!important}
#watchPage .facts-list>div{display:grid!important;grid-template-columns:150px minmax(0,1fr)!important;gap:12px!important;padding:9px 0!important;border-top:1px solid #262626!important;min-height:0!important}
#watchPage .facts-list>div:first-child{border-top:0!important}
#watchPage .facts-list dt{font-size:13px!important;color:#7f7f7f!important;margin:0!important}
#watchPage .facts-list dd{margin:0!important;font-size:14px!important;color:#d3d3d3!important;line-height:1.6!important}
#watchPage .empty-library{width:100%!important;margin:16px 0 0!important;padding:50px 24px!important;box-sizing:border-box!important;background:#1c1c1c!important;border:1px solid #2c2c2c!important;border-radius:6px!important}

@media(max-width:820px){
    #watchPage{padding:16px 20px 36px!important}
    #watchPage .watch-card{flex-direction:column!important;align-items:center!important;text-align:center!important;padding:20px!important}
    #watchPage .watch-card__poster-col{width:min(100%,280px)!important;flex:0 0 auto!important;align-items:center!important}
    #watchPage .watch-poster{width:150px!important;height:225px!important}
    #watchPage .watch-badges{justify-content:center!important}
    #watchPage .watch-facts>div{grid-template-columns:1fr!important;gap:2px!important;text-align:left!important}
    #watchPage .watch-description,#watchPage .details-main{padding:16px!important}
    #watchPage .facts-list>div{grid-template-columns:110px minmax(0,1fr)!important}
}

/* The side-by-side player+source grid gets too cramped (source column eating
   most of the width) between mobile and ~1180px — stack it for that whole
   range instead of just true mobile widths. Source chips wrap into a grid
   (2-up where there's room) instead of horizontal scrolling. */
@media(max-width:1180px){
    #watchPage .watch-player-grid{grid-template-columns:1fr!important}
    #watchPage .provider-panel{max-height:none!important}
    #watchPage .provider-list{display:grid!important;grid-template-columns:repeat(auto-fit,minmax(150px,1fr))!important;gap:8px!important;max-height:160px!important;flex:none!important}
    #watchPage .source-chip{width:100%!important;min-width:0!important;flex:none!important}
}

@media(max-width:480px){
    #watchPage{padding:12px 12px 28px!important}
    #watchPage .watch-card__info h1{font-size:20px!important}
    #watchPage .player-frame{border-radius:6px!important}
}

/* ============================================================
   CHANNELS (IPTV)
   ============================================================ */
.page-tabs-wrap{margin-bottom:0}
.channel-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(180px,1fr));gap:18px}
.channel-card{position:relative;display:flex;flex-direction:column;align-items:center;text-align:center;gap:10px;padding:18px 14px;background:#1c1c1c;border:1px solid #2c2c2c;border-radius:9px;transition:border-color .15s,background .15s}
.channel-card:hover{border-color:#444;background:#212121}
.channel-card__logo{position:relative;width:96px;height:96px;border-radius:14px;background:var(--tile);display:grid;place-items:center;overflow:hidden}
.channel-card__logo-fallback{font-size:26px;font-weight:800;color:rgba(255,255,255,.85);letter-spacing:.02em}
.channel-card__logo img{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;padding:10px;box-sizing:border-box;background:#eee}
.channel-card__logo.bg-dark img{background:#242424}
.channel-card strong{font-size:13px;font-weight:600;color:#e2e2e2;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}
.channel-card small{font-size:11px;color:#888;display:flex;align-items:center;gap:4px;max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.channel-card__now{color:#8bc34a!important}
.channel-card__now .lucide{width:11px;height:11px;flex:none}


/* channel watch page */
.channel-hero{display:flex;gap:22px;align-items:flex-start;background:#1c1c1c;border:1px solid #2c2c2c;border-radius:10px;padding:24px}
.channel-hero__logo{position:relative;width:110px;height:110px;flex:0 0 110px;border-radius:12px;background:var(--tile);display:grid;place-items:center;overflow:hidden}
.channel-hero__logo-fallback{font-size:30px;font-weight:800;color:rgba(255,255,255,.85);letter-spacing:.02em}
.channel-hero__logo img{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;padding:12px;box-sizing:border-box;background:#eee}
.channel-hero__logo.bg-dark img{background:#242424}
.hero-title-row{display:flex;align-items:center;gap:12px}
.favorite-star{position:absolute;top:8px;right:8px;width:28px;height:28px;border:0;border-radius:50%;background:rgba(12,12,12,.65);color:#aaa;display:grid;place-items:center;z-index:2;transition:background .15s,color .15s}
.favorite-star:hover{background:rgba(12,12,12,.85);color:#fff}
.favorite-star .lucide{width:15px;height:15px}
.favorite-star.is-active{color:var(--accent)}
.favorite-star.is-active .lucide{fill:currentColor}
.favorite-star--hero{position:static;width:38px;height:38px;background:#242424;color:#999}
.favorite-star--hero:hover{background:#2c2c2c;color:#fff}
.favorite-star--hero .lucide{width:18px;height:18px}
.shelf-scroll--channels{grid-auto-columns:150px}
.shelf-scroll--channels .channel-card,.shelf-scroll--channels .radio-card{width:150px}
.search-section{margin-bottom:32px}
.search-section__title{display:flex;align-items:center;gap:8px;font-size:16px;margin:0 0 14px;font-weight:600}
.channel-hero__info{min-width:0;flex:1}
#watchPage .channel-hero__info .watch-cta{width:auto!important;display:inline-flex!important;margin-top:0!important}
.channel-hero__info h1{font-size:24px;line-height:1.2;margin:8px 0 12px;font-weight:800;color:#f2f2f2}
.channel-epg-now{padding:14px 16px;background:#242424;border:1px solid #2f2f2f;border-radius:8px}
.channel-epg-now__badge{display:inline-block;font-size:10px;font-weight:800;letter-spacing:.06em;text-transform:uppercase;color:#8bc34a;background:rgba(139,195,74,.14);padding:3px 8px;border-radius:4px;margin-bottom:6px}
.channel-epg-now strong{display:block;font-size:15px;color:#f0f0f0;margin-bottom:4px}
.channel-epg-now p{margin:0 0 6px;font-size:12px;color:#999;line-height:1.5}
.channel-epg-now small{font-size:11px;color:#777}
.channel-epg-next{margin-top:10px;font-size:12px;color:#999;display:flex;align-items:center;gap:4px}
.channel-epg-next .lucide{width:13px;height:13px;color:var(--accent)}
#watchPage .channel-video{width:100%!important;height:100%!important;background:#000!important}

@media(max-width:820px){
    .channel-hero{flex-direction:column;align-items:center;text-align:center;padding:20px}
    .channel-epg-next{justify-content:center}
    .radio-hero__actions{flex-direction:column;align-items:stretch;width:100%}
    #watchPage .channel-hero__info .watch-cta{width:100%!important}
    .radio-hero__homepage{width:100%!important;box-sizing:border-box!important;justify-content:center!important}
    .channel-grid{grid-template-columns:repeat(auto-fill,minmax(130px,1fr));gap:12px}
    .channel-card__logo{width:72px;height:72px}
}

/* radio */
.radio-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(180px,1fr));gap:18px}
.radio-card{position:relative;display:flex;flex-direction:column;align-items:center;text-align:center;gap:10px;padding:18px 14px;background:#1c1c1c;border:1px solid #2c2c2c;border-radius:9px;transition:border-color .15s,background .15s}
.radio-card:hover{border-color:#444;background:#212121}
.radio-card__art{position:relative;width:96px;height:96px;border-radius:14px;background:var(--tile);display:grid;place-items:center;overflow:hidden}
.radio-card__art span{font-size:26px;font-weight:800;color:rgba(255,255,255,.85);letter-spacing:.02em}
.radio-card__art img{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;padding:10px;box-sizing:border-box;background:#eee}
.radio-card__art.bg-dark img{background:#242424}
.radio-card strong{font-size:13px;font-weight:600;color:#e2e2e2;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}
.radio-card__genre{font-size:11px;color:#888;max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

.radio-page{width:100%;max-width:900px;margin:0 auto;padding:24px 32px 48px;box-sizing:border-box}
.radio-hero{display:flex;gap:22px;align-items:flex-start;background:#1c1c1c;border:1px solid #2c2c2c;border-radius:10px;padding:24px;margin-top:20px}
.radio-hero__art{position:relative;width:110px;height:110px;flex:0 0 110px;border-radius:12px;background:var(--tile);display:grid;place-items:center;overflow:hidden}
.radio-hero__art span{font-size:32px;font-weight:800;color:rgba(255,255,255,.85)}
.radio-hero__art img{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;padding:12px;box-sizing:border-box;background:#eee}
.radio-hero__art.bg-dark img{background:#242424}
.radio-hero__info{min-width:0;flex:1}
.radio-hero__info h1{font-size:24px;line-height:1.2;margin:8px 0 12px;font-weight:800;color:#f2f2f2}
.radio-hero__description{margin:0 0 14px;font-size:13px;color:#999;line-height:1.6}
.radio-hero__homepage{display:inline-flex;align-items:center;gap:8px;height:42px;box-sizing:border-box;font-size:13px;font-weight:600;color:#e8e8e8;padding:0 14px;border:1px solid #3a3a3a;border-radius:6px;background:#242424}
.radio-hero__homepage:hover{background:#2c2c2c;border-color:#555}
.radio-hero__homepage .lucide{width:16px;height:16px}

.radio-player-frame{position:relative;background:#1c1c1c;border:1px solid #2c2c2c;border-radius:10px;min-height:110px;display:flex;align-items:center}
.radio-player-frame audio{display:none}
.radio-player-frame .player-loading,.radio-player-frame .player-unavailable{border-radius:10px;background:#1c1c1c;z-index:10}
.radio-player-frame .player-unavailable{padding:16px}
.radio-player-frame .player-unavailable .lucide{width:26px;height:26px;margin-bottom:8px}
.radio-player-frame .player-unavailable strong{font-size:13px;margin-bottom:4px}
.radio-player-frame .player-unavailable p{font-size:11px}

/* custom player controls (radio only — channels use native video controls) */
.custom-player-bar{position:absolute;left:0;right:0;bottom:0;display:flex;align-items:center;gap:12px;padding:10px 14px;z-index:6}
.custom-player-bar--radio{position:static!important;width:100%;box-sizing:border-box;padding:16px 20px;background:transparent;z-index:1}
.custom-player-bar button{width:34px;height:34px;min-width:34px;border:0;border-radius:6px;background:rgba(255,255,255,.08);color:#fff;display:grid;place-items:center;cursor:pointer}
.custom-player-bar button:hover{background:rgba(255,255,255,.18)}
.custom-player-bar>button:first-child{width:40px;height:40px;min-width:40px}
.custom-player-bar .lucide{width:17px;height:17px}
.custom-player-bar__meta{flex:1;min-width:0;color:#fff}
.custom-player-bar__meta strong{display:block;font-size:13px;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.custom-player-bar__meta small{font-size:10px;color:#aaa}
.custom-player-bar__volume{display:flex;align-items:center;gap:8px}
.custom-player-bar__volume input[type=range]{width:72px;accent-color:#ccc;cursor:pointer}
@media(max-width:560px){.custom-player-bar__volume input[type=range]{display:none}}

@media(max-width:820px){
    .radio-page{padding:16px}
    .radio-hero{flex-direction:column;align-items:center;text-align:center;padding:20px}
    .radio-grid{grid-template-columns:repeat(auto-fill,minmax(130px,1fr));gap:12px}
    .radio-card__art{width:72px;height:72px}
}

.radio-hero__actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:14px}
@media(max-width:820px){
    .radio-hero__actions{justify-content:center}
}

