@font-face{font-family:PrimeRoboto;src:url('assets/apk/roboto_regular_3m4l.ttf') format('truetype');font-display:swap}
*{box-sizing:border-box}html,body{margin:0;width:100%;height:100%;background:#19111b;color:#fff;font-family:PrimeRoboto,Roboto,Arial,sans-serif}body{overflow:hidden;font-size:18px}button,input,select{font:inherit}button,a,input,select{-webkit-tap-highlight-color:transparent}button{color:#fff;cursor:pointer;background:rgba(255,0,0,.25);border:2px solid transparent;border-radius:9px;padding:12px 20px}button:hover{background:rgba(255,0,0,.36)}button:focus,a:focus,input:focus,select:focus{outline:3px solid #fff;outline-offset:3px;box-shadow:0 0 16px rgba(255,255,255,.18)}button:disabled{opacity:.4;cursor:default}a{color:inherit;text-decoration:none}input,select{background:rgba(6,5,15,.7);border:1px solid rgba(255,255,255,.4);border-radius:7px;padding:12px 15px;color:#fff;min-height:48px}input::placeholder{color:#ddd}select option{background:#25192a}h1,h2,h3,p{margin-top:0}p{line-height:1.5}h1{font-size:32px}h2{font-size:25px}small,.muted{color:#ddd;font-size:.86em}.shade,#background{position:fixed;inset:0}#background{background:url('assets/apk/background1.png') center/cover no-repeat;transition:background-image .3s}.shade{background:rgba(0,0,0,.3)}#app{position:relative;height:100%;width:100%;overflow:auto}.logo{width:250px;max-height:145px;object-fit:contain}.loader{width:75px;height:75px;object-fit:contain}.loading{height:100%;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:22px}.loading .logo{width:300px}#busy{position:fixed;bottom:25px;left:50%;margin-left:-28px;pointer-events:none;z-index:50}#busy img{width:56px;height:56px}#toast{position:fixed;bottom:5%;left:10%;width:80%;background:#20131f;border:1px solid #ff6262;box-shadow:0 10px 40px #000;padding:18px 24px;text-align:center;z-index:80;border-radius:10px}[hidden]{display:none!important}.clock{position:absolute;right:3.5%;top:4%;color:#ddd}.version{position:fixed;bottom:3%;right:3.5%;font-size:16px}.home{height:100%;min-height:460px;position:relative}.home-body{position:absolute;width:84%;max-width:1180px;left:50%;top:50%;transform:translate(-50%,-38%)}.home-brand{position:absolute;width:21%;height:auto;max-height:140px;object-fit:contain;bottom:calc(100% + 20px);left:39.5%}.home-grid{position:relative;width:100%}.home-tile{position:absolute;padding:4px 8px;display:flex;flex-direction:column;align-items:center;justify-content:space-evenly;border-radius:8px;transition:background-color .15s,transform .15s}.home-tile:focus{outline:none;border:2px solid #fff;box-shadow:0 0 18px rgba(255,255,255,.1);transform:scale(1.018)}.home-tile img{object-fit:contain;max-height:61%;max-width:60%;width:auto;height:auto}.home-tile span{font-size:clamp(13px,1.5vw,24px);text-align:center}.home-tile.small{flex-direction:row;background:transparent;border-color:rgba(255,0,0,.25);justify-content:flex-start;padding-left:3%}.home-tile.small img{width:22%;max-height:65%;margin-right:12%}.home-tile.small span{font-size:clamp(11px,1.2vw,20px)}.home-tile.icon-only span{font-size:0}.home-tile.icon-only img{max-width:60%;max-height:65%;width:auto;margin:0}.home-tile.icon-only{justify-content:center;padding:6px}.home-ad{position:absolute;overflow:hidden;border-radius:7px;background:transparent}.home-ad img{height:100%;width:100%;object-fit:contain}.home-ad .ad-empty{height:100%;display:flex;align-items:center;justify-content:center;color:#ddd;font-size:14px}.home-warning{position:absolute;top:9%;left:10%;width:80%;font-size:15px;text-align:center}.screen{min-height:100%;padding:30px 4% 50px}.topbar{display:flex;align-items:center;gap:20px;margin-bottom:30px;min-height:60px}.topbar .logo{width:130px;height:70px}.topbar h1{margin:0;flex:1}.topbar button{background:rgba(0,0,0,.2);padding:10px 16px}.topbar .back img{width:26px;height:26px;vertical-align:middle}.content-box{background:rgba(6,5,15,.7);border:1px solid rgba(255,255,255,.15);border-radius:12px;padding:28px}.activation{display:flex;min-height:100%;align-items:center;justify-content:center;gap:5%;padding:5%}.activation-brand{width:32%;text-align:center}.activation-brand .logo{width:90%;max-height:230px}.activation-card{width:58%;max-width:760px}.activation h1{font-size:32px}.actions{display:flex;gap:16px;flex-wrap:wrap;align-items:center}.primary{background:rgba(220,0,0,.65);border-color:rgba(255,255,255,.25)}.secondary{background:rgba(255,255,255,.08);border:1px solid rgba(255,255,255,.25)}.identity{display:flex;gap:18px;margin:20px 0;flex-wrap:wrap}.identity>div{background:rgba(255,255,255,.07);padding:16px 22px;min-width:190px;border-radius:8px}.identity dt{font-size:14px;color:#ccc;margin-bottom:9px}.identity dd{margin:0;font-size:24px;letter-spacing:1.5px}.status{display:inline-block;padding:6px 12px;border:1px solid #f99;border-radius:20px;color:#ffd3d3;margin-bottom:20px}.status.active{border-color:#72c49a;color:#adffcf}.playlist-list{display:flex;flex-direction:column;gap:12px}.playlist-list button{text-align:left;display:flex;align-items:center;gap:20px;padding:18px}.playlist-list img{width:30px;height:30px}.playlist-list small{margin-left:auto}.split{display:flex;gap:25px}.categories{width:23%;flex-shrink:0;max-height:calc(100vh - 155px);overflow:auto;padding:5px 10px 20px 4px}.categories button{display:block;width:100%;text-align:left;border-radius:5px;background:transparent;padding:14px 18px;margin:5px 0;font-size:19px}.categories button.selected{background:rgba(255,0,0,.28);border-color:rgba(255,255,255,.5)}.catalog-content{flex:1;min-width:0}.catalog-toolbar{display:flex;align-items:center;gap:12px;margin-bottom:18px}.catalog-toolbar input{flex:1;min-width:90px}.catalog-toolbar button{padding:12px;font-size:16px}.posters{display:flex;flex-wrap:wrap;gap:18px}.poster{width:calc((100% - 90px)/6);min-width:105px;padding:0;overflow:hidden;position:relative;background:rgba(0,0,0,.35);text-align:left;border-radius:7px}.poster:focus{transform:scale(1.035);z-index:1}.poster img{display:block;width:100%;aspect-ratio:300/460;object-fit:cover;background:rgba(0,0,0,.25)}.poster.live{width:calc((100% - 54px)/4)}.poster.live img{aspect-ratio:16/9;object-fit:contain;padding:15px}.poster .name{display:block;font-size:16px;padding:10px;min-height:52px;line-height:1.35;overflow:hidden;max-height:3.9em}.poster .fav{position:absolute;top:7px;right:7px;color:#ffe783;text-shadow:0 1px 3px #000}.pagination{display:flex;align-items:center;justify-content:space-between;margin:25px 0 10px;gap:10px;font-size:16px}.empty{text-align:center;padding:60px 24px;color:#ddd;line-height:1.6}.details-body{display:flex;gap:45px;padding-top:20px}.details-poster{width:23%;flex-shrink:0}.details-poster img{width:100%;max-height:430px;object-fit:contain;border-radius:8px}.details-info{flex:1;min-width:0}.details-info h1{font-size:37px}.metadata{color:#ddd;display:flex;gap:25px;margin-bottom:20px}.plot{max-width:850px;line-height:1.6;color:#eee}.seasons{display:flex;gap:12px;overflow:auto;padding:8px 5px 20px;margin-top:20px}.seasons button{white-space:nowrap;background:rgba(0,0,0,.3)}.seasons .selected{border:2px solid #fff}.episodes{display:flex;flex-wrap:wrap;gap:14px;margin:15px 0}.episodes button{width:calc((100% - 28px)/3);background:rgba(0,0,0,.4);display:flex;gap:12px;align-items:center;text-align:left;font-size:16px}.episodes img{width:80px;height:50px;object-fit:cover}.settings-grid{display:flex;flex-wrap:wrap;gap:20px}.settings-grid label,.setting-row{background:rgba(0,0,0,.3);padding:20px;border:1px solid rgba(255,255,255,.1);border-radius:10px;width:calc(50% - 10px);display:flex;align-items:center;justify-content:space-between;gap:20px}.settings-grid label select{max-width:60%}.settings-grid label span{font-size:18px}.setting-row button{font-size:16px}.help{font-size:16px;color:#ddd;margin-top:22px}.notice{border-left:3px solid #ff6d6d;padding:10px 17px;background:rgba(50,0,0,.4);margin:20px 0}.pin-form{max-width:600px;margin:40px auto}.pin-form input{width:100%;margin:20px 0}.player-screen{position:fixed;inset:0;background:#000;z-index:20}.player-screen video{height:100%;width:100%;object-fit:contain;background:#000}.player-overlay{position:absolute;inset:0;display:flex;flex-direction:column;justify-content:space-between;padding:25px 4%;background:linear-gradient(#000b,transparent 30%,transparent 60%,#000d);transition:opacity .3s}.player-overlay.hidden-controls{opacity:0;pointer-events:none}.player-title{display:flex;align-items:center;gap:25px}.player-title h2{margin:0}.player-title .logo{height:60px;width:110px;margin-left:auto}.player-controls{display:flex;gap:16px;align-items:center;flex-wrap:wrap}.player-controls button{background:rgba(25,25,25,.8);min-width:50px}.timeline{width:100%;accent-color:#eb2828;padding:0;min-height:30px}.player-message{position:absolute;top:40%;left:10%;width:80%;text-align:center}.player-message .loader{margin-bottom:20px}.player-error{background:rgba(30,10,15,.95);padding:30px;border:1px solid #f88;border-radius:12px}.epg-list{display:flex;flex-direction:column;gap:10px}.epg-list>div{background:rgba(0,0,0,.4);padding:20px;border-radius:8px}.epg-list h3{font-size:21px;margin-bottom:8px}.epg-list button{float:right}.tiny{font-size:14px}.setup-code{display:block;word-break:break-all;background:#14101d;border:1px solid #777;padding:15px;border-radius:7px;margin:12px 0;font-family:monospace}
@media(min-width:1700px){body{font-size:25px}.screen{padding-top:45px}.topbar h1,h1{font-size:40px}.categories button{font-size:25px}.poster .name{font-size:22px;min-height:68px}.poster.live img{padding:25px}.catalog-toolbar button{font-size:23px}.poster{min-width:150px}.identity dd{font-size:32px}.help{font-size:22px}.topbar .logo{width:180px;height:100px}.categories{max-height:calc(100vh - 220px)}}
@media(max-width:1000px){body{font-size:16px}.screen{padding:20px 3% 40px}.topbar{gap:12px;margin-bottom:18px}.topbar h1{font-size:25px}.categories{width:25%}.categories button{font-size:16px;padding:12px 9px}.posters{gap:12px}.poster{width:calc((100% - 36px)/4);min-width:85px}.poster.live{width:calc((100% - 24px)/3)}.poster .name{font-size:14px}.catalog-toolbar{flex-wrap:wrap}.catalog-toolbar input{width:100%}.details-info h1{font-size:28px}.details-body{gap:24px}.episodes button{width:calc(50% - 7px)}.activation h1{font-size:27px}.activation-card{width:65%}.activation-brand{width:25%}.settings-grid label,.setting-row{width:100%}.home{min-height:340px}}
@media(max-aspect-ratio:11/10){body{overflow:auto}#app{overflow:auto}.home{min-height:100vh}.home-body{position:relative;top:auto;left:auto;transform:none;width:88%;padding-top:145px;margin:auto}.home-brand{top:12px;bottom:auto;width:180px;left:calc(50% - 90px);height:115px}.home-grid{height:auto!important;display:flex;gap:15px;flex-wrap:wrap}.home-tile{position:relative!important;left:auto!important;top:auto!important;width:calc(50% - 8px)!important;height:130px!important;flex-direction:column!important;padding:12px!important}.home-tile img{width:50px!important;height:55px!important;margin:0!important}.home-tile span{font-size:15px!important}.home-ad{position:relative!important;width:100%!important;height:150px!important;left:auto!important;top:auto!important}.version{position:relative;text-align:right;margin:25px 4%}.clock{display:none}.activation{display:block;padding:25px 5%}.activation-brand{width:100%;height:140px}.activation-brand .logo{width:220px;height:130px}.activation-card{width:100%;padding:24px}.identity{gap:12px}.identity>div{flex:1;min-width:160px}.identity dd{font-size:20px}.topbar .logo{width:90px;height:55px}.topbar h1{font-size:21px}.topbar .back{padding:8px}.topbar button{font-size:13px;padding:9px}.split{display:block}.categories{width:100%;display:flex;overflow:auto;max-height:100px;padding:8px 4px 18px}.categories button{white-space:nowrap;width:auto;font-size:14px;margin-right:9px}.poster{width:calc((100% - 24px)/3);min-width:70px}.poster.live{width:calc((100% - 12px)/2)}.details-body{display:block}.details-poster{width:40%;float:left;margin:0 20px 15px 0}.details-info h1{font-size:25px}.metadata{gap:12px;flex-wrap:wrap}.details-info .actions{clear:both;padding-top:15px}.episodes button{width:100%}.player-controls{gap:8px}.player-controls button{font-size:14px;padding:10px}.player-title h2{font-size:19px}.player-title .logo{display:none}.settings-grid label{flex-wrap:wrap}.settings-grid label select{max-width:100%}.home-warning{position:relative;top:auto;left:auto;width:90%;margin:10px auto;font-size:13px}}
@media(prefers-reduced-motion:reduce){*{transition:none!important;animation:none!important}}

video::cue{font-size:var(--subtitle-size,24px)}

.home-tile.small:focus{border-color:#fff}

/* TV layout from activity_live.xml: 23% categories, 27% channels, 50% player. */
.live-screen{padding:1.5% 2%;background:rgba(0,0,0,.48);display:flex;flex-direction:column;overflow:hidden}
.live-screen .topbar{margin-bottom:6px;min-height:0}
.live-screen .topbar .logo{order:2;margin-left:auto;height:50px;object-fit:contain}
.live-toolbar,.live-pagination{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.live-toolbar{padding:5px 0;border-top:1px solid rgba(255,255,255,.38)}
.live-toolbar button,.live-pagination button{padding:5px 9px}
.live-toolbar input{min-width:0;width:12em;padding:5px 9px}
.live-columns{display:flex;flex:1;min-height:0;border-top:1px solid rgba(255,255,255,.38)}
.live-groups,.live-channel-list,.live-preview{overflow:auto}
.live-groups,.live-channel-column,.live-preview{padding:8px;min-width:0}
.live-groups,.live-channel-column{border-right:1px solid rgba(255,255,255,.38)}
.live-groups{width:23%}
.live-channel-column{width:27%;display:flex;flex-direction:column}
.live-channel-list{flex:1;min-height:0}
.live-preview{width:50%}
.live-groups button,.live-channel{width:100%;text-align:left;padding:6px;margin:3px 0;min-height:2.4em;background:rgba(0,0,0,.35)}
.live-groups button.selected,.live-groups button:focus,.live-channel:focus{background:rgba(178,24,30,.82);outline-offset:-2px}
.live-channel{display:flex;align-items:center;gap:7px}
.live-channel span:first-child{min-width:2em;text-align:center}
.live-channel .channel-name{min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.channel-logo{width:1.7em;height:1.7em;object-fit:contain}
.live-pagination{justify-content:center}
#live-video{position:relative;width:100%;height:0;padding-top:56.25%;background:#000}
#live-video>p,#live-video .player-screen{position:absolute;top:0;left:0;width:100%;height:100%;margin:0}
#live-video>p{display:flex;align-items:center;justify-content:center;padding:10px;text-align:center}
#live-video .player-overlay{padding:8px}
#live-video .player-title h2,#live-video .player-error h2{font-size:1em}
#live-video .player-overlay button{font-size:.75em;padding:4px 7px}
#live-video .timeline,#live-video .player-title .logo,#live-video [data-action=rewind],#live-video [data-action=forward]{display:none}
#live-info h2{font-size:1.1em;margin:.55em 0 .2em}
#live-info p{margin:.2em 0 .5em}
#live-video:fullscreen{height:100%;padding:0}
@media(max-aspect-ratio:11/10){
 .live-screen{height:auto;overflow:auto}
 .live-columns{flex-wrap:wrap}
 .live-preview{width:100%;order:-1}
 .live-groups{width:42%;max-height:45vh}
 .live-channel-column{width:58%;max-height:45vh}
}

#panel-notice[hidden]{display:none}
#panel-notice{position:fixed;inset:0;z-index:100;background:rgba(0,0,0,.7);display:flex;align-items:center;justify-content:center;padding:24px}
.panel-notice-card{width:100%;max-width:640px;max-height:80vh;overflow:auto;background:#201521;border:1px solid rgba(255,255,255,.35);border-radius:12px;padding:28px}
.panel-notice-card h2{margin:0 0 12px}
#notice-message{white-space:pre-wrap;overflow-wrap:break-word}

.tmdb-highlight{height:100%;display:flex;gap:10px;align-items:center;text-align:left;overflow:hidden;padding:6px;background:rgba(0,0,0,.65)}
.home-ad .tmdb-highlight img{width:32%;height:100%;object-fit:contain}
.tmdb-highlight div{flex:1;min-width:0;max-height:100%;overflow:hidden}
.tmdb-highlight p{font-size:.78em;margin:4px 0;max-height:4.6em;overflow:hidden}
.tmdb-highlight small{font-size:.66em;color:#ddd}

/* Keep the catalogue mounted so the remote returns to the same scroll and focus. */
#live-video.live-fullscreen{position:fixed;inset:0;width:100%;height:100%;aspect-ratio:auto;z-index:45}
.player-screen video{display:block}
.player-screen video:focus{outline:none}
.live-fullscreen-open .live-screen{visibility:hidden}
.live-fullscreen-open #live-video{visibility:visible}
.tv-entry{position:fixed;inset:0;display:flex;align-items:center;justify-content:center;background:#19111b;z-index:60;padding:4%;overflow:auto}
.tv-entry section{width:min(100%,800px);max-height:100%;overflow:auto}
.tv-entry-value{padding:12px;background:#16101a;border-radius:7px;overflow-wrap:anywhere}
.tv-entry-keys{display:grid;grid-template-columns:repeat(9,1fr);gap:9px;margin-bottom:20px}
.tv-entry-keys button{padding:8px 4px}
