/* ═══════════════════════════════════════════════════════════════
   MOVIEHUB — Mobile-First CSS Rewrite
   ═══════════════════════════════════════════════════════════════ */

/* ── 1. RESET & CSS VARIABLES ── */
*,*::before,*::after{box-sizing:border-box;margin:0;padding:0;}
:root{
  --bg:#0e0e1a;--surface:#151528;--card:#1a1a35;
  --border:#2a2a52;--accent:#6366f1;--accent2:#8b5cf6;
  --text:#f2f2fa;--muted:#8888a8;--dim:#505070;
  --radius:12px;--nav-h:56px;--bottom-h:60px;
}
html{-webkit-text-size-adjust:100%;scroll-behavior:smooth;}
body{background:var(--bg);color:var(--text);font-family:'DM Sans',sans-serif;min-height:100vh;padding-bottom:var(--bottom-h);}
::-webkit-scrollbar{width:4px;}::-webkit-scrollbar-track{background:var(--surface);}::-webkit-scrollbar-thumb{background:var(--accent);border-radius:4px;}
img{max-width:100%;display:block;}
a{color:inherit;text-decoration:none;}

/* ── 2. TYPOGRAPHY HELPERS ── */
.font-head{font-family:'Syne',sans-serif;font-weight:800;}
.font-mono{font-family:'Space Mono',monospace;}

/* ── 3. BASE ELEMENTS ── */
input[type=text],input[type=password],input[type=number],textarea{
  background:var(--card);border:1px solid var(--border);border-radius:8px;
  padding:12px 16px;color:var(--text);font-family:'DM Sans',sans-serif;font-size:16px;outline:none;
  transition:border-color .2s;width:100%;
}
input[type=text]:focus,input[type=password]:focus,input[type=number]:focus,textarea:focus{border-color:var(--accent);}
select{
  background:var(--card);border:1px solid var(--border);color:var(--muted);
  border-radius:8px;padding:10px 14px;font-family:'Space Mono',monospace;font-size:11px;outline:none;cursor:pointer;
}
.btn{background:var(--accent);border:none;border-radius:8px;padding:12px 24px;color:#fff;cursor:pointer;font-family:'Space Mono',monospace;font-size:12px;font-weight:700;transition:background .15s;white-space:nowrap;}
.btn:hover{background:#4f46e5;}
.btn.secondary{background:var(--card);color:var(--muted);border:1px solid var(--border);}
.btn.secondary:hover{border-color:var(--accent);color:var(--text);}
.btn.active-type{background:var(--accent2);}

/* ── 4. BOTTOM NAV BAR (mobile) ── */
#bottom-nav{
  position:fixed;bottom:0;left:0;right:0;z-index:100;
  background:var(--surface);border-top:1px solid var(--border);
  display:flex;justify-content:space-around;align-items:center;
  height:var(--bottom-h);padding:0 4px 4px;
  backdrop-filter:blur(16px);-webkit-backdrop-filter:blur(16px);
}
#bottom-nav .bnav-btn{
  display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;
  background:none;border:none;color:var(--muted);cursor:pointer;
  padding:6px 0;flex:1;min-width:0;transition:color .15s;
  -webkit-tap-highlight-color:transparent;
}
#bottom-nav .bnav-btn svg{width:22px;height:22px;stroke:currentColor;fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;}
#bottom-nav .bnav-btn span{font-family:'Space Mono',monospace;font-size:9px;letter-spacing:.3px;line-height:1;}
#bottom-nav .bnav-btn.active{color:var(--accent);}
#bottom-nav .bnav-btn.active svg{stroke-width:2.2;}

/* ── 5. HEADER / TOP NAV ── */
#header{
  background:linear-gradient(to bottom,var(--surface),var(--bg));
  border-bottom:1px solid var(--border);
  padding:0 14px;position:sticky;top:0;z-index:50;
  display:flex;align-items:center;gap:12px;height:var(--nav-h);width:100%;
}
#logo{font-family:'Syne',sans-serif;font-weight:800;font-size:20px;cursor:pointer;letter-spacing:-.5px;flex-shrink:0;}
#menu-toggle{display:none;}
#nav{display:none;flex-direction:column;gap:0;position:absolute;top:var(--nav-h);left:0;right:0;background:var(--surface);border-bottom:1px solid var(--border);box-shadow:0 16px 48px #00000088;z-index:49;}
#nav.mob-open{display:flex;}
.tab-btn{
  background:transparent;color:var(--muted);border:none;
  padding:14px 20px;cursor:pointer;text-align:left;
  font-family:'Space Mono',monospace;font-size:13px;letter-spacing:.5px;transition:all .15s;
  border-left:3px solid transparent;white-space:nowrap;flex-shrink:0;
}
.tab-btn:hover{color:var(--text);background:var(--card);}
.tab-btn.active{color:var(--accent);border-left-color:var(--accent);background:var(--card);}
#lang-picker{position:relative;margin-left:auto;}
#lang-picker-btn{display:flex;align-items:center;gap:6px;padding:6px 12px;font-size:11px;border-radius:6px;border:1px solid var(--border);background:var(--card);color:var(--muted);font-family:'Space Mono',monospace;cursor:pointer;white-space:nowrap;}
#lang-picker-dd{display:none;position:absolute;top:100%;right:0;margin-top:4px;min-width:180px;max-height:320px;overflow-y:auto;background:var(--bg);border:1px solid var(--border);border-radius:8px;z-index:200;box-shadow:0 8px 24px rgba(0,0,0,.5);}

