:root{--bg:#070b14;--panel:#101827;--panel2:#0c1320;--line:#24314a;--text:#eef3ff;--muted:#91a0bc;--primary:#5b78ff;--primary2:#7d5cff;--green:#21c985;--red:#ff5e79;--amber:#f6b84a;--cyan:#4fd6ff;--shadow:0 18px 55px rgba(0,0,0,.35)}
*{box-sizing:border-box}html{background:var(--bg)}body{margin:0;font-family:Inter,ui-sans-serif,system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif;background:radial-gradient(circle at 20% -10%,#182754 0,transparent 33%),radial-gradient(circle at 95% 0,#291b4d 0,transparent 28%),var(--bg);color:var(--text);min-height:100vh}a{color:inherit;text-decoration:none}button,input,select,textarea{font:inherit}.muted{color:var(--muted)}.eyebrow{font-size:12px;font-weight:900;letter-spacing:.16em;color:#8ea5ff;text-transform:uppercase}.mini-logo,.brand-orb{display:grid;place-items:center;background:linear-gradient(135deg,var(--primary),var(--primary2));font-weight:900;color:#fff;box-shadow:0 8px 28px rgba(91,120,255,.35)}.mini-logo{width:36px;height:36px;border-radius:11px}.brand-orb{width:82px;height:82px;border-radius:26px;font-size:26px;margin:auto auto -28px;position:relative;z-index:2;border:6px solid #0b1020}
.login-bg{min-height:100vh;display:grid;place-items:center;padding:24px}.login-shell{width:min(94vw,430px)}.login-card{padding:52px 28px 28px;background:linear-gradient(180deg,rgba(18,26,43,.97),rgba(11,17,29,.97));border:1px solid var(--line);border-radius:26px;box-shadow:var(--shadow);backdrop-filter:blur(16px)}.login-card h1{margin:8px 0 6px;font-size:30px}.login-card p{margin:0 0 22px;color:var(--muted)}
.field{display:block}.field>span:first-child{display:block;font-weight:800;font-size:13px;margin:0 0 7px;color:#dce5ff}.field>span b{color:var(--red)}.field input,.field select,.field textarea,.search,.row input,.row select,.row textarea{width:100%;padding:13px 14px;border:1px solid #30405f;border-radius:13px;background:#0a111e;color:#fff;outline:none;transition:.18s}.field input:focus,.field select:focus,.field textarea:focus,.search:focus{border-color:#6f87ff;box-shadow:0 0 0 4px rgba(91,120,255,.13)}.field small{display:block;color:#7f8daa;margin-top:6px;line-height:1.4}.login-card .field{margin-bottom:14px}.login-card input{margin:0}.alert,.notice{padding:12px 14px;border-radius:12px;margin:0 0 15px;border:1px solid #7e3344;background:#32141d;color:#ffdce4}.notice.success{border-color:#256746;background:#0f2b20;color:#c9ffe5}.notice.error{border-color:#8b3448;background:#351720}.primary-wide,.login-card button,button,.btn{appearance:none;border:0;padding:12px 16px;border-radius:12px;background:linear-gradient(135deg,var(--primary),#6d5eff);color:#fff;font-weight:800;cursor:pointer;transition:.15s;display:inline-flex;align-items:center;justify-content:center;gap:7px}.primary-wide{width:100%;margin-top:6px}.btn:hover,button:hover{filter:brightness(1.08);transform:translateY(-1px)}.btn.secondary,button.secondary{background:#202b42}.danger-btn{background:linear-gradient(135deg,#9b2d49,#752139)!important}.small{padding:8px 10px!important;font-size:12px!important;border-radius:9px!important}
.topbar,.player-top{position:sticky;top:0;z-index:20;display:flex;justify-content:space-between;align-items:center;padding:13px 20px;background:rgba(9,14,25,.88);backdrop-filter:blur(18px);border-bottom:1px solid var(--line)}.topbar-brand{display:flex;align-items:center;gap:11px}.topbar small,.player-top small{display:block;color:var(--muted);margin-top:3px}.wrap{padding:22px;max-width:1600px;margin:auto}.hero-strip{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:22px 24px;margin-bottom:18px;border:1px solid var(--line);border-radius:22px;background:linear-gradient(135deg,rgba(24,36,64,.85),rgba(18,20,45,.85));box-shadow:var(--shadow)}.hero-strip h1{margin:5px 0 0}.account-chip,.metric-pill{padding:10px 14px;border-radius:999px;background:#17223a;border:1px solid #314267;color:#b9c8ff;font-weight:800;white-space:nowrap}.media-tabs{display:flex;gap:10px;margin:0 0 12px}.tab{background:#172136}.tab.active{background:linear-gradient(135deg,var(--primary),var(--primary2))}.search{max-width:580px;margin:0 0 18px}.grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:14px}.card{display:flex;gap:14px;align-items:center;padding:14px;min-height:100px;background:linear-gradient(180deg,#111a2b,#0d1524);border:2px solid transparent;border-radius:18px;transition:.16s;box-shadow:0 8px 24px rgba(0,0,0,.18)}.card img{width:76px;height:76px;object-fit:contain;background:white;border-radius:13px}.card span,.card em{display:block;color:var(--muted);font-size:13px;margin-top:5px}.card em{color:#8fa4ff;font-style:normal;font-weight:800}.card:focus,.card:hover,.movie-card:focus,.movie-card:hover{outline:none;border-color:#7890ff;transform:translateY(-2px) scale(1.012);box-shadow:0 0 0 4px rgba(83,111,255,.14),0 14px 34px rgba(0,0,0,.3)}.movie-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(155px,1fr));gap:16px}.movie-card{display:flex;flex-direction:column;padding:9px;background:linear-gradient(180deg,#111a2b,#0d1524);border:2px solid transparent;border-radius:17px;transition:.16s}.movie-card img{width:100%;aspect-ratio:2/3;object-fit:cover;border-radius:12px;background:#fff}.movie-card strong{margin-top:10px}.movie-card span{color:var(--muted);font-size:12px;margin-top:5px}
.player-page{height:100vh;overflow:hidden;background:#000}.player-page video{width:100%;height:calc(100vh - 64px);background:#000}.player-top{height:64px}.player-top>a{padding:9px 12px;background:#1d2638;border-radius:10px}.player-top>div{text-align:right}#msg{position:fixed;left:50%;bottom:22px;transform:translateX(-50%);max-width:min(92vw,760px);background:rgba(0,0,0,.78);padding:10px 14px;border-radius:10px;text-align:center;color:#fff}
.admin{padding:0;background:var(--bg)}.admin-header{position:sticky;top:0;z-index:30;display:flex;align-items:center;justify-content:space-between;gap:18px;padding:12px 20px;border-bottom:1px solid var(--line);background:rgba(8,13,23,.92);backdrop-filter:blur(18px)}.admin-brand{display:flex;align-items:center;gap:10px;font-weight:900}.nav{display:flex;gap:7px;flex-wrap:wrap}.nav a{padding:9px 11px;border-radius:10px;color:#b7c2d8;font-weight:700;font-size:14px}.nav a:hover,.nav a.active{background:#1c2740;color:#fff}.admin-main{max-width:1500px;margin:auto;padding:24px}.page-title{display:flex;align-items:flex-end;justify-content:space-between;gap:20px;margin:4px 0 20px}.page-title h1{font-size:34px;margin:5px 0}.page-title p{margin:0;color:var(--muted)}.panel{background:linear-gradient(180deg,rgba(17,25,41,.96),rgba(12,19,32,.96));border:1px solid var(--line);border-radius:20px;padding:18px;margin-bottom:18px;box-shadow:0 10px 35px rgba(0,0,0,.18)}.panel h2{margin-top:0}.section-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:14px}.section-head h2{margin:0}.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.field.full,.full{grid-column:1/-1}.check-line{min-height:48px;display:flex!important;align-items:center;gap:10px;padding:11px 12px;border:1px solid #30405f;border-radius:13px;background:#0a111e;font-weight:500!important}.check-line input{width:auto!important;margin:0!important;accent-color:var(--primary)}.form-actions{display:flex;gap:10px}.compact{margin-top:14px}.table-wrap{overflow:auto}.table{width:100%;border-collapse:collapse}.table th,.table td{padding:11px;border-bottom:1px solid #202c43;text-align:left}.table th{color:#9baccc;font-size:12px;text-transform:uppercase;letter-spacing:.06em}.channel-logo{width:48px;height:48px;object-fit:contain;background:#fff;border-radius:10px}.inline-form{display:inline-block;margin:2px}.action-cell{white-space:nowrap}
.status-badge{display:inline-flex;align-items:center;padding:5px 9px;border-radius:999px;font-size:11px;font-weight:900;text-transform:uppercase;letter-spacing:.04em;background:#222d42;color:#bac5da}.status-badge.active,.status-badge.on{background:#103c2b;color:#70efaf}.status-badge.inactive,.status-badge.off{background:#303545;color:#b7c0d2}.status-badge.suspended{background:#4a3411;color:#ffd06c}.status-badge.banned,.status-badge.expired{background:#461725;color:#ff8aa0}.status-badge.trial{background:#172f56;color:#7fc5ff}.is-hidden{display:none!important}.cost-note{padding:10px 12px;border:1px dashed #36507d;border-radius:12px;background:#0b1424;color:#aebee0;margin-bottom:14px}.credit-card{min-width:150px;padding:14px 18px;border-radius:18px;background:linear-gradient(135deg,#1d315f,#33255e);border:1px solid #4d5f99;text-align:center}.credit-card span{display:block;color:#aebbe0;font-size:12px}.credit-card b{display:block;font-size:32px;margin-top:3px}.dash-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin-bottom:18px}.stat-card{padding:18px;border-radius:19px;background:linear-gradient(145deg,#111c31,#0c1423);border:1px solid var(--line)}.stat-card span{color:#98a8c5;font-weight:700}.stat-card b{display:block;font-size:34px;margin:7px 0}.stat-card small{color:#7f8faa}.quick-actions{display:flex;gap:10px;flex-wrap:wrap}
.user-list{display:grid;gap:14px}.user-card{background:linear-gradient(180deg,#111a2b,#0b1321);border:1px solid var(--line);border-radius:20px;padding:17px}.user-card-head{display:flex;justify-content:space-between;align-items:flex-start;gap:14px}.user-name-row{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.user-name-row h3{margin:0;font-size:21px}.user-meta{margin-top:6px;color:var(--muted);font-size:13px}.connection-ring{min-width:92px;padding:11px;border-radius:15px;border:1px solid #34486c;background:#101b2e;text-align:center}.connection-ring b{display:block;font-size:20px}.connection-ring small{display:block;color:#8293b2;font-size:11px}.user-stats{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:14px}.user-stats>div{padding:12px;border-radius:14px;background:#0a111e;border:1px solid #1f2b40}.user-stats span,.user-stats small{display:block;color:#8392ad;font-size:12px}.user-stats b{display:block;margin:4px 0}.manage-box{margin-top:14px;border-top:1px solid #202d43;padding-top:12px}.manage-box summary{cursor:pointer;font-weight:900;color:#b8c8ff}.split-actions{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:12px}.split-actions form,.danger-row form{padding:12px;border:1px solid #26334c;border-radius:14px;background:#0b1320}.split-actions button,.danger-row button{margin-top:8px;width:100%}.danger-row{display:flex;gap:10px;flex-wrap:wrap;margin-top:12px}.danger-row form{flex:1;min-width:200px}.connections-box{margin-top:13px;padding:12px;border:1px solid #2a3a57;border-radius:14px;background:#0a111d}.device-list{display:grid;gap:8px;margin-top:8px}.device-row{display:flex;justify-content:space-between;gap:12px;align-items:center;padding:10px;border-radius:11px;background:#111b2c}.device-row small{display:block;color:#7f8eaa;margin-top:3px}.expiry-countdown{font-weight:900}.expiry-countdown.expired{color:var(--red)}
.mobile-channel-list{display:none}.admin-channel-card{border:1px solid var(--line);background:#0d1524;border-radius:16px;padding:12px}.admin-channel-main{display:flex;gap:12px;align-items:center}.admin-channel-main img{width:64px;height:64px;object-fit:contain;background:#fff;border-radius:12px;flex:0 0 64px}.channel-number{color:#91a5ff;font-weight:900}.mobile-actions{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin-top:12px}.mobile-actions form{margin:0}.mobile-actions button,.mobile-actions .btn{width:100%;padding:10px 8px}.movie-admin-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(290px,1fr));gap:14px}.movie-admin-card{display:grid;grid-template-columns:95px 1fr;gap:13px;padding:12px;border:1px solid var(--line);border-radius:17px;background:#0d1524}.movie-admin-card>img{width:95px;aspect-ratio:2/3;object-fit:cover;border-radius:12px;background:#fff}.movie-admin-card h3{margin:2px 0 7px}.movie-admin-card p{margin:4px 0;color:var(--muted);font-size:13px}
@media(max-width:900px){.dash-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.admin-header{align-items:flex-start;flex-direction:column}.nav{width:100%;overflow:auto;flex-wrap:nowrap}.nav a{white-space:nowrap}.page-title{align-items:flex-start}.form-grid{grid-template-columns:1fr}.field.full,.full{grid-column:auto}.split-actions{grid-template-columns:1fr}.desktop-table{display:none}.mobile-channel-list{display:grid;gap:12px}}
@media(max-width:700px){.wrap,.admin-main{padding:14px}.hero-strip{padding:17px;align-items:flex-start}.hero-strip h1{font-size:22px}.account-chip{font-size:12px}.topbar{padding:11px 13px}.topbar small{max-width:70vw;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.card{display:block;text-align:center;padding:10px;min-height:unset}.card img{width:62px;height:62px}.movie-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:9px}.movie-card{padding:6px}.movie-card strong{font-size:12px}.movie-card span{font-size:10px}.page-title{flex-direction:column}.page-title h1{font-size:28px}.metric-pill{align-self:flex-start}.user-card{padding:13px}.user-card-head{align-items:flex-start}.user-stats{grid-template-columns:1fr}.device-row{align-items:flex-start;flex-direction:column}.device-row form,.device-row button{width:100%}.mobile-actions{grid-template-columns:1fr 1fr 1fr}.dash-grid{grid-template-columns:1fr 1fr}.stat-card b{font-size:28px}.movie-admin-grid{grid-template-columns:1fr}.form-actions{display:grid;grid-template-columns:1fr}.form-actions>*{width:100%}.player-top{padding:9px 11px}.player-top>div{max-width:65vw;overflow:hidden}.player-top b,.player-top small{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}}
@media(max-width:430px){.movie-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.dash-grid{grid-template-columns:1fr}.mobile-actions{grid-template-columns:1fr}.hero-strip{flex-direction:column}.login-card{padding-left:20px;padding-right:20px}}

/* ===== v5 Pro UI ===== */
:root{
  --bg:#050812;--panel:#0d1422;--panel2:#0a101c;--line:#1c2940;--text:#f5f7ff;--muted:#8e9bb4;
  --primary:#6d7cff;--primary2:#8f64ff;--green:#26d99a;--red:#ff647c;--amber:#f6bd57;--cyan:#55d9ff;
  --radius:18px;--radius-lg:24px;--shadow:0 22px 60px rgba(0,0,0,.34)
}
body{background:
  radial-gradient(circle at 18% -6%,rgba(73,92,201,.23),transparent 30%),
  radial-gradient(circle at 100% 2%,rgba(112,61,174,.20),transparent 26%),var(--bg)}
.admin{background:linear-gradient(180deg,#060a13 0,#080d17 100%)}
.admin-header{position:fixed;left:0;top:0;bottom:0;width:250px;height:100vh;z-index:50;display:flex;flex-direction:column;align-items:stretch;justify-content:flex-start;padding:22px 14px;border-right:1px solid var(--line);border-bottom:0;background:rgba(7,11,19,.97);backdrop-filter:blur(22px);box-shadow:14px 0 40px rgba(0,0,0,.14)}
.admin-brand{padding:0 10px 20px;margin-bottom:10px;border-bottom:1px solid var(--line);font-size:16px;letter-spacing:-.01em}.admin-brand .mini-logo{width:42px;height:42px;border-radius:14px;box-shadow:0 10px 30px rgba(109,124,255,.32)}
.admin-header .nav{display:flex;flex-direction:column;gap:6px;width:100%;overflow:visible}.admin-header .nav a{position:relative;width:100%;padding:12px 14px;border-radius:13px;color:#9ca9c1;font-size:14px;font-weight:750;transition:.18s}.admin-header .nav a:hover{background:#111b2b;color:#fff;transform:translateX(2px)}.admin-header .nav a.active{background:linear-gradient(135deg,rgba(109,124,255,.23),rgba(143,100,255,.13));border:1px solid rgba(124,139,255,.22);color:#fff;box-shadow:inset 3px 0 0 #7d8aff}
.admin-main{max-width:none;margin:0 0 0 250px;padding:30px 34px 54px;min-height:100vh}.page-title{align-items:center;margin:0 0 24px;padding-bottom:4px}.page-title h1{font-size:36px;letter-spacing:-.035em;margin:6px 0 7px}.page-title p{max-width:760px;line-height:1.55}.eyebrow{color:#8fa2ff;font-size:11px}.metric-pill{background:#101a2c;border-color:#273856;box-shadow:inset 0 1px 0 rgba(255,255,255,.03)}
.panel,.user-card,.stat-card,.admin-channel-card,.movie-admin-card{background:linear-gradient(180deg,rgba(15,23,39,.96),rgba(9,15,26,.98));border:1px solid #1e2c44;box-shadow:0 12px 38px rgba(0,0,0,.18)}.panel{border-radius:22px;padding:22px}.panel h2{font-size:19px;letter-spacing:-.015em}.section-head{padding-bottom:12px;border-bottom:1px solid rgba(38,52,78,.65)}
.dash-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}.stat-card{position:relative;overflow:hidden;padding:21px;border-radius:20px}.stat-card:after{content:"";position:absolute;width:90px;height:90px;right:-26px;top:-28px;border-radius:999px;background:radial-gradient(circle,rgba(109,124,255,.20),transparent 70%)}.stat-card span{font-size:13px}.stat-card b{font-size:38px;letter-spacing:-.04em}.stat-card small{font-size:12px}
.form-grid{gap:16px}.field>span:first-child{font-size:12px;letter-spacing:.015em;color:#cdd7eb}.field input,.field select,.field textarea,.search,.row input,.row select,.row textarea,.login-card form>input{min-height:48px;padding:12px 14px;border:1px solid #263753;border-radius:13px;background:#080f1b;color:#f7f9ff;box-shadow:inset 0 1px 0 rgba(255,255,255,.02)}.field textarea{min-height:110px}.field input:hover,.field select:hover,.field textarea:hover{border-color:#334867}.field input:focus,.field select:focus,.field textarea:focus,.search:focus,.login-card form>input:focus{border-color:#7c8cff;box-shadow:0 0 0 4px rgba(109,124,255,.13)}
button,.btn,.primary-wide{min-height:44px;border-radius:12px;background:linear-gradient(135deg,#6678ff,#865fff);box-shadow:0 8px 20px rgba(83,92,218,.18)}button.secondary,.btn.secondary{background:#152135;border:1px solid #273a58;box-shadow:none}.danger-btn{border:1px solid rgba(255,100,124,.26)!important}.form-actions{padding-top:2px}
.info-banner{display:flex;align-items:flex-start;gap:9px;padding:13px 15px;border:1px solid #2d4269;border-radius:14px;background:linear-gradient(135deg,rgba(52,76,129,.24),rgba(31,43,77,.18));color:#c8d4ef}.info-banner b{white-space:nowrap;color:#fff}.info-banner span{font-size:13px;line-height:1.45;color:#aebbd4}
.notice{position:relative;border-radius:14px;padding:13px 16px;box-shadow:0 8px 30px rgba(0,0,0,.16)}.notice.success{background:linear-gradient(135deg,rgba(21,73,53,.75),rgba(10,42,31,.8));border-color:#29684e}.notice.error{background:linear-gradient(135deg,rgba(89,32,45,.75),rgba(48,20,29,.8));border-color:#7f3649}
.user-card{padding:20px;border-radius:21px}.user-card:hover{border-color:#2d4163}.user-name-row h3{font-size:22px;letter-spacing:-.025em}.user-meta{font-size:12px}.connection-ring{border-radius:16px;background:linear-gradient(145deg,#101c30,#0b1424);border-color:#2a426a;min-width:104px}.connection-ring b{font-size:22px}.user-stats>div{background:#080f1a;border-color:#1b2940;padding:14px}.manage-box summary{padding:5px 0;color:#c8d3ff}.manage-box[open] summary{margin-bottom:5px}.connections-box{background:#080f1a}.device-row{border:1px solid #1d2a41;background:#0d1625}
.status-badge{border:1px solid rgba(255,255,255,.06)}.status-badge.active,.status-badge.on{background:rgba(24,121,83,.24);color:#79efb9;border-color:rgba(71,214,156,.18)}.status-badge.suspended{background:rgba(151,102,17,.23)}.status-badge.banned,.status-badge.expired{background:rgba(151,40,62,.24)}.status-badge.trial{background:rgba(47,101,176,.24)}
.cost-note{border-style:solid;border-color:#2b4167;background:#091322;line-height:1.55}.credit-card{background:linear-gradient(135deg,#263d77,#4d2f7d);box-shadow:0 15px 38px rgba(46,55,126,.24)}
.table-wrap{border:1px solid #1d2b43;border-radius:16px;background:#0a111d}.table th{position:sticky;top:0;background:#0e1726;z-index:2}.table tr:hover td{background:rgba(31,46,72,.25)}
.login-bg{background:radial-gradient(circle at 50% -15%,rgba(87,104,238,.28),transparent 35%),radial-gradient(circle at 90% 80%,rgba(122,73,180,.17),transparent 28%),#050812}.login-shell{width:min(94vw,450px)}.login-card{border-radius:28px;padding:54px 30px 30px;border-color:#243450;background:linear-gradient(180deg,rgba(15,23,39,.98),rgba(8,13,23,.99));box-shadow:0 28px 75px rgba(0,0,0,.48)}.login-card h1,.login-card h2{letter-spacing:-.035em}.login-card form>input{width:100%;margin-bottom:12px}.brand-orb{box-shadow:0 16px 42px rgba(91,101,229,.38)}
.player-top{background:rgba(5,8,14,.92);border-color:#172337}.player-top>a{background:#111a28;border:1px solid #25334a}

@media(max-width:1000px){
  .admin-header{position:sticky;width:auto;height:auto;bottom:auto;flex-direction:row;align-items:center;justify-content:space-between;padding:11px 14px;border-right:0;border-bottom:1px solid var(--line);box-shadow:none}.admin-brand{padding:0;border-bottom:0;margin:0}.admin-brand .mini-logo{width:36px;height:36px}.admin-header .nav{width:auto;flex-direction:row;overflow:auto;gap:5px}.admin-header .nav a{width:auto;white-space:nowrap;padding:9px 11px}.admin-header .nav a:hover{transform:none}.admin-main{margin-left:0;padding:22px 18px 42px}.dash-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:700px){
  .admin-header{align-items:flex-start;flex-direction:column}.admin-header .nav{width:100%}.admin-main{padding:16px 13px 40px}.page-title h1{font-size:30px}.panel{padding:15px;border-radius:18px}.user-card{padding:14px}.info-banner{flex-direction:column;gap:4px}.dash-grid{grid-template-columns:1fr 1fr}.credit-card{width:100%;text-align:left;display:flex;align-items:center;justify-content:space-between}.credit-card b{font-size:27px}.login-card{padding-left:22px;padding-right:22px}
}
@media(max-width:430px){.dash-grid{grid-template-columns:1fr}.page-title h1{font-size:27px}}

/* ===== LiveTV Panel v6 additions ===== */
.imdb-panel{overflow:hidden}.imdb-search-row{display:grid;grid-template-columns:1fr auto;gap:12px}.imdb-search-row input{min-width:0}.imdb-results{display:grid;grid-template-columns:repeat(auto-fill,minmax(210px,1fr));gap:12px;margin-top:16px}.imdb-result{display:flex;align-items:center;gap:12px;text-align:left;padding:10px;border:1px solid rgba(255,255,255,.09);background:rgba(255,255,255,.035);border-radius:14px;color:inherit}.imdb-result:hover,.imdb-result:focus{transform:translateY(-2px);border-color:rgba(120,160,255,.65)}.imdb-result img{width:54px;height:78px;object-fit:cover;border-radius:10px;background:#111827}.imdb-result span{display:flex;flex-direction:column;gap:5px;min-width:0}.imdb-result b{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.imdb-result small,.imdb-credit{opacity:.68;font-size:12px}.imdb-credit{margin:16px 4px}
.category-admin-grid,.episode-admin-list{display:grid;gap:12px}.mini-admin-card{display:flex;justify-content:space-between;align-items:center;gap:16px;padding:16px 18px;border:1px solid rgba(255,255,255,.08);border-radius:16px;background:rgba(255,255,255,.025)}.mini-admin-card>div:first-child{display:flex;flex-direction:column;gap:5px}.mini-admin-card small{opacity:.7}
.vod-category-bar,.live-category-bar,.category-scroll{display:flex;gap:10px;overflow:auto;padding:2px 0 14px;scrollbar-width:none}.vod-cat,.live-cat{white-space:nowrap;border-radius:999px;padding:10px 16px;background:rgba(255,255,255,.05);border:1px solid rgba(255,255,255,.08);color:inherit}.vod-cat.active,.live-cat.active{background:rgba(88,120,255,.24);border-color:rgba(100,140,255,.8);box-shadow:0 0 0 3px rgba(88,120,255,.12)}.lock-chip{position:absolute;top:10px;right:10px;border-radius:999px;padding:5px 8px;background:rgba(0,0,0,.75);font-size:11px;font-style:normal}.movie-card{position:relative}
.modal{position:fixed;inset:0;z-index:9999;display:grid;place-items:center;padding:18px;background:rgba(0,0,0,.72);backdrop-filter:blur(10px)}.modal[hidden]{display:none}.modal-card{width:min(420px,100%);padding:24px;border-radius:22px;background:#111827;border:1px solid rgba(255,255,255,.1);box-shadow:0 30px 100px rgba(0,0,0,.5)}.modal-card input{width:100%;font-size:22px;letter-spacing:.18em;text-align:center;margin:12px 0}
.series-hero{min-height:330px;border-radius:24px;padding:28px;background-size:cover;background-position:center;display:flex;align-items:flex-end;gap:24px;margin-bottom:20px;overflow:hidden}.series-hero>img{width:160px;aspect-ratio:2/3;object-fit:cover;border-radius:16px;box-shadow:0 18px 50px rgba(0,0,0,.45)}.series-hero>div{max-width:760px}.series-hero h1{font-size:clamp(28px,4vw,48px);margin:5px 0 10px}.series-hero p{line-height:1.6;opacity:.78}.episode-list{display:grid;gap:10px}.episode-card{display:grid;grid-template-columns:86px 1fr auto;gap:14px;align-items:center;padding:14px 16px;border:1px solid rgba(255,255,255,.08);border-radius:14px;background:rgba(255,255,255,.025);color:inherit;text-decoration:none}.episode-card:hover,.episode-card:focus{border-color:rgba(100,140,255,.7);background:rgba(100,140,255,.08)}.episode-no{font-weight:800;opacity:.78}.episode-card small{opacity:.6}
.check-line{display:flex!important;align-items:center;gap:9px;margin-top:7px}.check-line input{width:auto!important}.channel-admin-grid{display:grid;gap:12px}.admin-channel-card{border:1px solid rgba(255,255,255,.08);border-radius:18px;padding:14px;background:rgba(255,255,255,.025)}
@media(max-width:680px){.imdb-search-row{grid-template-columns:1fr}.imdb-results{grid-template-columns:1fr 1fr}.imdb-result{align-items:flex-start}.imdb-result img{width:48px;height:70px}.mini-admin-card{align-items:flex-start;flex-direction:column}.series-hero{min-height:0;align-items:flex-start;padding:18px;flex-direction:column}.series-hero>img{width:115px}.episode-card{grid-template-columns:70px 1fr}.episode-card small{display:none}}

/* v7 TV/mobile player + freeze/downline enhancements */
.status-badge.frozen{background:rgba(80,170,255,.14);border-color:rgba(80,170,255,.38);color:#9fd4ff}
.downline-grid{display:grid;gap:10px;margin-top:12px}.downline-item{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:12px 14px;border:1px solid var(--line,#263248);border-radius:14px;background:rgba(255,255,255,.025)}.downline-item small{display:block;color:var(--muted,#94a3b8);margin-top:4px}.downline-item>span{font-size:12px;padding:6px 9px;border-radius:999px;background:rgba(255,255,255,.06)}
.video-stage{position:relative;width:min(100%,1600px);margin:auto;background:#000;display:flex;align-items:center;justify-content:center;min-height:calc(100dvh - 76px);overflow:hidden}.video-stage video{width:100%;height:100%;max-height:calc(100dvh - 76px);object-fit:contain;background:#000}.pro-controls{position:absolute;left:50%;bottom:max(18px,env(safe-area-inset-bottom));transform:translateX(-50%);display:flex;gap:12px;align-items:center;padding:10px 12px;border-radius:18px;background:rgba(8,12,20,.78);backdrop-filter:blur(14px);border:1px solid rgba(255,255,255,.12);z-index:10;opacity:.18;transition:.2s}.video-stage:hover .pro-controls,.pro-controls:focus-within,.pro-controls:hover{opacity:1}.pro-controls button{min-width:62px;min-height:48px;border-radius:14px;font-size:18px}.pro-controls button:focus{outline:3px solid #fff;outline-offset:3px}.player-message{position:absolute;top:16px;left:50%;transform:translateX(-50%);z-index:9;background:rgba(0,0,0,.66);padding:8px 12px;border-radius:10px}.video-stage:fullscreen{width:100vw;height:100vh;min-height:100vh}.video-stage:fullscreen video{max-height:100vh}.video-stage:fullscreen .pro-controls{bottom:max(22px,env(safe-area-inset-bottom))}
.focusable:focus{outline:4px solid #fff!important;outline-offset:4px;transform:scale(1.035);z-index:5}
@media(max-width:700px){.player-top{padding:10px 12px}.video-stage{min-height:calc(100dvh - 58px)}.video-stage video{max-height:calc(100dvh - 58px)}.pro-controls{opacity:1;bottom:max(10px,env(safe-area-inset-bottom));gap:8px;padding:8px}.pro-controls button{min-width:54px;min-height:46px;font-size:16px}.live-controls button:last-child{min-width:120px}}
@media(min-width:1000px){.pro-controls button{min-width:78px;min-height:58px;font-size:20px}.focusable:focus{outline-width:5px}}

/* v8 immersive player: full-screen canvas, clean overlay chrome, auto-hide controls */
.player-page{position:fixed;inset:0;width:100vw;height:100dvh;overflow:hidden;background:#000;color:#fff}
.player-page .player-top{position:fixed;top:0;left:0;right:0;height:auto;min-height:64px;z-index:30;padding:12px 18px;background:linear-gradient(180deg,rgba(0,0,0,.86),rgba(0,0,0,.48),transparent);border:0;box-shadow:none;transition:opacity .22s ease,transform .22s ease;pointer-events:auto}
.player-page .player-top>a{background:rgba(14,20,31,.78);border:1px solid rgba(255,255,255,.13);backdrop-filter:blur(12px)}
.player-page.player-chrome-hidden .player-top{opacity:0;transform:translateY(-14px);pointer-events:none}
.player-page .video-stage{position:absolute;inset:0;width:100vw;height:100dvh;min-height:100dvh;max-width:none;margin:0;background:#000;display:flex;align-items:center;justify-content:center;overflow:hidden}
.player-page .video-stage video{display:block;width:100%;height:100%;max-height:none;object-fit:contain;background:#000;border:0;outline:0}
.player-page .pro-controls{position:absolute;left:50%;bottom:max(18px,env(safe-area-inset-bottom));transform:translateX(-50%);display:flex;align-items:center;justify-content:center;gap:10px;padding:9px 11px;border-radius:18px;background:rgba(15,20,30,.76);border:1px solid rgba(255,255,255,.15);box-shadow:0 12px 36px rgba(0,0,0,.38);backdrop-filter:blur(16px);z-index:25;opacity:1;visibility:visible;transition:opacity .22s ease,transform .22s ease,visibility .22s ease}
.player-page .video-stage.controls-hidden .pro-controls{opacity:0;visibility:hidden;pointer-events:none;transform:translate(-50%,12px)}
.player-page .pro-controls:before,.player-page .pro-controls:after{content:none!important;display:none!important}
.player-page .pro-controls button{display:inline-flex;align-items:center;justify-content:center;gap:5px;min-width:58px;min-height:48px;margin:0;border:1px solid rgba(255,255,255,.12);border-radius:13px;background:rgba(255,255,255,.1);color:#fff;line-height:1;box-shadow:none}
.player-page .pro-controls button:hover,.player-page .pro-controls button:focus{background:rgba(255,255,255,.18);outline:3px solid rgba(255,255,255,.9);outline-offset:2px}
.player-page .player-message{position:absolute;top:82px;left:50%;bottom:auto;transform:translateX(-50%);z-index:20;max-width:min(90vw,760px);background:rgba(0,0,0,.68);border:1px solid rgba(255,255,255,.12);padding:9px 13px;border-radius:12px;text-align:center;color:#fff;pointer-events:none}
.player-page .player-message:empty{display:none}
.player-page .video-stage:fullscreen{inset:0;width:100vw;height:100vh;min-height:100vh}
.player-page .video-stage:fullscreen video{width:100vw;height:100vh;max-height:none}
@media(max-width:700px){
  .player-page .player-top{min-height:56px;padding:9px 10px}
  .player-page .player-top>div{max-width:66vw}
  .player-page .pro-controls{bottom:max(10px,env(safe-area-inset-bottom));gap:7px;padding:7px 8px;border-radius:15px}
  .player-page .pro-controls button{min-width:50px;min-height:44px;font-size:15px;padding:8px 10px}
  .player-page .live-controls button:last-child{min-width:104px}
  .player-page .player-message{top:66px;font-size:13px}
}
@media(min-width:1000px){
  .player-page .pro-controls{gap:14px;padding:12px 14px}
  .player-page .pro-controls button{min-width:72px;min-height:56px;font-size:19px}
}

/* v9 hard auto-hide rules. !important prevents older mobile/hover rules from keeping controls visible. */
.player-page[data-player-chrome="0"] .player-top,
.player-page.player-chrome-hidden .player-top{
  opacity:0!important;
  visibility:hidden!important;
  pointer-events:none!important;
  transform:translateY(-18px)!important;
}
.player-page .video-stage[data-controls-visible="0"] .pro-controls,
.player-page .video-stage.controls-hidden .pro-controls{
  opacity:0!important;
  visibility:hidden!important;
  pointer-events:none!important;
  transform:translate(-50%,14px)!important;
}
.player-page .video-stage[data-controls-visible="1"] .pro-controls{
  opacity:1;
  visibility:visible;
}
.player-page .video-stage{cursor:default}
.player-page.player-chrome-hidden .video-stage{cursor:none}
@media (hover:hover) and (pointer:fine){
  /* Hover must not override the timer; an actual click/key reveals the controls. */
  .player-page .video-stage:hover .pro-controls{opacity:inherit}
}

/* v10 login + WebView player hardening */
.remember-row{display:flex;align-items:flex-start;gap:11px;margin:14px 0 18px;padding:13px 14px;border:1px solid var(--line,#263248);border-radius:14px;background:rgba(255,255,255,.035);cursor:pointer}.remember-row input{width:21px;height:21px;margin-top:1px;accent-color:#6d6cff}.remember-row span{display:block}.remember-row small{display:block;color:var(--muted,#94a3b8);margin-top:4px;line-height:1.35}
.player-page.player-chrome-hidden .player-top,.player-page[data-player-chrome="0"] .player-top{display:none!important;opacity:0!important;visibility:hidden!important;pointer-events:none!important}
.player-page .video-stage.controls-hidden .pro-controls,.player-page .video-stage[data-controls-visible="0"] .pro-controls{display:none!important;opacity:0!important;visibility:hidden!important;pointer-events:none!important}

/* v11: compact account actions + saved-login status */
.topbar-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.saved-login-note{margin:-2px 0 14px;padding:11px 13px;border:1px solid rgba(87,117,255,.28);border-radius:14px;background:rgba(87,117,255,.08);color:#aebce4;font-size:13px;line-height:1.45}
@media(max-width:640px){.topbar-actions{gap:7px}.topbar-actions .btn{padding:10px 12px;font-size:13px}}

/* v12 TV / D-pad focus compatibility */
.focusable:focus,.tab:focus,.vod-cat:focus,.topbar a:focus,.topbar button:focus,.pro-controls button:focus,.player-top a:focus{
  outline:4px solid #fff !important;
  outline-offset:3px !important;
  transform:scale(1.025);
  box-shadow:0 0 0 7px rgba(99,102,241,.55),0 12px 32px rgba(0,0,0,.35) !important;
  z-index:20;
}
@media (hover:none){.focusable,.tab,.vod-cat,button,a{ -webkit-tap-highlight-color:transparent; }}

/* v13 universal spatial remote navigation */
[data-tv-focus]:focus,.episode-card:focus,.media-tabs .tab:focus,.vod-category-bar .vod-cat:focus,.topbar-actions .btn:focus,.player-top a:focus,.pro-controls button:focus{
  outline:4px solid #fff!important;outline-offset:4px!important;
  box-shadow:0 0 0 8px rgba(96,92,255,.72),0 16px 38px rgba(0,0,0,.45)!important;
  position:relative;z-index:50;transform:scale(1.035);
}
.episode-card{display:flex;align-items:center;gap:16px;text-decoration:none}
@media(max-width:720px){[data-tv-focus]:focus,.episode-card:focus{outline-width:3px!important;outline-offset:2px!important;transform:scale(1.015)}}


/* ===== v14 player status/progress + mobile back touch reliability ===== */
.player-page .player-top{z-index:70!important}
.player-page .player-back{
  position:relative;z-index:90!important;display:inline-flex;align-items:center;justify-content:center;
  min-width:112px;min-height:52px;padding:12px 18px!important;border-radius:15px!important;
  touch-action:manipulation;-webkit-user-select:none;user-select:none;-webkit-tap-highlight-color:rgba(120,140,255,.24);
  pointer-events:auto!important;cursor:pointer
}
.player-page .player-back:active{transform:scale(.97)!important;background:rgba(93,109,255,.28)!important}
.player-status{
  position:absolute;top:max(78px,calc(env(safe-area-inset-top) + 68px));left:50%;transform:translateX(-50%);
  z-index:45;display:flex;align-items:center;gap:9px;min-height:38px;max-width:min(88vw,520px);
  padding:9px 13px;border:1px solid rgba(255,255,255,.16);border-radius:999px;
  background:rgba(5,9,17,.76);backdrop-filter:blur(14px);box-shadow:0 10px 30px rgba(0,0,0,.28);
  color:#fff;font-size:13px;font-weight:800;letter-spacing:.01em;opacity:0;visibility:hidden;pointer-events:none;
  transition:opacity .18s ease,visibility .18s ease
}
.player-status.show{opacity:1;visibility:visible}
.player-status .status-dot{width:9px;height:9px;border-radius:50%;background:#fbbf24;box-shadow:0 0 0 4px rgba(251,191,36,.12);flex:0 0 auto}
.player-status[data-state="playing"] .status-dot{background:#34d399;box-shadow:0 0 0 4px rgba(52,211,153,.14)}
.player-status[data-state="paused"] .status-dot{background:#a78bfa;box-shadow:0 0 0 4px rgba(167,139,250,.14)}
.player-status[data-state="ready"] .status-dot{background:#60a5fa;box-shadow:0 0 0 4px rgba(96,165,250,.14)}
.player-status[data-state="error"] .status-dot{background:#fb7185;box-shadow:0 0 0 4px rgba(251,113,133,.14)}
.player-status .status-loader{width:32px;height:3px;overflow:hidden;border-radius:999px;background:rgba(255,255,255,.14);position:relative}
.player-status .status-loader:after{content:"";position:absolute;inset:0;width:45%;border-radius:inherit;background:#9aa8ff;animation:playerLoad 1s ease-in-out infinite}
.player-status:not([data-state="loading"]) .status-loader{display:none}
@keyframes playerLoad{0%{transform:translateX(-120%)}50%{transform:translateX(80%)}100%{transform:translateX(240%)}}
.vod-progress{
  position:absolute;left:50%;bottom:max(84px,calc(env(safe-area-inset-bottom) + 82px));transform:translateX(-50%);
  z-index:26;width:min(88vw,920px);display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:11px;
  padding:8px 12px;border:1px solid rgba(255,255,255,.12);border-radius:14px;background:rgba(7,11,18,.62);backdrop-filter:blur(12px);
  color:#fff;font-size:12px;font-weight:800;transition:opacity .2s ease,transform .2s ease,visibility .2s ease
}
.vod-progress input[type="range"]{width:100%;height:24px;accent-color:#7c83ff;cursor:pointer;touch-action:manipulation}
.vod-progress input[type="range"]:focus{outline:3px solid #fff;outline-offset:4px;border-radius:999px}
.player-page .video-stage[data-controls-visible="0"] .vod-progress,.player-page .video-stage.controls-hidden .vod-progress{display:none!important;opacity:0!important;visibility:hidden!important;pointer-events:none!important}
.player-page .video-stage[data-controls-visible="1"] .vod-progress{display:grid;opacity:1;visibility:visible;pointer-events:auto}
@media(max-width:700px){
  .player-page .player-back{min-width:104px;min-height:50px;padding:11px 15px!important;font-size:15px}
  .player-status{top:max(64px,calc(env(safe-area-inset-top) + 56px));font-size:12px;padding:8px 11px;max-width:90vw}
  .vod-progress{width:94vw;bottom:max(70px,calc(env(safe-area-inset-bottom) + 68px));gap:7px;padding:7px 9px;font-size:11px}
}


/* v15 — subscriber connection usage dashboard */
.hero-account-stats{display:flex;flex-wrap:wrap;gap:10px;align-items:center;justify-content:flex-end}
.connection-chip{display:inline-flex;align-items:center;gap:8px;min-height:42px;padding:9px 13px;border:1px solid rgba(119,140,255,.28);border-radius:14px;background:rgba(13,20,38,.84);box-shadow:0 8px 24px rgba(0,0,0,.16);font-size:.88rem;white-space:nowrap}
.connection-chip strong{font-size:.98rem;color:#fff}.connection-dot{width:9px;height:9px;border-radius:50%;background:#47d18c;box-shadow:0 0 0 4px rgba(71,209,140,.12)}
.connection-chip.at-limit{border-color:rgba(255,174,66,.55);background:rgba(70,43,10,.55)}.connection-chip.at-limit .connection-dot{background:#ffae42;box-shadow:0 0 0 4px rgba(255,174,66,.14)}
@media(max-width:700px){.hero-account-stats{width:100%;justify-content:flex-start}.connection-chip{flex:1 1 auto;justify-content:center}}


/* v16: WebView-safe VOD poster overlay. Do not use native video poster on TV sticks. */
.video-stage{position:relative;overflow:hidden;background:#000}
.video-stage>video{position:relative;z-index:1;background:#000;object-fit:contain;transform:translateZ(0);-webkit-transform:translateZ(0);backface-visibility:hidden;-webkit-backface-visibility:hidden}
.video-poster{position:absolute;inset:0;z-index:2;background-color:#000;background-size:contain;background-position:center;background-repeat:no-repeat;pointer-events:none;opacity:1;visibility:visible;transition:opacity .18s ease,visibility .18s ease}
.video-poster.hide,.video-stage.video-has-frame .video-poster{opacity:0!important;visibility:hidden!important;pointer-events:none!important}
.player-status,.player-message,.vod-progress,.pro-controls{z-index:8}
.player-top{z-index:12}

/* v17 library navigation */
.library-heading{display:flex;align-items:end;justify-content:space-between;gap:16px;margin:6px 0 10px}.library-heading h2{margin:2px 0}.live-category-bar::-webkit-scrollbar,.vod-category-bar::-webkit-scrollbar{display:none}.live-cat,.vod-cat{min-height:44px;touch-action:manipulation}.live-cat:focus,.vod-cat:focus{outline:none;border-color:#8da0ff;box-shadow:0 0 0 4px rgba(83,111,255,.18)}

/* =========================================================
   v19 PRO UI — TV / TV Stick / Tablet / Mobile
   ========================================================= */
:root{
  --v19-surface:rgba(14,22,38,.88);
  --v19-surface2:rgba(19,29,49,.92);
  --v19-border:rgba(151,166,211,.16);
  --v19-glow:0 22px 70px rgba(0,0,0,.38);
}
html{scroll-behavior:smooth}
body{background:
  radial-gradient(900px 520px at -5% -10%,rgba(69,91,201,.24),transparent 62%),
  radial-gradient(850px 480px at 105% 0,rgba(120,60,187,.18),transparent 58%),
  linear-gradient(180deg,#070b14 0%,#080d17 55%,#060a12 100%);background-attachment:fixed}
body.modal-open{overflow:hidden!important;touch-action:none}
.topbar{min-height:68px;padding:12px clamp(14px,2vw,28px);background:rgba(5,10,19,.82);border-color:var(--v19-border);box-shadow:0 8px 30px rgba(0,0,0,.18)}
.topbar-brand b{font-size:17px;letter-spacing:.01em}.topbar-brand small{font-size:12px}
.topbar-actions .btn{min-height:44px;display:inline-flex;align-items:center;justify-content:center;border-radius:13px;border:1px solid var(--v19-border);background:rgba(255,255,255,.045);font-weight:800}
.topbar-actions .btn:hover{background:rgba(112,124,255,.13);border-color:rgba(130,144,255,.38)}
.wrap{width:min(100%,1680px);padding:clamp(14px,2.2vw,34px)}
.hero-strip{position:relative;overflow:hidden;padding:clamp(18px,2.3vw,30px);border-color:var(--v19-border);background:linear-gradient(135deg,rgba(24,38,69,.94),rgba(17,23,43,.91));box-shadow:var(--v19-glow)}
.hero-strip:after{content:"";position:absolute;width:320px;height:320px;border-radius:50%;right:-110px;top:-180px;background:radial-gradient(circle,rgba(112,97,255,.26),transparent 68%);pointer-events:none}
.hero-strip h1{font-size:clamp(24px,3vw,40px);letter-spacing:-.035em}.hero-strip p{font-size:clamp(13px,1.2vw,16px)}
.media-tabs{position:sticky;top:74px;z-index:12;padding:6px;margin:0 0 14px;width:max-content;max-width:100%;background:rgba(7,12,22,.8);backdrop-filter:blur(14px);border:1px solid var(--v19-border);border-radius:17px}
.tab{min-height:46px;padding:10px 18px;border-radius:12px;border:0;font-weight:900;letter-spacing:.01em}.tab.active{box-shadow:0 8px 24px rgba(86,93,255,.27)}
.search{width:min(100%,720px);min-height:50px;border-radius:15px;background:rgba(11,18,31,.86);border:1px solid var(--v19-border);padding:0 16px;font-size:15px}
.search:focus{border-color:#8092ff;box-shadow:0 0 0 4px rgba(106,120,255,.13);outline:none}
.library-heading{margin-top:10px}.library-heading h2{font-size:clamp(21px,2vw,30px);letter-spacing:-.025em}
.category-scroll{gap:9px;padding:4px 2px 16px;scroll-padding-inline:8px}.live-cat,.vod-cat{min-height:46px;padding:10px 17px;background:rgba(18,27,46,.9);border:1px solid var(--v19-border);font-weight:800}.live-cat.active,.vod-cat.active{background:linear-gradient(135deg,rgba(84,108,255,.33),rgba(111,78,223,.28));border-color:#7285ff}
.grid{grid-template-columns:repeat(auto-fill,minmax(230px,1fr));gap:15px}.card{min-height:108px;padding:15px;border-radius:19px;border:1px solid var(--v19-border);background:linear-gradient(180deg,rgba(18,28,48,.96),rgba(11,18,31,.96))}.card img{width:78px;height:78px}.card strong{font-size:16px}
.movie-grid{grid-template-columns:repeat(auto-fill,minmax(164px,1fr));gap:17px}.movie-card{padding:8px;border-radius:18px;border:1px solid var(--v19-border);background:linear-gradient(180deg,rgba(17,27,47,.97),rgba(10,16,29,.98));box-shadow:0 8px 24px rgba(0,0,0,.15)}.movie-card img{border-radius:13px}.movie-card strong{font-size:14px;line-height:1.25}.movie-card span{line-height:1.35}
.focusable,.tab,.live-cat,.vod-cat,.topbar .btn{transition:transform .16s ease,border-color .16s ease,box-shadow .16s ease,background .16s ease}

/* TV-safe PIN dialog: no dependency on native <dialog> support. */
.pin-modal{position:fixed!important;inset:0!important;z-index:2147483000!important;display:flex!important;align-items:center!important;justify-content:center!important;padding:max(18px,env(safe-area-inset-top)) max(18px,env(safe-area-inset-right)) max(18px,env(safe-area-inset-bottom)) max(18px,env(safe-area-inset-left));overflow:auto!important;background:rgba(0,0,0,.84)!important;backdrop-filter:blur(18px);-webkit-backdrop-filter:blur(18px)}
.pin-modal[hidden]{display:none!important}.pin-modal.open{display:flex!important;visibility:visible!important;opacity:1!important}
.modal-scrim{position:fixed;inset:0;z-index:0;background:transparent}
.pin-card{position:relative;z-index:2;width:min(94vw,520px);max-height:94vh;overflow:auto;padding:clamp(20px,3vw,30px);border-radius:26px;background:linear-gradient(180deg,#121c31,#0b1322);border:1px solid rgba(163,178,225,.2);box-shadow:0 40px 120px rgba(0,0,0,.72),0 0 0 1px rgba(255,255,255,.03) inset}
.pin-head{display:flex;align-items:center;gap:15px;margin-bottom:14px}.pin-head h3{margin:2px 0 4px;font-size:clamp(23px,3vw,30px)}.pin-head p{margin:0;color:var(--muted);font-size:13px}.pin-icon{width:54px;height:54px;border-radius:17px;display:grid;place-items:center;font-size:24px;background:linear-gradient(135deg,#526dff,#7b56dc);box-shadow:0 12px 30px rgba(81,96,255,.28)}
.pin-card #pinInput{display:block!important;position:relative!important;width:100%!important;height:62px!important;margin:14px 0!important;padding:0 16px!important;border-radius:17px!important;border:1px solid rgba(145,160,211,.27)!important;background:#070d18!important;color:#fff!important;font-size:28px!important;letter-spacing:.25em!important;text-align:center!important;opacity:1!important;visibility:visible!important;-webkit-text-security:disc}
.pin-card #pinInput:focus{outline:4px solid #fff!important;outline-offset:3px!important;border-color:#7f91ff!important;box-shadow:0 0 0 8px rgba(92,108,255,.37)!important}
.pin-keypad{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:10px 0 14px}.pin-keypad button{min-height:58px;border-radius:15px;border:1px solid rgba(145,160,211,.19);background:linear-gradient(180deg,#1a2741,#121c30);color:#fff;font-size:21px;font-weight:900;cursor:pointer}.pin-keypad .pin-small{font-size:13px}.pin-keypad button:active{transform:scale(.96)}
.pin-actions{display:grid;grid-template-columns:1fr 1.35fr;gap:10px}.pin-actions button{min-height:54px;border-radius:15px;font-weight:900}.primary-action{background:linear-gradient(135deg,#5876ff,#7957df)!important;color:#fff!important;border:0!important}.pin-error{margin:0 0 10px}
.pin-modal [data-tv-focus]:focus{outline:4px solid #fff!important;outline-offset:3px!important;box-shadow:0 0 0 8px rgba(95,111,255,.52)!important;transform:scale(1.035)!important;z-index:5}

/* Tablet */
@media (min-width:700px) and (max-width:1100px){
  .wrap{padding:22px}.grid{grid-template-columns:repeat(3,minmax(0,1fr))}.movie-grid{grid-template-columns:repeat(4,minmax(0,1fr))}.hero-strip{align-items:flex-start}.media-tabs{top:72px}
}
/* Phones */
@media(max-width:699px){
  .topbar{position:sticky;min-height:60px;padding:9px 11px}.mini-logo{width:34px;height:34px}.topbar-brand b{font-size:14px}.topbar-brand small{font-size:10px}.topbar-actions{gap:6px}.topbar-actions .btn{min-height:40px;padding:8px 10px!important;font-size:12px!important}
  .wrap{padding:12px}.hero-strip{border-radius:18px;padding:16px;margin-bottom:12px;flex-direction:column;gap:12px}.hero-strip h1{font-size:24px}.hero-account-stats{gap:7px}.account-chip,.connection-chip{min-height:38px;padding:8px 10px;font-size:11px}
  .media-tabs{top:63px;width:100%;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:5px;border-radius:14px}.media-tabs .tab:only-child{grid-column:1/-1}.tab{min-height:44px;padding:8px 9px;font-size:13px}
  .search{min-height:46px;margin-bottom:14px}.library-heading{align-items:flex-end}.library-heading h2{font-size:20px}.library-heading .muted{font-size:11px}
  .category-scroll{margin-inline:-12px;padding-inline:12px;scroll-snap-type:x proximity}.category-scroll>button{scroll-snap-align:start}
  .grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.card{min-height:0;display:flex;flex-direction:column;gap:8px;text-align:center;padding:10px;border-radius:15px}.card img{width:64px;height:64px}.card strong{font-size:12px}.card span,.card em{font-size:10px}
  .movie-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:9px}.movie-card{padding:5px;border-radius:13px}.movie-card img{border-radius:10px}.movie-card strong{font-size:11px;margin-top:7px}.movie-card span{font-size:9px}.lock-chip{font-size:9px;padding:4px 6px}
  .pin-modal{align-items:flex-end!important;padding:10px!important}.pin-card{width:100%;max-height:min(92dvh,760px);border-radius:25px 25px 15px 15px;padding:18px}.pin-head{gap:12px}.pin-icon{width:46px;height:46px}.pin-head h3{font-size:22px}.pin-keypad button{min-height:52px}.pin-actions button{min-height:50px}
}
@media(max-width:430px){.movie-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.pin-keypad{gap:8px}.pin-keypad button{min-height:50px}}

/* Big-screen TV / TV Stick */
@media(min-width:1100px){
  body{font-size:16px}.topbar{min-height:78px;padding:14px 30px}.mini-logo{width:44px;height:44px;border-radius:14px}.topbar-brand b{font-size:20px}.topbar-brand small{font-size:13px}.topbar-actions .btn{min-width:112px;min-height:50px;font-size:15px}
  .wrap{padding:28px 34px 50px}.media-tabs{top:86px}.tab{min-width:160px;min-height:52px;font-size:16px}.search{min-height:56px;font-size:17px}.live-cat,.vod-cat{min-height:52px;font-size:15px;padding-inline:20px}
  .grid{grid-template-columns:repeat(auto-fill,minmax(250px,1fr));gap:18px}.card{min-height:118px}.card img{width:86px;height:86px}.card strong{font-size:17px}.movie-grid{grid-template-columns:repeat(auto-fill,minmax(180px,1fr));gap:20px}.movie-card strong{font-size:15px}
  [data-tv-focus]:focus,.focusable:focus,.episode-card:focus{outline:5px solid #fff!important;outline-offset:5px!important;box-shadow:0 0 0 11px rgba(91,105,255,.58),0 22px 48px rgba(0,0,0,.5)!important;transform:scale(1.045)!important}
  .pin-card{width:min(620px,86vw);padding:32px}.pin-keypad button{min-height:70px;font-size:26px}.pin-actions button{min-height:64px;font-size:18px}.pin-card #pinInput{height:72px!important;font-size:34px!important}
}


/* ===== v20 Universal TV PIN Page =====
   Dedicated page instead of overlay/modal. Uses conservative CSS so old Android TV
   System WebView builds can render it reliably. */
.pin-page{margin:0;min-height:100vh;background:#050912;color:#f7f9ff;overflow:auto}
.tv-pin-page{background:radial-gradient(circle at 50% 0,rgba(64,81,205,.28),transparent 42%),#050912}
.tv-pin-shell{min-height:100vh;width:100%;display:flex;align-items:center;justify-content:center;padding:28px;box-sizing:border-box}
.tv-pin-card{width:560px;max-width:94vw;background:#0d1626;border:2px solid #27395b;border-radius:24px;padding:28px;box-shadow:0 28px 80px rgba(0,0,0,.62);box-sizing:border-box}
.tv-pin-brand{display:flex;align-items:center;gap:12px;padding-bottom:18px;margin-bottom:20px;border-bottom:1px solid #22314d}.tv-pin-brand>div:last-child{display:flex;flex-direction:column;gap:3px}.tv-pin-brand small{color:#93a2bd}
.tv-pin-heading{display:flex;gap:16px;align-items:center;margin-bottom:18px}.tv-pin-lock{width:64px;height:64px;min-width:64px;display:flex;align-items:center;justify-content:center;border-radius:18px;background:#526dff;font-size:28px}.tv-pin-heading h1{margin:3px 0 5px;font-size:30px}.tv-pin-heading p{margin:0;color:#9ba9c2;line-height:1.4}
.tv-pin-input{display:block!important;width:100%!important;height:62px!important;box-sizing:border-box!important;margin:0 0 10px!important;padding:0 16px!important;border:2px solid #30456c!important;border-radius:14px!important;background:#050b14!important;color:#fff!important;font-size:28px!important;letter-spacing:.25em!important;text-align:center!important;opacity:1!important;visibility:visible!important}
.tv-pin-dots{min-height:30px;text-align:center;color:#aab7d0;font-size:18px;letter-spacing:5px;margin:2px 0 14px}
.tv-keypad{display:flex;display:grid;flex-wrap:wrap;grid-template-columns:repeat(3,1fr);gap:12px}.tv-keypad button{min-height:66px;border:2px solid #31476f;border-radius:14px;background:#172540;color:#fff;font-size:25px;font-weight:900;box-shadow:none}.tv-keypad .key-small{font-size:14px}
.tv-pin-actions{display:flex;display:grid;grid-template-columns:1fr 1.3fr;gap:12px;margin-top:14px}.tv-pin-actions button{min-height:62px;font-size:17px;font-weight:900;border:2px solid #31476f}.tv-pin-actions .primary-action{background:#5c6fff!important}
.tv-pin-help{margin:16px 0 0;text-align:center;color:#8291ab;font-size:12px;line-height:1.4}.tv-pin-error{margin:0 0 14px;padding:12px 14px;border:1px solid #9b4355;border-radius:12px;background:#5f2532;color:#fff;font-weight:800;text-align:center}
.tv-pin-page [data-tv-focus]:focus,.tv-pin-page button:focus,.tv-pin-page input:focus{outline:5px solid #fff!important;outline-offset:4px!important;box-shadow:0 0 0 10px rgba(76,98,255,.55)!important;transform:scale(1.035);z-index:3}
.vod-cat[role="button"]{display:inline-flex;align-items:center;justify-content:center;text-decoration:none}.vod-cat.locked-category{border-color:#66577b;background:#241a31}
@media(max-width:699px){.tv-pin-shell{padding:12px;align-items:flex-start}.tv-pin-card{margin-top:10px;padding:18px;border-radius:20px}.tv-pin-heading h1{font-size:24px}.tv-pin-lock{width:50px;height:50px;min-width:50px}.tv-keypad{gap:9px}.tv-keypad button{min-height:54px}.tv-pin-actions button{min-height:54px}.tv-pin-input{height:54px!important;font-size:24px!important}}
@media(min-width:1100px){.tv-pin-card{width:660px;padding:34px}.tv-pin-heading h1{font-size:36px}.tv-pin-input{height:76px!important;font-size:34px!important}.tv-keypad button{min-height:78px;font-size:30px}.tv-keypad .key-small{font-size:16px}.tv-pin-actions button{min-height:72px;font-size:20px}}

/* ===== v23 Universal device profile / TV layout ===== */
html.device-tv{font-size:16px;scroll-behavior:auto!important}
html.device-tv body{overscroll-behavior:none;-webkit-tap-highlight-color:transparent}
html.device-tv .topbar{min-height:76px;padding:13px 28px;gap:18px}
html.device-tv .topbar-brand{min-width:0}.device-tv .topbar-brand b{font-size:19px}.device-tv .topbar-brand small{font-size:12px;white-space:normal}
html.device-tv .topbar-actions{gap:10px}.device-tv .topbar-actions .btn{min-width:116px;min-height:50px;padding:12px 16px!important;font-size:15px!important}
html.device-tv .wrap{padding:24px 30px 54px;max-width:1900px;margin:0 auto}
html.device-tv .hero-strip{padding:24px 28px;border-radius:22px}.device-tv .hero-strip h1{font-size:32px}.device-tv .hero-strip p{font-size:15px}
html.device-tv .media-tabs{top:82px;padding:7px;gap:7px}.device-tv .tab{min-width:170px;min-height:54px;padding:12px 20px;font-size:16px}
html.device-tv .search{height:56px;min-height:56px;font-size:17px;padding:0 18px;border-radius:16px}
html.device-tv .category-scroll{gap:10px;padding-block:8px 12px;scroll-behavior:auto}.device-tv .live-cat,.device-tv .vod-cat{min-height:52px;padding:11px 20px;font-size:15px;flex:0 0 auto}
html.device-tv .grid{grid-template-columns:repeat(auto-fill,minmax(235px,1fr));gap:17px}.device-tv .card{min-height:116px;padding:15px}.device-tv .card img{width:82px;height:82px}.device-tv .card strong{font-size:16px}
html.device-tv .movie-grid{grid-template-columns:repeat(auto-fill,minmax(165px,1fr));gap:18px}.device-tv .movie-card{padding:7px}.device-tv .movie-card strong{font-size:15px;line-height:1.25}
html.device-tv .episode-list{gap:12px}.device-tv .episode-card{min-height:72px;padding:15px 18px;font-size:16px}
html.device-tv .panel{padding:22px}.device-tv .series-hero{min-height:310px;padding:28px}.device-tv .series-hero img{width:190px}
html.device-tv [data-tv-focus]:focus,html.device-tv a:focus,html.device-tv button:focus,html.device-tv input:focus,html.device-tv select:focus,html.device-tv textarea:focus,html.device-tv [role="button"]:focus{outline:5px solid #fff!important;outline-offset:5px!important;box-shadow:0 0 0 10px rgba(88,108,255,.58),0 18px 46px rgba(0,0,0,.52)!important;transform:scale(1.035);position:relative;z-index:30}
html.device-tv input:focus,html.device-tv select:focus,html.device-tv textarea:focus{transform:none}
html.device-tv .tv-pin-shell{padding:22px}.device-tv .tv-pin-card{width:650px;max-width:92vw;padding:32px}.device-tv .tv-keypad button{min-height:76px;font-size:28px}.device-tv .tv-pin-actions button{min-height:68px;font-size:19px}.device-tv .tv-pin-input{height:72px!important;font-size:32px!important}
html.device-tv .player-top{min-height:72px}.device-tv .player-back{min-width:150px;min-height:54px;font-size:16px}.device-tv .pro-controls button{min-width:74px;min-height:58px;font-size:22px}.device-tv .live-controls button{min-width:110px}
html.device-tv .vod-progress{left:50%;right:auto;bottom:90px;width:min(90vw,1100px);transform:translateX(-50%)}.device-tv #timeline{height:26px}

/* Some TV WebViews report only 960x540 CSS pixels. Keep TV sizing compact enough to fit. */
html.device-tv-lowres .topbar{min-height:62px;padding:8px 18px}.device-tv-lowres .topbar-actions .btn{min-height:42px;min-width:94px;font-size:13px!important}.device-tv-lowres .wrap{padding:16px 20px 40px}.device-tv-lowres .hero-strip{padding:17px 20px}.device-tv-lowres .hero-strip h1{font-size:26px}.device-tv-lowres .media-tabs{top:66px}.device-tv-lowres .tab{min-height:46px;min-width:145px;font-size:14px}.device-tv-lowres .search{height:48px;min-height:48px}.device-tv-lowres .live-cat,.device-tv-lowres .vod-cat{min-height:45px;font-size:13px}.device-tv-lowres .grid{grid-template-columns:repeat(auto-fill,minmax(190px,1fr));gap:12px}.device-tv-lowres .card{min-height:96px}.device-tv-lowres .card img{width:66px;height:66px}.device-tv-lowres .movie-grid{grid-template-columns:repeat(auto-fill,minmax(135px,1fr));gap:13px}.device-tv-lowres .tv-pin-card{width:570px;padding:22px}.device-tv-lowres .tv-keypad button{min-height:56px;font-size:22px}.device-tv-lowres .tv-pin-actions button{min-height:54px}

html.device-tablet .wrap{max-width:1200px;margin:0 auto;padding:20px}.device-tablet .grid{grid-template-columns:repeat(3,minmax(0,1fr))}.device-tablet .movie-grid{grid-template-columns:repeat(4,minmax(0,1fr))}
html.device-phone .movie-grid{grid-template-columns:repeat(2,minmax(0,1fr))}

/* v27 admin uses normal browser/touch/keyboard navigation; no TV spatial-nav JS is loaded in admin. */
html.device-tv .panel input,html.device-tv .panel select,html.device-tv .panel textarea,html.device-tv .form-control{min-height:50px;font-size:15px}
html.device-tv table a,html.device-tv table button{min-height:42px;display:inline-flex;align-items:center}
html.device-tv .btn{min-height:46px}


/* ===== v23 Universal TV Login Keyboard ===== */
.tv-login-keyboard{display:none;position:fixed;inset:0;z-index:2147483600;background:#03060d;padding:18px;box-sizing:border-box;align-items:center;justify-content:center;overflow:auto}
.tv-login-keyboard.open:not([hidden]){display:flex!important}
.tv-login-keyboard-card{width:min(1180px,96vw);max-height:96vh;overflow:auto;background:#0b1424;border:2px solid #2c4169;border-radius:22px;padding:20px;box-sizing:border-box;box-shadow:0 30px 90px rgba(0,0,0,.7)}
.tv-login-kb-head{display:flex;align-items:center;justify-content:space-between;gap:18px;margin-bottom:12px}.tv-login-kb-head>div{display:flex;flex-direction:column;gap:4px}.tv-login-kb-head b{font-size:22px}.tv-login-kb-head small{color:#9aa9c2}.tv-kb-close{min-width:110px;min-height:48px}
.tv-kb-preview{min-height:54px;display:flex;align-items:center;padding:0 16px;margin-bottom:14px;border:2px solid #30466d;border-radius:13px;background:#050a12;color:#fff;font-size:25px;letter-spacing:.04em;overflow:hidden;white-space:nowrap}
.tv-kb-grid{display:grid;grid-template-columns:repeat(10,minmax(0,1fr));gap:8px}.tv-kb-grid button,.tv-kb-actions button,.tv-kb-close{border:2px solid #30466d;border-radius:11px;background:#172541;color:#fff;font-weight:900;cursor:pointer}
.tv-kb-grid button{min-height:54px;font-size:18px}.tv-kb-actions{display:grid;grid-template-columns:1fr 2fr 1fr 1.4fr;gap:9px;margin-top:10px}.tv-kb-actions button{min-height:54px;font-size:15px}.tv-kb-actions .active{background:#4f63d9;border-color:#9aa8ff}
.tv-login-keyboard button:focus{outline:4px solid #fff!important;outline-offset:3px!important;box-shadow:0 0 0 8px rgba(83,105,255,.58)!important;transform:scale(1.045)!important;position:relative;z-index:5}
html.device-tv .login-card input[data-tv-input]{min-height:58px;font-size:18px;cursor:pointer}
html.device-tv .login-card input[data-tv-input]:focus{border-color:#fff!important;box-shadow:0 0 0 6px rgba(85,105,255,.45)!important}
@media(max-width:1000px){.tv-login-keyboard{padding:8px}.tv-login-keyboard-card{width:98vw;padding:12px;border-radius:16px}.tv-login-kb-head{margin-bottom:8px}.tv-login-kb-head b{font-size:17px}.tv-login-kb-head small{font-size:11px}.tv-kb-preview{min-height:42px;font-size:19px;margin-bottom:9px}.tv-kb-grid{gap:5px}.tv-kb-grid button{min-height:42px;font-size:15px}.tv-kb-actions{gap:6px;margin-top:7px}.tv-kb-actions button{min-height:44px;font-size:13px}.tv-kb-close{min-height:42px;min-width:84px}}
@media(max-height:560px){.tv-login-keyboard{align-items:flex-start}.tv-login-keyboard-card{margin-top:2px}.tv-login-kb-head small{display:none}.tv-kb-preview{min-height:38px;margin-bottom:6px}.tv-kb-grid button{min-height:38px}.tv-kb-actions button{min-height:40px}}
\n\n/* v24 Native Keyboard Stability Fix */\n.tv-login-keyboard{display:none!important}\ninput,textarea,select{touch-action:manipulation}\ninput[type=text],input[type=password],input[type=search],input[type=email],input[type=number],textarea{\n  -webkit-user-select:text!important;user-select:text!important;pointer-events:auto!important;\n}\n.device-tv input:focus,.device-tv textarea:focus,.device-tv select:focus{\n  outline:4px solid #fff!important;outline-offset:3px!important;box-shadow:0 0 0 8px rgba(95,111,255,.5)!important;\n}\n.device-phone input:focus,.device-tablet input:focus,.device-phone textarea:focus,.device-tablet textarea:focus{\n  transform:none!important;zoom:1!important;\n}\nbody.tv-keyboard-open{overflow:auto!important}\n\n\n/* v26 System Keyboard + Universal Remote Navigation */\n.tv-login-keyboard,.custom-tv-keyboard,[data-tv-keyboard]{display:none!important}\nhtml,body{height:auto;min-height:100%}\ninput,textarea,select{pointer-events:auto!important;touch-action:manipulation!important}\ninput[type=text],input[type=password],input[type=search],input[type=email],input[type=tel],input[type=url],input[type=number],textarea{\n  -webkit-user-select:text!important;user-select:text!important;transform:none!important;zoom:1!important\n}\n.login-card input{font-size:16px!important}\nhtml.device-tv .login-card input{min-height:58px;font-size:18px!important}\nhtml.device-tv .login-card input:focus,html.device-tv .login-card button:focus{\n outline:4px solid #fff!important;outline-offset:4px!important;box-shadow:0 0 0 9px rgba(95,111,255,.48)!important;transform:none!important\n}\n@media(max-width:699px){.login-card input{font-size:16px!important;min-height:50px}}\n
/* v28 subtitle controls */
.subtitle-btn{min-width:58px;font-weight:900;letter-spacing:.04em}
.subtitle-btn.active,.subtitle-btn[aria-pressed="true"]{background:#fff!important;color:#080b12!important;box-shadow:0 0 0 3px rgba(255,255,255,.35)!important}
.subtitle-btn:disabled{opacity:.45;cursor:not-allowed}
video::cue{background:rgba(0,0,0,.78);color:#fff;text-shadow:0 1px 2px #000}

/* v29 multiple subtitle admin */
.subtitle-admin-box{display:block}.subtitle-admin-row{display:grid;grid-template-columns:minmax(120px,.7fr) minmax(80px,.35fr) minmax(240px,2fr) auto;gap:8px;margin:8px 0;align-items:center}.subtitle-admin-row input{min-width:0}.add-subtitle{margin-top:6px}.subtitle-btn{max-width:220px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}@media(max-width:760px){.subtitle-admin-row{grid-template-columns:1fr 100px}.subtitle-admin-row input[name="subtitle_url_multi[]"]{grid-column:1/-1}.subtitle-admin-row .remove-subtitle{grid-column:1/-1}}


/* ===== v30 Hamburger navigation ===== */
.hamburger-wrap{position:relative;display:flex;align-items:center;justify-content:flex-end}
.hamburger-btn{width:48px;height:48px;min-width:48px;padding:0;border-radius:14px;display:inline-flex;align-items:center;justify-content:center;background:rgba(255,255,255,.055);border:1px solid var(--line);color:#fff;font-size:27px;line-height:1;font-weight:900;cursor:pointer}
.hamburger-btn:hover,.hamburger-btn:focus{background:rgba(112,124,255,.16);border-color:#7184ff;outline:none;box-shadow:0 0 0 4px rgba(83,111,255,.16)}
.hamburger-panel{position:absolute;right:0;top:calc(100% + 10px);z-index:120;width:min(320px,calc(100vw - 24px));padding:9px;border-radius:17px;border:1px solid #2b3852;background:rgba(8,13,23,.985);box-shadow:0 22px 65px rgba(0,0,0,.48);backdrop-filter:blur(22px)}
.hamburger-panel[hidden]{display:none!important}.hamburger-panel a,.hamburger-panel button.menu-item{width:100%;min-height:48px;padding:11px 13px;border:0;border-radius:12px;display:flex;align-items:center;gap:11px;background:transparent;color:#d8e0ef;text-align:left;font-weight:800;text-decoration:none}
.hamburger-panel a:hover,.hamburger-panel a:focus,.hamburger-panel a.active,.hamburger-panel button.menu-item:hover,.hamburger-panel button.menu-item:focus{background:#17233a;color:#fff;outline:none}
.hamburger-panel .menu-danger{color:#ffb5bd}.hamburger-panel .menu-separator{height:1px;margin:6px 4px;background:#24314a}.hamburger-panel .menu-label{padding:7px 11px 5px;color:#7686a4;font-size:11px;font-weight:900;letter-spacing:.08em;text-transform:uppercase}
.hamburger-backdrop{position:fixed;inset:0;z-index:110;background:transparent}.hamburger-backdrop[hidden]{display:none!important}
.topbar .hamburger-wrap{z-index:40}.topbar .hamburger-panel{position:fixed;right:16px;top:74px}.topbar-actions{display:none!important}
.admin-header .hamburger-wrap{margin-left:auto}.admin-header .hamburger-panel{position:fixed;right:16px;top:72px}
.admin-header.hamburger-header{position:sticky;left:auto;top:0;bottom:auto;width:auto;height:auto;z-index:90;display:flex;flex-direction:row;align-items:center;justify-content:space-between;padding:11px 18px;border-right:0;border-bottom:1px solid var(--line);box-shadow:0 8px 28px rgba(0,0,0,.18)}
.admin-header.hamburger-header .admin-brand{padding:0;border:0;margin:0}.admin-header.hamburger-header .nav{display:none!important}.admin-header.hamburger-header + .admin-main{margin-left:0!important}
.admin-main{margin-left:0!important}
@media(max-width:700px){.hamburger-btn{width:44px;height:44px;min-width:44px;font-size:25px;border-radius:12px}.topbar .hamburger-panel,.admin-header .hamburger-panel{right:10px;top:64px;width:calc(100vw - 20px)}.admin-header.hamburger-header{flex-direction:row!important;align-items:center!important;padding:9px 12px}.topbar-brand small{max-width:62vw}}
html.device-tv .hamburger-btn{width:56px;height:56px;min-width:56px;font-size:31px}.device-tv .hamburger-panel{width:360px}.device-tv .hamburger-panel a{min-height:56px;font-size:17px}.device-tv-lowres .hamburger-btn{width:48px;height:48px;min-width:48px}.device-tv-lowres .hamburger-panel a{min-height:48px;font-size:14px}


/* v31 Clean Home Header: compact Search icon + menu-only library switcher */
.clean-topbar{display:flex;align-items:center;justify-content:space-between;gap:14px}
.topbar-compact-actions{margin-left:auto;display:flex;align-items:center;gap:9px;position:relative;z-index:45}
.header-search{position:relative;display:flex;align-items:center}
.header-icon-btn{width:48px;height:48px;min-width:48px;padding:0;border-radius:14px;display:inline-flex;align-items:center;justify-content:center;background:rgba(255,255,255,.055);border:1px solid var(--line);color:#fff;font-size:29px;line-height:1;font-weight:900;cursor:pointer}
.header-icon-btn:hover,.header-icon-btn:focus{background:rgba(112,124,255,.16);border-color:#7184ff;outline:none;box-shadow:0 0 0 4px rgba(83,111,255,.16)}
.header-search-popover{position:fixed;z-index:125;right:80px;top:12px;width:min(480px,calc(100vw - 150px));min-height:48px;display:grid;grid-template-columns:32px minmax(0,1fr) 38px;align-items:center;gap:6px;padding:5px 7px 5px 12px;border:1px solid #2b3852;border-radius:15px;background:rgba(8,13,23,.985);box-shadow:0 18px 55px rgba(0,0,0,.42);backdrop-filter:blur(22px)}
.header-search-popover[hidden]{display:none!important}
.header-search-glyph{font-size:22px;opacity:.7;text-align:center}
.header-search-input{width:100%;min-width:0;height:38px;padding:0 4px;border:0!important;background:transparent!important;color:#fff;font-size:15px;box-shadow:none!important;outline:none!important}
.header-search-input::-webkit-search-cancel-button{display:none}
.header-search-clear{width:36px;height:36px;padding:0;border:0;border-radius:10px;background:transparent;color:#9aa8bf;font-size:26px;line-height:1;cursor:pointer}
.header-search-clear:hover,.header-search-clear:focus{background:#17233a;color:#fff;outline:none}
.clean-library-wrap .media-tabs{display:none!important}
.clean-library-wrap{padding-top:22px}
.clean-library-wrap .hero-strip{margin-bottom:22px}
.clean-library-wrap .library-heading{margin-top:0}
@media(max-width:700px){
 .topbar-compact-actions{gap:7px}.header-icon-btn{width:44px;height:44px;min-width:44px;font-size:26px;border-radius:12px}
 .header-search-popover{right:60px;top:9px;width:calc(100vw - 72px);min-height:44px;border-radius:13px}
 .header-search-input{font-size:16px}.clean-library-wrap{padding-top:14px}
 .clean-library-wrap .hero-strip{margin-bottom:16px}
}
html.device-tv .header-icon-btn{width:56px;height:56px;min-width:56px;font-size:32px}
html.device-tv .header-search-popover{right:94px;top:13px;width:min(620px,calc(100vw - 190px));min-height:56px}
html.device-tv .header-search-input{height:46px;font-size:18px}
html.device-tv-lowres .header-icon-btn{width:48px;height:48px;min-width:48px}
html.device-tv-lowres .header-search-popover{right:76px;top:8px;min-height:48px}

/* ===== v32 Subscription moved into hamburger menu ===== */
.menu-subscription{margin:4px 3px 8px;padding:12px 13px;border:1px solid #26344d;border-radius:13px;background:rgba(255,255,255,.035)}
.menu-subscription-title{margin-bottom:9px;color:#7f90ae;font-size:11px;font-weight:900;letter-spacing:.09em}
.menu-subscription-row{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;padding:5px 0;color:#9cabbe;font-size:12px}
.menu-subscription-row strong{max-width:66%;color:#eef4ff;text-align:right;font-size:12px;line-height:1.35}
.clean-library-wrap{padding-top:18px}
.clean-library-wrap>.media-section:first-child{margin-top:0}
.device-tv .menu-subscription{padding:14px 15px}.device-tv .menu-subscription-title{font-size:12px}.device-tv .menu-subscription-row,.device-tv .menu-subscription-row strong{font-size:14px}
@media(max-width:700px){.menu-subscription{padding:10px 11px}.menu-subscription-row{font-size:11px}.menu-subscription-row strong{font-size:11px}.clean-library-wrap{padding-top:12px}}


/* ===== v33 Attractive account countdown under brand ===== */
.brand-copy{min-width:0}
.brand-copy>b{display:block;font-size:16px;line-height:1.15;letter-spacing:-.01em}
.account-status-line{display:flex;align-items:center;gap:7px;min-width:0;margin-top:6px;color:#aebbd0;font-size:13px;font-weight:700;line-height:1.15}
.account-user{max-width:170px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#dce6f8}
.account-divider{color:#50617c;font-size:10px}
.account-countdown{display:inline-flex;align-items:center;gap:7px;padding:5px 9px;border:1px solid rgba(103,129,255,.30);border-radius:999px;background:linear-gradient(135deg,rgba(80,105,255,.14),rgba(72,189,255,.08));box-shadow:inset 0 1px 0 rgba(255,255,255,.04);color:#f4f7ff;font-size:14px;font-weight:900;font-variant-numeric:tabular-nums;white-space:nowrap}
.account-live-dot{width:7px;height:7px;flex:0 0 7px;border-radius:50%;background:#55dea0;box-shadow:0 0 0 4px rgba(85,222,160,.10),0 0 10px rgba(85,222,160,.28)}
.account-max{padding:4px 7px;border-radius:8px;background:rgba(255,255,255,.045);color:#93a5bf;font-size:11px;font-weight:800;white-space:nowrap}
#expiryCountdown{letter-spacing:.01em}
#expiryCountdown.expired{color:#ff7d8b}
@media(max-width:700px){
 .brand-copy>b{font-size:15px}
 .account-status-line{gap:5px;margin-top:5px;font-size:11px}
 .account-user{max-width:82px}
 .account-countdown{gap:5px;padding:4px 7px;font-size:12px}
 .account-max{padding:3px 5px;font-size:10px}
 .account-divider{display:none}
}
html.device-tv .brand-copy>b{font-size:19px}
html.device-tv .account-status-line{gap:9px;margin-top:7px;font-size:15px}
html.device-tv .account-countdown{padding:7px 12px;font-size:17px;border-radius:12px}
html.device-tv .account-user{max-width:220px;font-size:14px}
html.device-tv .account-max{padding:6px 9px;font-size:13px}
html.device-tv-lowres .account-status-line{gap:6px}
html.device-tv-lowres .account-countdown{padding:5px 8px;font-size:14px}
html.device-tv-lowres .account-user{max-width:140px;font-size:12px}


/* ===== v35 Username replaces LiveTV Pro in user header ===== */
.brand-username{display:block;max-width:260px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#f4f7ff;font-size:18px!important;font-weight:950;line-height:1.15;letter-spacing:-.015em}
.account-status-line{margin-top:7px}
@media(max-width:700px){.brand-username{max-width:155px;font-size:16px!important}.account-status-line{margin-top:5px}}
html.device-tv .brand-username{max-width:320px;font-size:22px!important}
html.device-tv-lowres .brand-username{max-width:210px;font-size:18px!important}


/* ===== v35 Header cleanup: remove TV badge + live Max Connections counter ===== */
.topbar-brand{min-width:0}
.account-connections{display:inline-flex;align-items:center;gap:6px}
.account-connections-label{color:#93a5bf;font-weight:800}
.account-connections strong{color:#eef4ff;font-size:12px;font-weight:950;font-variant-numeric:tabular-nums;letter-spacing:.01em}
@media(max-width:700px){
 .account-connections{gap:4px;padding:3px 6px}
 .account-connections-label{font-size:9px}
 .account-connections strong{font-size:10px}
}
html.device-tv .account-connections{gap:7px;padding:6px 10px}
html.device-tv .account-connections-label{font-size:13px}
html.device-tv .account-connections strong{font-size:14px}
html.device-tv-lowres .account-connections{gap:5px;padding:5px 7px}
html.device-tv-lowres .account-connections-label{font-size:11px}
html.device-tv-lowres .account-connections strong{font-size:12px}


/* ===== v38 Player TV timeline + subtitle + focus-memory polish ===== */
html.device-tv .player-page .vod-progress,
html.device-tv body.player-page .vod-progress{
  left:50%!important;
  right:auto!important;
  width:min(90vw,1100px)!important;
  transform:translateX(-50%)!important;
  box-sizing:border-box;
}
html.device-tv-lowres .player-page .vod-progress,
html.device-tv-lowres body.player-page .vod-progress{
  left:50%!important;
  right:auto!important;
  width:min(92vw,920px)!important;
  transform:translateX(-50%)!important;
}
html.device-tv .vod-progress #timeline{width:100%!important;min-width:0!important;margin:0!important}
html.device-tv .vod-progress:focus-within{border-color:rgba(255,255,255,.44);box-shadow:0 0 0 3px rgba(98,116,255,.24)}
.player-page .pro-controls button:focus,.player-page .player-back:focus,.player-page #timeline:focus{
  position:relative;z-index:40;
}

.xtream-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(320px,1fr));gap:14px;margin-top:14px}.xtream-card{margin:0}.xtream-counts{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;margin:12px 0}.xtream-counts span{padding:10px;border:1px solid var(--line);border-radius:12px;text-align:center}.xtream-counts b{display:block;font-size:1.25rem}.xtream-flags{display:flex;gap:16px;flex-wrap:wrap}.xtream-flags>span{width:100%;font-weight:700}.xtream-flags label{display:flex;align-items:center;gap:7px}@media(max-width:600px){.xtream-grid{grid-template-columns:1fr}.xtream-counts{grid-template-columns:repeat(2,1fr)}}
/* v42 M3U + category status manager */
.m3u-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(330px,1fr));gap:14px;margin:14px 0}.m3u-card{margin:0}.m3u-counts{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin:12px 0}.m3u-counts span{padding:10px;border:1px solid var(--line);border-radius:12px;text-align:center;background:rgba(255,255,255,.035);font-size:.82rem}.m3u-counts b{display:block;font-size:1.08rem;margin-bottom:3px}.category-status-tabs{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin:0 0 12px}.category-filter-card{display:flex;align-items:center;justify-content:center;gap:9px;min-height:68px;padding:12px 14px;border:1px solid var(--line);border-radius:16px;background:rgba(255,255,255,.035);color:inherit;text-decoration:none}.category-filter-card b{font-size:1.35rem}.category-filter-card.active{outline:2px solid currentColor;outline-offset:1px;background:rgba(255,255,255,.08)}.category-filter-card.enabled b{color:#61d88a}.category-filter-card.disabled b{color:#ff8b8b}.category-type-tabs{display:flex;gap:8px;flex-wrap:wrap;margin:0 0 12px}.category-card-title{display:flex;align-items:center;gap:9px;flex-wrap:wrap}.category-state-disabled{opacity:.8}.category-state-disabled strong{text-decoration:none}.empty-state{padding:24px;text-align:center;color:var(--muted)}
@media(max-width:650px){.m3u-grid{grid-template-columns:1fr}.m3u-counts{grid-template-columns:repeat(3,1fr)}.category-status-tabs{grid-template-columns:1fr}.category-filter-card{justify-content:flex-start;min-height:56px}}
\n/* v43 searchable/bulk/lazy admin lists */
.admin-list-tools{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin:14px 0}.admin-search{flex:1;min-width:220px;padding:12px 14px;border:1px solid var(--line);border-radius:12px;background:var(--panel);color:inherit}.bulk-tools{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.row-check-wrap{display:flex;align-items:center;justify-content:center;min-width:38px}.row-check{width:20px;height:20px;accent-color:currentColor}.lazy-more{display:block;margin:16px auto}.admin-item-selected{outline:2px solid currentColor}.admin-channel-card,.movie-admin-card,.user-card,.mini-admin-card,.xtream-card,.m3u-card{position:relative}.row-check-float{position:absolute;top:10px;right:10px;z-index:3;background:rgba(0,0,0,.55);padding:6px;border-radius:10px;backdrop-filter:blur(6px)}

/* v44 admin search/lazy reliability: explicit hide for older Android WebViews */
[data-admin-item].admin-item-hidden,[data-admin-item][hidden]{display:none!important}
.search-empty-state{margin:14px 0;padding:18px;border:1px dashed var(--line);border-radius:14px;text-align:center;opacity:.8}
.search-empty-state[hidden]{display:none!important}


/* v53 Mobile/Tablet native-touch mode */
html.device-phone [data-tv-focus]:focus,html.device-tablet [data-tv-focus]:focus{transform:none!important}
html.device-phone .card,html.device-phone .movie-card,html.device-tablet .card,html.device-tablet .movie-card{touch-action:manipulation}
html.device-phone .category-scroll,html.device-tablet .category-scroll{-webkit-overflow-scrolling:touch;scroll-snap-type:none}

/* ===== v60 Pro Universal TV Fit =====
   Layout-only tuning. No remote/player behavior is changed. */
html.device-tv{
  --tv-safe-x:max(18px,2.5vw);
  --tv-safe-y:max(14px,2.4vh);
  --tv-gap:clamp(10px,1.15vw,22px);
  --tv-card-min:clamp(180px,17vw,310px);
  --tv-poster-min:clamp(125px,11.5vw,220px);
  --tv-ui:clamp(13px,1.05vw,20px);
  --tv-title:clamp(21px,1.75vw,36px);
  --tv-radius:clamp(13px,1.15vw,22px);
  width:100%;min-width:0;overflow-x:hidden;
}
html.device-tv body{width:100%;min-width:0;overflow-x:hidden;font-size:var(--tv-ui)}
html.device-tv .wrap,
html.device-tv .clean-library-wrap{
  width:100%;max-width:none!important;margin:0!important;
  padding-left:var(--tv-safe-x)!important;padding-right:var(--tv-safe-x)!important;
  padding-bottom:calc(var(--tv-safe-y) + 24px)!important;
}
html.device-tv .topbar,
html.device-tv .clean-topbar{
  width:100%;max-width:100%;padding-left:var(--tv-safe-x)!important;padding-right:var(--tv-safe-x)!important;
  min-height:clamp(60px,8.8vh,92px)!important;
}
html.device-tv .topbar-brand{flex:1 1 auto;min-width:0;overflow:hidden}
html.device-tv .brand-copy{min-width:0;max-width:100%}
html.device-tv .brand-username{font-size:clamp(16px,1.45vw,25px)!important;max-width:min(48vw,620px)!important;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
html.device-tv .account-status-line{font-size:clamp(11px,.9vw,17px)!important;gap:clamp(5px,.65vw,11px)!important;min-width:0;flex-wrap:wrap}
html.device-tv .account-countdown,
html.device-tv .account-connections{padding:clamp(4px,.55vw,9px) clamp(7px,.75vw,13px)!important}
html.device-tv .topbar-compact-actions{flex:0 0 auto;gap:clamp(7px,.75vw,14px)!important}
html.device-tv .hamburger-btn,
html.device-tv .header-icon-btn{width:clamp(46px,4vw,68px)!important;height:clamp(46px,4vw,68px)!important;min-width:clamp(46px,4vw,68px)!important;border-radius:clamp(10px,.9vw,16px)!important}
html.device-tv .hamburger-panel{width:min(390px,42vw)!important;max-height:calc(var(--tv-vh,100vh) - 96px);overflow:auto}
html.device-tv .hamburger-panel a{min-height:clamp(46px,6.2vh,64px)!important;font-size:clamp(14px,1.15vw,19px)!important}
html.device-tv .header-search-popover{max-width:min(640px,60vw);width:min(640px,60vw)}
html.device-tv .header-search-input{font-size:clamp(15px,1.2vw,20px)!important;min-width:0}

html.device-tv .library-heading{gap:var(--tv-gap)!important;align-items:end;flex-wrap:wrap}
html.device-tv .library-heading h2{font-size:var(--tv-title)!important;line-height:1.08;margin-top:4px}
html.device-tv .library-heading .muted{font-size:clamp(12px,.9vw,16px)}
html.device-tv .category-scroll{
  display:flex!important;width:100%;max-width:100%;overflow-x:auto;overflow-y:hidden;
  gap:clamp(7px,.72vw,14px)!important;padding:clamp(7px,1vh,12px) 2px clamp(10px,1.4vh,16px)!important;
  scrollbar-width:none;-ms-overflow-style:none;scroll-padding-inline:var(--tv-safe-x);
}
html.device-tv .category-scroll::-webkit-scrollbar{display:none}
html.device-tv .live-cat,html.device-tv .vod-cat{
  flex:0 0 auto!important;min-width:max-content;max-width:min(36vw,430px);
  min-height:clamp(44px,6.5vh,64px)!important;padding:clamp(8px,1vh,13px) clamp(13px,1.25vw,23px)!important;
  font-size:clamp(12px,1.05vw,18px)!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
html.device-tv .grid{
  width:100%;grid-template-columns:repeat(auto-fit,minmax(min(100%,var(--tv-card-min)),1fr))!important;
  gap:var(--tv-gap)!important;align-items:stretch
}
html.device-tv .card{
  min-width:0;min-height:clamp(88px,14vh,132px)!important;padding:clamp(10px,1vw,17px)!important;
  gap:clamp(9px,1vw,16px)!important;border-radius:var(--tv-radius)!important;overflow:hidden
}
html.device-tv .card img{width:clamp(58px,6.2vw,96px)!important;height:clamp(58px,6.2vw,96px)!important;flex:0 0 auto;border-radius:clamp(9px,.8vw,14px)!important}
html.device-tv .card>div{min-width:0;overflow:hidden}
html.device-tv .card strong{display:block;font-size:clamp(13px,1.12vw,19px)!important;line-height:1.2;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
html.device-tv .card span,html.device-tv .card em{font-size:clamp(10px,.82vw,15px)!important;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
html.device-tv .movie-grid{
  width:100%;grid-template-columns:repeat(auto-fit,minmax(min(100%,var(--tv-poster-min)),1fr))!important;
  gap:var(--tv-gap)!important;align-items:start
}
html.device-tv .movie-card{min-width:0;border-radius:var(--tv-radius)!important;padding:clamp(6px,.65vw,10px)!important;overflow:hidden}
html.device-tv .movie-card img{width:100%;aspect-ratio:2/3;max-height:min(48vh,520px);object-fit:cover}
html.device-tv .movie-card strong{font-size:clamp(12px,.98vw,17px)!important;line-height:1.24;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
html.device-tv .movie-card span{font-size:clamp(10px,.78vw,14px)!important;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

html.device-tv .series-hero{
  width:100%;min-height:clamp(210px,37vh,390px)!important;padding:clamp(18px,2vw,34px)!important;
  gap:clamp(16px,2vw,34px)!important;background-position:center;background-size:cover;border-radius:var(--tv-radius)!important
}
html.device-tv .series-hero img{width:clamp(125px,14vw,230px)!important;max-height:34vh;object-fit:cover}
html.device-tv .series-hero h1{font-size:clamp(23px,2.2vw,42px)!important;line-height:1.08}
html.device-tv .series-hero p{font-size:clamp(12px,.95vw,17px)!important;line-height:1.45;max-width:75ch;display:-webkit-box;-webkit-line-clamp:5;-webkit-box-orient:vertical;overflow:hidden}
html.device-tv .episode-list{gap:clamp(8px,1vh,14px)!important}
html.device-tv .episode-card{min-height:clamp(58px,8.5vh,82px)!important;padding:clamp(10px,1vw,17px) clamp(13px,1.3vw,22px)!important;font-size:clamp(13px,1vw,18px)!important}

html.device-tv .login-bg{min-height:var(--tv-vh,100vh);padding:var(--tv-safe-y) var(--tv-safe-x)!important;overflow:auto}
html.device-tv .login-shell{width:min(520px,54vw)!important;max-width:94vw}
html.device-tv .login-card{padding:clamp(42px,6vh,66px) clamp(20px,2.2vw,34px) clamp(20px,3vh,34px)!important;border-radius:var(--tv-radius)!important}
html.device-tv .login-card h1{font-size:clamp(25px,2.2vw,38px)!important}
html.device-tv .login-card input{min-height:clamp(50px,7vh,64px)!important;font-size:clamp(15px,1.1vw,19px)!important}
html.device-tv .login-card button{min-height:clamp(50px,7vh,64px)!important;font-size:clamp(14px,1.05vw,18px)!important}

html.device-tv .tv-pin-shell{min-height:var(--tv-vh,100vh)!important;padding:var(--tv-safe-y) var(--tv-safe-x)!important;overflow:auto}
html.device-tv .tv-pin-card{width:min(680px,68vw)!important;max-width:94vw!important;max-height:calc(var(--tv-vh,100vh) - (var(--tv-safe-y) * 2));overflow:auto;padding:clamp(18px,2vw,34px)!important}
html.device-tv .tv-pin-heading h1{font-size:clamp(23px,2vw,36px)!important}
html.device-tv .tv-keypad{gap:clamp(7px,1vh,13px)!important}
html.device-tv .tv-keypad button{min-height:clamp(48px,8vh,78px)!important;font-size:clamp(19px,2vw,30px)!important}
html.device-tv .tv-pin-actions button{min-height:clamp(48px,7.2vh,70px)!important;font-size:clamp(14px,1.2vw,20px)!important}
html.device-tv .tv-pin-input{height:clamp(52px,8vh,76px)!important;font-size:clamp(23px,2.3vw,34px)!important}

/* Player: fit every reported TV viewport without touching JS/control behavior. */
html.device-tv .player-page{width:100vw!important;height:var(--tv-vh,100vh)!important;max-height:var(--tv-vh,100vh)!important;overflow:hidden!important}
html.device-tv .player-page .video-stage{width:100vw!important;height:var(--tv-vh,100vh)!important;min-height:var(--tv-vh,100vh)!important}
html.device-tv .player-page .video-stage video{width:100%!important;height:100%!important;max-width:100vw!important;max-height:var(--tv-vh,100vh)!important;object-fit:contain!important}
html.device-tv .player-page .player-top{padding:clamp(9px,1.35vh,16px) var(--tv-safe-x)!important;min-height:clamp(58px,8.5vh,82px)!important}
html.device-tv .player-page .player-back{min-width:clamp(108px,10vw,160px)!important;min-height:clamp(46px,6.5vh,58px)!important;font-size:clamp(13px,1.05vw,17px)!important}
html.device-tv .player-page .pro-controls{
  max-width:calc(100vw - (var(--tv-safe-x) * 2));bottom:max(var(--tv-safe-y),env(safe-area-inset-bottom))!important;
  gap:clamp(6px,.75vw,13px)!important;padding:clamp(7px,1vh,12px) clamp(8px,.9vw,14px)!important;white-space:nowrap
}
html.device-tv .player-page .pro-controls button{min-width:clamp(48px,5.6vw,82px)!important;min-height:clamp(44px,7vh,60px)!important;padding:clamp(7px,.8vw,12px)!important;font-size:clamp(15px,1.5vw,23px)!important}
html.device-tv .player-page .live-controls button{min-width:clamp(74px,8vw,118px)!important}
html.device-tv .player-page .vod-progress{
  left:50%!important;right:auto!important;transform:translateX(-50%)!important;
  width:min(90vw,1180px)!important;max-width:calc(100vw - (var(--tv-safe-x) * 2))!important;
  bottom:clamp(72px,11.5vh,112px)!important;padding:clamp(6px,.8vw,11px)!important;gap:clamp(6px,.7vw,11px)!important;
  font-size:clamp(10px,.8vw,14px)!important
}
html.device-tv .player-page #timeline{height:clamp(20px,3.2vh,28px)!important}
html.device-tv .player-page .player-message{top:clamp(66px,10vh,96px)!important;max-width:min(84vw,840px);font-size:clamp(11px,.85vw,15px)}

/* 540p/older TV WebViews */
html.device-tv.tv-size-540{--tv-safe-x:max(12px,2vw);--tv-safe-y:max(8px,1.8vh);--tv-gap:9px;--tv-card-min:175px;--tv-poster-min:118px;--tv-ui:12px}
html.device-tv.tv-size-540 .wrap{padding-top:10px!important}
html.device-tv.tv-size-540 .account-divider{display:none}
html.device-tv.tv-size-540 .account-status-line{row-gap:3px!important}
html.device-tv.tv-size-540 .movie-card img{max-height:42vh}
html.device-tv.tv-size-540 .series-hero p{-webkit-line-clamp:3}
html.device-tv.tv-size-540 .tv-pin-brand{padding-bottom:8px;margin-bottom:9px}
html.device-tv.tv-size-540 .tv-pin-heading{margin-bottom:9px}
html.device-tv.tv-size-540 .tv-pin-help{margin-top:8px}

/* 4K browsers often expose very large CSS viewports; cap visual density. */
html.device-tv.tv-size-4k{--tv-card-min:300px;--tv-poster-min:210px;--tv-gap:22px;--tv-ui:19px}
html.device-tv.tv-size-4k .wrap{max-width:2400px!important;margin-inline:auto!important}

/* Very wide or unusually narrow TV browser viewports. */
html.device-tv.tv-aspect-ultrawide .wrap{max-width:2200px!important;margin-inline:auto!important}
html.device-tv.tv-aspect-narrow .grid{grid-template-columns:repeat(auto-fit,minmax(min(100%,170px),1fr))!important}
html.device-tv.tv-aspect-narrow .movie-grid{grid-template-columns:repeat(auto-fit,minmax(min(100%,115px),1fr))!important}

/* Prevent focus scaling from being clipped at screen edges. */
html.device-tv .media-section,html.device-tv .grid,html.device-tv .movie-grid,html.device-tv .episode-list{scroll-margin:12px;overflow:visible}
html.device-tv [data-tv-focus],html.device-tv .focusable{scroll-margin:clamp(46px,8vh,90px) clamp(36px,5vw,80px)}

/* v67 CC reliability: the CC control is never conditionally hidden; tracks may load later. */
.player-page #subs.subtitle-btn{display:inline-flex!important;visibility:visible!important;opacity:1!important;min-width:62px!important}
.player-page #subs.subtitle-btn[data-track-count="0"]{opacity:.72!important}

/* ===== v77 touch-stable hamburger ===== */
.hamburger-btn,.hamburger-panel a,.hamburger-panel button.menu-item,.hamburger-backdrop{touch-action:manipulation;-webkit-tap-highlight-color:transparent}
.hamburger-panel{max-height:calc(100dvh - 86px);overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch}
.hamburger-wrap.open .hamburger-panel{pointer-events:auto}
.hamburger-wrap.open .hamburger-backdrop{pointer-events:auto}
@media(max-width:700px){.hamburger-panel{max-height:calc(100dvh - 76px)}}

/* ===== v78 instant mobile hamburger touch ===== */
.hamburger-btn,.hamburger-backdrop{-webkit-user-select:none;user-select:none;-webkit-touch-callout:none;touch-action:manipulation}
@media (hover:none) and (pointer:coarse){
  .hamburger-btn{transition:none!important;animation:none!important}
  .hamburger-btn:active{transform:scale(.96)}
  .hamburger-panel{transition:none!important;animation:none!important}
}

/* ===== v79 zero-wait hamburger touch ===== */
.hamburger-btn{touch-action:manipulation!important;-webkit-tap-highlight-color:transparent!important}
@media (hover:none) and (pointer:coarse){
  .hamburger-btn{transition:none!important;animation:none!important}
  .hamburger-panel,.hamburger-backdrop{transition:none!important;animation:none!important}
}


/* ===== v83 category/channel list player overlay ===== */
.category-list-overlay[hidden]{display:none!important}
.category-list-overlay{position:absolute;inset:0;z-index:95;background:rgba(0,0,0,.48);backdrop-filter:blur(3px);display:flex;justify-content:flex-end;align-items:stretch;padding:clamp(8px,2vw,22px);padding-top:max(72px,calc(env(safe-area-inset-top) + 64px));padding-bottom:max(12px,env(safe-area-inset-bottom))}
.category-list-panel{width:min(430px,92vw);height:100%;max-height:calc(100dvh - 92px);display:flex;flex-direction:column;overflow:hidden;border:1px solid rgba(255,255,255,.16);border-radius:22px;background:rgba(10,15,24,.94);box-shadow:0 24px 70px rgba(0,0,0,.55);backdrop-filter:blur(20px)}
.category-list-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:16px 16px 13px;border-bottom:1px solid rgba(255,255,255,.1)}
.category-list-head>div{min-width:0;display:flex;flex-direction:column;gap:3px}.category-list-head small{font-size:10px;letter-spacing:.16em;color:#9ca9bb}.category-list-head b{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:16px}
.category-list-head button{width:46px;height:46px;flex:0 0 46px;border-radius:13px;border:1px solid rgba(255,255,255,.13);background:rgba(255,255,255,.08);color:#fff;font-size:25px}
.category-list-items{overflow:auto;overscroll-behavior:contain;padding:9px;scrollbar-width:thin}
.category-list-item{display:grid;grid-template-columns:58px minmax(0,1fr) auto;align-items:center;gap:11px;min-height:66px;padding:7px 9px;margin:3px 0;border:1px solid transparent;border-radius:15px;color:#fff;text-decoration:none;background:rgba(255,255,255,.035);touch-action:manipulation}
.category-list-item:hover,.category-list-item:focus{outline:none;border-color:rgba(255,255,255,.62);background:rgba(255,255,255,.11);transform:none}.category-list-item.active{background:rgba(83,109,255,.19);border-color:rgba(128,148,255,.55)}
.category-list-thumb{width:58px;height:48px;border-radius:10px;background:rgba(255,255,255,.07) center/contain no-repeat}.category-list-item>span:nth-child(2){min-width:0;display:flex;flex-direction:column;gap:4px}.category-list-item b{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:14px}.category-list-item small{color:#aeb9c8;font-size:11px}.category-list-item em{font-style:normal;font-size:9px;font-weight:800;letter-spacing:.08em;padding:5px 7px;border-radius:999px;background:#566cff;color:#fff}
body.category-list-open .player-status,body.category-list-open .player-message{opacity:0!important;pointer-events:none!important}
@media(max-width:700px){.category-list-overlay{padding:64px 8px max(8px,env(safe-area-inset-bottom));align-items:flex-end}.category-list-panel{width:100%;max-height:72dvh;border-radius:20px}.category-list-item{grid-template-columns:52px minmax(0,1fr) auto;min-height:62px}.category-list-thumb{width:52px;height:44px}}
html.device-tv .category-list-panel{width:min(520px,42vw)}html.device-tv .category-list-item{min-height:72px;padding:9px 11px}html.device-tv .category-list-item:focus{outline:4px solid #fff!important;outline-offset:2px!important}

/* v84: category list remote + mobile/WebView scroll stability */
.category-list-overlay{overscroll-behavior:contain;touch-action:none}
.category-list-panel{overscroll-behavior:contain;touch-action:pan-y}
.category-list-items{
  -webkit-overflow-scrolling:touch;
  overscroll-behavior-y:contain;
  touch-action:pan-y;
  scroll-behavior:smooth;
}
.category-list-item:focus{scroll-margin-block:10px}
/* Keep the outer WebView technically scrollable by 1px while the inner list is open.
   This prevents Android pull-to-refresh parents from stealing upward list gestures. */
body.player-page.category-list-open{
  position:absolute!important;
  inset:auto!important;
  left:0!important;top:0!important;
  width:100vw!important;
  min-height:calc(100dvh + 2px)!important;
  height:calc(100dvh + 2px)!important;
  overflow-y:scroll!important;
  overscroll-behavior-y:none!important;
}
body.player-page.category-list-open .video-stage{position:fixed!important;inset:0!important}
body.player-page.category-list-open .player-top{position:fixed!important}
@media(max-width:700px){
  .category-list-overlay{touch-action:none!important;overscroll-behavior:none!important}
  .category-list-items{overscroll-behavior-y:contain!important;touch-action:pan-y!important}
}