/* Desktop: show top nav inline, hide bottom nav and hamburger */
@media(min-width:768px){
  body{padding-bottom:0;}
  #bottom-nav{display:none;}
  #header{padding:0 32px;height:64px;gap:32px;}
  #logo{font-size:24px;}
  #nav{display:flex!important;flex-direction:row;gap:4px;position:static;background:transparent;border:none;box-shadow:none;}
  .tab-btn{
    padding:10px 18px;font-size:12px;text-align:center;
    border-radius:6px 6px 0 0;border-left:none;border-bottom:2px solid transparent;
  }
  .tab-btn:hover{background:transparent;color:var(--text);}
  .tab-btn.active{border-left-color:transparent;border-bottom-color:var(--accent);background:#6366f110;}
}

/* ── 6. BROWSE PAGE ── */
#browse-page{width:100%;padding:16px 12px calc(var(--bottom-h) + 16px);}
#controls{margin-bottom:16px;display:flex;gap:8px;flex-wrap:wrap;align-items:center;}
#controls input[type=text]{flex:1;min-width:0;font-size:16px;padding:12px 14px;}
#controls select{font-size:12px;padding:10px 12px;}
#grid{display:grid;grid-template-columns:repeat(2,1fr);gap:10px;animation:slideUp .3s ease;}
.card{border-radius:var(--radius);overflow:hidden;background:var(--card);border:1px solid var(--border);cursor:pointer;transition:transform .2s,border-color .2s,box-shadow .2s;position:relative;}
.card:hover{transform:scale(1.03);border-color:var(--accent);box-shadow:0 8px 28px #6366f133;}
.card-poster{aspect-ratio:2/3;background:var(--surface);position:relative;overflow:hidden;}
.card-poster img{width:100%;height:100%;object-fit:cover;display:block;}
.card-poster .no-img{width:100%;height:100%;display:flex;align-items:center;justify-content:center;font-size:40px;color:#222;}
.card-badge{position:absolute;top:8px;left:8px;font-family:'Space Mono',monospace;font-size:9px;font-weight:700;letter-spacing:1px;text-transform:uppercase;padding:4px 8px;border-radius:4px;}
.badge-movie{background:#6366f122;color:var(--accent);border:1px solid #6366f144;}
.badge-tv{background:#8b5cf622;color:var(--accent2);border:1px solid #8b5cf644;}
.card-rating{position:absolute;top:8px;right:8px;background:#000000cc;border-radius:6px;padding:4px 8px;font-family:'Space Mono',monospace;font-size:11px;font-weight:700;display:flex;align-items:center;gap:3px;}
.card-info{padding:10px 10px 12px;}
.card-title{font-family:'Syne',sans-serif;font-weight:700;font-size:13px;color:var(--text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-bottom:4px;}
.card-year{font-family:'Space Mono',monospace;font-size:10px;color:var(--muted);}
/* Glassmorphism cards experiment */
body.exp-glass .card{background:rgba(255,255,255,.04);backdrop-filter:blur(16px);-webkit-backdrop-filter:blur(16px);border:1px solid rgba(255,255,255,.08);}
body.exp-glass .card:hover{background:rgba(255,255,255,.07);border-color:rgba(255,255,255,.15);box-shadow:0 8px 32px rgba(0,0,0,.3);}
body.exp-glass .card-info{background:rgba(0,0,0,.2);}
body.exp-glass .card-rating{background:rgba(0,0,0,.5);backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px);}
/* Smooth page transitions experiment */
body.exp-transitions #browse-page,
body.exp-transitions #detail-page,
body.exp-transitions #sports-page,
body.exp-transitions #livetv-page,
body.exp-transitions #anime-page,
body.exp-transitions #anime-detail-page,
body.exp-transitions #team-page{animation:expPageIn .3s ease both;}
@keyframes expPageIn{from{opacity:0;transform:translateY(12px);}to{opacity:1;transform:translateY(0);}}
.spinner-wrap{display:flex;justify-content:center;padding:60px 0;}
.spinner{width:36px;height:36px;border:2px solid var(--border);border-top-color:var(--accent);border-radius:50%;animation:spin .7s linear infinite;}
#empty{text-align:center;padding:80px 0;color:var(--dim);display:none;}
#empty .empty-icon{font-size:48px;margin-bottom:16px;}
#empty .empty-text{font-family:'Syne',sans-serif;font-weight:700;font-size:18px;}
#load-sentinel{height:60px;display:flex;align-items:center;justify-content:center;}
.load-more-spinner{width:24px;height:24px;border:2px solid var(--border);border-top-color:var(--accent);border-radius:50%;animation:spin .7s linear infinite;display:none;}
#load-sentinel.loading .load-more-spinner{display:block;}
#pagination{display:none;justify-content:center;gap:8px;margin-top:20px;}

/* Desktop browse */
@media(min-width:480px){
  #grid{grid-template-columns:repeat(3,1fr);gap:14px;}
}
@media(min-width:768px){
  #browse-page{padding:28px 36px;}
  #grid{grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:18px;}
  .card-info{padding:12px 12px 14px;}
  .card-title{font-size:14px;}
  .card-rating{font-size:12px;}
}

/* ── 7. DETAIL PAGE ── */
#detail-page{display:none;animation:fadeIn .25s ease;}
#detail-backdrop{height:260px;position:relative;overflow:hidden;}
#detail-backdrop img{width:100%;height:100%;object-fit:cover;opacity:.5;}
#detail-backdrop-fade{position:absolute;inset:0;background:linear-gradient(to bottom,transparent 0%,var(--bg) 92%);}
/* Color-extracted theme experiment */
#detail-page.color-tinted #detail-backdrop-fade{background:linear-gradient(to bottom, rgba(var(--tint),.18) 0%, var(--bg) 88%);}
#detail-page.color-tinted #detail-backdrop img{opacity:.6;}
#detail-page.color-tinted #detail-poster{border-color:rgba(var(--tint),.4);box-shadow:0 16px 48px rgba(var(--tint),.25);}
#detail-page.color-tinted #detail-play-btn{background:rgb(var(--tint)) !important;box-shadow:0 4px 20px rgba(var(--tint),.4) !important;}
#detail-page.color-tinted #detail-back-btn:hover{border-color:rgba(var(--tint),.6);color:var(--text);}
#detail-page.color-tinted .detail-badge:first-child{background:rgba(var(--tint),.25) !important;color:rgb(var(--tint)) !important;border-color:rgba(var(--tint),.35) !important;}
#detail-content{width:100%;margin:-100px 0 0;padding:0 16px calc(var(--bottom-h) + 24px);position:relative;}
#detail-back-btn{
  display:inline-flex;align-items:center;gap:8px;
  background:rgba(255,255,255,.06);border:1px solid rgba(255,255,255,.12);
  color:rgba(255,255,255,.7);border-radius:8px;padding:8px 16px;
  cursor:pointer;font-family:'Space Mono',monospace;font-size:11px;
  font-weight:700;letter-spacing:.5px;transition:all .15s;
  margin-bottom:16px;position:relative;z-index:2;
  backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px);
}
#detail-back-btn:hover{border-color:var(--accent);color:var(--text);background:#6366f111;}
#detail-hero{display:flex;gap:16px;align-items:flex-start;margin-bottom:20px;}
#detail-poster{
  width:130px;height:195px;object-fit:cover;border-radius:10px;
  border:2px solid rgba(255,255,255,.1);flex-shrink:0;box-shadow:0 16px 48px #000000aa;
  background:var(--card);
}
#detail-info{flex:1;min-width:0;padding-top:4px;}
#detail-badges{display:flex;gap:6px;margin-bottom:8px;flex-wrap:wrap;}
.detail-badge{font-family:'Space Mono',monospace;font-size:9px;font-weight:700;letter-spacing:1px;text-transform:uppercase;padding:3px 8px;border-radius:4px;}
#detail-title{font-family:'Syne',sans-serif;font-weight:800;font-size:clamp(18px,5.5vw,26px);color:#fff;line-height:1.15;margin-bottom:6px;}
#detail-tagline{font-family:'DM Sans',sans-serif;font-size:12px;color:var(--muted);font-style:italic;margin-bottom:8px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;}
#detail-stats{display:flex;gap:8px;margin-bottom:10px;flex-wrap:wrap;align-items:center;}
.detail-stat{font-family:'Space Mono',monospace;font-size:10px;color:var(--muted);}
.detail-stat strong{color:var(--text);}
#detail-play-btn{
  display:inline-flex;align-items:center;gap:10px;justify-content:center;
  padding:12px 28px;cursor:pointer;
  background:linear-gradient(135deg,var(--accent),var(--accent2));border:none;border-radius:10px;color:#fff;
  font-family:'Syne',sans-serif;font-weight:800;font-size:15px;
  letter-spacing:.5px;margin-bottom:10px;
  transition:transform .15s,box-shadow .15s;
  box-shadow:0 4px 24px #6366f144;
}
#detail-play-btn:hover{transform:translateY(-2px);box-shadow:0 8px 32px #6366f166;}
#detail-play-btn .play-icon{font-size:18px;}
#detail-torrent-btn{
  display:inline-flex;align-items:center;gap:8px;
  padding:10px 20px;cursor:pointer;
  background:#0d9488;border:none;border-radius:8px;color:#fff;
  font-family:'Space Mono',monospace;font-weight:700;font-size:12px;
  letter-spacing:1px;margin-bottom:10px;
  transition:background .15s,transform .15s;box-shadow:0 4px 16px #0d948844;
}
#detail-torrent-btn:hover{background:#0f766e;transform:translateY(-2px);}
#detail-overview{font-size:14px;color:#9999bb;line-height:1.7;margin-bottom:20px;}
#detail-tv-controls{display:none;align-items:center;gap:8px;margin-bottom:16px;flex-wrap:wrap;}
#tv-season-sel,#tv-ep-sel{padding:8px 12px;font-size:13px;border-radius:6px;border:1px solid var(--border);background:var(--card);color:var(--muted);font-family:'Space Mono',monospace;min-height:40px;}
#detail-body{display:grid;grid-template-columns:1fr;gap:0;}
#detail-side{display:none;}
.section-title{font-family:'Syne',sans-serif;font-weight:700;font-size:12px;letter-spacing:1.5px;text-transform:uppercase;color:var(--muted);margin-bottom:14px;padding-bottom:8px;border-bottom:1px solid var(--border);}

/* Cast — 2-row horizontal slider */
.cast-row,#cast-row{display:grid;grid-template-rows:repeat(2,auto);grid-auto-flow:column;grid-auto-columns:72px;gap:10px;overflow-x:auto;padding-bottom:8px;margin-bottom:20px;-webkit-overflow-scrolling:touch;scrollbar-width:thin;}
.cast-item{text-align:center;width:72px;cursor:pointer;transition:transform .15s;}
.cast-item:hover{transform:translateY(-2px);}
.cast-avatar{width:56px;height:56px;border-radius:50%;overflow:hidden;margin:0 auto 6px;background:var(--border);display:flex;align-items:center;justify-content:center;font-size:22px;}
.cast-avatar img{width:100%;height:100%;object-fit:cover;}
.cast-name{font-size:10px;color:var(--muted);line-height:1.3;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.cast-char{font-size:9px;color:var(--dim);margin-top:2px;font-family:'Space Mono',monospace;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}

/* Seasons / Episodes */
#season-tabs{display:flex;gap:8px;flex-wrap:wrap;padding-bottom:10px;margin-bottom:16px;max-height:96px;overflow-y:auto;}
.season-btn{background:var(--card);color:var(--muted);border:1px solid var(--border);border-radius:8px;padding:8px 16px;cursor:pointer;font-family:'Space Mono',monospace;font-size:12px;white-space:nowrap;transition:all .15s;flex-shrink:0;min-height:40px;}
.season-btn:hover{border-color:var(--accent);color:var(--text);}
.season-btn.active{background:var(--accent);color:#fff;border-color:var(--accent);}
#episodes-list{display:flex;flex-direction:column;gap:10px;max-height:680px;overflow-y:auto;padding-right:4px;}
.ep-row{display:flex;gap:14px;align-items:center;background:var(--card);border-radius:12px;padding:8px 14px;border:1px solid var(--border);border-left:3px solid transparent;transition:border-color .2s,background .2s,box-shadow .2s;cursor:pointer;position:relative;}
.ep-row.playing{border-color:var(--accent);border-left-color:var(--accent);background:#6366f10e;box-shadow:0 0 20px #6366f115;}
.ep-row:hover{border-color:#444466;border-left-color:var(--accent2);background:#ffffff08;box-shadow:0 4px 16px rgba(0,0,0,.2);}
.ep-thumb{width:110px;min-width:110px;height:62px;border-radius:8px;overflow:hidden;background:var(--surface);flex-shrink:0;position:relative;display:flex;align-items:center;justify-content:center;color:#2a2a44;font-size:22px;}
.ep-thumb img{width:100%;height:100%;object-fit:cover;display:block;}
.ep-thumb-play{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;background:rgba(0,0,0,.5);opacity:0;transition:opacity .15s;font-size:20px;}
.ep-row:hover .ep-thumb-play,.ep-row.playing .ep-thumb-play{opacity:1;}
/* Watched episode row */
.ep-row.ep-watched{border-left:3px solid #22c55e!important;background:rgba(34,197,94,.06);}
.ep-row.ep-watched .ep-big-num{color:#22c55e;opacity:.5;}
.ep-row.ep-watched .ep-title{color:var(--muted);}
.ep-row.ep-watched .ep-thumb::after{content:'';position:absolute;inset:0;background:rgba(0,0,0,.45);z-index:2;}
.ep-wp-check{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);width:28px;height:28px;background:#22c55e;border-radius:50%;display:flex;align-items:center;justify-content:center;z-index:3;box-shadow:0 2px 8px rgba(34,197,94,.4);font-size:14px;color:#fff;line-height:1;}
.ep-wp-badge{position:absolute;top:6px;right:6px;background:#22c55e;color:#fff;font-family:'Space Mono',monospace;font-size:9px;font-weight:700;padding:3px 8px;border-radius:4px;letter-spacing:.5px;z-index:3;white-space:nowrap;}
/* In-progress episode row */
.ep-row.ep-partial{border-left:3px solid #4361ee!important;}
.ep-wp-progress{position:absolute;bottom:0;left:0;right:0;height:4px;background:rgba(255,255,255,.1);border-radius:0 0 12px 12px;overflow:hidden;}
.ep-wp-bar{height:100%;background:linear-gradient(90deg,#4361ee,#6366f1);border-radius:0 2px 2px 0;}
.ep-wp-pct{font-family:'Space Mono',monospace;font-size:10px;color:#4361ee;font-weight:700;white-space:nowrap;align-self:center;flex-shrink:0;}
.ep-num{position:absolute;bottom:4px;left:5px;font-family:'Space Mono',monospace;font-size:9px;font-weight:700;color:#fff;background:rgba(0,0,0,.72);border-radius:4px;padding:1px 5px;line-height:1.4;letter-spacing:.5px;}
.ep-info{flex:1;min-width:0;display:flex;flex-direction:column;gap:4px;}
.ep-check-btn{display:none;background:transparent;border:1px solid rgba(99,102,241,.4);color:#6366f1;font-size:13px;padding:6px 10px;border-radius:8px;cursor:pointer;flex-shrink:0;transition:all .15s;line-height:1;align-self:center;}
.ep-check-btn:hover{background:#6366f122;border-color:#6366f1;}
body.admin-mode .ep-check-btn{display:block;}
.ep-link-btn{display:none;background:transparent;border:1px solid rgba(16,185,129,.4);color:#10b981;font-size:15px;font-weight:700;padding:4px 10px;border-radius:8px;cursor:pointer;flex-shrink:0;transition:all .15s;line-height:1;align-self:center;}
.ep-link-btn:hover{background:#10b98122;border-color:#10b981;}
body.admin-mode .ep-link-btn{display:block;}
.ep-big-num{display:block;font-family:'Syne',sans-serif;font-weight:800;font-size:32px;color:var(--accent);min-width:42px;text-align:center;flex-shrink:0;line-height:1;opacity:.85;}
.ep-row.has-custom-link{border-left-color:#10b981!important;background:rgba(16,185,129,.06);}
.ep-row.has-custom-link::after{content:'LINK';position:absolute;top:8px;right:8px;font-family:'Space Mono',monospace;font-size:9px;font-weight:700;color:#10b981;background:rgba(16,185,129,.15);border:1px solid rgba(16,185,129,.3);border-radius:4px;padding:2px 6px;letter-spacing:.5px;}
.ep-title{font-family:'Syne',sans-serif;font-weight:700;font-size:14px;color:var(--text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:1.3;}
.ep-overview{font-size:12px;color:var(--muted);line-height:1.5;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;}
.ep-meta{font-family:'Space Mono',monospace;font-size:11px;color:var(--dim);}
.ep-play-btn{background:var(--accent2);border:none;border-radius:8px;padding:8px 18px;color:#fff;cursor:pointer;font-family:'Space Mono',monospace;font-size:11px;font-weight:700;white-space:nowrap;transition:background .15s;flex-shrink:0;align-self:center;}
.ep-play-btn:hover{background:#4f46e5;}

/* Side panel */
.side-info-row{display:flex;justify-content:space-between;padding:12px 0;border-bottom:1px solid var(--border);font-size:14px;}
.side-info-row:last-child{border-bottom:none;}
.side-label{color:var(--muted);font-family:'Space Mono',monospace;font-size:10px;letter-spacing:.5px;}
.side-value{color:var(--text);text-align:right;max-width:180px;}

/* Recommended */
#recs-row{display:grid;grid-template-columns:repeat(auto-fill,minmax(100px,1fr));gap:10px;margin-bottom:24px;}
.rec-card{cursor:pointer;border-radius:8px;overflow:hidden;background:var(--card);border:1px solid var(--border);transition:border-color .15s,transform .15s;}
.rec-card:hover{border-color:var(--accent);transform:translateY(-2px);}
.rec-poster{aspect-ratio:2/3;overflow:hidden;background:var(--surface);}
.rec-poster img{width:100%;height:100%;object-fit:cover;display:block;}
.rec-title{padding:6px 8px;font-family:'Syne',sans-serif;font-size:11px;font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.rec-year{padding:0 8px 6px;font-family:'Space Mono',monospace;font-size:9px;color:var(--muted);}
#actor-filmo-modal{display:none;position:fixed;inset:0;z-index:190;background:rgba(0,0,0,.7);backdrop-filter:blur(6px);-webkit-backdrop-filter:blur(6px);align-items:center;justify-content:center;}
#actor-filmo-modal.open{display:flex;}
#actor-filmo-inner{width:100%;max-width:1000px;max-height:92vh;background:var(--bg);border:1px solid var(--border);border-radius:16px;display:flex;flex-direction:column;overflow:hidden;animation:filmoSlideUp .25s ease;}
@keyframes filmoSlideUp{from{transform:translateY(40px);opacity:0}to{transform:translateY(0);opacity:1}}
#actor-filmo-top{display:flex;align-items:center;padding:16px 18px 12px;border-bottom:1px solid var(--border);gap:12px;}
#actor-filmo-header{display:flex;align-items:center;gap:12px;flex:1;min-width:0;}
#actor-filmo-close{background:none;border:1px solid var(--border);color:var(--muted);border-radius:6px;width:32px;height:32px;cursor:pointer;font-size:14px;display:flex;align-items:center;justify-content:center;flex-shrink:0;transition:background .15s;}
#actor-filmo-close:hover{background:var(--card);color:var(--text);}
#actor-filmo-grid{display:grid;grid-template-rows:repeat(2,auto);grid-auto-flow:column;grid-auto-columns:150px;gap:14px;padding:16px 18px;overflow-x:auto;overflow-y:hidden;-webkit-overflow-scrolling:touch;flex:1;min-height:0;scrollbar-width:thin;}
#actor-filmo-grid .rec-poster{aspect-ratio:2/3;display:flex;align-items:center;justify-content:center;background:var(--surface);}
#actor-filmo-grid .rec-poster img{width:100%;height:100%;object-fit:contain;display:block;}
.actor-filmo-avatar{width:48px;height:48px;border-radius:50%;overflow:hidden;background:var(--border);flex-shrink:0;}
.actor-filmo-avatar img{width:100%;height:100%;object-fit:cover;}
.actor-filmo-info{font-family:'Space Mono',monospace;font-size:11px;color:var(--muted);line-height:1.4;}
.actor-filmo-name{font-family:'Syne',sans-serif;font-size:15px;font-weight:700;color:var(--text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}

@keyframes pulse-dot{0%,100%{opacity:1}50%{opacity:.3}}

/* Desktop detail */
@media(min-width:768px){
  #detail-backdrop{height:500px;}
  #detail-content{margin:-220px 0 0;padding:0 40px 60px;}
  #detail-hero{gap:40px;margin-bottom:36px;align-items:flex-end;}
  #detail-poster{width:clamp(180px,14vw,260px);height:clamp(270px,21vw,390px);border-radius:12px;box-shadow:0 24px 80px #000000aa;}
  #detail-title{font-size:clamp(32px,4vw,64px);margin-bottom:12px;}
  #detail-tagline{font-size:17px;margin-bottom:16px;-webkit-line-clamp:unset;}
  #detail-stats{gap:24px;margin-bottom:20px;}
  .detail-stat{font-size:13px;}
  #detail-play-btn{padding:16px 44px;font-size:18px;margin-bottom:28px;}
  #detail-overview{font-size:16px;line-height:1.85;max-width:80ch;margin-bottom:28px;}
  #detail-body{grid-template-columns:1fr clamp(300px,24vw,420px);gap:40px;}
  #detail-side{display:block;}
  .section-title{font-size:13px;margin-bottom:16px;}
  #cast-row,.cast-row{gap:12px;margin-bottom:24px;grid-auto-columns:96px;}
  .cast-item{width:96px;}
  .cast-avatar{width:76px;height:76px;font-size:28px;}
  .cast-name{font-size:11px;}
  .ep-row{padding:10px 18px;gap:16px;}
  .ep-thumb{width:180px;min-width:180px;height:101px;border-radius:10px;}
  .ep-title{font-size:15px;}
  .ep-overview{font-size:13px;-webkit-line-clamp:3;}
  .ep-meta{font-size:12px;}
  .ep-big-num{font-size:36px;min-width:48px;}
  #episodes-list{gap:12px;max-height:800px;}
  #recs-row{grid-template-columns:repeat(auto-fill,minmax(140px,1fr));gap:14px;}
  #actor-filmo-grid{grid-auto-columns:140px;gap:14px;}
  .rec-title{font-size:12px;padding:8px 10px;}
}

/* ── 8. SPORTS PAGE ── */
#sports-page{display:none;width:100%;padding:16px 12px calc(var(--bottom-h) + 16px);animation:fadeIn .25s ease;}
#team-page{display:none;width:100%;padding:16px 12px calc(var(--bottom-h) + 16px);animation:fadeIn .25s ease;}
.sports-filter{display:flex;gap:6px;overflow-x:auto;-webkit-overflow-scrolling:touch;padding-bottom:4px;margin-bottom:16px;scrollbar-width:none;}
.sports-filter::-webkit-scrollbar{display:none;}
.sports-filter-btn{background:var(--card);border:1px solid var(--border);color:var(--muted);border-radius:20px;padding:8px 16px;font-family:'Space Mono',monospace;font-size:11px;cursor:pointer;transition:all .15s;white-space:nowrap;flex-shrink:0;min-height:36px;}
.sports-filter-btn:hover{border-color:var(--accent);color:var(--text);}
.sports-filter-btn.active{background:var(--accent);border-color:var(--accent);color:#fff;}
.sports-cat{margin-bottom:24px;}
.sports-cat-title{font-family:'Syne',sans-serif;font-weight:800;font-size:16px;color:var(--accent);letter-spacing:1px;text-transform:uppercase;margin-bottom:12px;display:flex;align-items:center;gap:10px;}
.sports-cat-title .cat-count{font-family:'Space Mono',monospace;font-size:11px;color:var(--muted);font-weight:400;}
.sports-league{background:var(--card);border:1px solid var(--border);border-radius:10px;margin-bottom:12px;overflow:hidden;}
.sports-league-header{display:flex;align-items:center;gap:10px;padding:12px 16px;border-bottom:1px solid var(--border);background:var(--surface);}
.sports-league-header img{width:24px;height:16px;object-fit:contain;border-radius:2px;}
.sports-league-header span{font-family:'Syne',sans-serif;font-weight:700;font-size:14px;color:var(--text);}
.sports-league-header .league-country{font-family:'Space Mono',monospace;font-size:11px;color:var(--dim);margin-left:auto;}
.sport-row{display:flex;align-items:center;gap:8px;padding:10px 12px;border-bottom:1px solid var(--border);transition:background .12s;flex-wrap:wrap;}
.sport-row:last-child{border-bottom:none;}
.sport-row:hover{background:var(--surface);}
.sport-row.ended{opacity:.35;}
.sport-row-status{flex-shrink:0;}
.sport-row-status span{font-family:'Space Mono',monospace;font-size:10px;font-weight:700;letter-spacing:1px;text-transform:uppercase;padding:4px 10px;border-radius:4px;display:inline-block;}
.status-live{background:#ef444433;color:#ef4444;border:1px solid #ef444466;}
.status-upcoming{background:#eab30822;color:#eab308;border:1px solid #eab30844;}
.status-finished{background:#ffffff08;color:var(--dim);border:1px solid var(--border);}
.sport-row-time{flex-shrink:0;font-family:'Space Mono',monospace;font-size:11px;color:var(--muted);min-width:40px;text-align:center;}
.sport-row-teams{flex:1;display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:4px;min-width:0;}
.sport-row-team{display:flex;align-items:center;gap:6px;min-width:0;}
.sport-row-team img{width:24px;height:24px;object-fit:contain;flex-shrink:0;}
.sport-row-team span{font-family:'Syne',sans-serif;font-size:12px;font-weight:600;color:var(--text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.sport-row-team.home{justify-content:flex-end;text-align:right;}
.sport-row-team.home span{direction:rtl;}
.sport-row-vs{font-family:'Syne',sans-serif;font-weight:800;font-size:11px;color:var(--dim);text-align:center;padding:0 4px;}
.sport-row-score{flex-shrink:0;font-family:'Space Mono',monospace;font-size:16px;font-weight:700;color:var(--text);min-width:50px;text-align:center;letter-spacing:1px;}
.sport-row-countdown{flex-shrink:0;font-family:'Space Mono',monospace;font-size:11px;color:#eab308;background:#eab30812;padding:3px 8px;border-radius:4px;white-space:nowrap;}
.sport-row-event{flex:1;font-family:'Syne',sans-serif;font-weight:600;font-size:13px;color:var(--text);min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.sport-row-channels{display:flex;gap:4px;flex-wrap:wrap;flex-shrink:0;flex-basis:100%;margin-top:4px;}
.sport-channel-pill{background:var(--surface);border:1px solid var(--border);border-radius:5px;padding:6px 10px;font-family:'Space Mono',monospace;font-size:10px;color:var(--muted);display:flex;align-items:center;gap:6px;cursor:pointer;transition:border-color .15s,color .15s;white-space:nowrap;min-height:36px;}
.sport-channel-pill:hover{border-color:var(--accent);color:var(--text);}
.sport-channel-pill img{width:16px;height:16px;border-radius:2px;object-fit:contain;}
.sport-more-btn{background:var(--accent)22;color:var(--accent);border-color:var(--accent)44;font-weight:700;}
.sport-more-btn:hover{background:var(--accent);color:#fff;}
.sport-row-actions{display:flex;gap:4px;flex-shrink:0;margin-left:4px;}
.sport-action-btn{background:var(--surface);border:1px solid var(--border);color:var(--muted);border-radius:4px;padding:3px 8px;font-family:'Space Mono',monospace;font-size:9px;cursor:pointer;letter-spacing:.5px;transition:all .15s;text-transform:uppercase;white-space:nowrap;}
.sport-action-btn:hover{border-color:var(--accent);color:var(--accent);}
.sport-team-link{cursor:pointer;text-decoration:none;color:inherit;}
.sport-team-link:hover span{color:var(--accent);}

/* Team page */
.team-header{position:relative;border-radius:12px;overflow:hidden;margin-bottom:20px;}
.team-banner{width:100%;height:160px;object-fit:cover;display:block;}
.team-banner-fade{position:absolute;inset:0;background:linear-gradient(to top,var(--bg),transparent 60%);}
.team-info{position:relative;display:flex;align-items:flex-end;gap:16px;padding:0 16px 16px;margin-top:-60px;z-index:2;}
.team-badge{width:80px;height:80px;object-fit:contain;border-radius:12px;background:var(--card);border:2px solid var(--border);padding:6px;flex-shrink:0;}
.team-meta{flex:1;min-width:0;}
.team-name{font-family:'Syne',sans-serif;font-weight:800;font-size:22px;color:var(--text);margin:0 0 4px;}
.team-details{display:flex;flex-wrap:wrap;gap:10px;font-family:'Space Mono',monospace;font-size:11px;color:var(--muted);}
.team-details span{display:flex;align-items:center;gap:4px;}
.team-desc{font-family:'Space Mono',monospace;font-size:12px;color:var(--muted);line-height:1.7;margin-bottom:20px;max-height:120px;overflow:hidden;position:relative;}
.team-desc.expanded{max-height:none;}
.team-desc-toggle{background:none;border:none;color:var(--accent);cursor:pointer;font-family:'Space Mono',monospace;font-size:11px;margin-bottom:16px;padding:0;}
.team-section-title{font-family:'Syne',sans-serif;font-weight:800;font-size:15px;color:var(--text);letter-spacing:1px;text-transform:uppercase;margin-bottom:12px;display:flex;align-items:center;gap:8px;}
.team-section-title .count{font-family:'Space Mono',monospace;font-size:11px;color:var(--muted);font-weight:400;}
.player-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(140px,1fr));gap:10px;margin-bottom:24px;}
.player-card{background:var(--card);border:1px solid var(--border);border-radius:10px;padding:12px;text-align:center;transition:border-color .15s;cursor:pointer;}
.player-card:hover{border-color:var(--accent);}
.player-card img{width:64px;height:64px;border-radius:50%;object-fit:cover;margin:0 auto 8px;background:var(--surface);}
.player-card .player-name{font-family:'Syne',sans-serif;font-weight:700;font-size:12px;color:var(--text);margin-bottom:3px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.player-card .player-pos{font-family:'Space Mono',monospace;font-size:10px;color:var(--accent);letter-spacing:1px;text-transform:uppercase;}
.schedule-section{margin-bottom:24px;}
.schedule-row{display:flex;align-items:center;gap:10px;padding:8px 12px;background:var(--card);border:1px solid var(--border);border-radius:8px;margin-bottom:6px;}
.schedule-row .sch-badge{width:24px;height:24px;object-fit:contain;border-radius:4px;flex-shrink:0;}
.schedule-row .sch-team{font-family:'Space Mono',monospace;font-size:11px;color:var(--text);min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;flex:1;}
.schedule-row .sch-team.home{text-align:right;}
.schedule-row .sch-score{font-family:'Space Mono',monospace;font-size:13px;font-weight:700;color:var(--accent);min-width:50px;text-align:center;}
.schedule-row .sch-vs{font-family:'Space Mono',monospace;font-size:11px;color:var(--muted);min-width:50px;text-align:center;}
.schedule-row .sch-date{font-family:'Space Mono',monospace;font-size:10px;color:var(--muted);flex-shrink:0;min-width:70px;text-align:right;}
.schedule-row .sch-venue{font-family:'Space Mono',monospace;font-size:9px;color:#ffffff44;margin-left:auto;max-width:120px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}

/* Desktop sports */
@media(min-width:768px){
  #sports-page,#team-page{padding:28px 36px;}
  .sport-row{gap:12px;padding:12px 20px;flex-wrap:nowrap;}
  .sport-row-channels{flex-basis:auto;margin-top:0;}
  .sport-row-team img{width:26px;height:26px;}
  .sport-row-team span{font-size:13px;}
  .team-banner{height:200px;}
  .team-info{gap:20px;padding:0 24px 20px;margin-top:-80px;}
  .team-badge{width:100px;height:100px;padding:8px;}
  .team-name{font-size:28px;}
  .player-grid{grid-template-columns:repeat(auto-fill,minmax(160px,1fr));gap:12px;}
  .player-card img{width:80px;height:80px;}
  .player-card .player-name{font-size:13px;}
}

/* ── ANIME PAGE ── */
#anime-page{display:none;width:100%;padding:16px 12px calc(var(--bottom-h) + 16px);animation:fadeIn .25s ease;}
#anime-detail-page{display:none;animation:fadeIn .25s ease;}
#anime-detail-backdrop{height:260px;position:relative;overflow:hidden;}
#anime-detail-backdrop img{width:100%;height:100%;object-fit:cover;opacity:.5;}
.anime-detail-fade{position:absolute;inset:0;background:linear-gradient(to bottom,transparent 0%,var(--bg) 92%);}
#anime-detail-content{width:100%;margin:-100px 0 0;padding:0 16px calc(var(--bottom-h,60px) + 24px);position:relative;}
#anime-detail-back-btn{
  display:inline-flex;align-items:center;gap:8px;
  background:rgba(255,255,255,.06);border:1px solid rgba(255,255,255,.12);
  color:rgba(255,255,255,.7);border-radius:8px;padding:8px 16px;
  cursor:pointer;font-family:'Space Mono',monospace;font-size:11px;
  font-weight:700;letter-spacing:.5px;transition:all .15s;
  margin-bottom:16px;position:relative;z-index:2;
  backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px);
}
#anime-detail-back-btn:hover{border-color:var(--accent);color:var(--text);background:#6366f111;}
#anime-detail-hero{display:flex;gap:16px;align-items:flex-start;margin-bottom:20px;}
#anime-detail-poster{
  width:130px;height:195px;object-fit:cover;border-radius:10px;
  border:2px solid rgba(255,255,255,.1);flex-shrink:0;box-shadow:0 16px 48px #000000aa;
  background:var(--card);
}
#anime-detail-info{flex:1;min-width:0;padding-top:4px;}
#anime-detail-badges{display:flex;gap:6px;margin-bottom:8px;flex-wrap:wrap;}
#anime-detail-title{font-family:'Syne',sans-serif;font-weight:800;font-size:clamp(18px,5.5vw,26px);color:#fff;line-height:1.15;margin-bottom:6px;}
#anime-detail-title-jp{font-family:'Space Mono',monospace;font-size:12px;color:var(--muted);font-style:italic;margin-bottom:8px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;}
#anime-detail-stats{display:flex;gap:8px;margin-bottom:10px;flex-wrap:wrap;align-items:center;}
#anime-detail-synopsis{font-size:14px;color:#9999bb;line-height:1.7;margin-bottom:20px;}
#anime-detail-body{display:grid;grid-template-columns:1fr;gap:0;}
#anime-detail-side{display:none;}
#anime-detail-relations-section{margin-bottom:24px;}
#anime-detail-characters-section{margin-bottom:24px;}
#anime-tmdb-status{font-family:'Space Mono',monospace;font-size:10px;color:var(--muted);padding:4px 0;margin-bottom:8px;}
.badge-anime{background:#a855f7cc;color:#fff;}
.anime-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:10px;animation:slideUp .3s ease;}
.anime-schedule{display:flex;flex-direction:column;gap:24px;}
.anime-schedule-day-header{display:flex;align-items:center;gap:10px;margin-bottom:12px;padding-bottom:6px;border-bottom:1px solid var(--border);}
.anime-day-name{font-family:'Syne',sans-serif;font-weight:800;font-size:16px;color:var(--text);}
.anime-today-badge{font-family:'Space Mono',monospace;font-size:9px;font-weight:700;letter-spacing:1px;background:#4ade8022;color:#4ade80;border:1px solid #4ade8044;padding:3px 8px;border-radius:4px;}
.anime-schedule-day.today .anime-day-name{color:#4ade80;}
.anime-schedule-day-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:10px;}
.anime-pagination{display:flex;align-items:center;justify-content:center;gap:16px;margin-top:24px;padding:16px 0;}
.anime-episode-row{display:flex;align-items:center;gap:14px;background:var(--card);border-radius:12px;padding:8px 14px;border:1px solid var(--border);border-left:3px solid transparent;transition:border-color .2s,background .2s,box-shadow .2s;margin-bottom:10px;}
.anime-episode-row:hover{border-color:#444466;border-left-color:#a855f7;background:#ffffff08;box-shadow:0 4px 16px rgba(0,0,0,.2);}
.anime-ep-num{font-family:'Space Mono',monospace;font-size:12px;color:var(--muted);min-width:32px;text-align:center;flex-shrink:0;}
.anime-ep-play{background:var(--accent);color:#fff;border:none;border-radius:50%;width:32px;height:32px;min-width:32px;cursor:pointer;font-size:12px;display:flex;align-items:center;justify-content:center;flex-shrink:0;transition:transform .15s,opacity .15s;opacity:.85;}
.anime-ep-play:hover{transform:scale(1.15);opacity:1;}
.anime-ep-dub{background:#a855f7;border-radius:6px;font-family:'Space Mono',monospace;font-size:9px;font-weight:700;width:auto;padding:0 10px;}
.anime-ep-thumb{width:120px;height:68px;border-radius:6px;object-fit:cover;flex-shrink:0;background:var(--card);}
.anime-ep-thumb-empty{width:120px;height:68px;border-radius:6px;flex-shrink:0;background:var(--card);}
.anime-ep-desc{font-family:'Space Mono',monospace;font-size:10px;color:var(--muted);margin-top:3px;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;line-height:1.4;}
/* Anime watched episode */
.anime-episode-row.anime-ep-watched{border-left:3px solid #22c55e!important;background:rgba(34,197,94,.06);}
.anime-episode-row.anime-ep-watched .anime-ep-num{color:#22c55e;opacity:.6;}
.anime-wp-badge{position:absolute;top:6px;right:6px;background:#22c55e;color:#fff;font-family:'Space Mono',monospace;font-size:9px;font-weight:700;padding:3px 8px;border-radius:4px;letter-spacing:.5px;white-space:nowrap;}
.anime-episode-row{position:relative;}
/* Anime partial progress */
.anime-episode-row.anime-ep-partial{border-left:3px solid #a855f7!important;}
.anime-wp-bar{position:absolute;bottom:0;left:0;right:0;height:4px;background:rgba(255,255,255,.1);border-radius:0 0 12px 12px;overflow:hidden;}
.anime-wp-pct{font-family:'Space Mono',monospace;font-size:10px;color:#a855f7;font-weight:700;white-space:nowrap;flex-shrink:0;margin-left:auto;}
.anime-rel-slider{display:flex;gap:10px;overflow-x:auto;padding:0 36px 8px;scroll-behavior:smooth;scrollbar-width:thin;}
.anime-rel-arrow{position:absolute;top:50%;transform:translateY(-50%);z-index:2;width:30px;height:30px;border-radius:50%;border:1px solid var(--border);background:var(--bg);color:var(--text);font-size:20px;line-height:1;cursor:pointer;display:flex;align-items:center;justify-content:center;opacity:.8;transition:opacity .15s,background .15s;}
.anime-rel-arrow:hover{opacity:1;background:var(--card);}
.anime-rel-arrow-l{left:0;}
.anime-rel-arrow-r{right:0;}
.anime-page-info{font-family:'Space Mono',monospace;font-size:12px;color:var(--muted);}
@media(min-width:768px){
  #anime-page{padding:28px 36px;}
  .anime-grid{grid-template-columns:repeat(3,1fr);gap:14px;}
  .anime-schedule-day-grid{grid-template-columns:repeat(3,1fr);gap:14px;}
}
@media(min-width:768px){
  #anime-detail-backdrop{height:500px;}
  #anime-detail-content{margin:-220px 0 0;padding:0 40px 60px;}
  #anime-detail-hero{gap:40px;margin-bottom:36px;align-items:flex-end;}
  #anime-detail-poster{width:clamp(180px,14vw,260px);height:clamp(270px,21vw,390px);border-radius:12px;box-shadow:0 24px 80px #000000aa;}
  #anime-detail-title{font-size:clamp(32px,4vw,64px);margin-bottom:12px;}
  #anime-detail-title-jp{font-size:14px;margin-bottom:16px;-webkit-line-clamp:unset;}
  #anime-detail-stats{gap:24px;margin-bottom:20px;}
  #anime-detail-synopsis{font-size:16px;line-height:1.85;max-width:80ch;margin-bottom:28px;}
  #anime-detail-body{grid-template-columns:1fr clamp(300px,24vw,420px);gap:40px;}
  #anime-detail-side{display:block;}
}
@media(min-width:1024px){
  .anime-grid{grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:18px;}
  .anime-schedule-day-grid{grid-template-columns:repeat(auto-fill,minmax(180px,1fr));gap:14px;}
}
@media(max-width:767px){
  #anime-detail-side{display:block;margin-top:24px;}
  .anime-ep-thumb,.anime-ep-thumb-empty{width:90px;height:50px;}
  .anime-ep-desc{-webkit-line-clamp:1;}
  .anime-rel-slider{padding:0 32px 8px;}
}

/* Event & Player modals */
#event-modal{display:none;position:fixed;inset:0;z-index:9999;background:rgba(0,0,0,.85);overflow-y:auto;animation:fadeIn .2s ease;}
#event-modal-inner{max-width:560px;margin:40px auto;padding:0;background:var(--bg);border:1px solid var(--border);border-radius:14px;position:relative;overflow:hidden;}
.em-header{padding:20px 24px;background:var(--card);border-bottom:1px solid var(--border);display:flex;align-items:center;gap:14px;}
.em-header img{width:32px;height:32px;object-fit:contain;}
.em-header .em-teams{font-family:'Syne',sans-serif;font-weight:700;font-size:16px;color:var(--text);flex:1;}
.em-header .em-score{font-family:'Space Mono',monospace;font-weight:700;font-size:18px;color:var(--accent);}
.em-close{position:absolute;top:14px;right:14px;background:var(--surface);border:1px solid var(--border);color:var(--text);width:32px;height:32px;border-radius:50%;cursor:pointer;font-size:16px;display:flex;align-items:center;justify-content:center;z-index:2;}
.em-close:hover{background:var(--accent);color:#000;}
.em-body{padding:20px 24px;}
.tl-event{display:flex;align-items:flex-start;gap:12px;padding:10px 0;border-bottom:1px solid #ffffff0a;position:relative;}
.tl-event:last-child{border-bottom:none;}
.tl-time{font-family:'Space Mono',monospace;font-size:12px;color:var(--accent);min-width:32px;text-align:right;flex-shrink:0;padding-top:2px;}
.tl-icon{width:24px;height:24px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:12px;flex-shrink:0;}
.tl-icon.goal{background:#22c55e33;color:#22c55e;}
.tl-icon.card-y{background:#eab30833;color:#eab308;}
.tl-icon.card-r{background:#ef444433;color:#ef4444;}
.tl-icon.subst{background:#3b82f633;color:#3b82f6;}
.tl-icon.other{background:#ffffff15;color:var(--muted);}
.tl-detail{flex:1;min-width:0;}
.tl-player{font-family:'Syne',sans-serif;font-weight:700;font-size:13px;color:var(--text);}
.tl-assist{font-family:'Space Mono',monospace;font-size:10px;color:var(--muted);}
.tl-team-tag{font-family:'Space Mono',monospace;font-size:9px;color:#ffffff55;letter-spacing:.5px;}
.tl-side-home{border-left:3px solid var(--accent);padding-left:9px;}
.tl-side-away{border-left:3px solid #f87171;padding-left:9px;}
.stat-row{display:flex;align-items:center;gap:10px;margin-bottom:14px;}
.stat-row .stat-label{font-family:'Space Mono',monospace;font-size:11px;color:var(--muted);min-width:100px;text-align:center;flex-shrink:0;}
.stat-row .stat-val{font-family:'Space Mono',monospace;font-size:12px;font-weight:700;color:var(--text);min-width:32px;text-align:center;flex-shrink:0;}
.stat-bar-wrap{flex:1;height:8px;background:var(--surface);border-radius:4px;overflow:hidden;display:flex;}
.stat-bar-wrap.home-side{justify-content:flex-end;}
.stat-bar{height:100%;border-radius:4px;transition:width .5s ease;min-width:2px;}
.stat-bar.home{background:var(--accent);}
.stat-bar.away{background:#f87171;}
#player-modal{display:none;position:fixed;inset:0;z-index:9999;background:rgba(0,0,0,.85);overflow-y:auto;animation:fadeIn .2s ease;}
#player-modal-inner{max-width:600px;margin:40px auto;padding:28px;background:var(--bg);border:1px solid var(--border);border-radius:14px;position:relative;}
.pm-close{position:absolute;top:14px;right:14px;background:var(--card);border:1px solid var(--border);color:var(--text);width:32px;height:32px;border-radius:50%;cursor:pointer;font-size:16px;display:flex;align-items:center;justify-content:center;}
.pm-close:hover{background:var(--accent);color:#000;}
.pm-header{display:flex;gap:20px;align-items:flex-start;margin-bottom:20px;}
.pm-img{width:120px;height:120px;border-radius:12px;object-fit:cover;background:var(--card);flex-shrink:0;}
.pm-name{font-family:'Syne',sans-serif;font-weight:800;font-size:24px;color:var(--text);margin:0 0 6px;}
.pm-team{font-family:'Space Mono',monospace;font-size:12px;color:var(--accent);margin-bottom:8px;}
.pm-stats{display:grid;grid-template-columns:repeat(auto-fill,minmax(120px,1fr));gap:8px;margin-bottom:20px;}
.pm-stat{background:var(--card);border:1px solid var(--border);border-radius:8px;padding:10px;text-align:center;}
.pm-stat-val{font-family:'Syne',sans-serif;font-weight:700;font-size:16px;color:var(--text);}
.pm-stat-label{font-family:'Space Mono',monospace;font-size:9px;color:var(--muted);letter-spacing:1px;text-transform:uppercase;margin-top:2px;}
.pm-bio{font-family:'Space Mono',monospace;font-size:12px;color:var(--muted);line-height:1.7;max-height:160px;overflow:hidden;position:relative;}
.pm-bio.expanded{max-height:none;}
.pm-bio-toggle{background:none;border:none;color:var(--accent);cursor:pointer;font-family:'Space Mono',monospace;font-size:11px;padding:0;margin-top:4px;}
.ch-modal-overlay{position:fixed;inset:0;background:#000000cc;z-index:999;display:flex;align-items:center;justify-content:center;animation:fadeIn .15s ease;}
.ch-modal{background:var(--bg);border:1px solid var(--border);border-radius:12px;padding:24px;max-width:420px;width:90%;max-height:80vh;overflow-y:auto;}
.ch-modal-title{font-family:'Syne',sans-serif;font-weight:800;font-size:14px;color:var(--text);margin-bottom:16px;line-height:1.3;}
.ch-modal-list{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:16px;}
.ch-modal-pill{padding:6px 12px;font-size:11px;}
.ch-modal-pill img{width:18px;height:18px;}
.ch-modal-close{background:var(--surface);border:1px solid var(--border);border-radius:6px;padding:8px 20px;color:var(--muted);cursor:pointer;font-family:'Space Mono',monospace;font-size:11px;width:100%;transition:border-color .15s;}
.ch-modal-close:hover{border-color:var(--accent);color:var(--text);}

/* ── 9. LIVE TV PAGE ── */
#livetv-page{display:none;width:100%;padding:16px 12px calc(var(--bottom-h) + 16px);animation:fadeIn .25s ease;}
#livetv-countries{animation:fadeIn .25s ease;}
#livetv-countries-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;}
.ltv-flag-card{background:var(--card);border:1px solid var(--border);border-radius:var(--radius);cursor:pointer;transition:all .18s;overflow:hidden;}
.ltv-flag-card:hover{transform:translateY(-4px);border-color:var(--accent);box-shadow:0 8px 32px #6366f122;}
.ltv-flag-img{aspect-ratio:16/10;background-size:cover;background-position:center;background-repeat:no-repeat;background-color:var(--surface);}
.ltv-flag-info{padding:8px 10px 10px;text-align:center;}
.ltv-flag-name{font-family:'Syne',sans-serif;font-weight:700;font-size:11px;color:var(--text);letter-spacing:.3px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.ltv-flag-count{font-family:'Space Mono',monospace;font-size:10px;color:var(--muted);margin-top:2px;}
.ltv-flag-all{background:linear-gradient(135deg,var(--accent),var(--accent2));display:flex;align-items:center;justify-content:center;}
.ltv-flag-all::after{content:'📺';font-size:40px;}
.ltv-flag-unmapped{background:linear-gradient(135deg,var(--surface),var(--card));display:flex;align-items:center;justify-content:center;}
.ltv-flag-unmapped::after{content:'🌐';font-size:40px;}
.ltv-flag-import{background:linear-gradient(135deg,#1a3a2a,#0a2018);display:flex;align-items:center;justify-content:center;}
.ltv-flag-import::after{content:'📥';font-size:40px;}
.ltv-import-m3u{border-style:dashed!important;}
.ltv-import-m3u:hover{border-color:var(--accent)!important;}

/* Channels header */
#livetv-channels-header{display:flex;align-items:center;gap:12px;margin-bottom:16px;padding-bottom:12px;border-bottom:1px solid var(--border);}
#livetv-back-btn{background:var(--card);border:1px solid var(--border);color:var(--text);border-radius:8px;padding:8px 14px;font-family:'Space Mono',monospace;font-size:11px;font-weight:700;letter-spacing:.5px;cursor:pointer;transition:all .15s;display:flex;align-items:center;gap:6px;}
#livetv-back-btn::before{content:'\2190';font-size:14px;}
#livetv-back-btn:hover{border-color:var(--accent);color:var(--accent);}
.ltv-add-channel-btn{display:none;margin-left:auto;background:var(--accent);color:#fff;border:none;border-radius:8px;padding:7px 14px;font-family:'Space Mono',monospace;font-size:10px;font-weight:700;letter-spacing:1px;cursor:pointer;transition:all .15s;flex-shrink:0;}
.ltv-add-channel-btn:hover{opacity:.85;transform:scale(1.04);}
body.admin-mode .ltv-add-channel-btn{display:block;}
#livetv-country-title{font-family:'Syne',sans-serif;font-weight:800;font-size:18px;color:var(--text);display:flex;align-items:center;gap:10px;}
#livetv-category-bar{display:flex;gap:6px;overflow-x:auto;-webkit-overflow-scrolling:touch;margin-bottom:16px;scrollbar-width:none;padding-bottom:4px;}
#livetv-category-bar::-webkit-scrollbar{display:none;}
.ltv-cat-btn{background:var(--card);border:1px solid var(--border);color:var(--muted);border-radius:20px;padding:6px 14px;font-family:'Space Mono',monospace;font-size:10px;font-weight:700;letter-spacing:.5px;cursor:pointer;transition:all .15s;white-space:nowrap;flex-shrink:0;min-height:32px;}
.ltv-cat-btn:hover{border-color:var(--accent);color:var(--text);background:#6366f10a;}
.ltv-cat-btn.active{background:var(--accent2);border-color:var(--accent2);color:#fff;}

/* Channel grid */
#livetv-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:12px;animation:slideUp .3s ease;}
.ltv-card{background:var(--card);border:1px solid var(--border);border-radius:10px;overflow:hidden;cursor:pointer;transition:transform .18s,border-color .18s,box-shadow .18s;}
.ltv-card:hover{transform:translateY(-4px);border-color:var(--accent);box-shadow:0 8px 32px #6366f122;}
.ltv-thumb{aspect-ratio:16/9;background:var(--surface);position:relative;overflow:hidden;display:flex;align-items:center;justify-content:center;}
.ltv-thumb img:not(.ltv-live-logo){width:100%;height:100%;object-fit:cover;display:block;}
.ltv-thumb img.ltv-logo-fit{object-fit:contain;padding:36px;background:linear-gradient(135deg,#0d0d18,#131326);}
.ltv-thumb img.ltv-prog-bg{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;opacity:.4;}
.ltv-thumb-placeholder{width:100%;height:100%;display:flex;align-items:center;justify-content:center;font-family:'Syne',sans-serif;font-weight:800;font-size:48px;color:var(--border);background:linear-gradient(135deg,var(--surface),var(--card));}
.ltv-live-badge{position:absolute;top:8px;left:8px;background:#ef4444dd;color:#fff;font-family:'Space Mono',monospace;font-size:9px;font-weight:700;letter-spacing:1px;padding:3px 8px;border-radius:4px;backdrop-filter:blur(4px);}
.ltv-live-logo{position:absolute;top:8px;left:8px;width:96px;height:96px;object-fit:contain;border-radius:4px;padding:3px;filter:drop-shadow(0 2px 6px rgba(0,0,0,.6));}
.ltv-info{padding:10px 12px 12px;}
.ltv-name{font-family:'Syne',sans-serif;font-weight:700;font-size:13px;color:var(--text);margin-bottom:8px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.ltv-now{display:flex;align-items:baseline;gap:6px;margin-bottom:4px;}
.ltv-now-label{font-family:'Space Mono',monospace;font-size:9px;font-weight:700;letter-spacing:1px;color:#22c55e;background:#22c55e18;padding:2px 6px;border-radius:3px;flex-shrink:0;}
.ltv-now-title{font-family:'DM Sans',sans-serif;font-size:12px;color:var(--text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;flex:1;}
.ltv-desc{font-family:'Space Mono',monospace;font-size:9px;color:var(--muted);line-height:1.5;margin-bottom:8px;display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden;min-height:14px;}
.ltv-progress{height:4px;background:var(--surface);border-radius:2px;overflow:hidden;margin-bottom:4px;}
.ltv-progress-fill{height:100%;background:linear-gradient(90deg,#f59e0b,#ef4444);border-radius:2px;transition:width 1s linear;}
.ltv-time-range{display:flex;justify-content:space-between;font-family:'Space Mono',monospace;font-size:9px;color:var(--dim);margin-bottom:8px;}
.ltv-next{display:flex;align-items:baseline;gap:6px;}
.ltv-next-label{font-family:'Space Mono',monospace;font-size:9px;font-weight:700;letter-spacing:1px;color:#eab308;background:#eab30818;padding:2px 6px;border-radius:3px;flex-shrink:0;}
.ltv-next-title{font-family:'DM Sans',sans-serif;font-size:11px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;flex:1;}
.ltv-next-time{font-family:'Space Mono',monospace;font-size:10px;color:var(--dim);flex-shrink:0;}
.ltv-no-epg{font-family:'Space Mono',monospace;font-size:10px;color:var(--dim);padding:8px 0;}
.ltv-admin-bar{display:flex;gap:6px;margin-top:10px;padding-top:8px;border-top:1px solid var(--border);}
.ltv-admin-btn{flex:1;background:var(--surface);border:1px solid var(--border);border-radius:6px;padding:6px 0;font-family:'Space Mono',monospace;font-size:10px;font-weight:700;letter-spacing:1px;color:var(--text);cursor:pointer;transition:all .15s;display:flex;align-items:center;justify-content:center;}
.ltv-admin-edit:hover{background:var(--accent);border-color:var(--accent);color:#fff;}
.ltv-admin-epg{color:var(--accent);border-color:#4361ee44;}
.ltv-admin-epg:hover{background:var(--accent);border-color:var(--accent);color:#fff;}
.ltv-admin-del{color:#ef4444;border-color:#ef444433;}
.ltv-admin-del:hover{background:#ef4444;border-color:#ef4444;color:#fff;}
.ltv-fav-btn{position:absolute;top:6px;right:6px;background:#000a;border:none;font-size:18px;cursor:pointer;border-radius:50%;width:28px;height:28px;display:flex;align-items:center;justify-content:center;z-index:2;}

/* Desktop live TV */
@media(min-width:480px){
  #livetv-countries-grid{grid-template-columns:repeat(auto-fill,minmax(140px,1fr));gap:12px;}
  #livetv-grid{grid-template-columns:repeat(3,1fr);}
}
@media(min-width:768px){
  #livetv-page{padding:28px 36px;}
  #livetv-countries-grid{grid-template-columns:repeat(auto-fill,minmax(160px,1fr));gap:14px;}
  .ltv-flag-name{font-size:13px;}
  .ltv-flag-info{padding:10px 12px 12px;}
  #livetv-channels-header{margin-bottom:20px;padding-bottom:16px;gap:14px;}
  #livetv-country-title{font-size:20px;}
  #livetv-grid{grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:16px;}
  .ltv-name{font-size:14px;}
  .ltv-now-title{font-size:13px;}
  .ltv-desc{font-size:10px;-webkit-line-clamp:2;min-height:30px;}
  .ltv-next-title{font-size:12px;}
}

/* ── 10. PLAYER OVERLAY ── */
#player-overlay{position:fixed;top:0;left:0;right:0;bottom:0;width:100vw;height:100vh;height:100dvh;z-index:200;background:#000;display:none;flex-direction:column;visibility:hidden;}
#player-overlay.open{display:flex;visibility:visible;}
#player-bg{position:absolute;inset:0;background-size:cover;background-position:center;filter:blur(4px) brightness(0.3);transform:scale(1.15);z-index:0;pointer-events:none;}
#player-body{flex:1;position:relative;display:flex;flex-direction:column;overflow:hidden;min-width:0;width:100%;height:100%;z-index:1;}
#player-topbar{display:flex;align-items:center;gap:12px;padding:10px 12px;background:linear-gradient(to bottom,#000a,transparent);position:absolute;top:0;left:0;right:0;z-index:10;}
#player-back{background:#ffffff15;border:1px solid #ffffff22;color:#fff;border-radius:6px;padding:8px 14px;cursor:pointer;font-family:'Space Mono',monospace;font-size:11px;transition:background .15s;}
#player-back:hover{background:var(--accent);border-color:var(--accent);}
#player-title{font-family:'Syne',sans-serif;font-weight:700;font-size:13px;color:#fff;flex:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
#player-epg{display:none;flex-direction:column;gap:0;background:#0d1117;border-bottom:1px solid #ffffff12;z-index:11;position:relative;}
.epg-back{background:#ffffff15;border:1px solid #ffffff22;color:#fff;border-radius:6px;padding:5px 12px;cursor:pointer;font-family:'Space Mono',monospace;font-size:10px;transition:background .15s;flex-shrink:0;}
.epg-back:hover{background:var(--accent);border-color:var(--accent);}
.epg-row{display:flex;align-items:center;gap:8px;padding:6px 12px;flex-wrap:wrap;}
.epg-row+.epg-row{border-top:1px solid #ffffff0a;}
.epg-row-label{font-family:'Space Mono',monospace;font-size:8px;font-weight:700;letter-spacing:1px;text-transform:uppercase;flex-shrink:0;width:40px;}
.epg-row-label.now{color:#22c55e;}
.epg-row-label.next{color:#eab308;}
.epg-row .epg-team{display:flex;align-items:center;gap:6px;}
.epg-row .epg-team img{width:22px;height:22px;object-fit:contain;}
.epg-row .epg-team span{font-family:'Syne',sans-serif;font-weight:700;font-size:13px;color:#fff;}
.epg-row .epg-vs{font-family:'Syne',sans-serif;font-weight:800;font-size:10px;color:#ffffff44;}
.epg-row .epg-title{font-family:'Syne',sans-serif;font-weight:600;font-size:13px;color:#fff;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.epg-row .epg-info{margin-left:auto;display:flex;align-items:center;gap:8px;flex-shrink:0;}
.epg-row .epg-league{display:flex;align-items:center;gap:5px;font-family:'Space Mono',monospace;font-size:9px;color:#ffffff55;}
.epg-row .epg-league img{width:14px;height:10px;object-fit:contain;border-radius:2px;}
.epg-row .epg-badge{font-family:'Space Mono',monospace;font-size:9px;font-weight:700;letter-spacing:1px;padding:3px 8px;border-radius:4px;}
.epg-row .epg-time{font-family:'Space Mono',monospace;font-size:11px;color:#ffffff66;}
.epg-guide-card{display:flex;align-items:center;gap:12px;padding:12px 16px;background:#ffffff08;border:1px solid #ffffff12;border-radius:8px;margin-bottom:8px;}
.epg-guide-info{flex:1;min-width:0;}
.epg-guide-name{font-family:'Syne',sans-serif;font-weight:700;font-size:14px;color:#fff;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.epg-guide-meta{font-family:'Space Mono',monospace;font-size:10px;color:#ffffff55;margin-top:2px;}
.epg-guide-actions{display:flex;gap:6px;flex-shrink:0;}
.epg-del-btn{color:#ef4444!important;border-color:#ef444433!important;}
.epg-del-btn:hover{background:#ef444422!important;}
.epg-ch-block{margin-bottom:12px;border:1px solid #ffffff12;border-radius:8px;overflow:hidden;}
.epg-ch-header{display:flex;align-items:center;gap:8px;padding:10px 14px;background:#ffffff0a;border-bottom:1px solid #ffffff0a;}
.epg-ch-icon{width:24px;height:24px;object-fit:contain;border-radius:4px;flex-shrink:0;}
.epg-ch-name{font-family:'Syne',sans-serif;font-weight:700;font-size:13px;color:#fff;}
.epg-ch-count{font-family:'Space Mono',monospace;font-size:9px;color:#ffffff44;margin-left:auto;}
.epg-prog-list{padding:4px 0;}
.epg-prog-row{display:flex;align-items:center;gap:10px;padding:4px 14px;font-size:11px;}
.epg-prog-row:hover{background:#ffffff06;}
.epg-prog-time{font-family:'Space Mono',monospace;font-size:10px;color:#ffffff55;flex-shrink:0;width:100px;}
.epg-prog-title{font-family:'Syne',sans-serif;font-weight:600;font-size:12px;color:#ffffffcc;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.epg-prog-cat{font-family:'Space Mono',monospace;font-size:9px;color:var(--accent);background:#4361ee12;padding:1px 6px;border-radius:3px;flex-shrink:0;margin-left:auto;}
#player-loading{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:16px;background:transparent;z-index:5;}
#player-loading .spinner{width:48px;height:48px;border-width:3px;border-top-color:var(--accent2);}
#player-loading-text{font-family:'Space Mono',monospace;font-size:12px;color:var(--muted);}
#admin-srv-log{display:none;flex-direction:column;gap:4px;margin-top:8px;max-height:260px;overflow-y:auto;width:320px;background:rgba(0,0,0,.55);border:1px solid rgba(255,255,255,.08);border-radius:8px;padding:8px 10px;}
body.admin-mode #admin-srv-log{display:flex;}
.admin-srv-row{display:flex;align-items:center;gap:8px;font-family:'Space Mono',monospace;font-size:10px;padding:3px 0;border-bottom:1px solid rgba(255,255,255,.04);}
.admin-srv-row:last-child{border-bottom:none;}
.admin-srv-icon{font-size:11px;width:14px;text-align:center;flex-shrink:0;}
.admin-srv-name{color:rgba(255,255,255,.7);flex:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.admin-srv-status{font-size:9px;white-space:nowrap;}
.admin-srv-row.ok .admin-srv-icon{color:#4ade80;}
.admin-srv-row.ok .admin-srv-status{color:#4ade80;}
.admin-srv-row.fail .admin-srv-icon{color:#f87171;}
.admin-srv-row.fail .admin-srv-status{color:#f87171;}
.admin-srv-row.pending .admin-srv-icon{color:rgba(255,255,255,.3);}
.admin-srv-row.pending .admin-srv-status{color:rgba(255,255,255,.3);}
#player-main{flex:1;position:relative;display:flex;align-items:center;justify-content:center;min-height:0;overflow:hidden;}
#player-video{width:100%;height:100%;object-fit:contain;display:block;position:absolute;top:0;left:0;right:0;bottom:0;}
#player-error{position:absolute;inset:0;display:none;flex-direction:column;align-items:center;justify-content:center;gap:12px;background:transparent;color:#f87171;font-family:'Space Mono',monospace;font-size:13px;text-align:center;padding:24px;}
#lang-fallback-notice{position:absolute;top:48px;left:50%;transform:translateX(-50%);z-index:15;background:#f59e0b22;border:1px solid #f59e0b66;color:#fbbf24;font-family:'Space Mono',monospace;font-size:11px;padding:8px 36px 8px 14px;border-radius:8px;white-space:nowrap;pointer-events:auto;animation:noticeFadeIn .3s ease;}
#lang-fallback-notice .notice-close{position:absolute;right:8px;top:50%;transform:translateY(-50%);background:none;border:none;color:#fbbf2499;cursor:pointer;font-size:14px;line-height:1;padding:2px 4px;}
#lang-fallback-notice .notice-close:hover{color:#fff;}
@keyframes noticeFadeIn{from{opacity:0;transform:translateX(-50%) translateY(-8px);}to{opacity:1;transform:translateX(-50%) translateY(0);}}
#player-controls{background:linear-gradient(to top,#000e,#0006,transparent);padding:10px 12px 14px;position:absolute;bottom:0;left:0;right:0;z-index:10;transition:opacity .3s;}
#player-controls.hidden{opacity:0;pointer-events:none;}
#player-pills{display:flex;gap:6px;align-items:center;flex-wrap:wrap;margin-bottom:8px;}
.player-pill-group{display:flex;gap:4px;align-items:center;}
.player-pill-label{font-family:'Space Mono',monospace;font-size:9px;color:#ffffff55;letter-spacing:1px;margin-right:2px;}
.player-pill{background:#ffffff15;border:1px solid #ffffff22;color:#ffffffbb;border-radius:20px;padding:4px 10px;cursor:pointer;font-family:'Space Mono',monospace;font-size:10px;transition:all .15s;white-space:nowrap;min-height:32px;display:flex;align-items:center;}
.player-pill:hover{background:#ffffff25;color:#fff;}
.player-pill.active{background:var(--accent2);border-color:var(--accent2);color:#fff;}
.player-pill.sub-active{background:#10b981;border-color:#10b981;color:#fff;}
.torrent-section-label{font-family:'Space Mono',monospace;font-size:10px;font-weight:700;color:var(--dim);letter-spacing:1.5px;text-transform:uppercase;padding:4px 2px;margin-bottom:4px;}
.torrent-save-btn{background:var(--surface);border:1px solid #dc2626;color:#dc2626;border-radius:8px;padding:0 12px;cursor:pointer;font-family:'Space Mono',monospace;font-size:10px;font-weight:700;letter-spacing:1px;white-space:nowrap;min-width:54px;transition:all .15s;}
.torrent-save-btn:hover{background:#dc262630;color:#ff4444;}
.torrent-save-btn.saving{border-color:#f59e0b;color:#f59e0b;animation:pulse-save 1.5s infinite;}
.torrent-save-btn.saved{border-color:#10b981;color:#10b981;cursor:default;}
.torrent-save-btn.save-err{border-color:#ef4444;color:#ef4444;}
/* TV torrent episode groups */
.tv-torrent-ep-group{margin-bottom:6px;border:1px solid var(--border);border-radius:8px;overflow:hidden;}
.tv-torrent-ep-header{display:flex;align-items:center;gap:8px;padding:10px 14px;cursor:pointer;background:var(--card);transition:background .15s;}
.tv-torrent-ep-header:hover{background:var(--surface);}
.tv-torrent-ep-code{font-family:'Space Mono',monospace;font-size:13px;font-weight:700;color:var(--accent);min-width:60px;}
.tv-torrent-ep-meta{font-family:'Space Mono',monospace;font-size:10px;color:var(--muted);flex:1;}
.tv-torrent-ep-arrow{font-size:10px;color:var(--dim);transition:transform .2s;}
.tv-torrent-ep-group.open .tv-torrent-ep-arrow{transform:rotate(180deg);}
.tv-torrent-ep-list{display:none;padding:8px;background:var(--bg);border-top:1px solid var(--border);}
.tv-torrent-ep-group.open .tv-torrent-ep-list{display:block;}
@keyframes pulse-save{0%,100%{opacity:1;}50%{opacity:.6;}}
.save-toast{position:fixed;bottom:30px;right:20px;background:#1a1a2eee;border:1px solid #f59e0b;border-radius:10px;padding:12px 16px;color:#fff;font-family:'Space Mono',monospace;font-size:12px;z-index:9999;opacity:0;transition:opacity .3s;pointer-events:none;box-shadow:0 4px 24px rgba(245,158,11,.25);max-width:340px;min-width:220px;}
.save-toast.show{opacity:1;pointer-events:auto;}
.save-toast b{color:#f59e0b;}
.save-toast-header{display:flex;justify-content:space-between;align-items:center;gap:10px;}
.save-toast-actions{display:flex;gap:4px;align-items:center;flex-shrink:0;}
.save-toast-cancel,.save-toast-expand,.save-toast-item-x{background:none;border:1px solid #ffffff30;color:#fff;border-radius:4px;cursor:pointer;font-size:11px;padding:2px 6px;line-height:1;font-family:'Space Mono',monospace;}
.save-toast-cancel:hover,.save-toast-item-x:hover{background:#ef444440;border-color:#ef4444;color:#ef4444;}
.save-toast-expand:hover{background:#ffffff15;}
.save-toast-title{font-size:10px;color:#ffffff80;margin-top:4px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.save-toast-list{margin-top:8px;border-top:1px solid #ffffff20;padding-top:6px;max-height:180px;overflow-y:auto;}
.save-toast-item{display:flex;align-items:center;gap:6px;padding:4px 0;font-size:10px;}
.save-toast-item-name{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#ffffffcc;}
.save-toast-item-pct{color:#f59e0b;white-space:nowrap;font-size:10px;}
.save-toast-item-x{font-size:9px;padding:1px 4px;}
.dl-summary{font-family:'Space Mono',monospace;font-size:12px;color:var(--dim);padding:8px 0 12px;border-bottom:1px solid var(--border);}
.dl-list{display:flex;flex-direction:column;gap:2px;margin-top:8px;}
.dl-row{display:flex;align-items:center;justify-content:space-between;padding:10px 12px;background:var(--surface);border:1px solid var(--border);border-radius:8px;gap:12px;}
.dl-info{display:flex;flex-direction:column;gap:2px;min-width:0;flex:1;}
.dl-title{font-family:'Space Mono',monospace;font-size:12px;color:#fff;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.dl-meta{font-family:'Space Mono',monospace;font-size:10px;color:var(--dim);}
.dl-actions{display:flex;align-items:center;gap:6px;flex-shrink:0;}
.dl-status{font-family:'Space Mono',monospace;font-size:10px;font-weight:700;letter-spacing:.5px;padding:3px 8px;border-radius:4px;}
.dl-ok{color:#10b981;background:#10b98118;border:1px solid #10b98140;}
.dl-err{color:#ef4444;background:#ef444418;border:1px solid #ef444440;}
.dl-active{color:#f59e0b;background:#f59e0b18;border:1px solid #f59e0b40;animation:pulse-save 1.5s infinite;}
.dl-link{font-family:'Space Mono',monospace;font-size:10px;font-weight:700;color:#3b82f6;border:1px solid #3b82f6;border-radius:4px;padding:3px 8px;text-decoration:none;letter-spacing:.5px;}
.dl-link:hover{background:#3b82f620;}
.dl-delete{font-family:'Space Mono',monospace;font-size:10px;font-weight:700;color:#ef4444;background:none;border:1px solid #ef4444;border-radius:4px;padding:3px 8px;cursor:pointer;letter-spacing:.5px;}
.dl-delete:hover{background:#ef444420;}
#sub-panel{position:absolute;bottom:100px;left:20px;background:#0f0f23ee;border:1px solid var(--border);border-radius:8px;padding:8px;max-height:280px;overflow-y:auto;display:none;z-index:20;min-width:180px;}
#sub-panel.open{display:block;}
.sub-option{display:block;width:100%;text-align:left;background:transparent;border:none;color:#ffffffbb;padding:6px 12px;cursor:pointer;border-radius:5px;font-family:'Space Mono',monospace;font-size:10px;transition:background .1s;white-space:nowrap;}
.sub-option:hover{background:#ffffff15;color:#fff;}
.sub-option.active{background:#10b98122;color:#10b981;}
#audio-panel{position:absolute;bottom:100px;left:20px;background:#0f0f23ee;border:1px solid var(--border);border-radius:8px;padding:8px;max-height:320px;overflow-y:auto;display:none;z-index:21;min-width:200px;max-width:300px;}
#audio-panel.open{display:block;}
.audio-option{display:block;width:100%;text-align:left;background:transparent;border:none;color:#ffffffbb;padding:6px 12px;cursor:pointer;border-radius:5px;font-family:'Space Mono',monospace;font-size:10px;transition:background .1s;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.audio-option:hover{background:#ffffff15;color:#fff;}
.audio-option.active{background:#6366f122;color:#6366f1;}
#player-progress-wrap{display:flex;align-items:center;gap:8px;margin-bottom:8px;}
#player-time,#player-duration{font-family:'Space Mono',monospace;font-size:10px;color:#ffffffaa;white-space:nowrap;min-width:36px;}
#player-seek{flex:1;height:5px;-webkit-appearance:none;appearance:none;background:#ffffff33;border-radius:2px;outline:none;cursor:pointer;}
#player-seek::-webkit-slider-thumb{-webkit-appearance:none;width:16px;height:16px;border-radius:50%;background:#fff;cursor:pointer;}
#player-btns{display:flex;align-items:center;gap:16px;}
.ctrl-btn{background:transparent;border:none;color:#ffffffbb;cursor:pointer;font-size:24px;padding:6px;transition:color .15s;min-width:44px;min-height:44px;display:flex;align-items:center;justify-content:center;}
.ctrl-btn:hover{color:#fff;}
#player-vol{display:none;}
.ap-toggle{display:none;align-items:center;gap:5px;cursor:pointer;padding:2px 8px;border-radius:12px;border:1px solid #333;transition:all .2s;margin-left:4px;}
.ap-toggle:hover{border-color:#555;}
.ap-toggle.on{border-color:#6366f155;}
.ap-toggle .ap-dot{width:7px;height:7px;border-radius:50%;background:#555;transition:all .2s;}
.ap-toggle.on .ap-dot{background:#6366f1;box-shadow:0 0 6px #6366f188;}
.ap-toggle .ap-label{font-family:'Space Mono',monospace;font-size:10px;color:#666;letter-spacing:.5px;transition:color .2s;}
.ap-toggle.on .ap-label{color:#ffffffbb;}
@keyframes nepSlideIn{from{transform:translateX(100%);opacity:0;}to{transform:translateX(0);opacity:1;}}
#next-ep-overlay{display:none;position:absolute;bottom:90px;right:12px;background:rgba(8,8,20,.92);border:1px solid rgba(99,102,241,.25);border-radius:14px;padding:16px 18px;z-index:20;min-width:220px;max-width:340px;backdrop-filter:blur(20px);-webkit-backdrop-filter:blur(20px);box-shadow:0 8px 32px rgba(0,0,0,.5),0 0 0 1px rgba(99,102,241,.1);animation:nepSlideIn .4s cubic-bezier(.16,1,.3,1) both;}
#next-ep-overlay .nep-top{display:flex;gap:12px;margin-bottom:10px;}
#next-ep-overlay .nep-thumb{width:110px;height:62px;border-radius:8px;overflow:hidden;flex-shrink:0;background:#111;box-shadow:0 2px 8px rgba(0,0,0,.4);}
#next-ep-overlay .nep-thumb img{width:100%;height:100%;object-fit:cover;}
#next-ep-overlay .nep-info{flex:1;min-width:0;}
#next-ep-overlay .nep-title{font-family:'Syne',sans-serif;font-size:10px;font-weight:700;color:#6366f1;margin-bottom:4px;text-transform:uppercase;letter-spacing:1.5px;}
#next-ep-overlay .nep-ep{font-family:'DM Sans',sans-serif;font-size:14px;color:#fff;font-weight:600;line-height:1.3;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
#next-ep-overlay .nep-epnum{font-family:'Space Mono',monospace;font-size:10px;color:#8b8bf5;margin-bottom:3px;}
#next-ep-overlay .nep-bar{height:3px;background:#1a1a2e;border-radius:2px;overflow:hidden;margin-bottom:12px;}
#next-ep-overlay .nep-fill{height:100%;background:linear-gradient(90deg,#6366f1,#8b5cf6);border-radius:2px;transition:width .3s linear;width:100%;}
#next-ep-overlay .nep-btns{display:flex;gap:8px;}
#next-ep-overlay .nep-btn{padding:8px 18px;border:none;border-radius:8px;cursor:pointer;font-family:'Space Mono',monospace;font-size:11px;font-weight:700;transition:all .15s;letter-spacing:.3px;}
.nep-play{background:#6366f1;color:#fff;box-shadow:0 2px 12px rgba(99,102,241,.3);}
.nep-play:hover{background:#4f46e5;box-shadow:0 4px 16px rgba(99,102,241,.5);transform:translateY(-1px);}
.nep-cancel{background:rgba(255,255,255,.06);color:#888;border:1px solid rgba(255,255,255,.08) !important;}
.nep-cancel:hover{background:rgba(255,255,255,.1);color:#ccc;}

/* Desktop player */
@media(min-width:768px){
  #player-topbar{padding:10px 16px;}
  #player-title{font-size:16px;}
  #player-controls{padding:16px 20px 20px;}
  #player-pills{gap:8px;margin-bottom:10px;}
  #player-progress-wrap{gap:10px;margin-bottom:10px;}
  #player-time,#player-duration{min-width:50px;}
  #player-seek{height:4px;}
  #player-seek::-webkit-slider-thumb{width:12px;height:12px;}
  #player-btns{gap:14px;}
  .ctrl-btn{font-size:18px;padding:4px;min-width:auto;min-height:auto;}
  #player-vol{display:block;width:70px;height:4px;-webkit-appearance:none;appearance:none;background:#ffffff33;border-radius:2px;outline:none;cursor:pointer;}
  #player-vol::-webkit-slider-thumb{-webkit-appearance:none;width:10px;height:10px;border-radius:50%;background:#fff;cursor:pointer;}
  .epg-row{padding:8px 20px;gap:12px;flex-wrap:nowrap;}
  .epg-row-label{width:52px;font-size:9px;}
  .epg-row .epg-info{margin-left:auto;}
  #next-ep-overlay{right:24px;bottom:90px;padding:18px 22px;min-width:260px;max-width:380px;}
  #next-ep-overlay .nep-thumb{width:130px;height:74px;}
  #next-ep-overlay .nep-ep{font-size:15px;}
}
/* Landscape mobile */
@media(max-width:768px) and (orientation:landscape){
  #player-topbar{padding:6px 12px;}
  #player-title{font-size:11px;}
  #player-controls{padding:6px 12px 8px;}
  #player-pills{margin-bottom:4px;gap:4px;}
  #player-progress-wrap{margin-bottom:4px;}
  #player-btns{gap:12px;}
  .ctrl-btn{font-size:20px;padding:4px;}
}

/* Player Episode List */
#player-ep-list{position:absolute;top:0;right:0;width:100%;height:60%;bottom:0;top:auto;background:var(--bg);border-top:1px solid var(--border);z-index:20;display:flex;flex-direction:column;overflow:hidden;}
#pep-header{display:flex;align-items:center;justify-content:space-between;padding:14px 18px 12px;border-bottom:1px solid var(--border);flex-shrink:0;background:var(--surface);}
#pep-title{font-family:'Syne',sans-serif;font-weight:800;font-size:16px;color:var(--text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;flex:1;margin-right:10px;}
#pep-close{background:var(--card);border:1px solid var(--border);color:var(--muted);cursor:pointer;font-size:16px;width:32px;height:32px;display:flex;align-items:center;justify-content:center;border-radius:8px;transition:all .15s;}
#pep-close:hover{color:#fff;background:var(--border);border-color:var(--accent);}
#pep-seasons{display:flex;gap:6px;padding:12px 18px;flex-wrap:wrap;border-bottom:1px solid var(--border);flex-shrink:0;background:var(--surface);}
.pep-season-btn{background:var(--card);border:1px solid var(--border);border-radius:8px;color:var(--muted);cursor:pointer;font-family:'Space Mono',monospace;font-size:12px;padding:6px 14px;transition:all .15s;}
.pep-season-btn:hover{border-color:var(--accent);color:var(--text);}
.pep-season-btn.active{border-color:var(--accent);color:var(--accent);background:#6366f115;}
#pep-episodes{flex:1;overflow-y:auto;scrollbar-width:thin;padding:10px 14px;display:flex;flex-direction:column;gap:6px;}
#pep-episodes .ep-row{padding:6px 10px;gap:10px;border-radius:10px;}
#pep-episodes .ep-big-num{font-size:24px;min-width:32px;}
#pep-episodes .ep-thumb{width:100px;min-width:100px;height:56px;border-radius:7px;}
#pep-episodes .ep-title{font-size:13px;}
#pep-episodes .ep-overview{font-size:11px;-webkit-line-clamp:1;}
#pep-episodes .ep-meta{font-size:10px;}
#pep-episodes .ep-row.playing{background:var(--accent);background:linear-gradient(135deg,#6366f118,#8b5cf618);border-color:var(--accent);border-left-color:var(--accent);}
#ep-list-btn{font-size:11px!important;font-family:'Space Mono',monospace;letter-spacing:.5px;padding:4px 8px;border:1px solid #333;border-radius:8px;}
#ep-list-btn:hover{border-color:#555;}
@media(min-width:768px){
  #player-ep-list{width:420px;height:100%;top:0;bottom:auto;border-top:none;border-left:1px solid var(--border);}
  #pep-episodes .ep-thumb{width:120px;min-width:120px;height:68px;}
  #pep-episodes .ep-title{font-size:14px;}
  #pep-episodes .ep-overview{-webkit-line-clamp:2;}
  #pep-episodes .ep-row{padding:8px 12px;gap:12px;}
}

/* Mini-player mode */
#player-overlay.mini{position:fixed;inset:auto 16px 16px auto;width:360px;height:210px;z-index:300;border-radius:12px;overflow:hidden;box-shadow:0 8px 32px #000a;border:1px solid var(--border);cursor:pointer;resize:both;}
#player-overlay.mini #player-body{width:100%;height:100%;}
#player-overlay.mini #player-main{width:100%;height:100%;}
#player-overlay.mini #player-video{width:100%;height:100%;object-fit:cover;}
#player-overlay.mini #mini-player-bar{display:flex!important;position:absolute;top:0;right:0;z-index:310;background:linear-gradient(180deg,#000a,transparent);padding:4px;gap:2px;}
@media(max-width:600px){#player-overlay.mini{width:200px;height:120px;right:8px;bottom:8px;}}

/* Torrent modal */
#torrent-modal{position:fixed;inset:0;background:rgba(0,0,0,.8);z-index:900;display:none;align-items:center;justify-content:center;padding:16px;}

/* ── QUALITY BADGE ── */
.quality-badge{font-family:'Space Mono',monospace;font-size:10px;font-weight:700;letter-spacing:.5px;padding:3px 8px;border-radius:4px;background:#22c55e22;color:#22c55e;border:1px solid #22c55e44;margin-left:auto;margin-right:8px;white-space:nowrap;}

/* ── DOUBLE-TAP SEEK ZONES ── */
.dbl-tap-zone{position:absolute;top:0;bottom:0;width:35%;z-index:6;-webkit-tap-highlight-color:transparent;}
#dbl-tap-left{left:0;}
#dbl-tap-right{right:0;}
.dbl-tap-ind{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);z-index:7;pointer-events:none;font-family:'Space Mono',monospace;font-size:14px;font-weight:700;color:#fff;background:#00000088;border-radius:50%;width:64px;height:64px;display:none;align-items:center;justify-content:center;animation:dtFade .5s ease forwards;}
@keyframes dtFade{0%{opacity:1;transform:translate(-50%,-50%) scale(1);}100%{opacity:0;transform:translate(-50%,-50%) scale(1.3);}}

/* ── PULL TO REFRESH ── */
#ptr-indicator{position:fixed;top:0;left:50%;transform:translateX(-50%) translateY(-60px);z-index:9998;background:var(--card);border:1px solid var(--border);border-radius:50%;width:40px;height:40px;display:flex;align-items:center;justify-content:center;transition:transform .2s;box-shadow:0 4px 16px rgba(0,0,0,.3);pointer-events:none;}
#ptr-indicator .ptr-spin{width:20px;height:20px;border:2px solid var(--border);border-top-color:var(--accent);border-radius:50%;animation:spin .7s linear infinite;}
#ptr-indicator.pulling{transform:translateX(-50%) translateY(12px);}
#ptr-indicator.refreshing{transform:translateX(-50%) translateY(12px);}

/* ── PAGE TRANSITIONS ── */
@keyframes pageSlideIn{from{opacity:0;transform:translateY(12px);}to{opacity:1;transform:translateY(0);}}
@keyframes pageSlideOut{from{opacity:1;transform:translateY(0);}to{opacity:0;transform:translateY(-8px);}}
.page-enter{animation:pageSlideIn .2s ease both;}
.page-exit{animation:pageSlideOut .15s ease both;}

/* ── SEARCH SUGGESTIONS DROPDOWN ── */
#search-suggestions{position:absolute;top:100%;left:0;right:0;background:var(--bg);border:1px solid var(--border);border-radius:0 0 8px 8px;max-height:280px;overflow-y:auto;z-index:100;display:none;box-shadow:0 8px 24px rgba(0,0,0,.5);}
#search-suggestions.open{display:block;}
.search-sug-item{display:flex;align-items:center;gap:10px;padding:10px 14px;cursor:pointer;transition:background .12s;font-family:'DM Sans',sans-serif;font-size:14px;color:var(--text);border-bottom:1px solid rgba(255,255,255,.04);}
.search-sug-item:hover{background:var(--card);}
.search-sug-item:last-child{border-bottom:none;}
.search-sug-icon{font-size:14px;color:var(--dim);flex-shrink:0;width:20px;text-align:center;}
.search-sug-text{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.search-sug-type{font-family:'Space Mono',monospace;font-size:9px;color:var(--muted);flex-shrink:0;}
.search-sug-clear{font-family:'Space Mono',monospace;font-size:10px;color:var(--accent);cursor:pointer;padding:6px 14px;text-align:right;}
.search-sug-clear:hover{text-decoration:underline;}
.search-sug-header{font-family:'Space Mono',monospace;font-size:9px;color:var(--dim);letter-spacing:1px;padding:8px 14px 4px;text-transform:uppercase;}

/* ── VOICE SEARCH ── */
.voice-search-btn{background:transparent;border:1px solid var(--border);color:var(--muted);width:44px;height:44px;border-radius:8px;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:all .15s;flex-shrink:0;}
.voice-search-btn:hover{border-color:var(--accent);color:var(--accent);}
.voice-search-btn.listening{border-color:#ef4444;color:#ef4444;animation:voicePulse 1s ease infinite;}
@keyframes voicePulse{0%,100%{box-shadow:0 0 0 0 #ef444455;}50%{box-shadow:0 0 0 8px #ef444400;}}
.voice-search-btn svg{width:18px;height:18px;}

/* ── ADVANCED FILTERS ── */
#adv-filters{display:none;flex-wrap:wrap;gap:6px;margin-top:8px;animation:pageSlideIn .2s ease;}
#adv-filters.open{display:flex;}
#adv-filters select,#adv-filters input{font-size:12px;padding:8px 12px;border-radius:6px;background:var(--card);border:1px solid var(--border);color:var(--muted);font-family:'Space Mono',monospace;}
.filter-toggle-btn{background:var(--card);border:1px solid var(--border);color:var(--muted);border-radius:8px;padding:10px 14px;cursor:pointer;font-family:'Space Mono',monospace;font-size:11px;transition:all .15s;flex-shrink:0;}
.filter-toggle-btn:hover,.filter-toggle-btn.active{border-color:var(--accent);color:var(--accent);}

/* ── SKELETON LOADING ENHANCEMENT ── */
.skeleton-row{display:grid;grid-template-columns:repeat(2,1fr);gap:10px;padding:16px 0;}
@media(min-width:480px){.skeleton-row{grid-template-columns:repeat(3,1fr);gap:14px;}}
@media(min-width:768px){.skeleton-row{grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:18px;}}

/* ── BLUR-UP POSTER PLACEHOLDER ── */
.card-poster img{transition:opacity .3s ease;}
.card-poster .poster-placeholder{position:absolute;inset:0;background:var(--surface);filter:blur(20px);transform:scale(1.1);z-index:0;transition:opacity .3s ease;}
.card-poster img.loaded+.poster-placeholder,.card-poster img.loaded~.poster-placeholder{opacity:0;pointer-events:none;}

/* ── MOVIE/TV CARD VISUAL DISTINCTION ── */
.card.type-movie{border-bottom:2px solid #6366f133;}
.card.type-tv{border-bottom:2px solid #8b5cf633;}
.card.type-movie:hover{border-bottom-color:#6366f1;}
.card.type-tv:hover{border-bottom-color:#8b5cf6;}
.badge-movie{background:#6366f133;color:#818cf8;}
.badge-tv{background:#a855f733;color:#c084fc;}

/* ── GLASSMORPHISM CONSISTENCY ── */
#person-modal{backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);}
#person-inner{backdrop-filter:blur(16px);-webkit-backdrop-filter:blur(16px);background:rgba(21,21,40,.92);}
#actor-filmo-modal{backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);}
#actor-filmo-inner{backdrop-filter:blur(16px);-webkit-backdrop-filter:blur(16px);background:rgba(14,14,26,.95);}
#torrent-modal{backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px);}
#event-modal{backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);}

/* ── EPG GRID VIEW ── */
#epg-grid-container{overflow-x:auto;margin-bottom:16px;background:var(--card);border:1px solid var(--border);border-radius:12px;max-height:75vh;overflow-y:auto;}
.epg-grid-table{display:grid;min-width:900px;font-family:'Space Mono',monospace;font-size:10px;}
.epg-grid-header{display:flex;position:sticky;top:0;z-index:2;background:var(--surface);border-bottom:1px solid var(--border);}
.epg-grid-time-cell{flex-shrink:0;width:120px;padding:8px 6px;text-align:center;color:var(--muted);border-right:1px solid rgba(255,255,255,.04);}
.epg-grid-time-cell.now{color:var(--accent);font-weight:700;}
.epg-grid-corner{flex-shrink:0;width:160px;padding:8px 10px;font-weight:700;color:var(--muted);letter-spacing:1px;border-right:1px solid var(--border);background:var(--surface);position:sticky;left:0;z-index:3;}
.epg-grid-row{display:flex;border-bottom:1px solid rgba(255,255,255,.04);min-height:52px;position:relative;}
.epg-grid-row:hover{background:rgba(99,102,241,.04);}
.epg-grid-ch{flex-shrink:0;width:160px;display:flex;align-items:center;gap:8px;padding:6px 10px;border-right:1px solid var(--border);background:var(--surface);position:sticky;left:0;z-index:1;cursor:pointer;transition:background .12s;}
.epg-grid-ch:hover{background:var(--card);}
.epg-grid-ch img{width:28px;height:28px;object-fit:contain;border-radius:4px;flex-shrink:0;}
.epg-grid-ch span{font-family:'Syne',sans-serif;font-size:11px;font-weight:700;color:var(--text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.epg-grid-programs{flex:1;display:flex;position:relative;min-width:0;}
.epg-prog-block{padding:4px 8px;border-right:1px solid rgba(255,255,255,.06);display:flex;flex-direction:column;justify-content:center;overflow:hidden;cursor:pointer;transition:background .12s;min-width:0;flex-shrink:0;}
.epg-prog-block:hover{background:rgba(99,102,241,.1);}
.epg-prog-block.is-now{background:rgba(99,102,241,.08);border-left:2px solid var(--accent);}
.epg-prog-title{font-family:'DM Sans',sans-serif;font-size:11px;font-weight:600;color:var(--text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.epg-prog-time{font-size:9px;color:var(--dim);white-space:nowrap;}

/* ── RESPONSIVE TYPOGRAPHY ── */
.card-title{font-size:clamp(11px,2.5vw,14px);}
.card-year{font-size:clamp(9px,2vw,10px);}
.card-badge{font-size:clamp(8px,1.8vw,9px);}
.ep-title{font-size:clamp(12px,2.8vw,15px);}
.ep-overview{font-size:clamp(11px,2.2vw,13px);}
.section-title{font-size:clamp(11px,2.2vw,13px);}

/* ── 11. MODALS ── */
/* Welcome */
#welcome-modal{display:none;position:fixed;inset:0;z-index:9999;background:#0a0a1aee;backdrop-filter:blur(12px);align-items:center;justify-content:center;}
#welcome-modal.show{display:flex;}
#welcome-box{background:var(--card);border:1px solid var(--border);border-radius:16px;padding:32px 24px 24px;max-width:420px;width:90%;text-align:center;}
#welcome-box h2{font-family:'Syne',sans-serif;font-size:22px;color:#fff;margin:0 0 6px;}
#welcome-box .wm-sub{font-family:'DM Sans',sans-serif;font-size:13px;color:#888;margin-bottom:20px;line-height:1.5;}
#welcome-box .wm-label{font-family:'Space Mono',monospace;font-size:10px;color:#666;text-transform:uppercase;letter-spacing:1px;margin-bottom:8px;text-align:left;}
#welcome-box .wm-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:6px;margin-bottom:18px;}
#welcome-box .wm-lang{padding:10px 6px;border-radius:8px;border:1px solid var(--border);background:var(--surface);cursor:pointer;font-family:'DM Sans',sans-serif;font-size:13px;color:#ccc;transition:all .15s;text-align:center;}
#welcome-box .wm-lang:hover{border-color:#6366f166;color:#fff;}
#welcome-box .wm-lang.sel{border-color:#6366f1;background:#6366f122;color:#fff;}
#welcome-box .wm-go{margin-top:8px;width:100%;padding:12px;border:none;border-radius:8px;background:var(--accent);color:#fff;font-family:'Syne',sans-serif;font-size:15px;font-weight:700;cursor:pointer;transition:background .15s;}
#welcome-box .wm-go:hover{background:#4f46e5;}
#welcome-box .wm-go:disabled{background:#333;color:#666;cursor:default;}

/* Admin login */
#admin-login-modal{display:none;position:fixed;inset:0;z-index:9998;background:#080810dd;backdrop-filter:blur(16px);align-items:center;justify-content:center;}
#admin-login-modal.show{display:flex;}
.admin-box{background:var(--card);border:1px solid var(--border);border-radius:16px;padding:36px 28px 28px;max-width:340px;width:90%;text-align:center;}
.admin-box-icon{font-size:32px;margin-bottom:12px;}
.admin-box h3{font-family:'Syne',sans-serif;color:#fff;margin:0 0 20px;font-size:16px;letter-spacing:2px;}
.admin-box input{width:100%;padding:12px 16px;border:1px solid var(--border);border-radius:8px;background:var(--surface);color:#fff;font-family:'Space Mono',monospace;font-size:13px;margin-bottom:14px;box-sizing:border-box;outline:none;transition:border-color .2s;}
.admin-box input:focus{border-color:var(--accent);}
.admin-box button{width:100%;padding:12px;border:none;border-radius:8px;background:var(--accent);color:#fff;font-family:'Syne',sans-serif;font-size:14px;font-weight:700;cursor:pointer;transition:background .15s;}
.admin-box button:hover{background:#4f46e5;}
.admin-box .admin-err{color:#f87171;font-family:'Space Mono',monospace;font-size:11px;margin-bottom:10px;display:none;}

/* Report modal */
#report-modal{position:fixed;inset:0;background:rgba(0,0,0,.7);z-index:9999;display:flex;align-items:center;justify-content:center;backdrop-filter:blur(4px);}
.report-modal-inner{background:var(--card);border:1px solid var(--border);border-radius:14px;padding:24px;width:90%;max-width:440px;}
.report-modal-title{font-family:'Syne',sans-serif;font-weight:800;font-size:18px;color:var(--text);margin-bottom:12px;letter-spacing:1px;}
.report-subject{font-family:'DM Sans',sans-serif;font-size:13px;color:var(--accent);margin-bottom:16px;padding:8px 12px;background:var(--surface);border-radius:6px;}
.report-label{font-family:'Space Mono',monospace;font-size:10px;font-weight:700;letter-spacing:1px;color:var(--muted);display:block;margin-bottom:6px;}
.report-submit-btn{background:var(--accent);color:#fff;border:none;font-family:'Space Mono',monospace;font-size:11px;font-weight:700;letter-spacing:1px;padding:10px 24px;border-radius:8px;cursor:pointer;transition:all .18s;}
.report-submit-btn:hover{background:var(--accent2);transform:scale(1.03);}

/* Source check modal */
#src-check-modal{display:none;position:fixed;inset:0;background:rgba(0,0,0,.75);z-index:9000;align-items:center;justify-content:center;}
#src-check-modal.open{display:flex;}
#src-check-box{background:var(--surface);border:1px solid var(--border);border-radius:14px;width:520px;max-width:95vw;max-height:80vh;display:flex;flex-direction:column;overflow:hidden;}
#src-check-header{display:flex;align-items:center;justify-content:space-between;padding:14px 18px;border-bottom:1px solid var(--border);}
#src-check-title{font-family:'Space Mono',monospace;font-size:12px;font-weight:700;letter-spacing:2px;color:var(--text);}
#src-check-close{background:none;border:none;color:var(--muted);font-size:18px;cursor:pointer;padding:0 4px;line-height:1;}
#src-check-close:hover{color:#fff;}
#src-check-meta{padding:10px 18px 6px;font-family:'Space Mono',monospace;font-size:10px;color:var(--muted);border-bottom:1px solid var(--border);}
#src-check-rows{overflow-y:auto;flex:1;padding:8px 10px;display:flex;flex-direction:column;gap:6px;}
.src-chk-srv{border:1px solid rgba(255,255,255,.07);border-radius:8px;overflow:hidden;}
.src-chk-srv-header{display:flex;align-items:center;gap:8px;padding:8px 10px;background:rgba(255,255,255,.03);}
.src-chk-icon{font-size:13px;width:16px;text-align:center;flex-shrink:0;color:rgba(255,255,255,.25);}
.src-chk-name{font-family:'Space Mono',monospace;font-size:11px;font-weight:700;color:var(--text);flex:1;}
.src-chk-lang{font-family:'Space Mono',monospace;font-size:9px;color:rgba(255,255,255,.3);flex-shrink:0;}
.src-chk-count{font-family:'Space Mono',monospace;font-size:9px;font-weight:700;flex-shrink:0;color:rgba(255,255,255,.3);}
.src-chk-sources{display:flex;flex-direction:column;}
.src-chk-src-row{display:flex;align-items:center;gap:8px;padding:7px 10px;cursor:pointer;transition:background .13s;border-top:1px solid rgba(255,255,255,.05);}
.src-chk-src-row:hover{background:rgba(99,102,241,.18);}
.src-chk-src-idx{font-family:'Space Mono',monospace;font-size:9px;color:rgba(255,255,255,.3);width:16px;text-align:right;flex-shrink:0;}
.src-chk-src-qual{font-family:'Space Mono',monospace;font-size:9px;font-weight:700;color:#4ade80;flex-shrink:0;min-width:48px;}
.src-chk-src-host{font-family:'Space Mono',monospace;font-size:9px;color:rgba(255,255,255,.55);flex:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.src-chk-src-play{font-family:'Space Mono',monospace;font-size:9px;font-weight:700;color:#6366f1;flex-shrink:0;opacity:0;transition:opacity .13s;}
.src-chk-src-row:hover .src-chk-src-play{opacity:1;}
.src-chk-err{font-family:'Space Mono',monospace;font-size:9px;color:#f87171;padding:6px 10px;}

/* Channel edit/picker modals */
#ch-edit-modal{display:none;position:fixed;inset:0;z-index:10002;background:rgba(0,0,0,.92);overflow-y:auto;align-items:flex-start;justify-content:center;}
#ch-edit-modal.open{display:flex;}
#ch-edit-inner{width:100%;max-width:480px;margin:40px auto;padding:24px;background:var(--bg);border:1px solid var(--border);border-radius:14px;position:relative;}
.ch-edit-field{display:flex;flex-direction:column;gap:5px;margin-bottom:12px;}
.ch-edit-field label{font-family:'Space Mono',monospace;font-size:10px;color:var(--muted);letter-spacing:1px;text-transform:uppercase;}
#ch-picker-modal{display:none;position:fixed;inset:0;z-index:10001;background:rgba(0,0,0,.9);overflow-y:auto;}
#ch-picker-inner{max-width:500px;margin:40px auto;padding:20px;background:var(--bg);border:1px solid var(--border);border-radius:12px;position:relative;}
.cp-row{display:flex;align-items:center;gap:10px;padding:8px 4px;border-bottom:1px solid var(--border);cursor:pointer;transition:background .1s;border-radius:4px;}
.cp-row:hover{background:var(--surface);}
.cp-row img{width:28px;height:28px;object-fit:contain;border-radius:3px;flex-shrink:0;}
.cp-row .cp-name{font-family:'Space Mono',monospace;font-size:11px;color:var(--text);flex:1;}
.cp-row .cp-country{font-family:'Space Mono',monospace;font-size:9px;color:var(--dim);text-transform:uppercase;flex-shrink:0;}
.cp-row .cp-status{width:6px;height:6px;border-radius:50%;flex-shrink:0;}
.cp-status.online{background:#22c55e;}
.cp-status.offline{background:#ef4444;}

/* Report/admin buttons on detail page */
.report-btn{background:transparent;border:1px solid var(--border);color:var(--muted);font-family:'Space Mono',monospace;font-size:11px;font-weight:700;letter-spacing:1px;padding:10px 20px;border-radius:8px;cursor:pointer;transition:all .18s;}
.report-btn:hover{border-color:#ef4444;color:#ef4444;background:#ef444418;}
.admin-check-src-btn{display:none;background:transparent;border:1px solid #6366f166;color:#6366f1;font-family:'Space Mono',monospace;font-size:11px;font-weight:700;letter-spacing:1px;padding:10px 20px;border-radius:8px;cursor:pointer;transition:all .18s;}
.admin-check-src-btn:hover{border-color:#6366f1;background:#6366f122;}
body.admin-mode .admin-check-src-btn{display:inline-flex;align-items:center;gap:6px;}
.player-report-btn{background:transparent;border:1px solid rgba(255,255,255,.2);color:rgba(255,255,255,.6);font-family:'Space Mono',monospace;font-size:10px;font-weight:700;letter-spacing:1px;padding:6px 14px;border-radius:6px;cursor:pointer;transition:all .18s;margin-left:auto;}
.player-report-btn:hover{border-color:#ef4444;color:#ef4444;background:#ef444418;}

/* Card block button */
.card-block-btn{position:absolute;top:6px;right:6px;width:28px;height:28px;border-radius:50%;background:#e74c3cdd;border:none;color:#fff;font-size:14px;font-weight:700;cursor:pointer;display:none;z-index:5;line-height:28px;text-align:center;backdrop-filter:blur(4px);}
.card-block-btn:hover{background:#c0392b;transform:scale(1.1);}
body.admin-mode .card-block-btn{display:block;}
.card-working-btn{position:absolute;bottom:6px;right:6px;width:26px;height:26px;border-radius:50%;background:rgba(0,0,0,.55);border:2px solid #555;color:#555;font-size:13px;font-weight:700;cursor:pointer;z-index:5;line-height:22px;text-align:center;backdrop-filter:blur(4px);transition:background .15s,border-color .15s,color .15s;padding:0;}
.card-working-btn:hover{border-color:#22c55e;color:#22c55e;}
.card-working-btn.active{background:#22c55ecc;border-color:#22c55e;color:#fff;}

/* Settings button */
.settings-btn{position:fixed;bottom:16px;right:16px;z-index:100;background:var(--card);border:1px solid var(--border);border-radius:50%;width:36px;height:36px;display:flex;align-items:center;justify-content:center;cursor:pointer;color:#666;font-size:16px;transition:all .15s;}
.settings-btn:hover{border-color:#6366f1;color:#fff;}

/* ── 13. TOASTS & NOTIFICATIONS ── */
.player-toast{position:fixed;top:60px;left:50%;transform:translateX(-50%);
  background:#1a1a2e;border:1px solid var(--accent);border-radius:8px;padding:12px 24px;
  color:#fff;font-family:'Space Mono',monospace;font-size:12px;z-index:9999;
  opacity:0;transition:opacity .3s;pointer-events:none;text-align:center;
  box-shadow:0 4px 20px rgba(99,102,241,.3);max-width:90vw;}
.player-toast.show{opacity:1;}
.player-toast.goal-toast{padding:12px 20px 14px;border-color:#22c55e;box-shadow:0 4px 28px rgba(34,197,94,.35);min-width:240px;}
.goal-toast-top{font-size:13px;font-weight:700;color:#22c55e;letter-spacing:1px;margin-bottom:10px;}
.goal-toast-score{display:flex;align-items:center;justify-content:center;gap:10px;}
.goal-toast-team{display:flex;flex-direction:column;align-items:center;gap:5px;max-width:80px;}
.goal-toast-team span{font-size:10px;color:#ccc;text-align:center;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:80px;}
.goal-badge{width:36px;height:36px;object-fit:contain;}
.goal-toast-num{font-size:22px;font-weight:700;color:#fff;letter-spacing:1px;padding:0 6px;}

/* ── 14. ANIMATIONS & KEYFRAMES ── */
@keyframes spin{to{transform:rotate(360deg);}}
@keyframes fadeIn{from{opacity:0;}to{opacity:1;}}
@keyframes slideUp{from{opacity:0;transform:translateY(20px);}to{opacity:1;transform:translateY(0);}}

/* ── 15. TOUCH IMPROVEMENTS ── */
@media(hover:none) and (pointer:coarse){
  .card{-webkit-tap-highlight-color:transparent;}
  .ep-row{min-height:64px;}
  .tab-btn{min-height:44px;}
  .btn{min-height:44px;}
  .season-btn{min-height:40px;}
  #player-seek{height:8px;cursor:pointer;}
  #player-seek::-webkit-slider-thumb{width:20px;height:20px;}
  .ctrl-btn{min-width:48px;min-height:48px;}
}

/* ── 16. NEW FEATURES (preserved) ── */
#scroll-top-btn{position:fixed;bottom:calc(var(--bottom-h) + 12px);right:16px;width:44px;height:44px;border-radius:50%;background:var(--accent);color:#fff;border:none;font-size:20px;cursor:pointer;display:none;align-items:center;justify-content:center;z-index:60;box-shadow:0 4px 16px #0008;transition:opacity .2s;}
#scroll-top-btn.show{display:flex;}
@media(min-width:768px){#scroll-top-btn{bottom:24px;right:24px;}}
.rv-row{display:flex;gap:10px;overflow-x:auto;padding-bottom:12px;margin-bottom:16px;scrollbar-width:thin;-webkit-overflow-scrolling:touch;}
.rv-card{flex-shrink:0;width:100px;cursor:pointer;text-align:center;}
.rv-card img{width:100px;height:150px;object-fit:cover;border-radius:8px;border:1px solid var(--border);}
.rv-card .rv-title{font-size:10px;color:var(--muted);margin-top:4px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-family:'Space Mono',monospace;}
.wl-btn{background:transparent;border:1px solid var(--accent);color:var(--accent);border-radius:8px;padding:10px 20px;cursor:pointer;font-family:'Space Mono',monospace;font-size:11px;letter-spacing:1px;transition:all .2s;}
.wl-btn:hover,.wl-btn.in-wl{background:var(--accent);color:#fff;}
.ctrl-speed{background:var(--card);color:var(--text);border:1px solid var(--border);border-radius:6px;padding:4px 6px;font-size:11px;font-family:'Space Mono',monospace;cursor:pointer;}
#person-modal{position:fixed;inset:0;background:#000b;z-index:200;display:flex;align-items:center;justify-content:center;padding:20px;}
#person-inner{background:var(--surface);border:1px solid var(--border);border-radius:16px;max-width:600px;width:100%;max-height:80vh;overflow-y:auto;padding:28px;position:relative;}
.person-head{display:flex;gap:20px;margin-bottom:20px;}
.person-avatar{width:120px;height:120px;border-radius:50%;object-fit:cover;border:2px solid var(--border);}
.person-filmography{display:grid;grid-template-columns:repeat(auto-fill,minmax(100px,1fr));gap:10px;margin-top:16px;}
.person-film-card{cursor:pointer;text-align:center;}
.person-film-card img{width:100%;aspect-ratio:2/3;object-fit:cover;border-radius:8px;border:1px solid var(--border);}
.person-film-card .pf-title{font-size:10px;color:var(--muted);margin-top:4px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-family:'Space Mono',monospace;}
.skeleton-card{background:var(--card);border-radius:12px;overflow:hidden;animation:skeletonPulse 1.2s ease-in-out infinite;}
.skeleton-poster{width:100%;aspect-ratio:2/3;background:var(--border);}
.skeleton-text{height:12px;background:var(--border);border-radius:4px;margin:10px;}
@keyframes skeletonPulse{0%,100%{opacity:.5;}50%{opacity:1;}}
.view-toggle{display:flex;gap:4px;margin-left:auto;}
.view-toggle button{background:var(--card);border:1px solid var(--border);color:var(--muted);padding:6px 10px;cursor:pointer;border-radius:6px;font-size:11px;}
.view-toggle button.active{background:var(--accent);color:#fff;border-color:var(--accent);}
#grid.list-view{display:flex!important;flex-direction:column;gap:8px;}
#grid.list-view .card{display:flex;flex-direction:row;height:80px;}
#grid.list-view .card-poster{width:55px;min-width:55px;height:80px;}
#grid.list-view .card-poster img{height:80px;width:55px;}
#grid.list-view .card-info{display:flex;flex-direction:column;justify-content:center;padding:8px 12px;}
#grid.list-view .card-rating{font-size:10px;}
body.theme-blue{--accent:#4361ee;}
body.theme-purple{--accent:#7c3aed;}
body.theme-red{--accent:#ef4444;}
body.theme-green{--accent:#22c55e;}
body.theme-orange{--accent:#f97316;}
body.theme-pink{--accent:#ec4899;}
.dtap-overlay{position:absolute;top:50%;transform:translateY(-50%);color:#fff;font-size:14px;font-family:'Syne',sans-serif;font-weight:700;pointer-events:none;animation:dtapFade .6s forwards;z-index:20;}
.dtap-overlay.left{left:15%;}
.dtap-overlay.right{right:15%;}
@keyframes dtapFade{0%{opacity:1;transform:translateY(-50%) scale(1.2);}100%{opacity:0;transform:translateY(-50%) scale(1);}}
.cw-card{flex-shrink:0;width:140px;cursor:pointer;text-align:center;position:relative;}
.cw-card img{width:140px;height:210px;object-fit:cover;border-radius:8px;border:1px solid var(--border);}
.cw-card .cw-title{font-size:10px;color:var(--muted);margin-top:4px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-family:'Space Mono',monospace;}
.cw-card .cw-progress{position:absolute;bottom:28px;left:4px;right:4px;height:3px;background:rgba(255,255,255,.15);border-radius:2px;overflow:hidden;}
.cw-card .cw-progress-fill{height:100%;background:var(--accent);border-radius:2px;}
.cw-card .cw-ep{position:absolute;top:6px;left:6px;background:#000a;padding:2px 6px;border-radius:4px;font-size:9px;color:#fff;font-family:'Space Mono',monospace;}
.cw-card .cw-remove{position:absolute;top:4px;right:4px;background:#000a;color:#fff;border:none;width:20px;height:20px;border-radius:50%;font-size:11px;cursor:pointer;display:none;align-items:center;justify-content:center;}
.cw-card:hover .cw-remove{display:flex;}
.search-ac-dropdown{position:absolute;top:100%;left:0;right:0;max-width:400px;background:var(--card);border:1px solid var(--border);border-radius:0 0 10px 10px;z-index:50;max-height:360px;overflow-y:auto;box-shadow:0 8px 24px #000a;}
.search-ac-item{display:flex;align-items:center;gap:10px;padding:8px 12px;cursor:pointer;font-family:'Space Mono',monospace;font-size:11px;color:var(--text);transition:background .15s;}
.search-ac-item:hover{background:var(--surface);}
.search-ac-item img{width:36px;height:54px;object-fit:cover;border-radius:4px;flex-shrink:0;}
.search-ac-item .ac-info{overflow:hidden;}
.search-ac-item .ac-title{font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.search-ac-item .ac-meta{font-size:9px;color:var(--muted);margin-top:2px;}
.share-btn,.trailer-btn{background:var(--card);border:1px solid var(--border);color:var(--text);padding:8px 16px;border-radius:8px;cursor:pointer;font-family:'Space Mono',monospace;font-size:11px;transition:all .2s;}
.share-btn:hover,.trailer-btn:hover{border-color:var(--accent);color:var(--accent);}
.trailer-btn{border-color:var(--accent);color:var(--accent);}
.genre-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(140px,1fr));gap:12px;padding:10px 0;}
.genre-card{background:linear-gradient(135deg,var(--card),var(--surface));border:1px solid var(--border);border-radius:12px;padding:24px 16px;text-align:center;cursor:pointer;font-family:'Syne',sans-serif;font-weight:700;font-size:14px;transition:all .2s;position:relative;overflow:hidden;}
.genre-card:hover{border-color:var(--accent);transform:translateY(-2px);box-shadow:0 4px 16px #0005;}
.genre-card .genre-icon{font-size:28px;margin-bottom:8px;}
.genre-card .genre-count{font-family:'Space Mono',monospace;font-size:10px;color:var(--muted);margin-top:4px;}
.card-progress{position:absolute;bottom:0;left:0;right:0;height:3px;background:rgba(255,255,255,.15);}
.card-progress-fill{height:100%;background:var(--accent);border-radius:0 2px 0 0;}
#quality-badge{position:absolute;top:8px;right:8px;z-index:12;padding:3px 8px;border-radius:4px;font-family:'Space Mono',monospace;font-size:10px;font-weight:700;color:#fff;pointer-events:none;letter-spacing:.5px;}
.top10-card{position:relative;flex-shrink:0;cursor:pointer;display:flex;align-items:flex-end;width:130px;}
.top10-num{font-family:'Syne',sans-serif;font-weight:800;font-size:80px;line-height:.8;color:transparent;-webkit-text-stroke:2px var(--accent);position:relative;z-index:1;margin-right:-16px;user-select:none;}
.top10-poster{flex-shrink:0;}
.top10-poster img{width:100px;height:150px;object-fit:cover;border-radius:8px;border:1px solid var(--border);position:relative;z-index:2;}
.spotlight-banner:hover{transform:scale(1.005);transition:transform .3s;}
#sub-style-panel{position:absolute;bottom:100px;right:20px;background:#0f0f23ee;border:1px solid var(--border);border-radius:10px;padding:14px;display:none;z-index:22;min-width:220px;backdrop-filter:blur(10px);}
#sub-style-panel.open{display:block;}
#sub-style-panel label{display:block;font-family:'Space Mono',monospace;font-size:10px;color:var(--muted);margin-bottom:4px;letter-spacing:1px;}
#sub-style-panel select,#sub-style-panel input[type=range],#sub-style-panel input[type=color]{width:100%;margin-bottom:10px;padding:5px 8px;font-size:11px;border-radius:6px;border:1px solid var(--border);background:var(--card);color:var(--text);font-family:'Space Mono',monospace;cursor:pointer;}
#sub-style-panel input[type=color]{height:28px;padding:2px;}
#sub-style-panel input[type=range]{height:4px;-webkit-appearance:none;background:var(--border);border:none;}
#sub-style-panel input[type=range]::-webkit-slider-thumb{-webkit-appearance:none;width:14px;height:14px;border-radius:50%;background:var(--accent);cursor:pointer;}
.sub-style-btn{background:transparent;border:1px solid var(--border);color:var(--muted);border-radius:6px;padding:4px 10px;cursor:pointer;font-family:'Space Mono',monospace;font-size:10px;}
.sub-style-btn:hover{border-color:var(--accent);color:var(--text);}
#tvguide-modal{position:fixed;inset:0;background:#000e;z-index:180;display:none;flex-direction:column;}
#tvguide-modal.open{display:flex;}
.tvg-topbar{display:flex;align-items:center;gap:12px;padding:12px 20px;border-bottom:1px solid var(--border);background:var(--surface);}
.tvg-topbar h3{font-family:'Syne',sans-serif;font-weight:800;font-size:16px;flex:1;}
.tvg-close{background:var(--card);border:1px solid var(--border);color:var(--text);width:32px;height:32px;border-radius:50%;cursor:pointer;font-size:16px;display:flex;align-items:center;justify-content:center;}
.tvg-body{flex:1;overflow:auto;position:relative;}
.tvg-timeline{display:flex;position:sticky;top:0;z-index:3;background:var(--surface);border-bottom:1px solid var(--border);padding-left:140px;min-width:max-content;}
.tvg-time-slot{flex-shrink:0;width:200px;padding:8px 12px;font-family:'Space Mono',monospace;font-size:10px;color:var(--muted);border-right:1px solid var(--border);}
.tvg-row{display:flex;min-height:56px;border-bottom:1px solid var(--border);min-width:max-content;}
.tvg-ch{width:140px;flex-shrink:0;display:flex;align-items:center;gap:8px;padding:6px 10px;position:sticky;left:0;background:var(--bg);z-index:2;border-right:1px solid var(--border);}
.tvg-ch img{width:28px;height:28px;border-radius:4px;object-fit:contain;background:var(--card);}
.tvg-ch-name{font-family:'Space Mono',monospace;font-size:10px;color:var(--text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.tvg-programs{display:flex;position:relative;flex:1;}
.tvg-prog{position:absolute;top:2px;bottom:2px;background:var(--card);border:1px solid var(--border);border-radius:6px;padding:4px 8px;overflow:hidden;cursor:pointer;transition:border-color .15s,background .15s;}
.tvg-prog:hover{border-color:var(--accent);background:var(--accent)11;}
.tvg-prog.now{background:#6366f118;border-color:var(--accent);}
.tvg-prog-title{font-family:'Space Mono',monospace;font-size:10px;color:var(--text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.tvg-prog-time{font-family:'Space Mono',monospace;font-size:9px;color:var(--muted);white-space:nowrap;}
#multiview-container{position:fixed;inset:0;background:var(--bg);z-index:170;display:none;flex-wrap:wrap;}
#multiview-container.open{display:flex;}
.mv-cell{position:relative;border:1px solid var(--border);overflow:hidden;background:#000;}
.mv-cell video{width:100%;height:100%;object-fit:contain;}
.mv-cell-label{position:absolute;top:6px;left:8px;background:#000b;color:#fff;padding:3px 8px;border-radius:4px;font-family:'Space Mono',monospace;font-size:10px;z-index:2;pointer-events:none;}
.mv-cell-close{position:absolute;top:6px;right:8px;background:#000b;color:#fff;border:none;width:24px;height:24px;border-radius:50%;cursor:pointer;font-size:14px;display:flex;align-items:center;justify-content:center;z-index:2;}
.mv-toolbar{position:fixed;bottom:16px;left:50%;transform:translateX(-50%);display:flex;gap:8px;z-index:175;background:var(--surface);border:1px solid var(--border);border-radius:10px;padding:8px 14px;}
.mv-toolbar button{background:var(--card);border:1px solid var(--border);color:var(--text);border-radius:6px;padding:6px 14px;cursor:pointer;font-family:'Space Mono',monospace;font-size:11px;}
.mv-toolbar button:hover{border-color:var(--accent);color:var(--accent);}
.ob-overlay{position:fixed;inset:0;background:rgba(0,0,0,.75);z-index:300;pointer-events:none;}
.ob-highlight{position:fixed;z-index:301;border:2px solid var(--accent);border-radius:8px;box-shadow:0 0 0 9999px rgba(0,0,0,.7);pointer-events:none;transition:all .3s ease;}
.ob-tooltip{position:fixed;z-index:302;background:var(--surface);border:1px solid var(--accent);border-radius:10px;padding:16px 20px;max-width:300px;box-shadow:0 8px 32px #000a;pointer-events:auto;}
.ob-tooltip h4{font-family:'Syne',sans-serif;font-weight:700;font-size:14px;margin-bottom:6px;color:var(--text);}
.ob-tooltip p{font-family:'Space Mono',monospace;font-size:11px;color:var(--muted);line-height:1.5;margin-bottom:12px;}
.ob-tooltip-btns{display:flex;gap:8px;justify-content:flex-end;}
.ob-tooltip-btns button{padding:6px 14px;border-radius:6px;cursor:pointer;font-family:'Space Mono',monospace;font-size:11px;border:1px solid var(--border);}
.ob-btn-next{background:var(--accent);color:#fff;border-color:var(--accent)!important;}
.ob-btn-skip{background:transparent;color:var(--muted);}
.ap-stats-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(160px,1fr));gap:12px;margin-bottom:20px;}
.ap-stat-card{background:var(--card);border:1px solid var(--border);border-radius:10px;padding:16px;text-align:center;}
.ap-stat-num{font-family:'Syne',sans-serif;font-size:28px;font-weight:800;color:var(--accent);}
.ap-stat-label{font-family:'Space Mono',monospace;font-size:10px;color:var(--muted);margin-top:4px;letter-spacing:1px;}
.ap-log-item{display:flex;gap:12px;padding:10px 0;border-bottom:1px solid var(--border);font-family:'Space Mono',monospace;font-size:11px;}
.ap-log-time{color:var(--muted);white-space:nowrap;}
.ap-log-msg{color:var(--text);}
.admin-row{display:flex;align-items:center;gap:12px;padding:10px 14px;background:var(--card);border:1px solid var(--border);border-radius:8px;}
.admin-rank{font-family:'Space Mono',monospace;font-size:11px;color:var(--accent);min-width:24px;}
.admin-server{font-family:'Syne',sans-serif;font-weight:700;font-size:14px;color:var(--text);flex:1;}
.admin-bar-wrap{flex:2;height:6px;background:#ffffff0a;border-radius:3px;overflow:hidden;}
.admin-bar{height:100%;background:var(--accent);border-radius:3px;transition:width .4s;}
.admin-hits{font-family:'Space Mono',monospace;font-size:10px;color:var(--dim);min-width:48px;text-align:right;}
.admin-btn{background:#ffffff0a;border:1px solid var(--border);border-radius:8px;color:var(--muted);cursor:pointer;font-family:'Space Mono',monospace;font-size:11px;padding:8px 16px;transition:all .15s;letter-spacing:.5px;}
.admin-btn:hover{border-color:var(--accent);color:#fff;}
.admin-btn.danger{border-color:#f8717122;}
.admin-btn.danger:hover{border-color:#f87171;color:#f87171;}
.admin-stat{display:flex;align-items:center;justify-content:space-between;padding:10px 14px;background:var(--card);border:1px solid var(--border);border-radius:8px;}
.admin-stat-label{font-family:'Space Mono',monospace;font-size:11px;color:var(--muted);}
.admin-stat-val{font-family:'Syne',sans-serif;font-weight:700;font-size:16px;color:var(--text);}

/* ═══════════════════════════════════════════════════════════════
   END OF MOBILE-FIRST BASE — PRESERVED SECTIONS FOLLOW
   ═══════════════════════════════════════════════════════════════ */
/* ── AD OVERLAY ── */
#ad-overlay{position:absolute;inset:0;z-index:30;background:#000;display:flex;align-items:center;justify-content:center;}
#ad-overlay video{width:100%;height:100%;object-fit:contain;display:block;}
.ad-badge{position:absolute;top:12px;left:12px;background:rgba(0,0,0,0.75);color:#facc15;font-family:'Space Mono',monospace;font-size:10px;font-weight:700;padding:4px 10px;border-radius:4px;letter-spacing:1px;z-index:2;pointer-events:none;}
.ad-countdown{position:absolute;bottom:18px;right:18px;background:rgba(0,0,0,0.75);color:#ccc;font-family:'Space Mono',monospace;font-size:11px;padding:5px 10px;border-radius:4px;z-index:2;pointer-events:none;}
.ad-skip-btn{position:absolute;bottom:14px;right:14px;background:rgba(255,255,255,0.15);border:1.5px solid rgba(255,255,255,0.5);color:#fff;font-family:'Space Mono',monospace;font-size:11px;font-weight:700;padding:7px 16px;border-radius:5px;cursor:pointer;z-index:3;letter-spacing:0.5px;transition:background 0.15s;}
.ad-skip-btn:hover{background:rgba(255,255,255,0.28);}
.ad-click-area{position:absolute;inset:0;cursor:pointer;z-index:1;}

/* ── AD ADMIN PANEL ── */
.ad-list-table{width:100%;border-collapse:collapse;font-size:12px;margin-bottom:4px;}
.ad-list-table th{text-align:left;padding:8px 10px;color:var(--dim);font-family:'Space Mono',monospace;font-size:10px;letter-spacing:0.5px;border-bottom:1px solid var(--border);}
.ad-list-table td{padding:9px 10px;border-bottom:1px solid rgba(255,255,255,0.05);vertical-align:middle;color:var(--text);font-family:'Space Mono',monospace;font-size:11px;}
.ad-list-table tr:hover td{background:rgba(255,255,255,0.03);}
.ad-list-table .ad-td-actions{white-space:nowrap;}
.ad-list-table .ad-td-actions button{margin-right:4px;}
.ad-pos-badge{display:inline-block;padding:3px 8px;border-radius:3px;font-family:'Space Mono',monospace;font-size:9px;font-weight:700;letter-spacing:0.5px;}
.ad-pos-badge.pre{background:#4361ee22;color:#818cf8;}
.ad-pos-badge.mid{background:#f59e0b22;color:#fbbf24;}
.ad-pos-badge.post{background:#22c55e22;color:#4ade80;}
.ad-form-wrap{background:var(--card);border:1px solid var(--border);border-radius:10px;padding:20px;margin-top:16px;}
.ad-form-wrap h3{font-family:'Syne',sans-serif;font-size:15px;font-weight:700;margin:0 0 18px;color:var(--text);}
.ad-form-row{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-bottom:14px;}
.ad-form-row.full{grid-template-columns:1fr;}
.ad-form-row.single{grid-template-columns:1fr;max-width:50%;}
.ad-form-label{font-size:10px;color:var(--dim);font-family:'Space Mono',monospace;margin-bottom:5px;letter-spacing:0.5px;}
.ad-form-input{width:100%;background:var(--bg);border:1px solid var(--border);border-radius:6px;padding:9px 12px;color:var(--text);font-size:12px;font-family:'Space Mono',monospace;box-sizing:border-box;appearance:none;-webkit-appearance:none;}
.ad-form-input:focus{outline:none;border-color:var(--accent);}
select.ad-form-input{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23666'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 10px center;padding-right:28px;cursor:pointer;}
.ad-form-actions{display:flex;gap:8px;margin-top:18px;}
.ad-form-save{background:var(--accent);border:none;color:#fff;font-family:'Space Mono',monospace;font-size:11px;font-weight:700;padding:9px 20px;border-radius:6px;cursor:pointer;letter-spacing:0.5px;}
.ad-form-save:hover{opacity:0.85;}
.ad-form-cancel{background:none;border:1px solid var(--border);color:var(--dim);font-family:'Space Mono',monospace;font-size:11px;padding:9px 16px;border-radius:6px;cursor:pointer;}
.ad-form-cancel:hover{border-color:var(--muted);color:var(--text);}

/* ── SMART ADMIN: Stats Bar ── */
.ch-stats-bar{display:flex;flex-wrap:wrap;align-items:center;gap:8px;padding:12px 16px;background:var(--card);border:1px solid var(--border);border-radius:10px;margin-bottom:12px;}
.ch-stat{font-family:'Space Mono',monospace;font-size:11px;color:var(--muted);padding:4px 10px;border-radius:4px;background:var(--surface);white-space:nowrap;}
.ch-stat.mapped{color:#22c55e;background:#22c55e15;}
.ch-stat.unmapped{color:#f87171;background:#f8717115;}
.ch-stat.hls{color:#38bdf8;background:#38bdf815;}
.ch-stat.mpd{color:#c084fc;background:#c084fc15;}
.ch-stat.drm{color:#a78bfa;background:#7c3aed15;}
.ch-stat-btn{font-family:'Space Mono',monospace;font-size:10px;font-weight:700;color:var(--accent);background:var(--accent)15;border:1px solid var(--accent)33;border-radius:5px;padding:4px 12px;cursor:pointer;letter-spacing:0.5px;margin-left:auto;transition:all 0.15s;}
.ch-stat-btn:hover{background:var(--accent)25;border-color:var(--accent)55;}
/* ── SMART ADMIN: Quick-Add Bar ── */
.ch-quick-add{display:flex;gap:6px;align-items:center;padding:10px 16px;background:var(--card);border:1px solid var(--border);border-radius:10px;margin-bottom:12px;flex-wrap:wrap;}
.ch-quick-add .ap-input{flex:1;min-width:100px;padding:7px 10px;font-size:11px;}
.ch-qa-btn{background:var(--accent);border:none;color:#fff;font-family:'Space Mono',monospace;font-size:11px;font-weight:700;padding:7px 14px;border-radius:6px;cursor:pointer;white-space:nowrap;letter-spacing:0.5px;}
.ch-qa-btn:hover{opacity:0.85;}
.ch-qa-test-btn{background:none;border:1px solid var(--border);color:var(--muted);font-family:'Space Mono',monospace;font-size:10px;padding:6px 10px;border-radius:5px;cursor:pointer;white-space:nowrap;}
.ch-qa-test-btn:hover{border-color:var(--accent);color:var(--accent);}
/* ── SMART ADMIN: Stream Type Badges ── */
.cm-type-badge{display:inline-block;padding:2px 6px;border-radius:3px;font-family:'Space Mono',monospace;font-size:8px;font-weight:700;letter-spacing:0.5px;margin-right:4px;vertical-align:middle;}
.cm-type-badge.hls{background:#38bdf815;color:#38bdf8;border:1px solid #38bdf833;}
.cm-type-badge.mpd{background:#c084fc15;color:#c084fc;border:1px solid #c084fc33;}
.cm-health-dot{display:inline-block;width:7px;height:7px;border-radius:50%;margin-right:4px;vertical-align:middle;}
.cm-health-dot.ok{background:#22c55e;}
.cm-health-dot.fail{background:#ef4444;}
.cm-health-dot.checking{background:#fbbf24;animation:pulse-dot 1s infinite;}
/* ── SMART ADMIN: Bulk Import Modal ── */
.bulk-import-modal{display:none;position:fixed;inset:0;z-index:10003;background:rgba(0,0,0,0.92);align-items:center;justify-content:center;}
.bulk-import-modal.open{display:flex;}
.bulk-import-inner{width:100%;max-width:560px;padding:24px;background:var(--bg);border:1px solid var(--border);border-radius:14px;margin:20px;}
.bulk-import-inner h3{font-family:'Syne',sans-serif;font-size:16px;font-weight:700;color:var(--text);margin:0 0 8px;}
/* ── SMART ADMIN: Test Button in Row ── */
.cm-test{background:none;border:1px solid var(--border);color:var(--muted);border-radius:4px;padding:4px 6px;font-family:'Space Mono',monospace;font-size:8px;cursor:pointer;flex-shrink:0;letter-spacing:0.3px;}
.cm-test:hover{border-color:var(--accent);color:var(--accent);}
/* ── SMART ADMIN: Drag Handle ── */
.cm-drag-handle{cursor:grab;color:var(--muted);font-size:14px;user-select:none;padding:0 4px;flex-shrink:0;opacity:0.4;transition:opacity 0.15s;}
.cm-drag-handle:hover{opacity:1;color:var(--text);}
.cm-row-card.drag-over{border-top:2px solid var(--accent);}

#welcome-modal { display:none; position:fixed; inset:0; z-index:9999; background:#0a0a1aee; backdrop-filter:blur(12px); align-items:center; justify-content:center; }
#welcome-modal.show { display:flex; }
#welcome-box { background:var(--card); border:1px solid var(--border); border-radius:16px; padding:36px 32px 28px; max-width:420px; width:90%; text-align:center; }
#welcome-box h2 { font-family:'Syne',sans-serif; font-size:22px; color:#fff; margin:0 0 6px; }
#welcome-box .wm-sub { font-family:'DM Sans',sans-serif; font-size:13px; color:#888; margin-bottom:20px; line-height:1.5; }
#welcome-box .wm-label { font-family:'Space Mono',monospace; font-size:10px; color:#666; text-transform:uppercase; letter-spacing:1px; margin-bottom:8px; text-align:left; }
#welcome-box .wm-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:6px; margin-bottom:18px; }
#welcome-box .wm-lang { padding:10px 6px; border-radius:8px; border:1px solid var(--border); background:var(--surface); cursor:pointer; font-family:'DM Sans',sans-serif; font-size:13px; color:#ccc; transition:all 0.15s; text-align:center; }
#welcome-box .wm-lang:hover { border-color:#4361ee66; color:#fff; }
#welcome-box .wm-lang.sel { border-color:#4361ee; background:#4361ee22; color:#fff; }
#welcome-box .wm-go { margin-top:8px; width:100%; padding:12px; border:none; border-radius:8px; background:#4361ee; color:#fff; font-family:'Syne',sans-serif; font-size:15px; font-weight:700; cursor:pointer; transition:background 0.15s; }
#welcome-box .wm-go:hover { background:#3451de; }
#welcome-box .wm-go:disabled { background:#333; color:#666; cursor:default; }
.settings-btn { position:fixed; bottom:16px; right:16px; z-index:100; background:var(--card); border:1px solid var(--border); border-radius:50%; width:36px; height:36px; display:flex; align-items:center; justify-content:center; cursor:pointer; color:#666; font-size:16px; transition:all 0.15s; }
.settings-btn:hover { border-color:#4361ee; color:#fff; }

/* ── ADMIN LOGIN MODAL ── */
#admin-login-modal { display:none; position:fixed; inset:0; z-index:9998; background:#06060fdd; backdrop-filter:blur(16px); align-items:center; justify-content:center; }
#admin-login-modal.show { display:flex; }
.admin-box { background:var(--card); border:1px solid var(--border); border-radius:16px; padding:36px 28px 28px; max-width:340px; width:90%; text-align:center; }
.admin-box-icon { font-size:32px; margin-bottom:12px; }
.admin-box h3 { font-family:'Syne',sans-serif; color:#fff; margin:0 0 20px; font-size:16px; letter-spacing:2px; }
.admin-box input { width:100%; padding:12px 16px; border:1px solid var(--border); border-radius:8px; background:var(--surface); color:#fff; font-family:'Space Mono',monospace; font-size:13px; margin-bottom:14px; box-sizing:border-box; outline:none; transition:border-color 0.2s; }
.admin-box input:focus { border-color:var(--accent); }
.admin-box button { width:100%; padding:12px; border:none; border-radius:8px; background:var(--accent); color:#fff; font-family:'Syne',sans-serif; font-size:14px; font-weight:700; cursor:pointer; transition:background 0.15s; }
.admin-box button:hover { background:#3451de; }
.admin-box .admin-err { color:#f87171; font-family:'Space Mono',monospace; font-size:11px; margin-bottom:10px; display:none; }

/* ── CARD BLOCK BUTTON ── */
.card-block-btn { position:absolute; top:6px; right:6px; width:28px; height:28px; border-radius:50%; background:#e74c3cdd; border:none; color:#fff; font-size:14px; font-weight:700; cursor:pointer; display:none; z-index:5; line-height:28px; text-align:center; backdrop-filter:blur(4px); }
.card-block-btn:hover { background:#c0392b; transform:scale(1.1); }
body.admin-mode .card-block-btn { display:block; }
.card-working-btn { position:absolute; bottom:6px; right:6px; width:26px; height:26px; border-radius:50%; background:rgba(0,0,0,0.55); border:2px solid #555; color:#555; font-size:13px; font-weight:700; cursor:pointer; z-index:5; line-height:22px; text-align:center; backdrop-filter:blur(4px); transition:background 0.15s, border-color 0.15s, color 0.15s; padding:0; }
.card-working-btn:hover { border-color:#22c55e; color:#22c55e; }
.card-working-btn.active { background:#22c55ecc; border-color:#22c55e; color:#fff; }

/* ── ADMIN FAB ── */
.admin-fab { position:fixed; bottom:16px; left:16px; z-index:100; background:var(--accent); border:none; border-radius:12px; width:42px; height:42px; display:none; align-items:center; justify-content:center; cursor:pointer; color:#fff; font-size:16px; box-shadow:0 4px 16px #4361ee44; transition:transform 0.15s,box-shadow 0.15s; }
.admin-fab:hover { transform:translateY(-2px); box-shadow:0 6px 24px #4361ee66; }
body.admin-mode .admin-fab { display:flex; }
/* ── ADMIN PANEL (sidebar layout) ── */
#admin-panel { display:none; position:fixed; inset:0; z-index:9997; background:var(--bg); }
#admin-panel.show { display:flex; }

.ap-sidebar { width:220px; background:var(--surface); border-right:1px solid var(--border); display:flex; flex-direction:column; padding:24px 0; flex-shrink:0; }
.ap-brand { font-family:'Syne',sans-serif; font-weight:800; font-size:13px; letter-spacing:3px; color:var(--accent); padding:0 24px 24px; border-bottom:1px solid var(--border); margin-bottom:8px; }
.ap-nav-btn { background:none; border:none; color:var(--muted); font-family:'DM Sans',sans-serif; font-size:14px; padding:12px 24px; text-align:left; cursor:pointer; transition:all 0.15s; border-left:3px solid transparent; }
.ap-nav-btn:hover { color:var(--text); background:#ffffff06; }
.ap-nav-btn.active { color:var(--text); background:#4361ee0a; border-left-color:var(--accent); }
.ap-sidebar-spacer { flex:1; }
.ap-nav-close { background:none; border:none; color:var(--dim); font-family:'Space Mono',monospace; font-size:11px; letter-spacing:1px; padding:16px 24px; text-align:left; cursor:pointer; transition:color 0.15s; border-top:1px solid var(--border); }
.ap-nav-close:hover { color:var(--text); }

.ap-main { flex:1; overflow-y:auto; padding:32px 40px; }
.ap-section { display:none; }
.ap-section.active { display:block; }
.ap-section-head { margin-bottom:24px; }
.ap-section-head h2 { font-family:'Syne',sans-serif; font-weight:800; font-size:22px; color:#fff; margin:0 0 4px; }
.ap-section-sub { font-family:'Space Mono',monospace; font-size:11px; color:var(--muted); }

/* Blocked content list */
.blocked-item { display:flex; align-items:center; gap:16px; padding:14px 18px; background:var(--card); border:1px solid var(--border); border-radius:10px; margin-bottom:8px; transition:border-color 0.15s; }
.blocked-item:hover { border-color:#ffffff18; }
.blocked-item .bi-title { flex:1; color:#fff; font-family:'DM Sans',sans-serif; font-size:14px; }
.blocked-item .bi-type { color:var(--accent); font-family:'Space Mono',monospace; font-size:10px; letter-spacing:0.5px; text-transform:uppercase; background:#4361ee12; padding:2px 8px; border-radius:4px; }
.blocked-item .bi-id { color:var(--dim); font-family:'Space Mono',monospace; font-size:11px; }
.blocked-item .bi-restore { padding:7px 16px; border:none; border-radius:6px; background:#27ae60; color:#fff; cursor:pointer; font-family:'Space Mono',monospace; font-size:11px; font-weight:700; transition:background 0.15s; }
.blocked-item .bi-restore:hover { background:#2ecc71; }
.blocked-item.unblocked { opacity:0.35; }

/* Channel manager in admin panel */
.ap-channel-toolbar { display:flex; gap:8px; margin-bottom:16px; flex-wrap:wrap; }
.ap-input { flex:1; min-width:180px; padding:10px 14px; border:1px solid var(--border); border-radius:8px; background:var(--card); color:var(--text); font-family:'Space Mono',monospace; font-size:12px; outline:none; transition:border-color 0.2s; }
.ap-input:focus { border-color:var(--accent); }
.ap-btn-secondary { background:var(--card); border:1px solid var(--border); color:var(--muted); border-radius:6px; padding:8px 14px; font-family:'Space Mono',monospace; font-size:10px; font-weight:700; cursor:pointer; letter-spacing:0.5px; transition:all 0.15s; }
.ap-btn-secondary:hover { border-color:var(--accent); color:var(--text); }

/* ── CHANNEL MANAGER (redesigned) ── */
.cm-add-form { background:var(--card); border:1px solid var(--border); border-radius:10px; padding:18px 20px; margin-bottom:20px; }
.cm-add-title { font-family:'Syne',sans-serif; font-weight:700; font-size:12px; color:var(--muted); letter-spacing:1px; margin-bottom:12px; text-transform:uppercase; }
.cm-add-row { display:flex; gap:8px; margin-bottom:10px; flex-wrap:wrap; }
.cm-add-row:last-child { margin-bottom:0; }
.cm-row-card { display:flex; align-items:center; gap:14px; padding:12px 16px; background:var(--card); border:1px solid var(--border); border-radius:10px; margin-bottom:8px; transition:border-color 0.15s; }
.cm-row-card:hover { border-color:#ffffff18; }
.cm-row-left { display:flex; align-items:center; gap:12px; flex:1; min-width:0; }
.cm-logo { width:36px; height:36px; object-fit:contain; border-radius:6px; flex-shrink:0; background:var(--surface); }
.cm-logo-placeholder { width:36px; height:36px; border-radius:6px; flex-shrink:0; background:var(--surface); border:1px solid var(--border); display:flex; align-items:center; justify-content:center; font-family:'Syne',sans-serif; font-weight:700; font-size:16px; color:var(--dim); }
.cm-row-info { flex:1; min-width:0; }
.cm-row-name { font-family:'Syne',sans-serif; font-weight:700; font-size:14px; color:var(--text); margin-bottom:3px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.cm-row-meta { display:flex; flex-wrap:wrap; gap:8px; align-items:center; }
.cm-country-badge { font-family:'Space Mono',monospace; font-size:10px; color:var(--muted); display:flex; align-items:center; gap:3px; }
.cm-epg-badge { font-family:'Space Mono',monospace; font-size:9px; color:var(--accent); background:#4361ee12; padding:1px 6px; border-radius:3px; }
.cm-status-dot { font-family:'Space Mono',monospace; font-size:9px; font-weight:700; letter-spacing:0.5px; padding:1px 6px; border-radius:3px; }
.cm-status-dot.mapped { color:#22c55e; background:#22c55e12; }
.cm-status-dot.unmapped { color:var(--dim); background:#ffffff08; }
.cm-row-right { display:flex; align-items:center; gap:6px; flex-shrink:0; }
.cm-url-input { width:220px; padding:6px 10px; font-size:10px; border-radius:5px; border:1px solid var(--border); background:var(--surface); color:var(--text); font-family:'Space Mono',monospace; outline:none; transition:border-color 0.2s; }
.cm-url-input:focus { border-color:var(--accent); }
.cm-pick { background:var(--accent); border:none; color:#fff; border-radius:4px; padding:5px 10px; font-family:'Space Mono',monospace; font-size:9px; font-weight:700; cursor:pointer; transition:opacity 0.15s; }
.cm-pick:hover { opacity:0.85; }
.cm-edit { background:var(--surface); border:1px solid var(--border); color:var(--muted); border-radius:4px; padding:5px 10px; font-family:'Space Mono',monospace; font-size:9px; font-weight:700; cursor:pointer; transition:all 0.15s; }
.cm-edit:hover { border-color:var(--accent); color:var(--text); }
.cm-epg-btn { background:transparent; border:1px solid #4361ee44; color:var(--accent); border-radius:4px; padding:5px 10px; font-family:'Space Mono',monospace; font-size:9px; font-weight:700; cursor:pointer; transition:all 0.15s; }
.cm-epg-btn:hover { background:#4361ee22; border-color:var(--accent); }
.cm-del { background:transparent; border:1px solid #f8717133; color:#f87171; border-radius:4px; padding:5px 10px; font-family:'Space Mono',monospace; font-size:9px; font-weight:700; cursor:pointer; transition:all 0.15s; }
.cm-del:hover { background:#f8717122; }
.cm-category-badge { font-family:'Space Mono',monospace; font-size:9px; color:#a78bfa; background:#7c3aed12; padding:1px 6px; border-radius:3px; }
.cm-cb { width:16px; height:16px; accent-color:var(--accent); cursor:pointer; flex-shrink:0; }

/* ── Searchable Dropdown Component ── */
.searchable-select { position:relative; }
.searchable-dropdown { display:none; position:absolute; top:100%; left:0; right:0; max-height:240px; overflow-y:auto; background:var(--bg); border:1px solid var(--border); border-top:none; border-radius:0 0 8px 8px; z-index:100; box-shadow:0 8px 24px rgba(0,0,0,0.4); }
.sd-item { display:flex; align-items:center; gap:8px; padding:8px 12px; cursor:pointer; font-family:'Space Mono',monospace; font-size:11px; color:var(--text); transition:background 0.1s; }
.sd-item:hover { background:var(--surface); }
.sd-code { font-size:9px; color:var(--dim); text-transform:uppercase; margin-left:auto; flex-shrink:0; }
.sd-guide { font-size:8px; color:var(--accent); background:#4361ee12; padding:1px 5px; border-radius:3px; flex-shrink:0; }
.sd-icon { width:20px; height:20px; object-fit:contain; border-radius:3px; flex-shrink:0; }
.sd-name { flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.sd-empty { padding:12px; text-align:center; color:var(--dim); font-family:'Space Mono',monospace; font-size:10px; }
.sd-count { padding:6px 12px; font-family:'Space Mono',monospace; font-size:9px; color:var(--muted); border-bottom:1px solid var(--border); background:var(--surface); }

/* ── Mass Assign ── */
.cm-mass-toolbar { display:flex; align-items:center; gap:10px; padding:12px 16px; background:var(--bg); border:1px solid var(--accent); border-radius:8px; margin-bottom:12px; flex-wrap:wrap; position:sticky; top:0; z-index:50; box-shadow:0 4px 12px rgba(0,0,0,0.3); }
.cm-mass-info { display:flex; align-items:center; gap:8px; font-family:'Space Mono',monospace; font-size:11px; color:var(--text); flex-shrink:0; }
.cm-mass-actions { display:flex; align-items:center; gap:6px; flex-wrap:wrap; flex:1; }

/* ── LIVE TV PAGE ── */
#livetv-page { display:none; width:100%; padding:28px 36px; animation:fadeIn 0.25s ease; }

/* Country selection grid (Step 1) */
#livetv-countries { animation:fadeIn 0.25s ease; }
#livetv-countries-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(160px,1fr)); gap:14px; }
.ltv-flag-card { background:var(--card); border:1px solid var(--border); border-radius:12px; cursor:pointer; transition:all 0.18s; overflow:hidden; }
.ltv-flag-card:hover { transform:translateY(-4px); border-color:var(--accent); box-shadow:0 8px 32px #4361ee22; }
.ltv-flag-img { aspect-ratio:16/10; background-size:cover; background-position:center; background-repeat:no-repeat; background-color:var(--surface); }
.ltv-flag-info { padding:10px 12px 12px; text-align:center; }
.ltv-flag-name { font-family:'Syne',sans-serif; font-weight:700; font-size:13px; color:var(--text); letter-spacing:0.3px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.ltv-flag-count { font-family:'Space Mono',monospace; font-size:10px; color:var(--muted); margin-top:2px; }
.ltv-flag-all { background:linear-gradient(135deg,var(--accent),var(--accent2)); display:flex; align-items:center; justify-content:center; }
.ltv-flag-all::after { content:'📺'; font-size:40px; }
.ltv-flag-unmapped { background:linear-gradient(135deg,var(--surface),var(--card)); display:flex; align-items:center; justify-content:center; }
.ltv-flag-unmapped::after { content:'🌐'; font-size:40px; }
.ltv-flag-import { background:linear-gradient(135deg,#1a3a2a,#0a2018); display:flex; align-items:center; justify-content:center; }
.ltv-flag-import::after { content:'📥'; font-size:40px; }
.ltv-import-m3u { border-style:dashed !important; }
.ltv-import-m3u:hover { border-color:var(--accent) !important; }

/* Channels header (Step 2) */
#livetv-channels-header { display:flex; align-items:center; gap:14px; margin-bottom:20px; padding-bottom:16px; border-bottom:1px solid var(--border); }
#livetv-back-btn { background:var(--card); border:1px solid var(--border); color:var(--text); border-radius:8px; padding:8px 16px; font-family:'Space Mono',monospace; font-size:11px; font-weight:700; letter-spacing:0.5px; cursor:pointer; transition:all 0.15s; display:flex; align-items:center; gap:6px; }
#livetv-back-btn::before { content:'\2190'; font-size:14px; }
#livetv-back-btn:hover { border-color:var(--accent); color:var(--accent); }
#livetv-country-title { font-family:'Syne',sans-serif; font-weight:800; font-size:20px; color:var(--text); display:flex; align-items:center; gap:10px; }

/* Category bar */
#livetv-category-bar { display:flex; flex-wrap:wrap; gap:6px; margin-bottom:20px; }
.ltv-cat-btn { background:var(--card); border:1px solid var(--border); color:var(--muted); border-radius:8px; padding:6px 14px; font-family:'Space Mono',monospace; font-size:10px; font-weight:700; letter-spacing:0.5px; cursor:pointer; transition:all 0.15s; }
.ltv-cat-btn:hover { border-color:var(--accent); color:var(--text); background:#4361ee0a; }
.ltv-cat-btn.active { background:var(--accent2); border-color:var(--accent2); color:#fff; }

/* Grid */
#livetv-grid { display:grid; grid-template-columns:repeat(5,1fr); gap:16px; animation:slideUp 0.3s ease; }
@media(max-width:1400px) { #livetv-grid { grid-template-columns:repeat(4,1fr); } }
@media(max-width:1100px) { #livetv-grid { grid-template-columns:repeat(3,1fr); } }
@media(max-width:800px)  { #livetv-grid { grid-template-columns:repeat(2,1fr); } }
@media(max-width:500px)  { #livetv-grid { grid-template-columns:1fr; } }

/* Card */
.ltv-card { background:var(--card); border:1px solid var(--border); border-radius:10px; overflow:hidden; cursor:pointer; transition:transform 0.18s,border-color 0.18s,box-shadow 0.18s; }
.ltv-card:hover { transform:translateY(-4px); border-color:var(--accent); box-shadow:0 8px 32px #4361ee22; }

/* Thumbnail */
.ltv-thumb { aspect-ratio:16/9; background:var(--surface); position:relative; overflow:hidden; display:flex; align-items:center; justify-content:center; }
.ltv-thumb img:not(.ltv-live-logo) { width:100%; height:100%; object-fit:cover; display:block; }
.ltv-thumb img.ltv-logo-fit { object-fit:contain; padding:36px; background:linear-gradient(135deg,#0d0d18,#131326); }
.ltv-thumb img.ltv-prog-bg { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; opacity:0.4; }
.ltv-thumb-placeholder { width:100%; height:100%; display:flex; align-items:center; justify-content:center; font-family:'Syne',sans-serif; font-weight:800; font-size:48px; color:var(--border); background:linear-gradient(135deg,var(--surface),var(--card)); }
.ltv-live-badge { position:absolute; top:8px; left:8px; background:#ef4444dd; color:#fff; font-family:'Space Mono',monospace; font-size:9px; font-weight:700; letter-spacing:1px; padding:3px 8px; border-radius:4px; backdrop-filter:blur(4px); }
.ltv-live-logo { position:absolute; top:8px; left:8px; width:96px; height:96px; object-fit:contain; border-radius:4px; padding:3px; filter:drop-shadow(0 2px 6px rgba(0,0,0,0.6)); }

/* Info section */
.ltv-info { padding:12px 14px 14px; }
.ltv-name { font-family:'Syne',sans-serif; font-weight:700; font-size:14px; color:var(--text); margin-bottom:8px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }

/* Now playing */
.ltv-now { display:flex; align-items:baseline; gap:6px; margin-bottom:4px; }
.ltv-now-label { font-family:'Space Mono',monospace; font-size:9px; font-weight:700; letter-spacing:1px; color:#22c55e; background:#22c55e18; padding:2px 6px; border-radius:3px; flex-shrink:0; }
.ltv-now-title { font-family:'DM Sans',sans-serif; font-size:13px; color:var(--text); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; flex:1; }
.ltv-desc { font-family:'Space Mono',monospace; font-size:10px; color:var(--muted); line-height:1.5; margin-bottom:8px; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; min-height:30px; }

/* Progress bar */
.ltv-progress { height:4px; background:var(--surface); border-radius:2px; overflow:hidden; margin-bottom:4px; }
.ltv-progress-fill { height:100%; background:linear-gradient(90deg,#f59e0b,#ef4444); border-radius:2px; transition:width 1s linear; }

/* Time range */
.ltv-time-range { display:flex; justify-content:space-between; font-family:'Space Mono',monospace; font-size:9px; color:var(--dim); margin-bottom:8px; }

/* Next program */
.ltv-next { display:flex; align-items:baseline; gap:6px; }
.ltv-next-label { font-family:'Space Mono',monospace; font-size:9px; font-weight:700; letter-spacing:1px; color:#eab308; background:#eab30818; padding:2px 6px; border-radius:3px; flex-shrink:0; }
.ltv-next-title { font-family:'DM Sans',sans-serif; font-size:12px; color:var(--muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; flex:1; }
.ltv-next-time { font-family:'Space Mono',monospace; font-size:10px; color:var(--dim); flex-shrink:0; }

/* No EPG state */
.ltv-no-epg { font-family:'Space Mono',monospace; font-size:10px; color:var(--dim); padding:8px 0; }

/* ── LIVE TV ADMIN BAR ── */
.ltv-admin-bar { display:flex; gap:6px; margin-top:10px; padding-top:8px; border-top:1px solid var(--border); }
.ltv-admin-btn { flex:1; background:var(--surface); border:1px solid var(--border); border-radius:6px; padding:6px 0; font-family:'Space Mono',monospace; font-size:10px; font-weight:700; letter-spacing:1px; color:var(--text); cursor:pointer; transition:all .15s; display:flex; align-items:center; justify-content:center; }
.ltv-admin-edit:hover { background:var(--accent); border-color:var(--accent); color:#fff; }
.ltv-admin-del { color:#ef4444; border-color:#ef444433; }
.ltv-admin-del:hover { background:#ef4444; border-color:#ef4444; color:#fff; }

/* ── LIVE TV MOBILE ── */
@media(max-width:768px) {
  #livetv-page { padding:12px 10px 80px; }
  #livetv-countries-grid { grid-template-columns:repeat(auto-fill,minmax(120px,1fr)); gap:10px; }
  .ltv-flag-info { padding:8px 8px 10px; }
  .ltv-flag-name { font-size:11px; }
  #livetv-channels-header { margin-bottom:12px; padding-bottom:10px; gap:10px; }
  #livetv-country-title { font-size:16px; }
  .ltv-name { font-size:12px; }
  .ltv-now-title { font-size:11px; }
  .ltv-desc { font-size:9px; -webkit-line-clamp:1; min-height:15px; }
  .ltv-next-title { font-size:10px; }
  /* Channel Manager mobile */
  .cm-row-card { flex-direction:column; align-items:stretch; gap:10px; }
  .cm-row-right { flex-wrap:wrap; }
  .cm-url-input { width:100%; flex:1; }
  .cm-add-row { flex-direction:column; }
  .cm-add-row input, .cm-add-row select { width:100%; }
  .cm-add-row .searchable-select { flex:1 !important; }
  .cm-mass-toolbar { flex-direction:column; align-items:stretch; }
  .cm-mass-actions { flex-direction:column; }
  .searchable-dropdown { max-height:180px; }
  #livetv-category-bar { gap:4px; margin-bottom:12px; }
  .ltv-cat-btn { padding:4px 10px; font-size:9px; }
}

/* ── REPORT BUTTON ── */
.report-btn { background:transparent; border:1px solid var(--border); color:var(--muted); font-family:'Space Mono',monospace; font-size:11px; font-weight:700; letter-spacing:1px; padding:10px 20px; border-radius:8px; cursor:pointer; transition:all 0.18s; }
.report-btn:hover { border-color:#ef4444; color:#ef4444; background:#ef444418; }
.admin-check-src-btn { display:none; background:transparent; border:1px solid #4361ee66; color:#4361ee; font-family:'Space Mono',monospace; font-size:11px; font-weight:700; letter-spacing:1px; padding:10px 20px; border-radius:8px; cursor:pointer; transition:all 0.18s; }
.admin-check-src-btn:hover { border-color:#4361ee; background:#4361ee22; }
body.admin-mode .admin-check-src-btn { display:inline-flex; align-items:center; gap:6px; }
/* Source check modal */
#src-check-modal { display:none; position:fixed; inset:0; background:rgba(0,0,0,0.75); z-index:9000; align-items:center; justify-content:center; }
#src-check-modal.open { display:flex; }
#src-check-box { background:var(--surface,#111); border:1px solid var(--border,#222); border-radius:14px; width:520px; max-width:95vw; max-height:80vh; display:flex; flex-direction:column; overflow:hidden; }
#src-check-header { display:flex; align-items:center; justify-content:space-between; padding:14px 18px; border-bottom:1px solid var(--border,#222); }
#src-check-title { font-family:'Space Mono',monospace; font-size:12px; font-weight:700; letter-spacing:2px; color:var(--text,#fff); }
#src-check-close { background:none; border:none; color:var(--muted,#888); font-size:18px; cursor:pointer; padding:0 4px; line-height:1; }
#src-check-close:hover { color:#fff; }
#src-check-meta { padding:10px 18px 6px; font-family:'Space Mono',monospace; font-size:10px; color:var(--muted,#888); border-bottom:1px solid var(--border,#222); }
#src-check-rows { overflow-y:auto; flex:1; padding:8px 10px; display:flex; flex-direction:column; gap:6px; }
/* Server group */
.src-chk-srv { border:1px solid rgba(255,255,255,0.07); border-radius:8px; overflow:hidden; }
.src-chk-srv-header { display:flex; align-items:center; gap:8px; padding:8px 10px; background:rgba(255,255,255,0.03); }
.src-chk-icon { font-size:13px; width:16px; text-align:center; flex-shrink:0; color:rgba(255,255,255,0.25); }
.src-chk-name { font-family:'Space Mono',monospace; font-size:11px; font-weight:700; color:var(--text,#fff); flex:1; }
.src-chk-lang { font-family:'Space Mono',monospace; font-size:9px; color:rgba(255,255,255,0.3); flex-shrink:0; }
.src-chk-count { font-family:'Space Mono',monospace; font-size:9px; font-weight:700; flex-shrink:0; color:rgba(255,255,255,0.3); }
/* Individual source rows */
.src-chk-sources { display:flex; flex-direction:column; }
.src-chk-src-row { display:flex; align-items:center; gap:8px; padding:7px 10px; cursor:pointer; transition:background 0.13s; border-top:1px solid rgba(255,255,255,0.05); }
.src-chk-src-row:hover { background:rgba(67,97,238,0.18); }
.src-chk-src-idx { font-family:'Space Mono',monospace; font-size:9px; color:rgba(255,255,255,0.3); width:16px; text-align:right; flex-shrink:0; }
.src-chk-src-qual { font-family:'Space Mono',monospace; font-size:9px; font-weight:700; color:#4ade80; flex-shrink:0; min-width:48px; }
.src-chk-src-host { font-family:'Space Mono',monospace; font-size:9px; color:rgba(255,255,255,0.55); flex:1; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.src-chk-src-play { font-family:'Space Mono',monospace; font-size:9px; font-weight:700; color:#4361ee; flex-shrink:0; opacity:0; transition:opacity 0.13s; }
.src-chk-src-row:hover .src-chk-src-play { opacity:1; }
.src-chk-err { font-family:'Space Mono',monospace; font-size:9px; color:#f87171; padding:6px 10px; }
.player-report-btn { background:transparent; border:1px solid rgba(255,255,255,0.2); color:rgba(255,255,255,0.6); font-family:'Space Mono',monospace; font-size:10px; font-weight:700; letter-spacing:1px; padding:6px 14px; border-radius:6px; cursor:pointer; transition:all 0.18s; margin-left:auto; }
.player-report-btn:hover { border-color:#ef4444; color:#ef4444; background:#ef444418; }

/* ── TRAILER BUTTON ── */
#detail-trailer-btn { display:inline-flex; align-items:center; gap:8px; padding:10px 20px; cursor:pointer; background:#e11d48; border:none; border-radius:8px; color:#fff; font-family:'Space Mono',monospace; font-size:11px; font-weight:700; letter-spacing:1px; transition:background .15s,transform .15s; box-shadow:0 4px 16px #e11d4844; }
#detail-trailer-btn:hover { background:#be123c; transform:translateY(-2px); }

/* ── TRAILER MODAL ── */
#trailer-modal { position:fixed; inset:0; background:rgba(0,0,0,0.85); z-index:9998; display:flex; align-items:center; justify-content:center; backdrop-filter:blur(8px); -webkit-backdrop-filter:blur(8px); }
#trailer-modal-inner { width:92%; max-width:900px; background:var(--card); border:1px solid var(--border); border-radius:14px; overflow:hidden; animation:trailerSlideIn .25s ease; box-shadow:0 24px 80px rgba(0,0,0,.6); }
#trailer-modal-top { display:flex; align-items:center; justify-content:space-between; padding:14px 18px; border-bottom:1px solid var(--border); }
#trailer-modal-title { font-family:'Space Mono',monospace; font-size:12px; font-weight:700; letter-spacing:1.5px; color:var(--text); }
#trailer-modal-close { background:none; border:none; color:var(--muted); font-size:22px; cursor:pointer; padding:0 4px; line-height:1; transition:color .15s; }
#trailer-modal-close:hover { color:#e11d48; }
#trailer-modal-body { position:relative; width:100%; padding-top:56.25%; background:#000; }
#trailer-iframe { position:absolute; top:0; left:0; width:100%; height:100%; border:none; }
@keyframes trailerSlideIn { from { transform:scale(.92) translateY(20px); opacity:0; } to { transform:scale(1) translateY(0); opacity:1; } }

/* ── REPORT MODAL ── */
#report-modal { position:fixed; inset:0; background:rgba(0,0,0,0.7); z-index:9999; display:flex; align-items:center; justify-content:center; backdrop-filter:blur(4px); }
.report-modal-inner { background:var(--card); border:1px solid var(--border); border-radius:14px; padding:28px; width:90%; max-width:440px; }
.report-modal-title { font-family:'Syne',sans-serif; font-weight:800; font-size:18px; color:var(--text); margin-bottom:12px; letter-spacing:1px; }
.report-subject { font-family:'DM Sans',sans-serif; font-size:13px; color:var(--accent); margin-bottom:16px; padding:8px 12px; background:var(--surface); border-radius:6px; }
.report-label { font-family:'Space Mono',monospace; font-size:10px; font-weight:700; letter-spacing:1px; color:var(--muted); display:block; margin-bottom:6px; }
.report-submit-btn { background:var(--accent); color:#fff; border:none; font-family:'Space Mono',monospace; font-size:11px; font-weight:700; letter-spacing:1px; padding:10px 24px; border-radius:8px; cursor:pointer; transition:all 0.18s; }
.report-submit-btn:hover { background:var(--accent2); transform:scale(1.03); }

/* ── ADMIN REPORTS ── */
.rpt-card { background:var(--surface); border:1px solid var(--border); border-radius:10px; padding:16px; margin-bottom:10px; transition:all 0.15s; }
.rpt-card.resolved { opacity:0.5; }
.rpt-header { display:flex; align-items:center; gap:10px; margin-bottom:8px; flex-wrap:wrap; }
.rpt-type { font-family:'Space Mono',monospace; font-size:9px; font-weight:700; letter-spacing:1px; color:#fff; padding:3px 8px; border-radius:4px; text-transform:uppercase; }
.rpt-title { font-family:'Syne',sans-serif; font-weight:700; font-size:14px; color:var(--text); flex:1; }
.rpt-time { font-family:'Space Mono',monospace; font-size:10px; color:var(--dim); }
.rpt-reason { font-family:'DM Sans',sans-serif; font-size:13px; color:var(--accent); margin-bottom:4px; }
.rpt-details { font-family:'DM Sans',sans-serif; font-size:12px; color:var(--muted); margin-bottom:8px; line-height:1.5; }
.rpt-actions { display:flex; gap:6px; }
.rpt-del-btn:hover { border-color:#ef4444 !important; color:#ef4444 !important; }
.rpt-filter-btn.active { background:var(--accent) !important; color:#fff !important; border-color:var(--accent) !important; }
.rpt-meta { display:flex; gap:6px; flex-wrap:wrap; margin-bottom:8px; }
.rpt-meta-tag { font-family:'Space Mono',monospace; font-size:10px; color:var(--text); background:var(--card); border:1px solid var(--border); padding:2px 8px; border-radius:4px; }
.rpt-block-btn:hover { border-color:#ef4444 !important; color:#ef4444 !important; }
.rpt-override-btn:hover { border-color:#22c55e !important; color:#22c55e !important; }
.rpt-override-form { display:flex; gap:8px; margin-top:10px; padding-top:10px; border-top:1px solid var(--border); align-items:center; }
.rpt-override-url { flex:1; }
.rpt-override-quality { width:120px; flex:0 0 120px; }

/* ── ADMIN MOBILE ── */
@media (max-width:768px) {
  .ap-sidebar { width:100%; border-right:none; border-bottom:1px solid var(--border); padding:16px 0 0; flex-direction:row; flex-wrap:wrap; align-items:center; }
  .ap-brand { padding:0 16px 12px; border-bottom:none; margin-bottom:0; flex-basis:100%; }
  .ap-nav-btn { padding:10px 16px; font-size:13px; border-left:none; border-bottom:2px solid transparent; flex-shrink:0; }
  .ap-nav-btn.active { border-left-color:transparent; border-bottom-color:var(--accent); }
  .ap-sidebar-spacer { display:none; }
  .ap-nav-close { border-top:none; padding:10px 16px; margin-left:auto; }
  #admin-panel.show { flex-direction:column; }
  .ap-main { padding:20px 16px; }
  .ap-section-head h2 { font-size:18px; }
}

/* ── NEW FEATURES ── */

/* Scroll to top */
#scroll-top-btn{position:fixed;bottom:24px;right:24px;width:44px;height:44px;border-radius:50%;background:var(--accent);color:#fff;border:none;font-size:20px;cursor:pointer;display:none;align-items:center;justify-content:center;z-index:60;box-shadow:0 4px 16px #0008;transition:opacity .2s;}
#scroll-top-btn.show{display:flex;}

/* Recently viewed row */
.rv-row{display:flex;gap:10px;overflow-x:auto;padding-bottom:12px;margin-bottom:16px;scrollbar-width:thin;}
.rv-card{flex-shrink:0;width:100px;cursor:pointer;text-align:center;}
.rv-card img{width:100px;height:150px;object-fit:cover;border-radius:8px;border:1px solid var(--border);}
.rv-card .rv-title{font-size:10px;color:var(--muted);margin-top:4px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-family:'Space Mono',monospace;}

/* Watchlist button */
.wl-btn{background:transparent;border:1px solid var(--accent);color:var(--accent);border-radius:8px;padding:10px 20px;cursor:pointer;font-family:'Space Mono',monospace;font-size:11px;letter-spacing:1px;transition:all .2s;}
.wl-btn:hover,.wl-btn.in-wl{background:var(--accent);color:#fff;}

/* Player speed select */
.ctrl-speed{background:var(--card);color:var(--text);border:1px solid var(--border);border-radius:6px;padding:4px 6px;font-size:11px;font-family:'Space Mono',monospace;cursor:pointer;}

/* Person modal */
#person-modal{position:fixed;inset:0;background:#000b;z-index:200;display:flex;align-items:center;justify-content:center;padding:20px;}
#person-inner{background:var(--surface);border:1px solid var(--border);border-radius:16px;max-width:600px;width:100%;max-height:80vh;overflow-y:auto;padding:28px;position:relative;}
.person-head{display:flex;gap:20px;margin-bottom:20px;}
.person-avatar{width:120px;height:120px;border-radius:50%;object-fit:cover;border:2px solid var(--border);}
.person-filmography{display:grid;grid-template-columns:repeat(auto-fill,minmax(100px,1fr));gap:10px;margin-top:16px;}
.person-film-card{cursor:pointer;text-align:center;}
.person-film-card img{width:100%;aspect-ratio:2/3;object-fit:cover;border-radius:8px;border:1px solid var(--border);}
.person-film-card .pf-title{font-size:10px;color:var(--muted);margin-top:4px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-family:'Space Mono',monospace;}

/* Channel favourites star */
.ltv-fav-btn{position:absolute;top:6px;right:6px;background:#000a;border:none;font-size:18px;cursor:pointer;border-radius:50%;width:28px;height:28px;display:flex;align-items:center;justify-content:center;z-index:2;}
.ltv-thumb{position:relative;}

/* Skeleton loading */
.skeleton-card{background:var(--card);border-radius:12px;overflow:hidden;animation:skeletonPulse 1.2s ease-in-out infinite;}
.skeleton-poster{width:100%;aspect-ratio:2/3;background:var(--border);}
.skeleton-text{height:12px;background:var(--border);border-radius:4px;margin:10px;}

/* View toggle */
.view-toggle{display:flex;gap:4px;margin-left:auto;}
.view-toggle button{background:var(--card);border:1px solid var(--border);color:var(--muted);padding:6px 10px;cursor:pointer;border-radius:6px;font-size:11px;}
.view-toggle button.active{background:var(--accent);color:#fff;border-color:var(--accent);}
#grid.list-view{display:flex!important;flex-direction:column;gap:8px;}
#grid.list-view .card{display:flex;flex-direction:row;height:80px;}
#grid.list-view .card-poster{width:55px;min-width:55px;height:80px;}
#grid.list-view .card-poster img{height:80px;width:55px;}
#grid.list-view .card-info{display:flex;flex-direction:column;justify-content:center;padding:8px 12px;}
#grid.list-view .card-rating{font-size:10px;}

/* Theme colors */
body.theme-blue{--accent:#4361ee;}
body.theme-purple{--accent:#7c3aed;}
body.theme-red{--accent:#ef4444;}
body.theme-green{--accent:#22c55e;}
body.theme-orange{--accent:#f97316;}
body.theme-pink{--accent:#ec4899;}

/* Double-tap seek overlay */
.dtap-overlay{position:absolute;top:50%;transform:translateY(-50%);color:#fff;font-size:14px;font-family:'Syne',sans-serif;font-weight:700;pointer-events:none;animation:dtapFade .6s forwards;z-index:20;}
.dtap-overlay.left{left:15%;}
.dtap-overlay.right{right:15%;}

/* Admin backup/analytics */
.ap-stats-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(160px,1fr));gap:12px;margin-bottom:20px;}
.ap-stat-card{background:var(--card);border:1px solid var(--border);border-radius:10px;padding:16px;text-align:center;}
.ap-stat-num{font-family:'Syne',sans-serif;font-size:28px;font-weight:800;color:var(--accent);}
.ap-stat-label{font-family:'Space Mono',monospace;font-size:10px;color:var(--muted);margin-top:4px;letter-spacing:1px;}

/* Activity log */
.ap-log-item{display:flex;gap:12px;padding:10px 0;border-bottom:1px solid var(--border);font-family:'Space Mono',monospace;font-size:11px;}
.ap-log-time{color:var(--muted);white-space:nowrap;}
.ap-log-msg{color:var(--text);}

/* Subtitle styling panel */
#sub-style-panel{position:absolute;bottom:100px;right:20px;background:#0f0f23ee;border:1px solid var(--border);border-radius:10px;padding:14px;display:none;z-index:22;min-width:220px;backdrop-filter:blur(10px);}
#sub-style-panel.open{display:block;}
#sub-style-panel label{display:block;font-family:'Space Mono',monospace;font-size:10px;color:var(--muted);margin-bottom:4px;letter-spacing:1px;}
#sub-style-panel select,#sub-style-panel input[type=range],#sub-style-panel input[type=color]{width:100%;margin-bottom:10px;padding:5px 8px;font-size:11px;border-radius:6px;border:1px solid var(--border);background:var(--card);color:var(--text);font-family:'Space Mono',monospace;cursor:pointer;}
#sub-style-panel input[type=color]{height:28px;padding:2px;}
#sub-style-panel input[type=range]{height:4px;-webkit-appearance:none;background:var(--border);border:none;}
#sub-style-panel input[type=range]::-webkit-slider-thumb{-webkit-appearance:none;width:14px;height:14px;border-radius:50%;background:var(--accent);cursor:pointer;}
.sub-style-btn{background:transparent;border:1px solid var(--border);color:var(--muted);border-radius:6px;padding:4px 10px;cursor:pointer;font-family:'Space Mono',monospace;font-size:10px;}
.sub-style-btn:hover{border-color:var(--accent);color:var(--text);}

/* TV Guide Grid */
#tvguide-modal{position:fixed;inset:0;background:#000e;z-index:180;display:none;flex-direction:column;}
#tvguide-modal.open{display:flex;}
.tvg-topbar{display:flex;align-items:center;gap:12px;padding:12px 20px;border-bottom:1px solid var(--border);background:var(--surface);}
.tvg-topbar h3{font-family:'Syne',sans-serif;font-weight:800;font-size:16px;flex:1;}
.tvg-close{background:var(--card);border:1px solid var(--border);color:var(--text);width:32px;height:32px;border-radius:50%;cursor:pointer;font-size:16px;display:flex;align-items:center;justify-content:center;}
.tvg-body{flex:1;overflow:auto;position:relative;}
.tvg-timeline{display:flex;position:sticky;top:0;z-index:3;background:var(--surface);border-bottom:1px solid var(--border);padding-left:140px;min-width:max-content;}
.tvg-time-slot{flex-shrink:0;width:200px;padding:8px 12px;font-family:'Space Mono',monospace;font-size:10px;color:var(--muted);border-right:1px solid var(--border);}
.tvg-row{display:flex;min-height:56px;border-bottom:1px solid var(--border);min-width:max-content;}
.tvg-ch{width:140px;flex-shrink:0;display:flex;align-items:center;gap:8px;padding:6px 10px;position:sticky;left:0;background:var(--bg);z-index:2;border-right:1px solid var(--border);}
.tvg-ch img{width:28px;height:28px;border-radius:4px;object-fit:contain;background:var(--card);}
.tvg-ch-name{font-family:'Space Mono',monospace;font-size:10px;color:var(--text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.tvg-programs{display:flex;position:relative;flex:1;}
.tvg-prog{position:absolute;top:2px;bottom:2px;background:var(--card);border:1px solid var(--border);border-radius:6px;padding:4px 8px;overflow:hidden;cursor:pointer;transition:border-color .15s,background .15s;}
.tvg-prog:hover{border-color:var(--accent);background:var(--accent)11;}
.tvg-prog.now{background:#4361ee18;border-color:var(--accent);}
.tvg-prog-title{font-family:'Space Mono',monospace;font-size:10px;color:var(--text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.tvg-prog-time{font-family:'Space Mono',monospace;font-size:9px;color:var(--muted);white-space:nowrap;}

/* Multi-view */
#multiview-container{position:fixed;inset:0;background:var(--bg);z-index:170;display:none;flex-wrap:wrap;}
#multiview-container.open{display:flex;}
.mv-cell{position:relative;border:1px solid var(--border);overflow:hidden;background:#000;}
.mv-cell video{width:100%;height:100%;object-fit:contain;}
.mv-cell-label{position:absolute;top:6px;left:8px;background:#000b;color:#fff;padding:3px 8px;border-radius:4px;font-family:'Space Mono',monospace;font-size:10px;z-index:2;pointer-events:none;}
.mv-cell-close{position:absolute;top:6px;right:8px;background:#000b;color:#fff;border:none;width:24px;height:24px;border-radius:50%;cursor:pointer;font-size:14px;display:flex;align-items:center;justify-content:center;z-index:2;}
.mv-toolbar{position:fixed;bottom:16px;left:50%;transform:translateX(-50%);display:flex;gap:8px;z-index:175;background:var(--surface);border:1px solid var(--border);border-radius:10px;padding:8px 14px;}
.mv-toolbar button{background:var(--card);border:1px solid var(--border);color:var(--text);border-radius:6px;padding:6px 14px;cursor:pointer;font-family:'Space Mono',monospace;font-size:11px;}
.mv-toolbar button:hover{border-color:var(--accent);color:var(--accent);}

/* Onboarding */
.ob-overlay{position:fixed;inset:0;background:rgba(0,0,0,.75);z-index:300;pointer-events:none;}
.ob-highlight{position:fixed;z-index:301;border:2px solid var(--accent);border-radius:8px;box-shadow:0 0 0 9999px rgba(0,0,0,.7);pointer-events:none;transition:all .3s ease;}
.ob-tooltip{position:fixed;z-index:302;background:var(--surface);border:1px solid var(--accent);border-radius:10px;padding:16px 20px;max-width:300px;box-shadow:0 8px 32px #000a;pointer-events:auto;}
.ob-tooltip h4{font-family:'Syne',sans-serif;font-weight:700;font-size:14px;margin-bottom:6px;color:var(--text);}
.ob-tooltip p{font-family:'Space Mono',monospace;font-size:11px;color:var(--muted);line-height:1.5;margin-bottom:12px;}
.ob-tooltip-btns{display:flex;gap:8px;justify-content:flex-end;}
.ob-tooltip-btns button{padding:6px 14px;border-radius:6px;cursor:pointer;font-family:'Space Mono',monospace;font-size:11px;border:1px solid var(--border);}
.ob-btn-next{background:var(--accent);color:#fff;border-color:var(--accent)!important;}
.ob-btn-skip{background:transparent;color:var(--muted);}

/* Continue Watching */
.cw-card{flex-shrink:0;width:140px;cursor:pointer;text-align:center;position:relative;}
.cw-card img{width:140px;height:210px;object-fit:cover;border-radius:8px;border:1px solid var(--border);}
.cw-card .cw-title{font-size:10px;color:var(--muted);margin-top:4px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-family:'Space Mono',monospace;}
.cw-card .cw-progress{position:absolute;bottom:28px;left:4px;right:4px;height:3px;background:rgba(255,255,255,.15);border-radius:2px;overflow:hidden;}
.cw-card .cw-progress-fill{height:100%;background:var(--accent);border-radius:2px;}
.cw-card .cw-ep{position:absolute;top:6px;left:6px;background:#000a;padding:2px 6px;border-radius:4px;font-size:9px;color:#fff;font-family:'Space Mono',monospace;}
.cw-card .cw-remove{position:absolute;top:4px;right:4px;background:#000a;color:#fff;border:none;width:20px;height:20px;border-radius:50%;font-size:11px;cursor:pointer;display:none;align-items:center;justify-content:center;}
.cw-card:hover .cw-remove{display:flex;}

/* Search Autocomplete */
.search-ac-dropdown{position:absolute;top:100%;left:0;right:0;max-width:400px;background:var(--card);border:1px solid var(--border);border-radius:0 0 10px 10px;z-index:50;max-height:360px;overflow-y:auto;box-shadow:0 8px 24px #000a;}
.search-ac-item{display:flex;align-items:center;gap:10px;padding:8px 12px;cursor:pointer;font-family:'Space Mono',monospace;font-size:11px;color:var(--text);transition:background .15s;}
.search-ac-item:hover{background:var(--surface);}
.search-ac-item img{width:36px;height:54px;object-fit:cover;border-radius:4px;flex-shrink:0;}
.search-ac-item .ac-info{overflow:hidden;}
.search-ac-item .ac-title{font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.search-ac-item .ac-meta{font-size:9px;color:var(--muted);margin-top:2px;}

/* Share & Trailer buttons */
.share-btn,.trailer-btn{background:var(--card);border:1px solid var(--border);color:var(--text);padding:8px 16px;border-radius:8px;cursor:pointer;font-family:'Space Mono',monospace;font-size:11px;transition:all .2s;}
.share-btn:hover,.trailer-btn:hover{border-color:var(--accent);color:var(--accent);}
.trailer-btn{border-color:var(--accent);color:var(--accent);}

/* Genre Browse */
.genre-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(160px,1fr));gap:12px;padding:10px 0;}
.genre-card{background:linear-gradient(135deg,var(--card),var(--surface));border:1px solid var(--border);border-radius:12px;padding:24px 16px;text-align:center;cursor:pointer;font-family:'Syne',sans-serif;font-weight:700;font-size:14px;transition:all .2s;position:relative;overflow:hidden;}
.genre-card:hover{border-color:var(--accent);transform:translateY(-2px);box-shadow:0 4px 16px #0005;}
.genre-card .genre-icon{font-size:28px;margin-bottom:8px;}
.genre-card .genre-count{font-family:'Space Mono',monospace;font-size:10px;color:var(--muted);margin-top:4px;}

/* Progress bar overlay on cards */
.card-progress{position:absolute;bottom:0;left:0;right:0;height:3px;background:rgba(255,255,255,.15);}
.card-progress-fill{height:100%;background:var(--accent);border-radius:0 2px 0 0;}

/* Quality Badge */
#quality-badge{position:absolute;top:8px;right:8px;z-index:12;padding:3px 8px;border-radius:4px;font-family:'Space Mono',monospace;font-size:10px;font-weight:700;color:#fff;pointer-events:none;letter-spacing:0.5px;}

/* Admin Rankings / Server+Cache sections */
.admin-row{display:flex;align-items:center;gap:12px;padding:10px 14px;background:var(--card);border:1px solid var(--border);border-radius:8px;}
.admin-rank{font-family:'Space Mono',monospace;font-size:11px;color:var(--accent);min-width:24px;}
.admin-server{font-family:'Syne',sans-serif;font-weight:700;font-size:14px;color:var(--text);flex:1;}
.admin-bar-wrap{flex:2;height:6px;background:#ffffff0a;border-radius:3px;overflow:hidden;}
.admin-bar{height:100%;background:var(--accent);border-radius:3px;transition:width 0.4s;}
.admin-hits{font-family:'Space Mono',monospace;font-size:10px;color:var(--dim);min-width:48px;text-align:right;}
.admin-btn{background:#ffffff0a;border:1px solid var(--border);border-radius:8px;color:var(--muted);cursor:pointer;font-family:'Space Mono',monospace;font-size:11px;padding:8px 16px;transition:all 0.15s;letter-spacing:.5px;}
.admin-btn:hover{border-color:var(--accent);color:#fff;}
.admin-btn.danger{border-color:#f8717122;}
.admin-btn.danger:hover{border-color:#f87171;color:#f87171;}
.admin-stat{display:flex;align-items:center;justify-content:space-between;padding:10px 14px;background:var(--card);border:1px solid var(--border);border-radius:8px;}
.admin-stat-label{font-family:'Space Mono',monospace;font-size:11px;color:var(--muted);}
.admin-stat-val{font-family:'Syne',sans-serif;font-weight:700;font-size:16px;color:var(--text);}

/* Player Episode List (template override) */
#player-ep-list{position:absolute;top:0;right:0;width:420px;height:100%;background:var(--bg);border-left:1px solid var(--border);z-index:20;display:flex;flex-direction:column;overflow:hidden;}
#pep-header{display:flex;align-items:center;justify-content:space-between;padding:14px 18px 12px;border-bottom:1px solid var(--border);flex-shrink:0;background:var(--surface);}
#pep-title{font-family:'Syne',sans-serif;font-weight:800;font-size:16px;color:var(--text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;flex:1;margin-right:10px;}
#pep-close{background:var(--card);border:1px solid var(--border);color:var(--muted);cursor:pointer;font-size:16px;width:32px;height:32px;display:flex;align-items:center;justify-content:center;border-radius:8px;transition:all .15s;}
#pep-close:hover{color:#fff;background:var(--border);border-color:var(--accent);}
#pep-seasons{display:flex;gap:6px;padding:12px 18px;flex-wrap:wrap;border-bottom:1px solid var(--border);flex-shrink:0;background:var(--surface);}
.pep-season-btn{background:var(--card);border:1px solid var(--border);border-radius:8px;color:var(--muted);cursor:pointer;font-family:'Space Mono',monospace;font-size:12px;padding:6px 14px;transition:all .15s;}
.pep-season-btn:hover{border-color:var(--accent);color:var(--text);}
.pep-season-btn.active{border-color:var(--accent);color:var(--accent);background:#6366f115;}
#pep-episodes{flex:1;overflow-y:auto;scrollbar-width:thin;padding:10px 14px;display:flex;flex-direction:column;gap:6px;}
#pep-episodes .ep-row{padding:8px 12px;gap:12px;border-radius:10px;}
#pep-episodes .ep-big-num{font-size:24px;min-width:32px;}
#pep-episodes .ep-thumb{width:120px;min-width:120px;height:68px;border-radius:7px;}
#pep-episodes .ep-title{font-size:14px;}
#pep-episodes .ep-overview{font-size:11px;-webkit-line-clamp:2;}
#pep-episodes .ep-meta{font-size:10px;}
#pep-episodes .ep-row.playing{background:linear-gradient(135deg,#6366f118,#8b5cf618);border-color:var(--accent);border-left-color:var(--accent);}
#ep-list-btn{font-size:11px!important;font-family:'Space Mono',monospace;letter-spacing:.5px;padding:4px 8px;border:1px solid #333;border-radius:8px;}
#ep-list-btn:hover{border-color:#555;}
@media(max-width:600px){#player-ep-list{width:100%;height:60%;bottom:0;top:auto;border-left:none;border-top:1px solid var(--border);}}

/* Mini-player mode */
#player-overlay.mini{position:fixed;inset:auto 16px 16px auto;width:360px;height:210px;z-index:300;border-radius:12px;overflow:hidden;box-shadow:0 8px 32px #000a;border:1px solid var(--border);cursor:pointer;resize:both;}
#player-overlay.mini #player-body{width:100%;height:100%;}
#player-overlay.mini #player-main{width:100%;height:100%;}
#player-overlay.mini #player-video{width:100%;height:100%;object-fit:cover;}
#player-overlay.mini #mini-player-bar{display:flex!important;position:absolute;top:0;right:0;z-index:310;background:linear-gradient(180deg,#000a,transparent);padding:4px;gap:2px;}
@media(max-width:600px){#player-overlay.mini{width:200px;height:120px;right:8px;bottom:8px;}}

/* ctrl-speed dropdown */
.ctrl-speed{padding:4px 6px;font-size:10px;border-radius:4px;border:1px solid var(--border);background:var(--card);color:var(--muted);font-family:'Space Mono',monospace;cursor:pointer;}

/* Top 10 Numbered List */
.top10-card{position:relative;flex-shrink:0;cursor:pointer;display:flex;align-items:flex-end;width:130px;}
.top10-num{font-family:'Syne',sans-serif;font-weight:800;font-size:80px;line-height:0.8;color:transparent;-webkit-text-stroke:2px var(--accent);position:relative;z-index:1;margin-right:-16px;user-select:none;}
.top10-poster{flex-shrink:0;}
.top10-poster img{width:100px;height:150px;object-fit:cover;border-radius:8px;border:1px solid var(--border);position:relative;z-index:2;}

/* Spotlight banner */
.spotlight-banner:hover{transform:scale(1.005);transition:transform .3s;}

/* ═══════════════════════════════════════════════════════════════════════
   NETFLIX TEMPLATE — 1:1 FAITHFUL RECREATION
   ═══════════════════════════════════════════════════════════════════════ */

/* ── Base variables ── */
body.template-netflix{
  --bg:#141414;--surface:#1a1a1a;--card:#181818;
  --border:#2a2a2a;--accent:#E50914;--accent2:#B20710;
  --text:#e5e5e5;--muted:#808080;--dim:#404040;
  font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;
}
body.template-netflix ::-webkit-scrollbar{width:0;height:0;}
body.template-netflix .rv-row,body.template-netflix #cw-row{scrollbar-width:none;}

/* ── HIDE NON-NETFLIX FEATURES ── */
body.template-netflix #stats-btn,
body.template-netflix #notes-btn,
body.template-netflix #mood-btn,
body.template-netflix #random-pick-btn,
body.template-netflix #lang-picker,
body.template-netflix .card-block-btn,
body.template-netflix .card-badge,
body.template-netflix .card-rating,
body.template-netflix .card-year,
body.template-netflix .share-btn,
body.template-netflix #detail-note-btn,
body.template-netflix #detail-tagline,
body.template-netflix #detail-badges,
body.template-netflix .view-toggle,
body.template-netflix #scroll-top-btn,
body.template-netflix .report-btn,
body.template-netflix .player-report-btn,
body.template-netflix .wl-btn,
body.template-netflix #ob-highlight,
body.template-netflix #ob-tooltip,
body.template-netflix .rv-title,
body.template-netflix .cw-title,
body.template-netflix #trending-region{display:none!important;}

/* Hide tabs that Netflix doesn't have */
body.template-netflix .tab-btn[data-tab="toprated"],
body.template-netflix .tab-btn[data-tab="genres"],
body.template-netflix .tab-btn[data-tab="history"]{display:none!important;}

/* ── HEADER — Netflix style ── */
body.template-netflix #header{
  background:linear-gradient(180deg,rgba(0,0,0,.9) 0%,transparent 100%);
  border-bottom:none;height:68px;padding:0 4%;position:fixed;width:100%;z-index:50;
}
body.template-netflix #logo{
  font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;font-weight:900;font-size:28px;
  color:#E50914;letter-spacing:-1.5px;text-transform:uppercase;
}
body.template-netflix #logo span{color:#E50914!important;}
body.template-netflix .tab-btn{
  font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;font-size:14px;font-weight:400;
  letter-spacing:0;border-bottom:none!important;border-radius:0;padding:8px 10px;color:#e5e5e5;
  text-transform:none;background:transparent!important;
}
body.template-netflix .tab-btn:hover{color:#b3b3b3;}
body.template-netflix .tab-btn.active{color:#fff;font-weight:700;border-bottom:none!important;background:transparent!important;}
body.template-netflix #settings-btn{
  background:transparent!important;border:none!important;color:#e5e5e5!important;font-size:16px!important;padding:6px!important;
}
body.template-netflix #theme-picker-btn{
  background:transparent!important;border:none!important;
}

/* ── BROWSE PAGE ── */
body.template-netflix #browse-page{padding:68px 4% 28px 4%;}

/* ── CONTROLS / SEARCH ── */
body.template-netflix input[type=text]{
  border-radius:0;border:1px solid #fff;background:#141414cc;
  font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;font-size:14px;color:#fff;
  padding:8px 14px;
}
body.template-netflix input[type=text]:focus{border-color:#fff;}
body.template-netflix select{
  border-radius:0;border:1px solid #444;background:transparent;
  font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;font-size:13px;color:#fff;
}
body.template-netflix .btn{
  border-radius:0;font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;font-weight:700;
  letter-spacing:0;font-size:16px;padding:8px 24px;
}
body.template-netflix .btn:hover{background:#f40612;}
body.template-netflix .btn.secondary{background:rgba(109,109,110,.7);border:none;color:#fff;}
body.template-netflix .btn.secondary:hover{background:rgba(109,109,110,.4);}

/* ── GRID — landscape 16:9 layout ── */
body.template-netflix #grid{grid-template-columns:repeat(auto-fill,minmax(230px,1fr));gap:4px 3px;}

/* ── CARDS — Netflix landscape style ── */
body.template-netflix .card{
  border-radius:4px;border:none;background:transparent;overflow:hidden;
  transition:transform .3s ease,z-index 0s .3s;
}
@media(hover:hover) and (pointer:fine){
  body.template-netflix .card:hover{
    transform:scale(1.3);z-index:20;
    box-shadow:0 14px 35px rgba(0,0,0,.85);transition:transform .3s ease,z-index 0s;
  }
}
body.template-netflix .card-poster{border-radius:4px;overflow:hidden;background:#2a2a2a;aspect-ratio:16/9;}
body.template-netflix .card-info{display:none;}

/* ── SECTION TITLES — Netflix ── */
body.template-netflix .section-title{
  font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;font-weight:700;font-size:22px;
  letter-spacing:0;text-transform:none;border-bottom:none;color:#e5e5e5;padding-bottom:4px;margin-bottom:6px;
}

/* ── SPOTLIGHT / HERO BILLBOARD ── */
body.template-netflix #spotlight{padding:0;margin:-68px 0 0;position:relative;z-index:1;}
body.template-netflix .spotlight-banner{
  width:100vw!important;margin-left:calc(-4vw)!important;
}

/* ── ROW SECTIONS ── */
body.template-netflix .rv-row{gap:6px;padding-bottom:4px;margin-bottom:8px;}
body.template-netflix .rv-card{width:230px;border-radius:4px;overflow:hidden;}
body.template-netflix .rv-card img{width:230px;height:130px;object-fit:cover;border-radius:4px;border:none;}
body.template-netflix .rv-card .rv-title{
  font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;font-size:11px;color:#999;margin-top:3px;
}

/* ── CONTINUE WATCHING ── */
body.template-netflix .cw-card{width:230px;border-radius:4px;overflow:visible;}
body.template-netflix .cw-card img{width:230px;height:130px;object-fit:cover;border-radius:4px;border:none;}
body.template-netflix .cw-card .cw-title{
  font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;font-size:11px;color:#999;
}
body.template-netflix .cw-card .cw-progress{bottom:25px;left:0;right:0;height:3px;border-radius:0;background:#333;}
body.template-netflix .cw-card .cw-progress-fill{background:#E50914;}
body.template-netflix .cw-card .cw-ep{font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;border-radius:2px;background:#000c;}

/* ── TOP 10 ── */
body.template-netflix .top10-card{width:260px;align-items:center;}
body.template-netflix .top10-num{-webkit-text-stroke:3px #E50914;font-size:120px;color:transparent;}
body.template-netflix .top10-poster{flex-shrink:0;}
body.template-netflix .top10-poster img{width:200px;height:112px;object-fit:cover;border-radius:4px;border:none;}

/* ── CAROUSEL HOVER — Raddy-style scale + push siblings ── */
@media(hover:hover) and (pointer:fine){
  body.template-netflix .rv-row{overflow:visible;scroll-snap-type:none;padding:20px 0 20px;}
  body.template-netflix .rv-card,
  body.template-netflix .cw-card{scroll-snap-align:unset;transition:transform 250ms ease,margin 250ms ease,opacity 250ms ease;}
  body.template-netflix .top10-card{transition:transform 250ms ease,margin 250ms ease,opacity 250ms ease;}

  body.template-netflix .rv-row .rv-card:hover,
  body.template-netflix .rv-row .cw-card:hover{
    transform:scale(1.2);margin:0 30px;z-index:5;position:relative;
  }
  body.template-netflix .rv-row .top10-card:hover{
    transform:scale(1.15);margin:0 25px;z-index:5;position:relative;
  }

  /* Dim non-hovered siblings */
  body.template-netflix .rv-row:hover .rv-card,
  body.template-netflix .rv-row:hover .cw-card,
  body.template-netflix .rv-row:hover .top10-card{opacity:0.7;}
  body.template-netflix .rv-row:hover .rv-card:hover,
  body.template-netflix .rv-row:hover .cw-card:hover,
  body.template-netflix .rv-row:hover .top10-card:hover{opacity:1;}

  /* First/last card edge behavior */
  body.template-netflix .rv-row .rv-card:first-child:hover,
  body.template-netflix .rv-row .cw-card:first-child:hover,
  body.template-netflix .rv-row .top10-card:first-child:hover{margin-left:0;transform-origin:left center;}
  body.template-netflix .rv-row .rv-card:last-child:hover,
  body.template-netflix .rv-row .cw-card:last-child:hover,
  body.template-netflix .rv-row .top10-card:last-child:hover{margin-right:0;transform-origin:right center;}

  /* GPU hint on hover context */
  body.template-netflix .rv-row:hover .rv-card,
  body.template-netflix .rv-row:hover .cw-card,
  body.template-netflix .rv-row:hover .top10-card{will-change:transform,margin;}
}

/* ── ROW WRAPPER — contains overflow from visible rows ── */
body.template-netflix .nf-row-wrapper{position:relative;overflow:hidden;}

/* ── ROW NAVIGATION ARROWS ── */
body.template-netflix .nf-row-arrow{
  position:absolute;top:0;bottom:0;width:55px;z-index:10;
  display:flex;align-items:center;justify-content:center;
  cursor:pointer;border:none;font-size:28px;color:#fff;
  opacity:0;transition:opacity 200ms ease;background:transparent;
}
body.template-netflix .nf-row-wrapper:hover .nf-row-arrow{opacity:1;}
body.template-netflix .nf-row-arrow.left{left:0;background:linear-gradient(to right,#141414 0%,transparent 100%);}
body.template-netflix .nf-row-arrow.right{right:0;background:linear-gradient(to left,#141414 0%,transparent 100%);}
body.template-netflix .nf-row-arrow:hover{font-size:36px;color:#fff;}

/* ── DETAIL PAGE — Netflix modal style ── */
body.template-netflix #detail-backdrop-fade{
  background:linear-gradient(to bottom,transparent 0%,#141414 90%)!important;
}
body.template-netflix #detail-backdrop img{opacity:0.6;}
body.template-netflix #detail-content{padding:0 4% 60px;}
body.template-netflix #detail-poster{border:none;border-radius:6px;box-shadow:none;display:none;}
body.template-netflix #detail-hero{gap:0;}
body.template-netflix #detail-title{
  font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;font-weight:900;
  font-size:clamp(28px,4vw,56px);text-shadow:2px 2px 4px rgba(0,0,0,.45);
}
body.template-netflix #detail-stats{gap:14px;}
body.template-netflix .detail-stat{
  font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;font-size:14px;
}
body.template-netflix #detail-play-btn{
  background:#fff;color:#000;border-radius:4px;padding:10px 32px;
  font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;font-weight:700;font-size:18px;
  letter-spacing:0;box-shadow:none;
}
body.template-netflix #detail-play-btn:hover{background:#e6e6e6;transform:none;box-shadow:none;}
body.template-netflix #detail-play-btn .play-icon{color:#000;}
body.template-netflix #detail-back-btn{
  border:none;background:rgba(42,42,42,.6);color:#fff;border-radius:50%;
  width:36px;height:36px;padding:0;font-size:18px;display:flex;align-items:center;justify-content:center;
  letter-spacing:0;font-weight:400;position:fixed;top:20px;left:20px;z-index:51;
}
body.template-netflix #detail-back-btn:hover{background:rgba(42,42,42,.9);}
body.template-netflix #detail-overview{
  font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;font-size:16px;color:#d2d2d2;line-height:1.6;
}
body.template-netflix #detail-body{gap:30px;}
body.template-netflix #detail-side{font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;}
body.template-netflix #detail-side-info{font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;font-size:14px;}

/* Netflix episodes */
body.template-netflix .ep-row{
  background:#2a2a2a;border:none;border-radius:0;border-bottom:1px solid #404040;padding:16px;
}
body.template-netflix .ep-row:hover{border-color:#404040;background:#333;}
body.template-netflix .ep-row.playing{background:#333;border-color:#E50914;}
body.template-netflix .season-btn{
  background:transparent;border:none;border-bottom:2px solid transparent;border-radius:0;
  color:#999;font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;font-size:16px;font-weight:700;
  padding:8px 0;margin-right:20px;
}
body.template-netflix .season-btn.active{
  background:transparent;color:#fff;border-color:#E50914;border-bottom:2px solid #E50914;
}
body.template-netflix #episodes-list{gap:0;}
body.template-netflix .ep-thumb{border-radius:4px;}

/* Netflix cast */
body.template-netflix .cast-avatar{border-radius:4px;width:76px;height:76px;}
body.template-netflix .cast-name{font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;font-size:12px;color:#999;}
body.template-netflix .cast-char{font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;font-size:10px;color:#666;}

/* Netflix recommendations */
body.template-netflix #recs-row .card{border-radius:4px;}

/* ── PLAYER — dark chrome ── */
body.template-netflix #player-topbar{font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;}
body.template-netflix #player-title{font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;}
body.template-netflix .ctrl-btn{font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;}

/* ── SPINNER ── */
body.template-netflix .spinner{border-color:#333;border-top-color:#E50914;}

/* ── LIST VIEW ── */
body.template-netflix #grid.list-view .card{border:none;}

/* ── MOBILE RESPONSIVE ── */
@media(max-width:768px){
  body.template-netflix #header{padding:0 12px;height:56px;}
  body.template-netflix #logo{font-size:22px;}
  body.template-netflix .tab-btn{font-size:12px;padding:6px 8px;}
  body.template-netflix #browse-page{padding:56px 12px 28px;}
  body.template-netflix .card:hover{transform:none;z-index:auto;box-shadow:none;}
  body.template-netflix .spotlight-banner{height:50vw!important;min-height:200px!important;max-height:350px!important;}
  body.template-netflix .spotlight-banner>div:nth-child(2){bottom:20%!important;}
  body.template-netflix .rv-card{width:150px;}
  body.template-netflix .rv-card img{width:150px;height:84px;}
  body.template-netflix .cw-card{width:150px;}
  body.template-netflix .cw-card img{width:150px;height:84px;}
  body.template-netflix .section-title{font-size:17px;}
  body.template-netflix .top10-card{width:180px;}
  body.template-netflix .top10-poster img{width:130px;height:73px;}
  body.template-netflix .top10-num{font-size:80px;}
  body.template-netflix .rv-card:hover,body.template-netflix .cw-card:hover,body.template-netflix .top10-card:hover{transform:none;margin:0;opacity:1;}
  body.template-netflix .nf-row-arrow{display:none!important;}
  body.template-netflix #detail-poster{display:none!important;}
  body.template-netflix #detail-content{padding:0 12px 40px;}
  body.template-netflix #grid{grid-template-columns:repeat(auto-fill,minmax(120px,1fr));gap:3px;}
}

/* ═══════════════════════════════════════════════════════════════════════
   DISNEY+ TEMPLATE — 1:1 FAITHFUL RECREATION
   ═══════════════════════════════════════════════════════════════════════ */

/* ── Base variables ── */
body.template-disney{
  --bg:#1A1D29;--surface:#222639;--card:#1F2333;
  --border:#2E3348;--accent:#0063E5;--accent2:#0050B5;
  --text:#F9F9F9;--muted:#CACACA;--dim:#555;
  font-family:-apple-system,BlinkMacSystemFont,'Avenir','Segoe UI',Roboto,sans-serif;
}
body.template-disney ::-webkit-scrollbar{width:0;height:0;}
body.template-disney .rv-row,body.template-disney #cw-row{scrollbar-width:none;}

/* ── HIDE NON-DISNEY+ FEATURES ── */
body.template-disney #stats-btn,
body.template-disney #notes-btn,
body.template-disney #mood-btn,
body.template-disney #random-pick-btn,
body.template-disney #lang-picker,
body.template-disney .card-block-btn,
body.template-disney .card-badge,
body.template-disney .card-rating,
body.template-disney .card-year,
body.template-disney .share-btn,
body.template-disney #detail-note-btn,
body.template-disney #detail-tagline,
body.template-disney #detail-badges,
body.template-disney .view-toggle,
body.template-disney #scroll-top-btn,
body.template-disney .report-btn,
body.template-disney .player-report-btn,
body.template-disney .wl-btn,
body.template-disney #ob-highlight,
body.template-disney #ob-tooltip,
body.template-disney .cw-title,
body.template-disney #trending-region{display:none!important;}

/* Hide tabs Disney+ doesn't have */
body.template-disney .tab-btn[data-tab="toprated"],
body.template-disney .tab-btn[data-tab="genres"],
body.template-disney .tab-btn[data-tab="history"]{display:none!important;}

/* ── HEADER — Disney+ style ── */
body.template-disney #header{
  background:linear-gradient(180deg,rgba(9,11,19,.95) 0%,transparent 100%);
  border-bottom:none;height:72px;padding:0 4%;position:fixed;width:100%;z-index:50;
}
body.template-disney #logo{
  font-family:-apple-system,BlinkMacSystemFont,'Avenir','Segoe UI',Roboto,sans-serif;
  font-weight:800;font-size:28px;color:#0063E5;letter-spacing:-1px;
}
body.template-disney #logo span{color:#0063E5!important;}
body.template-disney .tab-btn{
  font-family:-apple-system,BlinkMacSystemFont,'Avenir','Segoe UI',Roboto,sans-serif;
  font-size:13px;font-weight:500;letter-spacing:1px;text-transform:uppercase;
  border-bottom:none!important;border-radius:0;padding:8px 12px;color:#CACACA;
  background:transparent!important;
}
body.template-disney .tab-btn:hover{color:#F9F9F9;}
body.template-disney .tab-btn.active{
  color:#F9F9F9;font-weight:700;border-bottom:none!important;background:transparent!important;
  position:relative;
}
body.template-disney .tab-btn.active::after{
  content:'';position:absolute;bottom:0;left:50%;transform:translateX(-50%);
  width:20px;height:3px;background:#F9F9F9;border-radius:2px;
}
body.template-disney #settings-btn{
  background:transparent!important;border:none!important;color:#CACACA!important;font-size:16px!important;padding:6px!important;
}
body.template-disney #theme-picker-btn{
  background:transparent!important;border:none!important;
}

/* ── BROWSE PAGE ── */
body.template-disney #browse-page{padding:72px 4% 28px 4%;}

/* ── CONTROLS / SEARCH ── */
body.template-disney input[type=text]{
  border-radius:8px;border:1px solid #2E3348;background:#1A1D29cc;
  font-family:-apple-system,BlinkMacSystemFont,'Avenir',sans-serif;font-size:14px;color:#F9F9F9;
  padding:10px 16px;
}
body.template-disney input[type=text]:focus{border-color:#0063E5;}
body.template-disney select{
  border-radius:8px;border:1px solid #2E3348;background:transparent;
  font-family:-apple-system,BlinkMacSystemFont,'Avenir',sans-serif;font-size:13px;color:#F9F9F9;
}
body.template-disney .btn{
  border-radius:4px;font-family:-apple-system,BlinkMacSystemFont,'Avenir',sans-serif;
  font-weight:600;letter-spacing:0;font-size:15px;padding:10px 24px;
}
body.template-disney .btn:hover{background:#0050B5;}
body.template-disney .btn.secondary{background:rgba(249,249,249,.1);border:1px solid rgba(249,249,249,.2);color:#F9F9F9;}
body.template-disney .btn.secondary:hover{background:rgba(249,249,249,.2);}

/* ── GRID — portrait poster layout ── */
body.template-disney #grid{grid-template-columns:repeat(auto-fill,minmax(160px,1fr));gap:16px 12px;}

/* ── CARDS — Disney+ portrait style (titles visible) ── */
body.template-disney .card{
  border-radius:10px;border:none;background:transparent;overflow:hidden;
  transition:transform .3s ease,box-shadow .3s ease;
}
@media(hover:hover) and (pointer:fine){
  body.template-disney .card:hover{
    transform:scale(1.08);z-index:20;
    box-shadow:0 0 20px rgba(0,99,229,.4),0 12px 30px rgba(0,0,0,.6);
  }
}
body.template-disney .card-poster{border-radius:10px;overflow:hidden;background:#222639;}
body.template-disney .card-info{padding:8px 4px 4px;background:transparent;}
body.template-disney .card-title{
  font-family:-apple-system,BlinkMacSystemFont,'Avenir',sans-serif;font-size:13px;
  color:#F9F9F9;font-weight:500;
}

/* ── SECTION TITLES — Disney+ ── */
body.template-disney .section-title{
  font-family:-apple-system,BlinkMacSystemFont,'Avenir',sans-serif;font-weight:700;font-size:20px;
  letter-spacing:0;text-transform:none;border-bottom:none;color:#F9F9F9;padding-bottom:6px;margin-bottom:8px;
}

/* ── SPOTLIGHT / HERO BILLBOARD ── */
body.template-disney #spotlight{padding:0;margin:-72px 0 0;position:relative;z-index:1;}
body.template-disney .spotlight-banner{
  width:100vw!important;margin-left:calc(-4vw)!important;
}

/* ── ROW SECTIONS ── */
body.template-disney .rv-row{gap:12px;padding-bottom:4px;margin-bottom:8px;}
body.template-disney .rv-card{width:160px;border-radius:10px;overflow:hidden;}
body.template-disney .rv-card img{width:160px;height:240px;object-fit:cover;border-radius:10px;border:none;}
body.template-disney .rv-card .rv-title{
  font-family:-apple-system,BlinkMacSystemFont,'Avenir',sans-serif;font-size:12px;
  color:#CACACA;margin-top:6px;text-align:center;
}

/* ── CONTINUE WATCHING ── */
body.template-disney .cw-card{width:160px;border-radius:10px;overflow:visible;}
body.template-disney .cw-card img{width:160px;height:240px;object-fit:cover;border-radius:10px;border:none;}
body.template-disney .cw-card .cw-progress{bottom:25px;left:0;right:0;height:3px;border-radius:2px;background:#2E3348;}
body.template-disney .cw-card .cw-progress-fill{background:#0063E5;}
body.template-disney .cw-card .cw-ep{font-family:-apple-system,BlinkMacSystemFont,'Avenir',sans-serif;border-radius:4px;background:#000c;}

/* ── TOP 10 ── */
body.template-disney .top10-card{width:200px;align-items:center;}
body.template-disney .top10-num{-webkit-text-stroke:3px #0063E5;font-size:120px;color:transparent;}
body.template-disney .top10-poster{flex-shrink:0;}
body.template-disney .top10-poster img{width:120px;height:180px;object-fit:cover;border-radius:10px;border:none;}

/* ── CAROUSEL HOVER — Raddy-style ── */
@media(hover:hover) and (pointer:fine){
  body.template-disney .rv-row{overflow:visible;scroll-snap-type:none;padding:20px 0 20px;}
  body.template-disney .rv-card,
  body.template-disney .cw-card{scroll-snap-align:unset;transition:transform 250ms ease,margin 250ms ease,opacity 250ms ease;}
  body.template-disney .top10-card{transition:transform 250ms ease,margin 250ms ease,opacity 250ms ease;}

  body.template-disney .rv-row .rv-card:hover,
  body.template-disney .rv-row .cw-card:hover{
    transform:scale(1.08);margin:0 20px;z-index:5;position:relative;
    box-shadow:0 0 20px rgba(0,99,229,.4);
  }
  body.template-disney .rv-row .top10-card:hover{
    transform:scale(1.08);margin:0 18px;z-index:5;position:relative;
  }

  /* Dim non-hovered siblings */
  body.template-disney .rv-row:hover .rv-card,
  body.template-disney .rv-row:hover .cw-card,
  body.template-disney .rv-row:hover .top10-card{opacity:0.7;}
  body.template-disney .rv-row:hover .rv-card:hover,
  body.template-disney .rv-row:hover .cw-card:hover,
  body.template-disney .rv-row:hover .top10-card:hover{opacity:1;}

  /* First/last card edge behavior */
  body.template-disney .rv-row .rv-card:first-child:hover,
  body.template-disney .rv-row .cw-card:first-child:hover,
  body.template-disney .rv-row .top10-card:first-child:hover{margin-left:0;transform-origin:left center;}
  body.template-disney .rv-row .rv-card:last-child:hover,
  body.template-disney .rv-row .cw-card:last-child:hover,
  body.template-disney .rv-row .top10-card:last-child:hover{margin-right:0;transform-origin:right center;}

  body.template-disney .rv-row:hover .rv-card,
  body.template-disney .rv-row:hover .cw-card,
  body.template-disney .rv-row:hover .top10-card{will-change:transform,margin;}
}

/* ── ROW WRAPPER ── */
body.template-disney .nf-row-wrapper{position:relative;overflow:hidden;}

/* ── ROW NAVIGATION ARROWS ── */
body.template-disney .nf-row-arrow{
  position:absolute;top:0;bottom:0;width:55px;z-index:10;
  display:flex;align-items:center;justify-content:center;
  cursor:pointer;border:none;font-size:28px;color:#fff;
  opacity:0;transition:opacity 200ms ease;background:transparent;
}
body.template-disney .nf-row-wrapper:hover .nf-row-arrow{opacity:1;}
body.template-disney .nf-row-arrow.left{left:0;background:linear-gradient(to right,#1A1D29 0%,transparent 100%);}
body.template-disney .nf-row-arrow.right{right:0;background:linear-gradient(to left,#1A1D29 0%,transparent 100%);}
body.template-disney .nf-row-arrow:hover{font-size:36px;color:#fff;}

/* ── DETAIL PAGE — Disney+ style ── */
body.template-disney #detail-backdrop-fade{
  background:linear-gradient(to bottom,transparent 0%,#1A1D29 90%)!important;
}
body.template-disney #detail-backdrop img{opacity:0.5;}
body.template-disney #detail-content{padding:0 4% 60px;}
body.template-disney #detail-poster{border:none;border-radius:12px;box-shadow:0 8px 32px rgba(0,0,0,.5);}
body.template-disney #detail-hero{gap:24px;}
body.template-disney #detail-title{
  font-family:-apple-system,BlinkMacSystemFont,'Avenir',sans-serif;font-weight:800;
  font-size:clamp(26px,4vw,52px);text-shadow:2px 2px 4px rgba(0,0,0,.45);
}
body.template-disney #detail-stats{gap:14px;}
body.template-disney .detail-stat{
  font-family:-apple-system,BlinkMacSystemFont,'Avenir',sans-serif;font-size:14px;
}
body.template-disney #detail-play-btn{
  background:#0063E5;color:#fff;border-radius:6px;padding:12px 36px;
  font-family:-apple-system,BlinkMacSystemFont,'Avenir',sans-serif;font-weight:700;font-size:16px;
  letter-spacing:1px;box-shadow:none;text-transform:uppercase;
}
body.template-disney #detail-play-btn:hover{background:#0050B5;transform:none;box-shadow:none;}
body.template-disney #detail-play-btn .play-icon{color:#fff;}
body.template-disney #detail-back-btn{
  border:none;background:rgba(34,38,57,.7);color:#F9F9F9;border-radius:50%;
  width:36px;height:36px;padding:0;font-size:18px;display:flex;align-items:center;justify-content:center;
  letter-spacing:0;font-weight:400;position:fixed;top:20px;left:20px;z-index:51;
}
body.template-disney #detail-back-btn:hover{background:rgba(34,38,57,.95);}
body.template-disney #detail-overview{
  font-family:-apple-system,BlinkMacSystemFont,'Avenir',sans-serif;font-size:15px;color:#CACACA;line-height:1.6;
}
body.template-disney #detail-body{gap:30px;}
body.template-disney #detail-side{font-family:-apple-system,BlinkMacSystemFont,'Avenir',sans-serif;}
body.template-disney #detail-side-info{font-family:-apple-system,BlinkMacSystemFont,'Avenir',sans-serif;font-size:14px;}

/* Disney+ episodes */
body.template-disney .ep-row{
  background:#222639;border:none;border-radius:8px;border-bottom:1px solid #2E3348;padding:16px;
}
body.template-disney .ep-row:hover{background:#2A2E45;}
body.template-disney .ep-row.playing{background:#2A2E45;border-color:#0063E5;}
body.template-disney .season-btn{
  background:transparent;border:none;border-bottom:2px solid transparent;border-radius:0;
  color:#CACACA;font-family:-apple-system,BlinkMacSystemFont,'Avenir',sans-serif;font-size:15px;font-weight:600;
  padding:8px 0;margin-right:20px;
}
body.template-disney .season-btn.active{
  background:transparent;color:#F9F9F9;border-color:#F9F9F9;border-bottom:2px solid #F9F9F9;
}
body.template-disney #episodes-list{gap:2px;}
body.template-disney .ep-thumb{border-radius:6px;}

/* Disney+ cast */
body.template-disney .cast-avatar{border-radius:50%;width:76px;height:76px;}
body.template-disney .cast-name{font-family:-apple-system,BlinkMacSystemFont,'Avenir',sans-serif;font-size:12px;color:#CACACA;}
body.template-disney .cast-char{font-family:-apple-system,BlinkMacSystemFont,'Avenir',sans-serif;font-size:10px;color:#777;}

/* Disney+ recommendations */
body.template-disney #recs-row .card{border-radius:10px;}

/* ── PLAYER ── */
body.template-disney #player-topbar{font-family:-apple-system,BlinkMacSystemFont,'Avenir',sans-serif;}
body.template-disney #player-title{font-family:-apple-system,BlinkMacSystemFont,'Avenir',sans-serif;}
body.template-disney .ctrl-btn{font-family:-apple-system,BlinkMacSystemFont,'Avenir',sans-serif;}

/* ── SPINNER ── */
body.template-disney .spinner{border-color:#2E3348;border-top-color:#0063E5;}

/* ── LIST VIEW ── */
body.template-disney #grid.list-view .card{border:none;}

/* ── MOBILE RESPONSIVE ── */
@media(max-width:768px){
  body.template-disney #header{padding:0 12px;height:56px;}
  body.template-disney #logo{font-size:22px;}
  body.template-disney .tab-btn{font-size:11px;padding:6px 8px;letter-spacing:0.5px;}
  body.template-disney #browse-page{padding:56px 12px 28px;}
  body.template-disney .card:hover{transform:none;z-index:auto;box-shadow:none;}
  body.template-disney .spotlight-banner{height:50vw!important;min-height:200px!important;max-height:350px!important;}
  body.template-disney .spotlight-banner>div:nth-child(2){bottom:20%!important;}
  body.template-disney .rv-card{width:120px;}
  body.template-disney .rv-card img{width:120px;height:180px;}
  body.template-disney .cw-card{width:120px;}
  body.template-disney .cw-card img{width:120px;height:180px;}
  body.template-disney .section-title{font-size:17px;}
  body.template-disney .top10-card{width:160px;}
  body.template-disney .top10-poster img{width:90px;height:135px;}
  body.template-disney .top10-num{font-size:80px;}
  body.template-disney .rv-card:hover,body.template-disney .cw-card:hover,body.template-disney .top10-card:hover{transform:none;margin:0;opacity:1;}
  body.template-disney .nf-row-arrow{display:none!important;}
  body.template-disney #grid{grid-template-columns:repeat(auto-fill,minmax(120px,1fr));gap:10px 8px;}
}


/* ═══════════════════════════════════════════════════════════════════════
   HULU TEMPLATE — 1:1 FAITHFUL RECREATION
   ═══════════════════════════════════════════════════════════════════════ */

/* ── Base variables ── */
body.template-hulu{
  --bg:#040405;--surface:#151517;--card:#1A1A1C;
  --border:#2A2A2C;--accent:#1CE783;--accent2:#17C96E;
  --text:#FFFFFF;--muted:#999;--dim:#444;
  font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;
}
body.template-hulu ::-webkit-scrollbar{width:0;height:0;}
body.template-hulu .rv-row,body.template-hulu #cw-row{scrollbar-width:none;}

/* ── HIDE NON-HULU FEATURES ── */
body.template-hulu #stats-btn,
body.template-hulu #notes-btn,
body.template-hulu #mood-btn,
body.template-hulu #random-pick-btn,
body.template-hulu #lang-picker,
body.template-hulu .card-block-btn,
body.template-hulu .card-badge,
body.template-hulu .card-rating,
body.template-hulu .card-year,
body.template-hulu .share-btn,
body.template-hulu #detail-note-btn,
body.template-hulu #detail-tagline,
body.template-hulu #detail-badges,
body.template-hulu .view-toggle,
body.template-hulu #scroll-top-btn,
body.template-hulu .report-btn,
body.template-hulu .player-report-btn,
body.template-hulu .wl-btn,
body.template-hulu #ob-highlight,
body.template-hulu #ob-tooltip,
body.template-hulu .rv-title,
body.template-hulu .cw-title,
body.template-hulu #trending-region{display:none!important;}

/* Hide tabs Hulu doesn't have */
body.template-hulu .tab-btn[data-tab="toprated"],
body.template-hulu .tab-btn[data-tab="genres"],
body.template-hulu .tab-btn[data-tab="history"]{display:none!important;}

/* ── HEADER — Hulu style ── */
body.template-hulu #header{
  background:linear-gradient(180deg,rgba(4,4,5,.95) 0%,transparent 100%);
  border-bottom:none;height:68px;padding:0 4%;position:fixed;width:100%;z-index:50;
}
body.template-hulu #logo{
  font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;font-weight:900;font-size:28px;
  color:#1CE783;letter-spacing:-1px;
}
body.template-hulu #logo span{color:#1CE783!important;}
body.template-hulu .tab-btn{
  font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;font-size:14px;font-weight:500;
  letter-spacing:0;text-transform:none;border-bottom:none!important;border-radius:0;
  padding:8px 14px;color:#999;background:transparent!important;
}
body.template-hulu .tab-btn:hover{color:#fff;}
body.template-hulu .tab-btn.active{
  color:#fff;font-weight:700;border-bottom:none!important;background:transparent!important;
}
body.template-hulu #settings-btn{
  background:transparent!important;border:none!important;color:#999!important;font-size:16px!important;padding:6px!important;
}
body.template-hulu #theme-picker-btn{
  background:transparent!important;border:none!important;
}

/* ── BROWSE PAGE ── */
body.template-hulu #browse-page{padding:68px 4% 28px 4%;}

/* ── CONTROLS / SEARCH ── */
body.template-hulu input[type=text]{
  border-radius:4px;border:1px solid #2A2A2C;background:#0a0a0bcc;
  font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;font-size:14px;color:#fff;
  padding:10px 16px;
}
body.template-hulu input[type=text]:focus{border-color:#1CE783;}
body.template-hulu select{
  border-radius:4px;border:1px solid #2A2A2C;background:transparent;
  font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;font-size:13px;color:#fff;
}
body.template-hulu .btn{
  border-radius:4px;font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;
  font-weight:700;letter-spacing:0;font-size:15px;padding:10px 28px;
}
body.template-hulu .btn:hover{background:#17C96E;}
body.template-hulu .btn.secondary{background:rgba(255,255,255,.1);border:none;color:#fff;}
body.template-hulu .btn.secondary:hover{background:rgba(255,255,255,.2);}

/* ── GRID — portrait poster layout ── */
body.template-hulu #grid{grid-template-columns:repeat(auto-fill,minmax(160px,1fr));gap:8px 6px;}

/* ── CARDS — Hulu portrait style (titles hidden) ── */
body.template-hulu .card{
  border-radius:6px;border:none;background:transparent;overflow:hidden;
  transition:transform .3s ease,box-shadow .3s ease;
}
@media(hover:hover) and (pointer:fine){
  body.template-hulu .card:hover{
    transform:scale(1.08);z-index:20;
    box-shadow:0 0 20px rgba(28,231,131,.3),0 12px 30px rgba(0,0,0,.6);
  }
}
body.template-hulu .card-poster{border-radius:6px;overflow:hidden;background:#1A1A1C;}
body.template-hulu .card-info{display:none;}

/* ── SECTION TITLES — Hulu ── */
body.template-hulu .section-title{
  font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;font-weight:700;font-size:20px;
  letter-spacing:0;text-transform:none;border-bottom:none;color:#fff;padding-bottom:6px;margin-bottom:8px;
}

/* ── SPOTLIGHT / HERO BILLBOARD ── */
body.template-hulu #spotlight{padding:0;margin:-68px 0 0;position:relative;z-index:1;}
body.template-hulu .spotlight-banner{
  width:100vw!important;margin-left:calc(-4vw)!important;
}

/* ── ROW SECTIONS ── */
body.template-hulu .rv-row{gap:8px;padding-bottom:4px;margin-bottom:8px;}
body.template-hulu .rv-card{width:160px;border-radius:6px;overflow:hidden;}
body.template-hulu .rv-card img{width:160px;height:240px;object-fit:cover;border-radius:6px;border:none;}
body.template-hulu .rv-card .rv-title{
  font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;font-size:11px;color:#999;margin-top:3px;
}

/* ── CONTINUE WATCHING ── */
body.template-hulu .cw-card{width:160px;border-radius:6px;overflow:visible;}
body.template-hulu .cw-card img{width:160px;height:240px;object-fit:cover;border-radius:6px;border:none;}
body.template-hulu .cw-card .cw-progress{bottom:25px;left:0;right:0;height:3px;border-radius:2px;background:#2A2A2C;}
body.template-hulu .cw-card .cw-progress-fill{background:#1CE783;}
body.template-hulu .cw-card .cw-ep{font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;border-radius:4px;background:#000c;}

/* ── TOP 10 ── */
body.template-hulu .top10-card{width:200px;align-items:center;}
body.template-hulu .top10-num{-webkit-text-stroke:3px #1CE783;font-size:120px;color:transparent;}
body.template-hulu .top10-poster{flex-shrink:0;}
body.template-hulu .top10-poster img{width:120px;height:180px;object-fit:cover;border-radius:6px;border:none;}

/* ── CAROUSEL HOVER — Raddy-style ── */
@media(hover:hover) and (pointer:fine){
  body.template-hulu .rv-row{overflow:visible;scroll-snap-type:none;padding:20px 0 20px;}
  body.template-hulu .rv-card,
  body.template-hulu .cw-card{scroll-snap-align:unset;transition:transform 250ms ease,margin 250ms ease,opacity 250ms ease;}
  body.template-hulu .top10-card{transition:transform 250ms ease,margin 250ms ease,opacity 250ms ease;}

  body.template-hulu .rv-row .rv-card:hover,
  body.template-hulu .rv-row .cw-card:hover{
    transform:scale(1.08);margin:0 20px;z-index:5;position:relative;
    box-shadow:0 0 20px rgba(28,231,131,.3);
  }
  body.template-hulu .rv-row .top10-card:hover{
    transform:scale(1.08);margin:0 18px;z-index:5;position:relative;
  }

  /* Dim non-hovered siblings */
  body.template-hulu .rv-row:hover .rv-card,
  body.template-hulu .rv-row:hover .cw-card,
  body.template-hulu .rv-row:hover .top10-card{opacity:0.7;}
  body.template-hulu .rv-row:hover .rv-card:hover,
  body.template-hulu .rv-row:hover .cw-card:hover,
  body.template-hulu .rv-row:hover .top10-card:hover{opacity:1;}

  /* First/last card edge behavior */
  body.template-hulu .rv-row .rv-card:first-child:hover,
  body.template-hulu .rv-row .cw-card:first-child:hover,
  body.template-hulu .rv-row .top10-card:first-child:hover{margin-left:0;transform-origin:left center;}
  body.template-hulu .rv-row .rv-card:last-child:hover,
  body.template-hulu .rv-row .cw-card:last-child:hover,
  body.template-hulu .rv-row .top10-card:last-child:hover{margin-right:0;transform-origin:right center;}

  body.template-hulu .rv-row:hover .rv-card,
  body.template-hulu .rv-row:hover .cw-card,
  body.template-hulu .rv-row:hover .top10-card{will-change:transform,margin;}
}

/* ── ROW WRAPPER ── */
body.template-hulu .nf-row-wrapper{position:relative;overflow:hidden;}

/* ── ROW NAVIGATION ARROWS ── */
body.template-hulu .nf-row-arrow{
  position:absolute;top:0;bottom:0;width:55px;z-index:10;
  display:flex;align-items:center;justify-content:center;
  cursor:pointer;border:none;font-size:28px;color:#fff;
  opacity:0;transition:opacity 200ms ease;background:transparent;
}
body.template-hulu .nf-row-wrapper:hover .nf-row-arrow{opacity:1;}
body.template-hulu .nf-row-arrow.left{left:0;background:linear-gradient(to right,#040405 0%,transparent 100%);}
body.template-hulu .nf-row-arrow.right{right:0;background:linear-gradient(to left,#040405 0%,transparent 100%);}
body.template-hulu .nf-row-arrow:hover{font-size:36px;color:#fff;}

/* ── DETAIL PAGE — Hulu style ── */
body.template-hulu #detail-backdrop-fade{
  background:linear-gradient(to bottom,transparent 0%,#040405 90%)!important;
}
body.template-hulu #detail-backdrop img{opacity:0.5;}
body.template-hulu #detail-content{padding:0 4% 60px;}
body.template-hulu #detail-poster{border:none;border-radius:6px;box-shadow:0 8px 32px rgba(0,0,0,.6);}
body.template-hulu #detail-hero{gap:24px;}
body.template-hulu #detail-title{
  font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;font-weight:900;
  font-size:clamp(26px,4vw,52px);text-shadow:2px 2px 4px rgba(0,0,0,.45);
}
body.template-hulu #detail-stats{gap:14px;}
body.template-hulu .detail-stat{
  font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;font-size:14px;
}
body.template-hulu #detail-play-btn{
  background:#1CE783;color:#040405;border-radius:4px;padding:12px 36px;
  font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;font-weight:800;font-size:16px;
  letter-spacing:0;box-shadow:none;
}
body.template-hulu #detail-play-btn:hover{background:#17C96E;transform:none;box-shadow:none;}
body.template-hulu #detail-play-btn .play-icon{color:#040405;}
body.template-hulu #detail-back-btn{
  border:none;background:rgba(26,26,28,.7);color:#fff;border-radius:50%;
  width:36px;height:36px;padding:0;font-size:18px;display:flex;align-items:center;justify-content:center;
  letter-spacing:0;font-weight:400;position:fixed;top:20px;left:20px;z-index:51;
}
body.template-hulu #detail-back-btn:hover{background:rgba(26,26,28,.95);}
body.template-hulu #detail-overview{
  font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;font-size:15px;color:#999;line-height:1.6;
}
body.template-hulu #detail-body{gap:30px;}
body.template-hulu #detail-side{font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;}
body.template-hulu #detail-side-info{font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;font-size:14px;}

/* Hulu episodes */
body.template-hulu .ep-row{
  background:#151517;border:none;border-radius:0;border-bottom:1px solid #2A2A2C;padding:16px;
}
body.template-hulu .ep-row:hover{background:#1A1A1C;}
body.template-hulu .ep-row.playing{background:#1A1A1C;border-color:#1CE783;}
body.template-hulu .season-btn{
  background:transparent;border:none;border-bottom:2px solid transparent;border-radius:0;
  color:#999;font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;font-size:15px;font-weight:700;
  padding:8px 0;margin-right:20px;
}
body.template-hulu .season-btn.active{
  background:transparent;color:#fff;border-color:#1CE783;border-bottom:2px solid #1CE783;
}
body.template-hulu #episodes-list{gap:0;}
body.template-hulu .ep-thumb{border-radius:4px;}

/* Hulu cast */
body.template-hulu .cast-avatar{border-radius:50%;width:76px;height:76px;}
body.template-hulu .cast-name{font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;font-size:12px;color:#999;}
body.template-hulu .cast-char{font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;font-size:10px;color:#666;}

/* Hulu recommendations */
body.template-hulu #recs-row .card{border-radius:6px;}

/* ── PLAYER ── */
body.template-hulu #player-topbar{font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;}
body.template-hulu #player-title{font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;}
body.template-hulu .ctrl-btn{font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;}

/* ── SPINNER ── */
body.template-hulu .spinner{border-color:#2A2A2C;border-top-color:#1CE783;}

/* ── LIST VIEW ── */
body.template-hulu #grid.list-view .card{border:none;}

/* ── MOBILE RESPONSIVE ── */
@media(max-width:768px){
  body.template-hulu #header{padding:0 12px;height:56px;}
  body.template-hulu #logo{font-size:22px;}
  body.template-hulu .tab-btn{font-size:12px;padding:6px 8px;}
  body.template-hulu #browse-page{padding:56px 12px 28px;}
  body.template-hulu .card:hover{transform:none;z-index:auto;box-shadow:none;}
  body.template-hulu .spotlight-banner{height:50vw!important;min-height:200px!important;max-height:350px!important;}
  body.template-hulu .spotlight-banner>div:nth-child(2){bottom:20%!important;}
  body.template-hulu .rv-card{width:120px;}
  body.template-hulu .rv-card img{width:120px;height:180px;}
  body.template-hulu .cw-card{width:120px;}
  body.template-hulu .cw-card img{width:120px;height:180px;}
  body.template-hulu .section-title{font-size:17px;}
  body.template-hulu .top10-card{width:160px;}
  body.template-hulu .top10-poster img{width:90px;height:135px;}
  body.template-hulu .top10-num{font-size:80px;}
  body.template-hulu .rv-card:hover,body.template-hulu .cw-card:hover,body.template-hulu .top10-card:hover{transform:none;margin:0;opacity:1;}
  body.template-hulu .nf-row-arrow{display:none!important;}
  body.template-hulu #grid{grid-template-columns:repeat(auto-fill,minmax(120px,1fr));gap:6px 4px;}
}


/* ═══════════════════════════════════════════════════════════════════════
   ICE TEMPLATE — PREMIUM COLD DARK-NAVY + CYAN GLASS-MORPHISM
   ═══════════════════════════════════════════════════════════════════════ */

/* ── Base variables ── */
body.template-ice{
  --bg:#070c13;--surface:#0e1620;--card:#0d141f;
  --border:rgba(255,255,255,0.07);--accent:#4fc3f7;--accent2:#81d4fa;
  --text:#e8eaed;--muted:rgba(255,255,255,0.55);--dim:rgba(255,255,255,0.3);
  font-family:'Source Sans 3','Source Sans Pro',sans-serif;
}
body.template-ice ::-webkit-scrollbar{width:0;height:0;}
body.template-ice .rv-row,body.template-ice #cw-row{scrollbar-width:none;}

/* ── HIDE NON-ICE FEATURES ── */
body.template-ice #stats-btn,
body.template-ice #notes-btn,
body.template-ice #mood-btn,
body.template-ice #random-pick-btn,
body.template-ice #lang-picker,
body.template-ice .card-block-btn,
body.template-ice .card-badge,
body.template-ice .card-rating,
body.template-ice .card-year,
body.template-ice .share-btn,
body.template-ice #detail-note-btn,
body.template-ice #detail-tagline,
body.template-ice #detail-badges,
body.template-ice .view-toggle,
body.template-ice #scroll-top-btn,
body.template-ice .report-btn,
body.template-ice .player-report-btn,
body.template-ice .wl-btn,
body.template-ice #ob-highlight,
body.template-ice #ob-tooltip,
body.template-ice .rv-title,
body.template-ice .cw-title,
body.template-ice #trending-region{display:none!important;}

/* Hide tabs ICE doesn't have */
body.template-ice .tab-btn[data-tab="toprated"],
body.template-ice .tab-btn[data-tab="genres"],
body.template-ice .tab-btn[data-tab="history"]{display:none!important;}

/* ── HEADER — ICE glass nav ── */
body.template-ice #header{
  background:linear-gradient(180deg,rgba(10,16,24,0.96) 0%,rgba(10,16,24,0.3) 100%);
  border-bottom:none;height:56px;padding:0 32px;position:fixed;width:100%;z-index:50;
  display:flex;align-items:center;gap:20px;
}
body.template-ice #logo{
  font-family:'Bebas Neue',sans-serif;font-weight:700;font-size:20px;
  letter-spacing:3px;
  background:linear-gradient(135deg,#fff,#7ec8e3);-webkit-background-clip:text;-webkit-text-fill-color:transparent;
  border:1.5px solid rgba(255,255,255,0.2);border-radius:6px;padding:3px 11px 1px;
}
body.template-ice #logo span{display:contents;color:transparent!important;-webkit-text-fill-color:transparent!important;}
body.template-ice .tab-btn{
  font-family:'Source Sans 3','Source Sans Pro',sans-serif;font-size:12px;font-weight:600;
  letter-spacing:0.3px;border-bottom:none!important;border-radius:20px;padding:6px 16px;
  color:rgba(255,255,255,0.55);background:transparent!important;transition:all 0.3s;
  white-space:nowrap;border:none;
}
body.template-ice .tab-btn:hover{color:#e8eaed;}
body.template-ice .tab-btn.active{
  color:#e8eaed;font-weight:600;border-bottom:none!important;
  background:rgba(255,255,255,0.12)!important;box-shadow:0 2px 8px rgba(0,0,0,0.3);
}
body.template-ice #settings-btn{
  background:transparent!important;border:none!important;color:rgba(255,255,255,0.55)!important;font-size:16px!important;padding:6px!important;
}
body.template-ice #theme-picker-btn{
  background:transparent!important;border:none!important;
}

/* ── BROWSE PAGE ── */
body.template-ice #browse-page{padding:64px 32px 28px;}

/* ── CONTROLS / SEARCH ── */
body.template-ice input[type=text]{
  border-radius:10px;border:1px solid rgba(255,255,255,0.07);background:rgba(255,255,255,0.06);
  font-family:'Source Sans 3','Source Sans Pro',sans-serif;font-size:12px;color:#e8eaed;
  padding:7px 12px;transition:all 0.3s;
}
body.template-ice input[type=text]:focus{border-color:#4fc3f7;background:rgba(255,255,255,0.09);box-shadow:0 0 0 3px rgba(79,195,247,0.1);}
body.template-ice input[type=text]::placeholder{color:rgba(255,255,255,0.3);}
body.template-ice select{
  border-radius:10px;border:1px solid rgba(255,255,255,0.07);background:rgba(255,255,255,0.06);
  font-family:'Source Sans 3','Source Sans Pro',sans-serif;font-size:12px;color:#e8eaed;
}
body.template-ice select:focus{border-color:#4fc3f7;background:rgba(255,255,255,0.09);box-shadow:0 0 0 3px rgba(79,195,247,0.1);}
body.template-ice .btn{
  border-radius:10px;font-family:'Source Sans 3','Source Sans Pro',sans-serif;
  font-weight:700;letter-spacing:0;font-size:13px;padding:10px 22px;
  box-shadow:0 4px 16px rgba(79,195,247,0.25);transition:all 0.3s;
}
body.template-ice .btn:hover{background:#81d4fa;transform:translateY(-1px);}
body.template-ice .btn.secondary{background:rgba(255,255,255,0.08);border:1px solid rgba(255,255,255,0.07);color:#e8eaed;box-shadow:none;backdrop-filter:blur(8px);}
body.template-ice .btn.secondary:hover{background:rgba(255,255,255,0.14);border-color:rgba(255,255,255,0.2);}

/* ── GRID — portrait poster layout ── */
body.template-ice #grid{grid-template-columns:repeat(auto-fill,minmax(140px,1fr));gap:12px;padding:0;}

/* ── CARDS — ICE portrait style with glass borders ── */
body.template-ice .card{
  border-radius:10px;border:1px solid rgba(255,255,255,0.07);background:transparent;overflow:hidden;
  transition:all .4s cubic-bezier(0.25,0.46,0.45,0.94);
}
@media(hover:hover) and (pointer:fine){
  body.template-ice .card:hover{
    transform:translateY(-6px) scale(1.02);z-index:20;
    box-shadow:0 10px 36px rgba(0,0,0,0.6),0 0 0 2px rgba(79,195,247,0.3);
    border-color:rgba(79,195,247,0.3);
  }
}
body.template-ice .card-poster{border-radius:10px;overflow:hidden;background:#0d141f;box-shadow:0 6px 24px rgba(0,0,0,0.4);border:1px solid rgba(255,255,255,0.07);transition:all 0.4s;}
body.template-ice .card:hover .card-poster{border-color:rgba(79,195,247,0.3);box-shadow:0 10px 36px rgba(0,0,0,0.6),0 0 0 2px rgba(79,195,247,0.3);}
body.template-ice .card-info{
  font-family:'Source Sans 3','Source Sans Pro',sans-serif;font-size:11px;font-weight:600;
  color:rgba(255,255,255,0.55);padding:8px 6px;text-align:center;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}

/* ── SECTION TITLES — ICE ── */
body.template-ice .section-title{
  font-family:'Source Sans 3','Source Sans Pro',sans-serif;font-weight:700;font-size:13px;
  letter-spacing:0.4px;text-transform:none;border-bottom:none;color:rgba(255,255,255,0.55);
  padding-bottom:12px;margin-bottom:16px;
}

/* ── SPOTLIGHT / HERO BILLBOARD ── */
body.template-ice #spotlight{padding:0;margin:-56px 0 0;position:relative;z-index:1;}
body.template-ice .spotlight-banner{
  width:100vw!important;margin-left:calc(-32px)!important;
}
body.template-ice .spotlight-banner>div:first-child{
  background:linear-gradient(to right,rgba(10,16,24,0.96) 0%,rgba(10,16,24,0.72) 28%,rgba(10,16,24,0.28) 55%,rgba(10,16,24,0.08) 100%),
             linear-gradient(to top,rgba(10,16,24,1) 0%,rgba(10,16,24,0.5) 30%,transparent 55%),
             linear-gradient(to bottom,rgba(10,16,24,0.6) 0%,transparent 12%)!important;
}
body.template-ice .spotlight-title{
  font-family:'Bebas Neue',sans-serif!important;font-size:64px!important;line-height:0.92!important;
  letter-spacing:2px!important;
  background:linear-gradient(180deg,#fff 30%,#8db5d4 100%)!important;-webkit-background-clip:text!important;-webkit-text-fill-color:transparent!important;
}
body.template-ice .spotlight-genre{
  font-size:10px!important;font-weight:600!important;padding:3px 10px!important;border-radius:4px!important;
  background:rgba(255,255,255,0.08)!important;color:rgba(255,255,255,0.55)!important;letter-spacing:0.4px!important;text-transform:uppercase!important;
}
body.template-ice .spotlight-desc{
  font-size:13px!important;line-height:1.65!important;color:rgba(255,255,255,0.55)!important;
}

/* ── ROW SECTIONS ── */
body.template-ice .rv-row{gap:12px;padding:0 32px 22px;margin-bottom:12px;scrollbar-width:none;}
body.template-ice .rv-row::-webkit-scrollbar{display:none;}
body.template-ice .rv-card{
  flex-shrink:0;width:140px;border-radius:10px;overflow:hidden;cursor:pointer;
  transition:all 0.4s cubic-bezier(0.25,0.46,0.45,0.94);
}
body.template-ice .rv-card img{
  width:140px;height:210px;object-fit:cover;border-radius:10px;
  border:1px solid rgba(255,255,255,0.07);transition:all 0.4s;
  box-shadow:0 6px 24px rgba(0,0,0,0.4);
}
body.template-ice .rv-card:hover{transform:translateY(-6px) scale(1.02);}
body.template-ice .rv-card:hover img{box-shadow:0 10px 36px rgba(0,0,0,0.6),0 0 0 2px rgba(79,195,247,0.3);border-color:rgba(79,195,247,0.3);}
body.template-ice .rv-card .rv-title{
  font-family:'Source Sans 3','Source Sans Pro',sans-serif;font-size:11px;font-weight:600;
  color:rgba(255,255,255,0.55);margin-top:7px;text-align:center;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;transition:color 0.3s;
}
body.template-ice .rv-card:hover .rv-title{color:#e8eaed;}

/* ── CONTINUE WATCHING ── */
body.template-ice .cw-card{flex-shrink:0;width:140px;border-radius:10px;overflow:visible;}
body.template-ice .cw-card img{width:140px;height:210px;object-fit:cover;border-radius:10px;border:1px solid rgba(255,255,255,0.07);box-shadow:0 6px 24px rgba(0,0,0,0.4);}
body.template-ice .cw-card .cw-progress{bottom:25px;left:0;right:0;height:3px;border-radius:2px;background:rgba(255,255,255,0.07);}
body.template-ice .cw-card .cw-progress-fill{background:#4fc3f7;}
body.template-ice .cw-card .cw-ep{font-family:'Source Sans 3','Source Sans Pro',sans-serif;border-radius:6px;background:rgba(0,0,0,0.7);backdrop-filter:blur(8px);}

/* ── TOP 10 ── */
body.template-ice .top10-card{width:200px;align-items:center;}
body.template-ice .top10-num{-webkit-text-stroke:3px #4fc3f7;font-size:120px;color:transparent;}
body.template-ice .top10-poster{flex-shrink:0;}
body.template-ice .top10-poster img{width:120px;height:180px;object-fit:cover;border-radius:10px;border:1px solid rgba(255,255,255,0.07);}

/* ── CAROUSEL HOVER — ICE style ── */
@media(hover:hover) and (pointer:fine){
  body.template-ice .rv-row{overflow:visible;scroll-snap-type:none;padding:20px 32px 20px;}
  body.template-ice .rv-card,
  body.template-ice .cw-card{scroll-snap-align:unset;transition:transform 400ms cubic-bezier(0.25,0.46,0.45,0.94),margin 250ms ease,opacity 250ms ease;}
  body.template-ice .top10-card{transition:transform 400ms cubic-bezier(0.25,0.46,0.45,0.94),margin 250ms ease,opacity 250ms ease;}

  body.template-ice .rv-row .rv-card:hover,
  body.template-ice .rv-row .cw-card:hover{
    transform:translateY(-6px) scale(1.02);margin:0 20px;z-index:5;position:relative;
    box-shadow:0 10px 36px rgba(0,0,0,0.6),0 0 0 2px rgba(79,195,247,0.3);
  }
  body.template-ice .rv-row .top10-card:hover{
    transform:scale(1.05);margin:0 18px;z-index:5;position:relative;
  }

  /* Dim non-hovered siblings */
  body.template-ice .rv-row:hover .rv-card,
  body.template-ice .rv-row:hover .cw-card,
  body.template-ice .rv-row:hover .top10-card{opacity:0.7;}
  body.template-ice .rv-row:hover .rv-card:hover,
  body.template-ice .rv-row:hover .cw-card:hover,
  body.template-ice .rv-row:hover .top10-card:hover{opacity:1;}

  /* First/last card edge behavior */
  body.template-ice .rv-row .rv-card:first-child:hover,
  body.template-ice .rv-row .cw-card:first-child:hover,
  body.template-ice .rv-row .top10-card:first-child:hover{margin-left:0;transform-origin:left center;}
  body.template-ice .rv-row .rv-card:last-child:hover,
  body.template-ice .rv-row .cw-card:last-child:hover,
  body.template-ice .rv-row .top10-card:last-child:hover{margin-right:0;transform-origin:right center;}

  body.template-ice .rv-row:hover .rv-card,
  body.template-ice .rv-row:hover .cw-card,
  body.template-ice .rv-row:hover .top10-card{will-change:transform,margin;}
}

/* ── ROW WRAPPER ── */
body.template-ice .nf-row-wrapper{position:relative;overflow:hidden;}

/* ── ROW NAVIGATION ARROWS ── */
body.template-ice .nf-row-arrow{
  position:absolute;top:0;bottom:0;width:55px;z-index:10;
  display:flex;align-items:center;justify-content:center;
  cursor:pointer;border:none;font-size:28px;color:#fff;
  opacity:0;transition:opacity 200ms ease;background:transparent;
}
body.template-ice .nf-row-wrapper:hover .nf-row-arrow{opacity:1;}
body.template-ice .nf-row-arrow.left{left:0;background:linear-gradient(to right,#070c13 0%,transparent 100%);}
body.template-ice .nf-row-arrow.right{right:0;background:linear-gradient(to left,#070c13 0%,transparent 100%);}
body.template-ice .nf-row-arrow:hover{font-size:36px;color:#fff;}

/* ── DETAIL PAGE — ICE cinematic style ── */
body.template-ice #detail-backdrop-fade{
  background:linear-gradient(to right,rgba(10,16,24,0.97) 0%,rgba(10,16,24,0.82) 35%,rgba(10,16,24,0.4) 60%,rgba(10,16,24,0.15) 100%),
             linear-gradient(to top,rgba(10,16,24,1) 0%,rgba(10,16,24,0.7) 20%,transparent 50%),
             linear-gradient(to bottom,rgba(10,16,24,0.6) 0%,transparent 12%)!important;
}
body.template-ice #detail-backdrop img{opacity:1;}
body.template-ice #detail-content{padding:36px 32px 60px;position:relative;z-index:2;}
body.template-ice #detail-poster{
  border:1px solid rgba(255,255,255,0.07);border-radius:10px;flex-shrink:0;
  box-shadow:0 8px 32px rgba(0,0,0,0.6),0 0 0 1px rgba(79,195,247,0.1);
}
body.template-ice #detail-hero{gap:24px;align-items:center;}
body.template-ice #detail-title{
  font-family:'Bebas Neue',sans-serif;font-weight:700;
  font-size:clamp(48px,6vw,62px);line-height:0.92;letter-spacing:2px;
  background:linear-gradient(180deg,#fff 25%,#8ba8c4 100%);-webkit-background-clip:text;-webkit-text-fill-color:transparent;
  margin-bottom:14px;
}
body.template-ice #detail-stats{gap:14px;}
body.template-ice .detail-stat{
  font-family:'Source Sans 3','Source Sans Pro',sans-serif;font-size:14px;
  color:rgba(255,255,255,0.55);
}
body.template-ice .detail-stat .tag,
body.template-ice .genre-tag{
  font-size:10px;font-weight:600;padding:3px 10px;border-radius:4px;
  background:rgba(255,255,255,0.08);color:rgba(255,255,255,0.55);
  letter-spacing:0.4px;text-transform:uppercase;
}
body.template-ice #detail-play-btn{
  display:inline-flex;align-items:center;gap:8px;
  background:#4fc3f7;color:#0a1018;border:none;border-radius:10px;padding:10px 22px;
  font-family:'Source Sans 3','Source Sans Pro',sans-serif;font-weight:700;font-size:13px;
  letter-spacing:0;cursor:pointer;transition:all 0.3s;
  box-shadow:0 4px 16px rgba(79,195,247,0.25);
}
body.template-ice #detail-play-btn:hover{background:#81d4fa;transform:translateY(-1px);box-shadow:0 6px 20px rgba(79,195,247,0.35);}
body.template-ice #detail-play-btn .play-icon{color:#0a1018;}
body.template-ice #detail-back-btn{
  border:1px solid rgba(255,255,255,0.07);background:rgba(255,255,255,0.03);color:rgba(255,255,255,0.55);
  border-radius:7px;padding:5px 12px;font-size:12px;font-weight:600;
  display:inline-flex;align-items:center;gap:5px;
  font-family:'Source Sans 3','Source Sans Pro',sans-serif;
  letter-spacing:0;transition:all 0.3s;backdrop-filter:blur(8px);
}
body.template-ice #detail-back-btn:hover{background:rgba(255,255,255,0.08);border-color:rgba(255,255,255,0.15);color:#e8eaed;}
body.template-ice #detail-overview{
  font-family:'Source Sans 3','Source Sans Pro',sans-serif;font-size:14px;color:rgba(255,255,255,0.55);line-height:1.7;
  max-width:460px;
}
body.template-ice #detail-body{gap:30px;}
body.template-ice #detail-side{font-family:'Source Sans 3','Source Sans Pro',sans-serif;}
body.template-ice #detail-side-info{font-family:'Source Sans 3','Source Sans Pro',sans-serif;font-size:14px;}

/* ICE episodes — glass cards */
body.template-ice .ep-row{
  background:rgba(255,255,255,0.05);border:1px solid rgba(255,255,255,0.07);border-radius:14px;
  padding:12px 14px;margin-bottom:8px;transition:all 0.4s cubic-bezier(0.25,0.46,0.45,0.94);
}
body.template-ice .ep-row:hover{background:rgba(255,255,255,0.1);transform:translateY(-3px);box-shadow:0 14px 44px rgba(0,0,0,0.5);border-color:rgba(255,255,255,0.14);}
body.template-ice .ep-row.playing{background:rgba(79,195,247,0.08);border-color:rgba(79,195,247,0.3);}
body.template-ice .season-btn{
  background:rgba(255,255,255,0.04);border:1px solid rgba(255,255,255,0.07);border-radius:24px;
  color:rgba(255,255,255,0.55);font-family:'Source Sans 3','Source Sans Pro',sans-serif;font-size:13px;font-weight:600;
  padding:10px 22px;letter-spacing:0.5px;transition:all 0.3s;white-space:nowrap;flex-shrink:0;
}
body.template-ice .season-btn:hover{border-color:rgba(255,255,255,0.22);color:#e8eaed;background:rgba(255,255,255,0.08);}
body.template-ice .season-btn.active{
  background:rgba(79,195,247,0.15);color:#4fc3f7;border-color:#4fc3f7;
}
body.template-ice #episodes-list{gap:8px;}
body.template-ice .ep-thumb{border-radius:10px;}

/* ICE cast */
body.template-ice .cast-avatar{border-radius:10px;width:76px;height:76px;}
body.template-ice .cast-name{font-family:'Source Sans 3','Source Sans Pro',sans-serif;font-size:12px;color:rgba(255,255,255,0.55);}
body.template-ice .cast-char{font-family:'Source Sans 3','Source Sans Pro',sans-serif;font-size:10px;color:rgba(255,255,255,0.3);}

/* ICE recommendations */
body.template-ice #recs-row .card{border-radius:10px;}

/* ── PLAYER ── */
body.template-ice #player-topbar{font-family:'Source Sans 3','Source Sans Pro',sans-serif;}
body.template-ice #player-title{font-family:'Source Sans 3','Source Sans Pro',sans-serif;}
body.template-ice .ctrl-btn{font-family:'Source Sans 3','Source Sans Pro',sans-serif;}

/* ── SPINNER ── */
body.template-ice .spinner{border-color:rgba(255,255,255,0.07);border-top-color:#4fc3f7;}

/* ── LIST VIEW ── */
body.template-ice #grid.list-view .card{border:none;}

/* ── MOBILE RESPONSIVE ── */
@media(max-width:768px){
  body.template-ice #header{padding:0 12px;height:56px;gap:10px;}
  body.template-ice #logo{font-size:16px;letter-spacing:2px;padding:2px 8px 0;}
  body.template-ice .tab-btn{font-size:11px;padding:5px 12px;flex-shrink:0;}
  body.template-ice #browse-page{padding:56px 12px 28px;}
  body.template-ice .card:hover{transform:none;z-index:auto;box-shadow:none;}
  body.template-ice .spotlight-banner{height:50vw!important;min-height:200px!important;max-height:350px!important;}
  body.template-ice .spotlight-banner>div:nth-child(2){bottom:20%!important;}
  body.template-ice .spotlight-title{font-size:36px!important;line-height:0.95!important;}
  body.template-ice .rv-row{padding:0 12px 14px;}
  body.template-ice .rv-card{width:100px;}
  body.template-ice .rv-card img{width:100px;height:150px;border-radius:8px;box-shadow:0 4px 16px rgba(0,0,0,0.3);}
  body.template-ice .rv-card:hover{transform:none;}
  body.template-ice .cw-card{width:100px;}
  body.template-ice .cw-card img{width:100px;height:150px;}
  body.template-ice .section-title{font-size:12px;padding-bottom:8px;margin-bottom:8px;}
  body.template-ice .top10-card{width:160px;}
  body.template-ice .top10-poster img{width:90px;height:135px;}
  body.template-ice .top10-num{font-size:80px;}
  body.template-ice .rv-card:hover,body.template-ice .cw-card:hover,body.template-ice .top10-card:hover{transform:none;margin:0;opacity:1;}
  body.template-ice .nf-row-arrow{display:none!important;}
  body.template-ice #grid{grid-template-columns:repeat(auto-fill,minmax(100px,1fr));gap:8px;}
  body.template-ice #detail-title{font-size:36px!important;-webkit-text-fill-color:transparent!important;}
  body.template-ice #detail-content{padding:18px 12px 28px;}
  body.template-ice #detail-overview{max-width:100%;}
  body.template-ice .season-btn{font-size:12px;padding:8px 16px;border-radius:20px;}
}

/* ═══════════════════════════════════════
   ICE TEMPLATE — SPORTS PAGE (Broadcast Cards)
   ═══════════════════════════════════════ */

/* Sports page container */
body.template-ice #sports-page{font-family:'Source Sans 3','Source Sans Pro',sans-serif;padding:0 0 28px;}

/* Hide default filter bar styling — ICE uses its own sport-tab pills */
body.template-ice .sports-filter{display:flex;gap:6px;flex-wrap:wrap;margin-bottom:6px;padding:0 32px;}

/* ICE sport-tab filter pills */
body.template-ice .ice-sport-tab{font-size:11px;font-weight:600;padding:5px 14px;border-radius:8px;border:1px solid rgba(255,255,255,0.07);background:rgba(255,255,255,0.03);color:rgba(255,255,255,0.55);cursor:pointer;transition:all 0.3s;font-family:'Source Sans 3',sans-serif;letter-spacing:0.3px;}
body.template-ice .ice-sport-tab:hover{color:#e8eaed;border-color:rgba(255,255,255,0.15);}
body.template-ice .ice-sport-tab.active{background:rgba(79,195,247,0.15);border-color:#4fc3f7;color:#4fc3f7;}

/* ICE Sports header */
body.template-ice .ice-sports-header{padding:28px 32px 12px;position:relative;z-index:2;}
body.template-ice .ice-sports-title{font-family:'Bebas Neue',sans-serif;font-size:36px;letter-spacing:2px;background:linear-gradient(180deg,#fff,#8db5d4);-webkit-background-clip:text;-webkit-text-fill-color:transparent;margin-bottom:4px;}
body.template-ice .ice-sports-sub{font-size:13px;color:rgba(255,255,255,0.55);margin-bottom:16px;}

/* Broadcast card rows */
body.template-ice .ice-bc-row{padding:0 32px 24px;position:relative;z-index:2;}
body.template-ice .ice-bc-row-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:14px;}
body.template-ice .ice-bc-row-title{font-size:15px;font-weight:700;color:#e8eaed;}
body.template-ice .ice-bc-row-link{font-size:12px;font-weight:600;color:rgba(255,255,255,0.55);padding:5px 14px;border:1px solid rgba(255,255,255,0.07);border-radius:8px;background:rgba(255,255,255,0.03);font-family:'Source Sans 3',sans-serif;cursor:default;}

/* Broadcast track — horizontal scroll */
body.template-ice .ice-bc-track{display:flex;gap:12px;overflow-x:auto;scroll-behavior:auto;scrollbar-width:none;-ms-overflow-style:none;padding-bottom:4px;cursor:grab;user-select:none;}
body.template-ice .ice-bc-track::-webkit-scrollbar{display:none;}

/* Broadcast card */
body.template-ice .ice-bc-card{flex-shrink:0;width:310px;border-radius:14px;overflow:hidden;cursor:pointer;transition:all 0.4s cubic-bezier(0.25,0.46,0.45,0.94);position:relative;}
body.template-ice .ice-bc-card:hover{transform:translateY(-4px) scale(1.01);box-shadow:0 14px 44px rgba(0,0,0,0.5);}

/* Card image area */
body.template-ice .ice-bc-card-img{width:100%;height:190px;background-size:cover;background-position:center;position:relative;background-color:rgba(255,255,255,0.04);border-radius:14px;overflow:hidden;}
body.template-ice .ice-bc-card-img::after{content:'';position:absolute;inset:0;background:linear-gradient(to top,rgba(10,16,24,0.92) 0%,rgba(10,16,24,0.3) 40%,transparent 70%);border-radius:14px;}

/* Team logos overlay (when no event image) */
body.template-ice .ice-bc-teams-overlay{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;gap:24px;z-index:1;}
body.template-ice .ice-bc-teams-overlay img{width:72px;height:72px;object-fit:contain;filter:drop-shadow(0 4px 12px rgba(0,0,0,0.5));}

/* Sport icon overlay (when no image or logos) */
body.template-ice .ice-bc-icon-overlay{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;font-size:56px;z-index:1;opacity:0.6;filter:drop-shadow(0 4px 12px rgba(0,0,0,0.3));}

/* Day badge */
body.template-ice .ice-bc-badge{position:absolute;top:12px;left:12px;font-size:9px;font-weight:700;padding:4px 10px;border-radius:6px;letter-spacing:0.6px;text-transform:uppercase;z-index:2;backdrop-filter:blur(8px);font-family:'Source Sans 3',sans-serif;}
body.template-ice .ice-bc-badge.today{background:rgba(79,195,247,0.2);color:#4fc3f7;border:1px solid rgba(79,195,247,0.3);}
body.template-ice .ice-bc-badge.yesterday{background:rgba(255,255,255,0.1);color:rgba(255,255,255,0.55);border:1px solid rgba(255,255,255,0.12);}
body.template-ice .ice-bc-badge.tomorrow{background:rgba(34,197,94,0.15);color:#22c55e;border:1px solid rgba(34,197,94,0.25);}
body.template-ice .ice-bc-badge.live{background:rgba(239,68,68,0.2);color:#ef4444;border:1px solid rgba(239,68,68,0.3);animation:ice-livepulse 2s infinite;}

/* Card info overlay */
body.template-ice .ice-bc-card-info{position:absolute;bottom:0;left:0;right:0;padding:14px 16px;z-index:2;}
body.template-ice .ice-bc-time{font-size:10px;font-weight:600;color:rgba(255,255,255,0.55);background:rgba(0,0,0,0.4);padding:3px 8px;border-radius:4px;display:inline-block;margin-bottom:6px;backdrop-filter:blur(6px);}
body.template-ice .ice-bc-event-name{font-size:16px;font-weight:700;color:#e8eaed;line-height:1.2;}

/* League info below card */
body.template-ice .ice-bc-league-info{font-size:11px;color:rgba(255,255,255,0.3);margin-top:8px;padding:0 4px;display:flex;align-items:center;gap:6px;}
body.template-ice .ice-bc-league-info img{width:16px;height:11px;object-fit:contain;border-radius:1px;}
body.template-ice .ice-bc-league-info span{color:rgba(255,255,255,0.55);}

/* Browse by sport section */
body.template-ice .ice-browse-sport{padding:12px 32px 28px;}
body.template-ice .ice-browse-sport .ice-bc-row-title{margin-bottom:14px;}
body.template-ice .ice-sport-sm-track{display:flex;gap:12px;overflow-x:auto;scrollbar-width:none;-ms-overflow-style:none;padding-bottom:4px;}
body.template-ice .ice-sport-sm-track::-webkit-scrollbar{display:none;}

/* Small sport card */
body.template-ice .ice-sport-sm{flex-shrink:0;width:130px;border-radius:12px;overflow:hidden;cursor:pointer;transition:all 0.35s;position:relative;text-align:center;}
body.template-ice .ice-sport-sm:hover{transform:translateY(-3px);box-shadow:0 8px 28px rgba(0,0,0,0.4);}
body.template-ice .ice-sport-sm-img{width:130px;height:80px;border-radius:12px;overflow:hidden;position:relative;}
body.template-ice .ice-sm-grad{width:100%;height:100%;border-radius:12px;display:flex;align-items:center;justify-content:center;font-size:28px;}
body.template-ice .ice-sport-sm-name{font-size:11px;font-weight:600;color:rgba(255,255,255,0.55);margin-top:6px;transition:color 0.3s;}
body.template-ice .ice-sport-sm:hover .ice-sport-sm-name{color:#e8eaed;}

/* Hide old sports-cat/league elements when ICE renders broadcast cards */
body.template-ice .sports-cat{margin-bottom:28px;padding:0 32px;}
body.template-ice .sports-cat-title{font-family:'Bebas Neue',sans-serif;font-weight:400;font-size:28px;letter-spacing:2px;background:linear-gradient(180deg,#fff,#8db5d4);-webkit-background-clip:text;-webkit-text-fill-color:transparent;margin-bottom:14px;display:flex;align-items:center;gap:10px;}
body.template-ice .sports-cat-title .cat-count{font-family:'Source Sans 3',sans-serif;font-size:12px;color:rgba(255,255,255,0.3);font-weight:400;-webkit-text-fill-color:rgba(255,255,255,0.3);}

/* Sports league blocks — glass card style */
body.template-ice .sports-league{background:rgba(255,255,255,0.05);border:1px solid rgba(255,255,255,0.07);border-radius:14px;margin-bottom:14px;overflow:hidden;}
body.template-ice .sports-league-header{display:flex;align-items:center;gap:10px;padding:12px 20px;border-bottom:1px solid rgba(255,255,255,0.07);background:rgba(255,255,255,0.03);backdrop-filter:blur(8px);}
body.template-ice .sports-league-header img{width:24px;height:16px;object-fit:contain;border-radius:2px;}
body.template-ice .sports-league-header span{font-family:'Source Sans 3',sans-serif;font-weight:700;font-size:15px;color:#e8eaed;}
body.template-ice .sports-league-header .league-country{font-family:'Source Sans 3',sans-serif;font-size:11px;color:rgba(255,255,255,0.3);margin-left:auto;}

/* Sport event rows */
body.template-ice .sport-row{display:flex;align-items:center;gap:12px;padding:12px 20px;border-bottom:1px solid rgba(255,255,255,0.07);transition:background 0.2s;}
body.template-ice .sport-row:last-child{border-bottom:none;}
body.template-ice .sport-row:hover{background:rgba(79,195,247,0.04);}

/* Status badges — ICE style */
body.template-ice .sport-row-status span{font-family:'Source Sans 3',sans-serif;font-size:10px;font-weight:700;letter-spacing:1px;text-transform:uppercase;padding:4px 10px;border-radius:6px;display:inline-block;backdrop-filter:blur(8px);}
body.template-ice .status-live{background:rgba(239,68,68,0.2);color:#ef4444;border:1px solid rgba(239,68,68,0.3);animation:ice-livepulse 2s infinite;}
body.template-ice .status-upcoming{background:rgba(245,158,11,0.12);color:#f59e0b;border:1px solid rgba(245,158,11,0.25);}
body.template-ice .status-finished{background:rgba(255,255,255,0.06);color:rgba(255,255,255,0.3);border:1px solid rgba(255,255,255,0.07);}
@keyframes ice-livepulse{0%,100%{opacity:0.7}50%{opacity:1}}

/* Time & countdown */
body.template-ice .sport-row-time{font-family:'Source Sans 3',sans-serif;font-size:12px;color:rgba(255,255,255,0.55);min-width:44px;text-align:center;}
body.template-ice .sport-row-countdown{font-family:'Source Sans 3',sans-serif;font-size:11px;color:#f59e0b;background:rgba(245,158,11,0.1);padding:3px 8px;border-radius:6px;white-space:nowrap;}

/* Teams */
body.template-ice .sport-row-teams{flex:1;display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:4px;min-width:0;}
body.template-ice .sport-row-team{display:flex;align-items:center;gap:8px;min-width:0;}
body.template-ice .sport-row-team img{width:26px;height:26px;object-fit:contain;flex-shrink:0;}
body.template-ice .sport-row-team span{font-family:'Source Sans 3',sans-serif;font-size:13px;font-weight:600;color:#e8eaed;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
body.template-ice .sport-row-team.home{justify-content:flex-end;text-align:right;}
body.template-ice .sport-row-vs{font-family:'Source Sans 3',sans-serif;font-weight:800;font-size:11px;color:rgba(255,255,255,0.3);text-align:center;padding:0 4px;}
body.template-ice .sport-row-score{font-family:'Source Sans 3',sans-serif;font-size:16px;font-weight:700;color:#e8eaed;min-width:50px;text-align:center;letter-spacing:1px;}

/* Event name */
body.template-ice .sport-row-event{font-family:'Source Sans 3',sans-serif;font-weight:600;font-size:13px;color:#e8eaed;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}

/* Action buttons */
body.template-ice .sport-action-btn{background:rgba(255,255,255,0.03);border:1px solid rgba(255,255,255,0.07);color:rgba(255,255,255,0.55);border-radius:6px;padding:3px 8px;font-family:'Source Sans 3',sans-serif;font-size:9px;cursor:pointer;letter-spacing:0.5px;transition:all 0.3s;text-transform:uppercase;}
body.template-ice .sport-action-btn:hover{border-color:#4fc3f7;color:#4fc3f7;}

/* Channel pills */
body.template-ice .sport-channel-pill{background:rgba(255,255,255,0.03);border:1px solid rgba(255,255,255,0.07);border-radius:8px;padding:5px 10px;font-family:'Source Sans 3',sans-serif;font-size:10px;color:rgba(255,255,255,0.55);display:flex;align-items:center;gap:6px;cursor:pointer;transition:all 0.3s;white-space:nowrap;}
body.template-ice .sport-channel-pill:hover{border-color:#4fc3f7;color:#e8eaed;background:rgba(79,195,247,0.08);}
body.template-ice .sport-channel-pill img{width:16px;height:16px;border-radius:3px;object-fit:contain;}
body.template-ice .sport-more-btn{background:rgba(79,195,247,0.15);color:#4fc3f7;border-color:rgba(79,195,247,0.3);font-weight:700;}
body.template-ice .sport-more-btn:hover{background:#4fc3f7;color:#0a1018;}

/* Channel modal */
body.template-ice .ch-modal-overlay{background:rgba(0,0,0,0.8);backdrop-filter:blur(12px);}
body.template-ice .ch-modal{background:#0e1620;border:1px solid rgba(255,255,255,0.07);border-radius:14px;padding:24px;}
body.template-ice .ch-modal-title{font-family:'Source Sans 3',sans-serif;font-weight:700;font-size:14px;color:#e8eaed;margin-bottom:16px;line-height:1.3;}
body.template-ice .ch-modal-close{background:rgba(255,255,255,0.03);border:1px solid rgba(255,255,255,0.07);border-radius:10px;padding:8px 20px;color:rgba(255,255,255,0.55);cursor:pointer;font-family:'Source Sans 3',sans-serif;font-size:11px;width:100%;transition:all 0.3s;}
body.template-ice .ch-modal-close:hover{border-color:#4fc3f7;color:#e8eaed;}

/* Sports empty state */
body.template-ice #sports-empty{font-family:'Source Sans 3',sans-serif;}
body.template-ice #sports-empty div:last-child{font-family:'Source Sans 3',sans-serif;font-weight:700;}

/* ═══════════════════════════════════════
   ICE TEMPLATE — LIVE TV PAGE
   ═══════════════════════════════════════ */

body.template-ice #livetv-page{font-family:'Source Sans 3','Source Sans Pro',sans-serif;padding:28px 32px;}

/* Country selection grid */
body.template-ice #livetv-countries-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(160px,1fr));gap:14px;}
body.template-ice .ltv-flag-card{background:rgba(255,255,255,0.05);border:1px solid rgba(255,255,255,0.07);border-radius:14px;cursor:pointer;transition:all 0.4s cubic-bezier(0.25,0.46,0.45,0.94);overflow:hidden;}
body.template-ice .ltv-flag-card:hover{transform:translateY(-4px);border-color:rgba(79,195,247,0.3);box-shadow:0 8px 32px rgba(0,0,0,0.4),0 0 20px rgba(79,195,247,0.15);}
body.template-ice .ltv-flag-info{padding:10px 12px 12px;text-align:center;}
body.template-ice .ltv-flag-name{font-family:'Source Sans 3',sans-serif;font-weight:700;font-size:13px;color:#e8eaed;letter-spacing:0.3px;}
body.template-ice .ltv-flag-count{font-family:'Source Sans 3',sans-serif;font-size:10px;color:rgba(255,255,255,0.55);margin-top:2px;}

/* Channels header */
body.template-ice #livetv-channels-header{display:flex;align-items:center;gap:14px;margin-bottom:20px;padding-bottom:16px;border-bottom:1px solid rgba(255,255,255,0.07);}
body.template-ice #livetv-back-btn{background:rgba(255,255,255,0.03);border:1px solid rgba(255,255,255,0.07);color:#e8eaed;border-radius:7px;padding:8px 16px;font-family:'Source Sans 3',sans-serif;font-size:11px;font-weight:700;letter-spacing:0.5px;cursor:pointer;transition:all 0.3s;backdrop-filter:blur(8px);}
body.template-ice #livetv-back-btn:hover{border-color:rgba(255,255,255,0.15);background:rgba(255,255,255,0.08);}
body.template-ice #livetv-country-title{font-family:'Bebas Neue',sans-serif;font-weight:400;font-size:28px;color:#e8eaed;letter-spacing:2px;background:linear-gradient(180deg,#fff,#8db5d4);-webkit-background-clip:text;-webkit-text-fill-color:transparent;}

/* Search input */
body.template-ice #livetv-search{background:rgba(255,255,255,0.06);border:1px solid rgba(255,255,255,0.07);border-radius:10px;color:#e8eaed;font-family:'Source Sans 3',sans-serif;font-size:12px;transition:all 0.3s;}
body.template-ice #livetv-search:focus{border-color:#4fc3f7;background:rgba(255,255,255,0.09);box-shadow:0 0 12px rgba(79,195,247,0.15);outline:none;}
body.template-ice #livetv-search::placeholder{color:rgba(255,255,255,0.3);}

/* Category bar — pill tabs */
body.template-ice #livetv-category-bar{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:20px;}
body.template-ice .ltv-cat-btn{background:rgba(255,255,255,0.03);border:1px solid rgba(255,255,255,0.07);color:rgba(255,255,255,0.55);border-radius:8px;padding:5px 14px;font-family:'Source Sans 3',sans-serif;font-size:11px;font-weight:600;letter-spacing:0.3px;cursor:pointer;transition:all 0.3s;}
body.template-ice .ltv-cat-btn:hover{border-color:rgba(255,255,255,0.15);color:#e8eaed;}
body.template-ice .ltv-cat-btn.active{background:rgba(79,195,247,0.15);border-color:#4fc3f7;color:#4fc3f7;}

/* TV Guide button in header */
body.template-ice #livetv-channels-header button[onclick*="openTvGuide"],
body.template-ice #livetv-channels-header button[onclick*="openMultiView"]{
  background:rgba(255,255,255,0.03)!important;border:1px solid rgba(255,255,255,0.07)!important;color:rgba(255,255,255,0.55)!important;border-radius:8px!important;font-family:'Source Sans 3',sans-serif!important;font-size:11px!important;font-weight:600!important;transition:all 0.3s!important;padding:6px 14px!important;}
body.template-ice #livetv-channels-header button[onclick*="openTvGuide"]:hover,
body.template-ice #livetv-channels-header button[onclick*="openMultiView"]:hover{
  border-color:#4fc3f7!important;color:#4fc3f7!important;background:rgba(79,195,247,0.08)!important;}

/* Channel cards — glass card style */
body.template-ice .ltv-card{background:rgba(255,255,255,0.05);border:1px solid rgba(255,255,255,0.07);border-radius:14px;overflow:hidden;cursor:pointer;transition:all 0.4s cubic-bezier(0.25,0.46,0.45,0.94);}
body.template-ice .ltv-card:hover{transform:translateY(-4px) scale(1.01);border-color:rgba(79,195,247,0.3);box-shadow:0 14px 44px rgba(0,0,0,0.5),0 0 20px rgba(79,195,247,0.15);}

/* Thumbnail */
body.template-ice .ltv-thumb{background:rgba(14,22,32,0.95);}
body.template-ice .ltv-thumb img.ltv-logo-fit{background:linear-gradient(135deg,#0d141f,#0e1620);}
body.template-ice .ltv-thumb-placeholder{font-family:'Source Sans 3',sans-serif;font-weight:800;color:rgba(255,255,255,0.07);background:linear-gradient(135deg,#0e1620,#0d141f);}
body.template-ice .ltv-live-badge{background:rgba(239,68,68,0.85);color:#fff;font-family:'Source Sans 3',sans-serif;font-size:9px;font-weight:700;letter-spacing:1px;padding:3px 8px;border-radius:6px;backdrop-filter:blur(8px);}

/* Info section */
body.template-ice .ltv-info{padding:12px 14px 14px;}
body.template-ice .ltv-name{font-family:'Source Sans 3',sans-serif;font-weight:700;font-size:14px;color:#e8eaed;margin-bottom:8px;}

/* Now playing */
body.template-ice .ltv-now-label{font-family:'Source Sans 3',sans-serif;font-size:9px;font-weight:700;letter-spacing:1px;color:#22c55e;background:rgba(34,197,94,0.12);padding:2px 6px;border-radius:4px;}
body.template-ice .ltv-now-title{font-family:'Source Sans 3',sans-serif;font-size:13px;color:#e8eaed;}
body.template-ice .ltv-desc{font-family:'Source Sans 3',sans-serif;font-size:10px;color:rgba(255,255,255,0.55);line-height:1.5;}

/* Progress bar — cyan accent */
body.template-ice .ltv-progress{height:4px;background:rgba(255,255,255,0.06);border-radius:2px;overflow:hidden;margin-bottom:4px;}
body.template-ice .ltv-progress-fill{height:100%;background:linear-gradient(90deg,#4fc3f7,#81d4fa);border-radius:2px;}

/* Time range */
body.template-ice .ltv-time-range{font-family:'Source Sans 3',sans-serif;font-size:9px;color:rgba(255,255,255,0.3);}

/* Next program */
body.template-ice .ltv-next-label{font-family:'Source Sans 3',sans-serif;font-size:9px;font-weight:700;letter-spacing:1px;color:#f59e0b;background:rgba(245,158,11,0.12);padding:2px 6px;border-radius:4px;}
body.template-ice .ltv-next-title{font-family:'Source Sans 3',sans-serif;font-size:12px;color:rgba(255,255,255,0.55);}
body.template-ice .ltv-next-time{font-family:'Source Sans 3',sans-serif;font-size:10px;color:rgba(255,255,255,0.3);}

/* No EPG state */
body.template-ice .ltv-no-epg{font-family:'Source Sans 3',sans-serif;font-size:10px;color:rgba(255,255,255,0.3);}

/* Admin bar */
body.template-ice .ltv-admin-bar{border-top:1px solid rgba(255,255,255,0.07);}
body.template-ice .ltv-admin-btn{background:rgba(255,255,255,0.03);border:1px solid rgba(255,255,255,0.07);border-radius:8px;transition:all 0.3s;color:rgba(255,255,255,0.8);}
body.template-ice .ltv-admin-edit:hover{background:#4fc3f7;border-color:#4fc3f7;color:#fff;}
body.template-ice .ltv-admin-epg{color:#4fc3f7;border-color:rgba(79,195,247,0.2);}
body.template-ice .ltv-admin-epg:hover{background:#4fc3f7;border-color:#4fc3f7;color:#fff;}
body.template-ice .ltv-admin-del{color:#ef4444;border-color:rgba(239,68,68,0.2);}
body.template-ice .ltv-admin-del:hover{background:#ef4444;border-color:#ef4444;color:#fff;}

/* Favourite button */
body.template-ice .ltv-fav-btn{background:rgba(0,0,0,0.5);backdrop-filter:blur(8px);border-radius:50%;}

/* ═══════════════════════════════════════
   ICE TEMPLATE — TV GUIDE MODAL
   ═══════════════════════════════════════ */

body.template-ice #tvguide-modal{background:rgba(0,0,0,0.92);backdrop-filter:blur(16px);}
body.template-ice .tvg-topbar{display:flex;align-items:center;gap:12px;padding:14px 24px;border-bottom:1px solid rgba(255,255,255,0.07);background:rgba(14,22,32,0.95);backdrop-filter:blur(8px);}
body.template-ice .tvg-topbar h3{font-family:'Bebas Neue',sans-serif;font-weight:400;font-size:28px;letter-spacing:2px;background:linear-gradient(180deg,#fff,#8db5d4);-webkit-background-clip:text;-webkit-text-fill-color:transparent;}
body.template-ice .tvg-close{background:rgba(255,255,255,0.03);border:1px solid rgba(255,255,255,0.07);color:#e8eaed;width:36px;height:36px;border-radius:8px;cursor:pointer;font-size:16px;display:flex;align-items:center;justify-content:center;transition:all 0.3s;backdrop-filter:blur(8px);}
body.template-ice .tvg-close:hover{background:rgba(255,255,255,0.08);border-color:rgba(255,255,255,0.15);color:#fff;}

/* Guide body */
body.template-ice .tvg-body{background:#070c13;}

/* Timeline header — sticky */
body.template-ice .tvg-timeline{display:flex;position:sticky;top:0;z-index:3;background:rgba(14,22,32,0.95);border-bottom:1px solid rgba(255,255,255,0.07);backdrop-filter:blur(8px);padding-left:140px;min-width:max-content;}
body.template-ice .tvg-time-slot{flex-shrink:0;width:200px;padding:8px 12px;font-family:'Source Sans 3',sans-serif;font-size:10px;font-weight:600;color:rgba(255,255,255,0.3);letter-spacing:0.5px;text-transform:uppercase;border-right:1px solid rgba(255,255,255,0.07);text-align:center;}

/* Channel rows */
body.template-ice .tvg-row{display:flex;min-height:52px;border-bottom:1px solid rgba(255,255,255,0.03);min-width:max-content;}
body.template-ice .tvg-ch{width:140px;flex-shrink:0;display:flex;align-items:center;gap:8px;padding:10px 12px;position:sticky;left:0;background:rgba(14,22,32,0.95);z-index:2;border-right:1px solid rgba(255,255,255,0.07);backdrop-filter:blur(8px);cursor:pointer;transition:background 0.2s;}
body.template-ice .tvg-ch:hover{background:rgba(79,195,247,0.06);}
body.template-ice .tvg-ch img{width:28px;height:28px;border-radius:6px;object-fit:contain;background:rgba(255,255,255,0.05);}
body.template-ice .tvg-ch-name{font-family:'Source Sans 3',sans-serif;font-size:11px;font-weight:600;color:rgba(255,255,255,0.55);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}

/* Program blocks */
body.template-ice .tvg-prog{position:absolute;top:2px;bottom:2px;background:rgba(255,255,255,0.05);border:1px solid rgba(255,255,255,0.07);border-radius:8px;padding:6px 12px;overflow:hidden;cursor:pointer;transition:all 0.2s;}
body.template-ice .tvg-prog:hover{border-color:rgba(79,195,247,0.3);background:rgba(79,195,247,0.08);}
body.template-ice .tvg-prog.now{background:rgba(79,195,247,0.06);border:1px solid rgba(79,195,247,0.15);border-radius:4px;margin:2px 1px;}
body.template-ice .tvg-prog-title{font-family:'Source Sans 3',sans-serif;font-size:11px;font-weight:600;color:#e8eaed;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
body.template-ice .tvg-prog-time{font-family:'Source Sans 3',sans-serif;font-size:9px;color:rgba(255,255,255,0.3);margin-top:1px;}

/* ═══════════════════════════════════════
   ICE TEMPLATE — MULTI-VIEW
   ═══════════════════════════════════════ */

body.template-ice #multiview-container{background:#070c13;}
body.template-ice .mv-toolbar{background:rgba(14,22,32,0.95);border:1px solid rgba(255,255,255,0.07);border-radius:14px;padding:8px 14px;backdrop-filter:blur(12px);}
body.template-ice .mv-toolbar button{background:rgba(255,255,255,0.03);border:1px solid rgba(255,255,255,0.07);color:rgba(255,255,255,0.55);border-radius:8px;padding:6px 14px;font-family:'Source Sans 3',sans-serif;font-size:11px;font-weight:600;cursor:pointer;transition:all 0.3s;}
body.template-ice .mv-toolbar button:hover{border-color:#4fc3f7;color:#4fc3f7;background:rgba(79,195,247,0.08);}
body.template-ice .mv-cell{border:1px solid rgba(255,255,255,0.07);}
body.template-ice .mv-cell-label{background:rgba(0,0,0,0.6);backdrop-filter:blur(8px);border-radius:6px;font-family:'Source Sans 3',sans-serif;font-size:10px;}
body.template-ice .mv-cell-close{background:rgba(0,0,0,0.6);backdrop-filter:blur(8px);border-radius:6px;}

/* ═══════════════════════════════════════
   ICE TEMPLATE — SPORTS/LIVETV/GUIDE MOBILE
   ═══════════════════════════════════════ */

/* Disable hover transform on touch */
@media(hover:none){
  body.template-ice .ice-bc-card:hover{transform:none;box-shadow:none;}
  body.template-ice .ice-sport-sm:hover{transform:none;box-shadow:none;}
}

@media(max-width:900px){
  /* Broadcast cards tablet */
  body.template-ice .sports-filter{padding:0 20px;overflow-x:auto;scrollbar-width:none;-ms-overflow-style:none;flex-wrap:nowrap;}
  body.template-ice .sports-filter::-webkit-scrollbar{display:none;}
  body.template-ice .ice-sport-tab{flex-shrink:0;}
  body.template-ice .ice-sports-header{padding:20px 20px 8px;}
  body.template-ice .ice-bc-row{padding:0 20px 20px;}
  body.template-ice .ice-bc-card{width:260px;}
  body.template-ice .ice-bc-card-img{height:155px;}
  body.template-ice .ice-browse-sport{padding:8px 20px 20px;}
  body.template-ice .sports-cat{padding:0 20px;}

  body.template-ice #livetv-page{padding:20px 20px;}
  body.template-ice .tvg-ch{width:100px;min-width:100px;padding:8px;}
  body.template-ice .tvg-ch-name{font-size:10px;}
}

@media(max-width:600px){
  /* Broadcast cards mobile */
  body.template-ice .sports-filter{padding:0 12px;gap:4px;-webkit-overflow-scrolling:touch;}
  body.template-ice .ice-sport-tab{font-size:10px;padding:5px 12px;border-radius:6px;flex-shrink:0;}
  body.template-ice .ice-sports-header{padding:14px 12px 6px;}
  body.template-ice .ice-sports-title{font-size:26px;margin-bottom:2px;}
  body.template-ice .ice-sports-sub{font-size:11px;margin-bottom:8px;}
  body.template-ice .ice-bc-row{padding:0 12px 14px;}
  body.template-ice .ice-bc-row-head{margin-bottom:8px;}
  body.template-ice .ice-bc-row-title{font-size:13px;}
  body.template-ice .ice-bc-row-link{font-size:10px;padding:4px 10px;border-radius:6px;}
  body.template-ice .ice-bc-card{width:220px;border-radius:10px;}
  body.template-ice .ice-bc-card-img{height:135px;border-radius:10px;}
  body.template-ice .ice-bc-badge{font-size:8px;padding:3px 7px;top:8px;left:8px;border-radius:5px;}
  body.template-ice .ice-bc-time{font-size:9px;padding:2px 6px;margin-bottom:3px;border-radius:3px;}
  body.template-ice .ice-bc-event-name{font-size:13px;line-height:1.2;}
  body.template-ice .ice-bc-card-info{padding:10px 12px;}
  body.template-ice .ice-bc-league-info{font-size:9px;padding:5px 2px 0;}
  body.template-ice .ice-bc-league-info img{width:13px;height:9px;}
  body.template-ice .ice-bc-teams-overlay img{width:48px;height:48px;gap:16px;}
  body.template-ice .ice-bc-icon-overlay{font-size:36px;}
  body.template-ice .ice-browse-sport{padding:4px 12px 14px;}
  body.template-ice .ice-sport-sm{width:90px;}
  body.template-ice .ice-sport-sm-img{width:90px;height:56px;border-radius:8px;}
  body.template-ice .ice-sm-grad{font-size:20px;border-radius:8px;}
  body.template-ice .ice-sport-sm-name{font-size:9px;margin-top:4px;}
  body.template-ice .sports-cat{padding:0 12px;margin-bottom:20px;}
  body.template-ice .sports-cat-title{font-size:22px;margin-bottom:10px;}

  body.template-ice #livetv-page{padding:12px 12px 80px;}
  body.template-ice #livetv-countries-grid{grid-template-columns:repeat(auto-fill,minmax(120px,1fr));gap:10px;}
  body.template-ice .ltv-flag-info{padding:8px 8px 10px;}
  body.template-ice .ltv-flag-name{font-size:11px;}
  body.template-ice #livetv-channels-header{margin-bottom:12px;padding-bottom:10px;gap:10px;flex-wrap:wrap;}
  body.template-ice #livetv-country-title{font-size:22px;}
  body.template-ice .ltv-card{border-radius:10px;}
  body.template-ice .ltv-card:hover{transform:none;box-shadow:none;}
  body.template-ice .ltv-name{font-size:12px;}
  body.template-ice .ltv-now-title{font-size:11px;}
  body.template-ice .ltv-desc{font-size:9px;-webkit-line-clamp:1;min-height:15px;}
  body.template-ice .ltv-next-title{font-size:10px;}
  body.template-ice #livetv-category-bar{gap:4px;margin-bottom:12px;}
  body.template-ice .ltv-cat-btn{padding:4px 10px;font-size:10px;}

  body.template-ice .tvg-topbar{padding:10px 14px;}
  body.template-ice .tvg-topbar h3{font-size:22px;}
  body.template-ice .tvg-close{width:32px;height:32px;border-radius:6px;}
  body.template-ice .tvg-ch{width:64px;min-width:64px;padding:5px 4px;gap:2px;flex-direction:column;align-items:center;text-align:center;}
  body.template-ice .tvg-ch img{width:22px;height:22px;}
  body.template-ice .tvg-ch-name{font-size:8px;line-height:1.2;}
  body.template-ice .tvg-timeline{padding-left:64px;}
  body.template-ice .tvg-time-slot{font-size:8px;padding:5px 0;width:150px;}
  body.template-ice .tvg-prog{padding:4px 6px;min-height:44px;}
  body.template-ice .tvg-prog-title{font-size:9px;}
  body.template-ice .tvg-prog-time{font-size:7px;}
}

/* ── Sport Player Right-Click Context Menu ── */
#sport-ctx-menu {
  position: fixed;
  z-index: 9000;
  background: rgba(10,12,18,0.97);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px;
  padding: 4px 0;
  min-width: 180px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.7);
  font-family: 'Space Mono', monospace;
  font-size: 12px;
  user-select: none;
  display: none;
}
#sport-ctx-menu.open { display: block; }
.sport-ctx-item {
  padding: 9px 16px;
  min-height: 44px;
  color: rgba(255,255,255,0.85);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
  white-space: nowrap;
}
.sport-ctx-item:hover { background: rgba(255,255,255,0.08); color: #fff; }
.sport-ctx-item.focused { background: rgba(255,255,255,0.12); color: #fff; }
.sport-ctx-item.has-sub::after { content: '▶'; margin-left: auto; font-size: 9px; opacity: 0.5; }
.sport-ctx-sep { height: 1px; background: rgba(255,255,255,0.08); margin: 4px 0; }
.sport-ctx-label { padding: 7px 16px 4px; font-size: 9px; font-weight: 700; letter-spacing: 1.5px; color: rgba(255,255,255,0.3); text-transform: uppercase; }
.sport-ctx-sub {
  position: absolute;
  left: 100%;
  top: 0;
  background: rgba(10,12,18,0.97);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px;
  padding: 4px 0;
  min-width: 160px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.7);
  display: none;
}
.sport-ctx-item:hover .sport-ctx-sub { display: block; }
.sport-ctx-sub-item {
  padding: 9px 16px;
  color: rgba(255,255,255,0.85);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
}
.sport-ctx-sub-item:hover { background: rgba(255,255,255,0.08); color: #fff; }
.sport-ctx-sub-item img { width: 22px; height: 22px; object-fit: contain; border-radius: 3px; }
/* Lineup panel overlay on player */
#sport-lineup-panel {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: rgba(6,14,6,0.97);
  backdrop-filter: blur(6px);
  z-index: 25;
  display: none;
  flex-direction: column;
  overflow: hidden;
}
#sport-lineup-panel.open { display: flex; }
.lineup-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px 8px;
  background: rgba(0,0,0,0.4);
  flex-shrink: 0;
}
.lineup-header-team {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'Space Mono', monospace;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.lineup-header-team img { width: 32px; height: 32px; object-fit: contain; }
.lineup-close {
  background: none;
  border: none;
  color: rgba(255,255,255,0.5);
  font-size: 20px;
  cursor: pointer;
  line-height: 1;
  padding: 2px 6px;
}
.lineup-close:hover { color: #fff; }
.lineup-body {
  overflow-y: auto;
  flex: 1;
  padding: 0;
}
.lineup-section-title {
  font-family: 'Space Mono', monospace;
  font-size: 9px;
  font-weight: 700;
  color: rgba(255,255,255,0.4);
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 10px 16px 6px;
  text-align: center;
}
.lineup-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 120px;
  color: rgba(255,255,255,0.35);
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  gap: 10px;
}
.lineup-spinner {
  width: 18px; height: 18px;
  border: 2px solid rgba(255,255,255,0.1);
  border-top-color: #4fc3f7;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
.lineup-empty {
  text-align: center;
  padding: 40px 20px;
  color: rgba(255,255,255,0.3);
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  line-height: 1.8;
}
/* ── Pitch formation layout — Sky Sports style ── */
/* Outer wrapper: full panel background dark blue */
#sport-lineup-panel { background: #0e1e38; }
.lineup-body { background: #0e1e38; }

/* The pitch itself */
.lp-pitch {
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  flex: 1;
  min-height: 0;
  padding: 0 4px;
  position: relative;
  /* dark navy blue, slightly lighter in centre */
  background: linear-gradient(180deg, #12254a 0%, #163060 40%, #163060 60%, #12254a 100%);
  margin: 0;
  overflow: visible;
}
/* Pitch outline */
.lp-pitch-lines {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: visible;
}
.lp-row {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 2px;
  padding: 4px 0 2px;
  position: relative;
  z-index: 2;
  flex-wrap: nowrap;
}
/* Player: big cutout image floating on pitch, label below */
.lp-player {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  flex: 1;
  max-width: 80px;
  min-width: 0;
}
/* The cutout image — no card border, just the player floating */
.lp-face {
  width: 100%;
  max-width: 72px;
  aspect-ratio: 3/4;
  object-fit: cover;
  object-position: top center;
  display: block;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.7));
}
.lp-face-blank {
  width: 56px;
  aspect-ratio: 3/4;
  background: rgba(255,255,255,0.06);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.2);
  font-size: 28px;
}
/* Number + name pill — dark blue rounded rectangle like Sky Sports */
.lp-label {
  display: flex;
  align-items: center;
  gap: 0;
  background: rgba(8,20,50,0.92);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 3px;
  overflow: hidden;
  max-width: 76px;
  width: 100%;
  margin-top: 3px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.5);
}
.lp-badge {
  background: rgba(255,255,255,0.15);
  color: #fff;
  font-family: 'Space Mono', monospace;
  font-size: 9px;
  font-weight: 700;
  padding: 2px 5px;
  flex-shrink: 0;
  line-height: 1.5;
}
.lp-name {
  color: #fff;
  font-family: 'Syne', sans-serif;
  font-size: 9px;
  font-weight: 800;
  padding: 2px 4px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  text-align: center;
  line-height: 1.5;
}
/* Team name bar at the bottom — Sky Sports style */
.lp-teambar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 8px 16px;
  background: linear-gradient(90deg, #1a3a7a, #2255bb, #1a3a7a);
  flex-shrink: 0;
}
.lp-teambar-name {
  font-family: 'Syne', sans-serif;
  font-size: 16px;
  font-weight: 900;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 2px;
}
.lp-teambar img {
  width: 36px; height: 36px;
  object-fit: contain;
}
/* Subs bench */
.lp-subs-wrap {
  flex-shrink: 0;
  background: rgba(0,0,0,0.3);
  border-top: 1px solid rgba(255,255,255,0.08);
}
.lp-subs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 6px 8px 8px;
  justify-content: center;
}
.lp-sub-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  width: 46px;
}
.lp-sub-face {
  width: 38px;
  aspect-ratio: 3/4;
  object-fit: cover;
  object-position: top center;
  display: block;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.6));
}
.lp-sub-face-blank {
  width: 38px;
  aspect-ratio: 3/4;
  background: rgba(255,255,255,0.05);
  border-radius: 3px;
}
.lp-sub-label {
  display: flex;
  align-items: center;
  gap: 0;
  background: rgba(8,20,50,0.9);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 2px;
  overflow: hidden;
  width: 100%;
  margin-top: 2px;
}
.lp-sub-num {
  background: rgba(255,255,255,0.12);
  color: #fff;
  font-family: 'Space Mono', monospace;
  font-size: 7px;
  font-weight: 700;
  padding: 1px 3px;
  flex-shrink: 0;
  line-height: 1.5;
}
.lp-sub-name {
  color: rgba(255,255,255,0.9);
  font-family: 'Syne', sans-serif;
  font-size: 7px;
  font-weight: 700;
  padding: 1px 3px;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  text-align: center;
  line-height: 1.5;
}

/* ── League Table ── */
.lt-wrap { padding: 0 0 12px; font-family: 'Space Mono', monospace; }
.lt-head, .lt-row { display: flex; align-items: center; padding: 5px 10px; gap: 4px; font-size: 10px; }
.lt-head { color: rgba(255,255,255,0.35); font-size: 9px; letter-spacing: 1px; border-bottom: 1px solid rgba(255,255,255,0.08); position: sticky; top: 0; background: #0e1e38; }
.lt-row { border-bottom: 1px solid rgba(255,255,255,0.04); color: rgba(255,255,255,0.8); }
.lt-row:hover { background: rgba(255,255,255,0.04); }
.lt-row-promotion { border-left: 2px solid #4ade80; }
.lt-row-playoff   { border-left: 2px solid #facc15; }
.lt-row-relegation{ border-left: 2px solid #f87171; }
.lt-row-playing   { background: rgba(255,255,255,0.07) !important; color: #fff; font-weight: 700; }
.lt-col-rank  { width: 18px; text-align: center; color: rgba(255,255,255,0.35); flex-shrink: 0; }
.lt-col-team  { flex: 1; display: flex; align-items: center; gap: 5px; min-width: 0; }
.lt-col-team img { width: 16px; height: 16px; object-fit: contain; flex-shrink: 0; }
.lt-col-team span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10px; }
.lt-col-num   { width: 22px; text-align: center; flex-shrink: 0; color: rgba(255,255,255,0.6); }
.lt-col-pts   { width: 26px; text-align: center; flex-shrink: 0; font-weight: 700; color: #fff; }
.lt-col-form  { width: 52px; display: flex; align-items: center; flex-shrink: 0; }

/* ── Lineup Panel Tabs ── */
.lineup-tabs { display: flex; gap: 2px; padding: 6px 8px 0; background: #0a1628; border-bottom: 1px solid rgba(255,255,255,0.08); flex-shrink: 0; }
.lp-tab { flex: 1; padding: 6px 4px; background: transparent; border: none; border-bottom: 2px solid transparent; color: rgba(255,255,255,0.4); font-family: 'Space Mono', monospace; font-size: 9px; font-weight: 700; letter-spacing: 0.5px; text-transform: uppercase; cursor: pointer; transition: color .15s, border-color .15s; }
.lp-tab:hover { color: rgba(255,255,255,0.7); }
.lp-tab.active { color: #fff; border-bottom-color: #3b82f6; }

/* ── Event Details Tab ── */
.ev-details-wrap { padding: 12px 14px; font-family: 'Space Mono', monospace; }
.ev-details-matchup { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 14px; padding-bottom: 14px; border-bottom: 1px solid rgba(255,255,255,0.07); }
.ev-details-team { display: flex; flex-direction: column; align-items: center; gap: 6px; flex: 1; min-width: 0; }
.ev-details-team img { width: 40px; height: 40px; object-fit: contain; }
.ev-details-team span { font-size: 9px; color: rgba(255,255,255,0.7); text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 80px; }
.ev-details-score-mid { display: flex; flex-direction: column; align-items: center; gap: 4px; flex-shrink: 0; }
.ev-details-score { font-size: 26px; font-weight: 700; color: #fff; letter-spacing: 3px; }
.ev-details-vs { font-size: 14px; font-weight: 700; color: rgba(255,255,255,0.3); letter-spacing: 2px; }
.ev-details-progress { font-size: 10px; color: rgba(255,255,255,0.45); text-align: center; }
.ev-details-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.ev-detail-cell { background: rgba(255,255,255,0.04); border-radius: 6px; padding: 8px 10px; }
.ev-detail-label { font-size: 8px; color: rgba(255,255,255,0.3); letter-spacing: 1px; text-transform: uppercase; margin-bottom: 3px; }
.ev-detail-value { font-size: 11px; color: rgba(255,255,255,0.85); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev-detail-full { grid-column: 1 / -1; }
.ev-details-desc { margin-top: 10px; font-size: 10px; color: rgba(255,255,255,0.45); line-height: 1.6; }

/* ── Score Tracker button ── */
#score-tracker-btn.on { color: #4ade80; }

/* ── Lineup team picker ── */
.lp-team-picker { display: flex; flex-direction: column; gap: 10px; padding: 20px 16px; }
.lp-team-pick-btn { display: flex; align-items: center; gap: 12px; background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1); border-radius: 10px; padding: 14px 16px; cursor: pointer; color: #fff; font-family: 'Space Mono', monospace; font-size: 12px; font-weight: 700; text-align: left; letter-spacing: 0.5px; transition: background .15s; width: 100%; }
.lp-team-pick-btn:hover { background: rgba(255,255,255,0.1); }
.lp-team-pick-btn img { width: 32px; height: 32px; object-fit: contain; flex-shrink: 0; }

/* ── All Scores Panel ── */
.as-wrap { padding: 0 0 16px; font-family: 'Space Mono', monospace; }
.as-sport-header { padding: 8px 12px 4px; font-size: 9px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; color: rgba(255,255,255,0.3); border-bottom: 1px solid rgba(255,255,255,0.06); }
.as-row { display: flex; align-items: center; padding: 7px 10px; gap: 6px; border-bottom: 1px solid rgba(255,255,255,0.04); }
.as-row:hover { background: rgba(255,255,255,0.04); }
.as-row-watching { background: rgba(59,130,246,0.12) !important; border-left: 2px solid #3b82f6; }
.as-team { display: flex; align-items: center; gap: 5px; flex: 1; min-width: 0; }
.as-team.home { justify-content: flex-end; text-align: right; }
.as-team.away { justify-content: flex-start; }
.as-team img { width: 18px; height: 18px; object-fit: contain; flex-shrink: 0; }
.as-team span { font-size: 10px; color: rgba(255,255,255,0.8); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 90px; }
.as-score-col { display: flex; flex-direction: column; align-items: center; flex-shrink: 0; width: 72px; gap: 1px; }
.as-score { font-size: 13px; font-weight: 700; color: #fff; letter-spacing: 1px; }
.as-progress { font-size: 8px; color: rgba(255,255,255,0.35); letter-spacing: 0.5px; }

/* Embed mode: hide video transport controls, keep topbar + pills + episode list */
.embed-mode #player-progress-wrap{display:none!important;}
.embed-mode #player-btns .ctrl-btn{display:none!important;}
.embed-mode #player-btns #player-vol{display:none!important;}
.embed-mode #player-btns #ep-list-btn{display:inline-flex!important;}
.embed-mode #player-btns #ap-toggle{display:flex!important;}
.embed-mode #player-btns button[onclick="toggleFullscreen()"]{display:inline-flex!important;}
.embed-mode #player-video{display:none!important;}

