/* PLAYER 365 ÃƒÆ’Ã‚Â¢ÃƒÂ¢Ã¢â‚¬Å¡Ã‚Â¬ÃƒÂ¢Ã¢â€šÂ¬Ã‚Â Series reference design. This file owns Movies presentation only. */
body.iptv365-series-mode,
body.iptv365-series-mode #app,
body.iptv365-series-mode .app-container {
  background:#020812 !important;
}
body.iptv365-series-mode #iptv365GlobalNav { display:none !important; }
body.iptv365-series-mode #mediaWorkspaceScreen {
  position:fixed !important; inset:0 !important; z-index:900 !important;
  display:flex !important; flex-direction:column !important;
  width:100vw !important; height:100vh !important; height:100dvh !important;
  min-height:0 !important; margin:0 !important; padding:0 !important;
  overflow:hidden !important; box-sizing:border-box !important;
  color:#f7fbff !important; background:#020812 var(--iptv365-global-bg) center center / cover no-repeat !important;
  isolation:isolate !important;
}
body.iptv365-series-mode #mediaWorkspaceScreen::before { content:none !important; }
body.iptv365-series-mode #mediaWorkspaceScreen > .iptv365-screen-back,
body.iptv365-series-mode #mediaWorkspaceScreen > .backToHomeBtn { display:none !important; }
body.iptv365-series-mode .iptv365-movies-header {
  position:relative; z-index:3; flex:0 0 clamp(72px,9vh,94px); min-height:72px;
  display:grid; grid-template-columns:minmax(180px,1fr) auto minmax(520px,1fr);
  align-items:center; gap:clamp(10px,1.2vw,20px); padding:5px clamp(18px,2.5vw,44px);
  box-sizing:border-box; border-bottom:1px solid rgba(0,150,255,.12);
  background:linear-gradient(90deg,rgba(1,6,13,.96),rgba(2,13,27,.86),rgba(1,6,13,.97));
  height:clamp(72px,9vh,94px); max-height:94px;
}
body.iptv365-series-mode .iptv365-movie-brand { display:flex; align-items:center; gap:0; width:max-content; text-decoration:none; color:#fff; filter:drop-shadow(0 4px 10px rgba(0,0,0,.55)); }
body.iptv365-series-mode .iptv365-brand-word { font-size:clamp(18px,1.95vw,31px); font-style:italic; font-weight:950; letter-spacing:-1.6px; }
body.iptv365-series-mode .iptv365-brand-play { position:relative; display:grid; place-items:center; width:clamp(50px,5.5vw,84px); height:clamp(38px,4.6vw,62px); margin-left:5px; padding-right:10px; clip-path:polygon(0 0,100% 50%,0 100%); border-radius:12px; background:linear-gradient(145deg,#fff06a 0%,#ffc400 48%,#ff8b00 100%); color:#050505; }
body.iptv365-series-mode .iptv365-brand-play b { font-size:clamp(17px,1.7vw,27px); font-weight:1000; transform:translateX(-5px); }
body.iptv365-series-mode .iptv365-movies-heading { display:flex; flex-direction:column; justify-content:center; align-items:center; gap:0; min-width:0; color:#f7fbff; text-shadow:0 2px 12px rgba(0,130,255,.22); }
body.iptv365-series-mode .iptv365-movies-heading-main { display:flex; justify-content:center; align-items:center; gap:10px; font-size:clamp(20px,2.3vw,35px); font-style:italic; font-weight:950; letter-spacing:-1.3px; white-space:nowrap; }
body.iptv365-series-mode .iptv365-clapper { font-size:clamp(23px,2.55vw,38px); filter:grayscale(1) brightness(2.5); }
body.iptv365-series-mode .iptv365-movies-category-subtitle { display:block; max-width:min(34vw,460px); margin-top:1px; overflow:hidden; color:#9dbbd2; font-size:clamp(9px,.76vw,12px); font-weight:650; letter-spacing:.7px; line-height:1.25; text-overflow:ellipsis; white-space:nowrap; }
body.iptv365-series-mode .iptv365-movies-header-tools { display:flex !important; justify-content:flex-end !important; align-items:center !important; gap:clamp(10px,1vw,16px) !important; min-width:0 !important; width:100% !important; margin-left:auto !important; }
/* Search is deliberately anchored at the far-right, immediately before the oval separator and Favorites. */
body.iptv365-series-mode .iptv365-movies-search-slot { display:flex !important; flex:0 1 clamp(330px,27vw,430px) !important; align-items:center !important; justify-content:flex-end !important; width:clamp(330px,27vw,430px) !important; min-width:290px !important; max-width:430px !important; margin-left:auto !important; }
body.iptv365-series-mode .iptv365-movies-search-slot #mediaTitleSearch { background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' viewBox='0 0 24 24' fill='none' stroke='%23d9f4ff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-4-4'/%3E%3C/svg%3E") !important; background-repeat:no-repeat !important; background-position:right 15px center !important; background-size:20px 20px !important; padding:0 48px 0 16px !important; }
body.iptv365-series-mode .iptv365-movies-search-slot #mediaTitleSearch { display:block !important; flex:1 1 auto !important; min-width:0 !important; width:100% !important; max-width:none !important; height:42px !important; margin:0 !important; padding:0 14px !important; border:1px solid rgba(0,160,255,.58) !important; border-radius:12px !important; background:rgba(1,10,20,.92) !important; color:#fff !important; box-sizing:border-box !important; }
body.iptv365-series-mode .iptv365-movies-search-slot #mediaTitleSearch { background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' viewBox='0 0 24 24' fill='none' stroke='%23d9f4ff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-4-4'/%3E%3C/svg%3E") !important; background-repeat:no-repeat !important; background-position:right 15px center !important; background-size:20px 20px !important; padding:0 48px 0 16px !important; }
body.iptv365-series-mode .iptv365-movies-oval-divider { flex:0 0 4px; width:4px; height:30px; border-radius:99px; background:linear-gradient(180deg,rgba(50,199,255,.35),rgba(50,199,255,.9),rgba(50,199,255,.35)); box-shadow:0 0 9px rgba(0,165,255,.35); }
body.iptv365-series-mode .iptv365-movies-favorites-control { display:grid; flex:0 0 48px; place-items:center; width:48px; height:44px; min-height:44px; padding:0; border:1px solid rgba(0,166,255,.48); border-radius:13px; background:linear-gradient(135deg,rgba(5,29,49,.96),rgba(1,13,27,.96)); color:#f8fbff; cursor:pointer; box-shadow:inset 0 0 12px rgba(0,140,255,.07); transition:border-color .18s ease,box-shadow .18s ease,transform .18s ease; }
body.iptv365-series-mode .iptv365-movies-favorites-control:hover, body.iptv365-series-mode .iptv365-movies-favorites-control:focus-visible { border-color:#20bdff; box-shadow:0 0 12px rgba(0,166,255,.34),inset 0 0 12px rgba(0,140,255,.12); transform:translateY(-1px); outline:none; }
body.iptv365-series-mode .iptv365-movies-favorites-heart { color:#ff4d83; font-size:29px; line-height:1; text-shadow:0 0 10px rgba(255,48,111,.38); }
body.iptv365-series-mode .iptv365-favorites-label { display:none !important; }
body.iptv365-series-mode #mediaWorkspaceScreen .media-grid-header { display:none !important; }

body.iptv365-series-mode #mediaWorkspaceScreen .split-workspace {
  position:relative; z-index:1; display:grid !important;
  grid-template-columns:minmax(250px,22.5vw) minmax(0,1fr) !important;
  gap:clamp(18px,2vw,34px) !important; flex:1 1 auto !important;
  width:100% !important; height:auto !important; min-height:0 !important;
  box-sizing:border-box !important; margin:0 !important; padding:clamp(16px,2.2vh,26px) clamp(16px,1.6vw,28px) clamp(18px,2.2vh,28px) !important;
  overflow:hidden !important; border:0 !important; border-radius:0 !important;
  background:transparent !important; box-shadow:none !important;
}
body.iptv365-series-mode #mediaWorkspaceScreen .left-list-panel {
  display:flex !important; flex-direction:column !important; min-width:0 !important; min-height:0 !important;
  width:auto !important; height:100% !important; padding:0 clamp(8px,.9vw,15px) 12px 0 !important;
  overflow:hidden !important; border:0 !important; border-right:0 !important; border-radius:0 !important;
  background:linear-gradient(180deg,rgba(1,8,17,.72),rgba(1,13,25,.82)) !important;
  box-shadow:12px 0 26px rgba(0,0,0,.14);
}
body.iptv365-series-mode #mediaWorkspaceScreen .panel-header { display:none !important; }
body.iptv365-series-mode #mediaWorkspaceScreen #mediaPanelSearch { flex:0 0 44px !important; width:calc(100% - 10px) !important; height:44px !important; min-height:44px !important; margin:0 5px 13px !important; padding:0 14px !important; box-sizing:border-box !important; border:1px solid rgba(0,157,255,.5) !important; border-radius:12px !important; outline:none !important; background:rgba(2,13,27,.92) !important; color:#fff !important; font-size:14px !important; }

/* Movies-only: the search input is relocated into the top header by app.js. */
body.iptv365-series-mode #mediaWorkspaceScreen .media-grid-header { display:none !important; }
body.iptv365-series-mode #mediaWorkspaceScreen .left-list-panel .panel-header { display:none !important; }
body.iptv365-series-mode #mediaWorkspaceScreen .items-scroll-list { display:flex !important; flex:1 1 auto !important; flex-direction:column !important; gap:7px !important; min-height:0 !important; height:auto !important; max-height:none !important; overflow-y:auto !important; overflow-x:hidden !important; padding:0 5px 12px !important; background:transparent !important; }
body.iptv365-series-mode #mediaWorkspaceScreen .list-item-btn { display:flex !important; flex:0 0 auto !important; flex-direction:row !important; align-items:center !important; justify-content:flex-start !important; gap:clamp(10px,1vw,17px) !important; width:100% !important; min-height:clamp(43px,5.7vh,58px) !important; padding:7px clamp(10px,1.15vw,19px) !important; border:1px solid rgba(0,126,205,.13) !important; border-radius:12px !important; background:linear-gradient(105deg,rgba(3,19,34,.92),rgba(1,10,21,.9)) !important; color:#f8fbff !important; text-align:left !important; font-size:clamp(12px,.98vw,17px) !important; font-weight:650 !important; cursor:pointer !important; text-align:left !important; transition:background .18s ease,border-color .18s ease,box-shadow .18s ease !important; }
body.iptv365-series-mode #mediaWorkspaceScreen .iptv365-category-icon { flex:0 0 clamp(28px,2.8vw,43px); display:grid; place-items:center; color:#f7fbff; font-size:clamp(22px,2.2vw,34px); line-height:1; }
body.iptv365-series-mode #mediaWorkspaceScreen .iptv365-category-label { display:block !important; flex:1 1 auto !important; min-width:0 !important; overflow:hidden !important; text-align:left !important; text-overflow:ellipsis !important; white-space:nowrap !important; }
body.iptv365-series-mode #mediaWorkspaceScreen .list-item-btn:hover { border-color:rgba(0,174,255,.72) !important; background:rgba(0,55,94,.68) !important; }
body.iptv365-series-mode #mediaWorkspaceScreen .list-item-btn.active { border:1px solid #ffd72e !important; background:linear-gradient(100deg,#ffdf32,#ffb900 72%,#ff8b00) !important; color:#050b13 !important; box-shadow:0 0 10px rgba(255,208,0,.75),0 0 26px rgba(255,196,0,.4),inset 0 0 12px rgba(255,255,255,.28) !important; }
body.iptv365-series-mode #mediaWorkspaceScreen .list-item-btn.active .iptv365-category-icon { color:#050b13; }
body.iptv365-series-mode #mediaWorkspaceScreen .media-grid-container { display:flex !important; flex-direction:column !important; min-width:0 !important; min-height:0 !important; height:100% !important; padding:0 !important; overflow:hidden !important; background:transparent !important; }
body.iptv365-series-mode #mediaWorkspaceScreen .media-grid-header { display:none !important; }
body.iptv365-series-mode #mediaWorkspaceScreen #currentCategoryHeading { margin:0 !important; color:#fff !important; font-size:clamp(19px,1.7vw,28px) !important; font-weight:850 !important; letter-spacing:.1px !important; }
body.iptv365-series-mode #mediaWorkspaceScreen .media-grid-header #mediaTitleSearch { width:min(300px,30vw) !important; height:44px !important; margin:0 !important; padding:0 15px !important; box-sizing:border-box !important; border:1px solid rgba(0,160,255,.55) !important; border-radius:12px !important; outline:none !important; background:rgba(1,10,20,.94) !important; color:#fff !important; }
body.iptv365-series-mode #mediaWorkspaceScreen #mediaPosterGrid {
  display:grid !important; grid-template-columns:repeat(5,minmax(0,1fr)) !important;
  grid-auto-rows:max-content !important; align-content:start !important; align-items:stretch !important;
  gap:clamp(14px,1.65vw,25px) !important; flex:1 1 auto !important;
  width:100% !important; min-width:0 !important; min-height:0 !important; height:auto !important;
  padding:2px 5px 22px !important; box-sizing:border-box !important;
  overflow-x:hidden !important; overflow-y:auto !important;
  background:transparent !important; scrollbar-width:thin !important; scrollbar-color:rgba(0,155,255,.55) rgba(0,0,0,.2) !important;
}
/* Approved Movies card treatment:
   idle = subtle transparent glass; hover / keyboard / TV-remote focus = neon cyan.
   This replaces the former always-on neon border rather than layering over it. */
body.iptv365-series-mode #mediaWorkspaceScreen #mediaPosterGrid > .poster-card {
  position:relative !important; display:block !important; align-self:start !important;
  min-width:0 !important; width:100% !important; height:auto !important;
  aspect-ratio:.72 / 1 !important; overflow:hidden !important;
  border:1.5px solid rgba(205,225,239,.58) !important;
  border-radius:clamp(12px,1.1vw,19px) !important;
  background:rgba(8,18,30,.34) !important;
  box-shadow:0 0 5px rgba(205,230,245,.16),inset 0 0 12px rgba(220,240,255,.055) !important;
  -webkit-backdrop-filter:blur(10px) saturate(125%) !important;
  backdrop-filter:blur(10px) saturate(125%) !important;
  cursor:pointer !important; isolation:isolate !important; outline:none !important;
  transition:transform .2s ease,border-color .2s ease,box-shadow .2s ease,background .2s ease !important;
}
body.iptv365-series-mode #mediaWorkspaceScreen #mediaPosterGrid > .poster-card:hover,
body.iptv365-series-mode #mediaWorkspaceScreen #mediaPosterGrid > .poster-card:focus,
body.iptv365-series-mode #mediaWorkspaceScreen #mediaPosterGrid > .poster-card:focus-visible {
  transform:translateY(-2px) !important;
  border-color:#20cfff !important;
  background:rgba(3,24,42,.48) !important;
  box-shadow:0 0 8px rgba(0,194,255,.92),0 0 22px rgba(0,145,255,.58),0 0 38px rgba(0,145,255,.24),inset 0 0 12px rgba(0,190,255,.16) !important;
}
body.iptv365-series-mode #mediaWorkspaceScreen .poster-img-wrap {
  position:absolute !important; inset:0 !important; z-index:0 !important;
  width:100% !important; height:100% !important; overflow:hidden !important;
  background:#020b17 !important;
}
body.iptv365-series-mode #mediaWorkspaceScreen .poster-img-wrap img {
  display:block !important; width:100% !important; height:100% !important;
  object-fit:cover !important; object-position:center center !important;
  border:0 !important; border-radius:0 !important;
}
body.iptv365-series-mode #mediaWorkspaceScreen .poster-info {
  position:absolute !important; z-index:2 !important; left:0 !important; right:0 !important; bottom:0 !important;
  display:flex !important; align-items:center !important; justify-content:center !important;
  width:100% !important; min-height:clamp(54px,7.2vh,82px) !important;
  max-height:34% !important; margin:0 !important; padding:9px 10px !important;
  box-sizing:border-box !important; overflow:hidden !important;
  background:linear-gradient(180deg,rgba(0,5,12,.62),rgba(0,5,12,.88)) !important;
  backdrop-filter:blur(2px) !important; -webkit-backdrop-filter:blur(2px) !important;
}
body.iptv365-series-mode #mediaWorkspaceScreen .poster-title {
  display:-webkit-box !important; width:100% !important; max-height:100% !important;
  overflow:hidden !important; color:#fff !important;
  font-size:clamp(12px,.98vw,16px) !important; font-weight:750 !important;
  line-height:1.25 !important; text-align:center !important;
  text-overflow:ellipsis !important; -webkit-line-clamp:3 !important;
  -webkit-box-orient:vertical !important; white-space:normal !important;
  overflow-wrap:anywhere !important; text-shadow:0 1px 5px rgba(0,0,0,.9) !important;
}
body.iptv365-series-mode #mediaWorkspaceScreen .iptv365-fav-star { position:absolute !important; top:9px !important; right:9px !important; bottom:auto !important; left:auto !important; z-index:5 !important; display:grid !important; place-items:center !important; width:32px !important; height:32px !important; margin:0 !important; padding:0 !important; border:1px solid rgba(255,255,255,.48) !important; border-radius:50% !important; background:rgba(0,5,12,.76) !important; color:#ffe05b !important; font-size:20px !important; line-height:1 !important; cursor:pointer !important; box-shadow:0 2px 8px rgba(0,0,0,.5) !important; }
body.iptv365-series-mode #mediaWorkspaceScreen .poster-fallback { display:grid !important; place-items:center !important; width:100% !important; height:100% !important; background:#020b17 url("assets/player365-fallback-logo.png") center / 72% auto no-repeat !important; font-size:0 !important; }
body.iptv365-series-mode #mediaWorkspaceScreen #mediaPosterGrid:has(> .iptv-media-details) { display:block !important; overflow-y:auto !important; }
body.iptv365-series-mode #mediaWorkspaceScreen .iptv-media-details {
  position:relative !important; isolation:isolate !important; display:flex !important; flex-direction:column !important;
  width:100% !important; min-height:clamp(480px,68vh,720px) !important; box-sizing:border-box !important;
  padding:clamp(16px,2vw,28px) !important; overflow:hidden !important; border:1px solid rgba(0,166,255,.72) !important;
  border-radius:22px !important; background:linear-gradient(135deg,#06182a,#020a14 72%) !important; color:#fff !important;
  box-shadow:0 0 10px rgba(0,166,255,.48),0 0 28px rgba(0,132,255,.22),inset 0 0 24px rgba(0,145,255,.08) !important;
  transition:border-color .2s ease,box-shadow .2s ease,transform .2s ease !important;
}
body.iptv365-series-mode #mediaWorkspaceScreen .iptv-media-details:hover { border-color:#22c5ff !important; box-shadow:0 0 14px rgba(0,185,255,.75),0 0 38px rgba(0,135,255,.34),inset 0 0 30px rgba(0,145,255,.12) !important; }
body.iptv365-series-mode #mediaWorkspaceScreen .iptv-media-detail-backdrop { position:absolute !important; inset:0 !important; z-index:-2 !important; overflow:hidden !important; }
body.iptv365-series-mode #mediaWorkspaceScreen .iptv-media-detail-backdrop img { width:100% !important; height:100% !important; object-fit:cover !important; object-position:center 35% !important; opacity:.46 !important; filter:blur(1.5px) saturate(1.08) !important; transform:scale(1.035) !important; }
body.iptv365-series-mode #mediaWorkspaceScreen .iptv-media-detail-shade { position:absolute !important; inset:0 !important; z-index:-1 !important; background:linear-gradient(90deg,rgba(2,11,22,.92) 0%,rgba(2,13,26,.84) 48%,rgba(2,10,20,.58) 100%),linear-gradient(0deg,rgba(0,5,12,.52),rgba(0,5,12,.2)) !important; }
body.iptv365-series-mode #mediaWorkspaceScreen .iptv-media-back { position:relative !important; z-index:3 !important; align-self:flex-start !important; display:inline-flex !important; align-items:center !important; gap:7px !important; min-height:34px !important; margin:0 0 12px !important; padding:0 12px !important; border:1px solid rgba(0,170,255,.55) !important; border-radius:9px !important; background:rgba(1,18,34,.74) !important; color:#eaf7ff !important; font-size:12px !important; font-weight:750 !important; cursor:pointer !important; }
body.iptv365-series-mode #mediaWorkspaceScreen .iptv-media-detail-layout { position:relative !important; z-index:2 !important; display:grid !important; grid-template-columns:minmax(190px,27%) minmax(0,1fr) !important; gap:clamp(22px,3vw,48px) !important; align-items:center !important; width:100% !important; flex:1 1 auto !important; min-height:0 !important; padding:clamp(6px,1.2vw,18px) !important; border-radius:16px !important; cursor:pointer !important; outline:none !important; }
body.iptv365-series-mode #mediaWorkspaceScreen .iptv-media-detail-layout:focus-visible { box-shadow:0 0 0 2px #fff,0 0 0 5px #00aaff !important; }
body.iptv365-series-mode #mediaWorkspaceScreen .iptv-media-detail-poster-wrap { position:relative !important; width:100% !important; max-width:330px !important; justify-self:center !important; aspect-ratio:2/3 !important; overflow:hidden !important; border:2px solid #09baff !important; border-radius:20px !important; background:#06111d !important; box-shadow:0 0 10px rgba(0,174,255,.85),0 0 28px rgba(0,132,255,.38) !important; }
body.iptv365-series-mode #mediaWorkspaceScreen .iptv-media-detail-poster { display:block !important; width:100% !important; height:100% !important; object-fit:contain !important; background:#050c15 !important; }
body.iptv365-series-mode #mediaWorkspaceScreen .iptv-media-detail-copy { display:flex !important; flex-direction:column !important; align-items:flex-start !important; min-width:0 !important; color:#f5faff !important; padding:clamp(8px,1.2vw,18px) !important; text-shadow:0 2px 8px rgba(0,0,0,.75) !important; }
body.iptv365-series-mode #mediaWorkspaceScreen .iptv-media-detail-title { margin:0 0 18px !important; color:#fff !important; font-size:clamp(28px,3.1vw,50px) !important; line-height:1.13 !important; font-weight:900 !important; letter-spacing:-.6px !important; overflow-wrap:anywhere !important; }
body.iptv365-series-mode #mediaWorkspaceScreen .iptv-media-detail-meta { display:flex !important; flex-wrap:wrap !important; align-items:center !important; gap:9px 18px !important; margin:0 0 clamp(22px,2.4vw,36px) !important; color:#e7f2ff !important; font-size:clamp(13px,1.15vw,18px) !important; line-height:1.5 !important; font-weight:600 !important; }
body.iptv365-series-mode #mediaWorkspaceScreen .iptv-media-detail-description { max-width:1000px !important; margin:0 0 clamp(26px,3vw,44px) !important; color:#f4f8ff !important; font-size:clamp(15px,1.35vw,21px) !important; line-height:1.65 !important; font-weight:450 !important; white-space:normal !important; }
body.iptv365-series-mode #mediaWorkspaceScreen .iptv-media-play { display:inline-flex !important; align-items:center !important; justify-content:center !important; gap:12px !important; min-width:clamp(190px,23vw,300px) !important; min-height:clamp(52px,5.5vw,76px) !important; margin-top:auto !important; padding:0 30px !important; border:1px solid rgba(255,255,255,.65) !important; border-radius:15px !important; background:linear-gradient(100deg,#ffe875,#ffc400 70%,#ffad00) !important; color:#07111c !important; font-size:clamp(17px,1.55vw,25px) !important; font-weight:950 !important; letter-spacing:.4px !important; cursor:pointer !important; box-shadow:0 0 12px rgba(255,203,0,.42) !important; text-shadow:none !important; transition:transform .18s ease,box-shadow .18s ease !important; }
body.iptv365-series-mode #mediaWorkspaceScreen .iptv-media-play:hover { transform:translateY(-2px) !important; box-shadow:0 0 18px rgba(255,213,0,.7),0 0 34px rgba(255,190,0,.3) !important; }
@media (max-width:850px) {
 body.iptv365-series-mode #mediaWorkspaceScreen .iptv-media-details { min-height:0 !important; }
 body.iptv365-series-mode #mediaWorkspaceScreen .iptv-media-detail-layout { grid-template-columns:minmax(130px,32%) minmax(0,1fr) !important; gap:16px !important; }
 body.iptv365-series-mode #mediaWorkspaceScreen .iptv-media-detail-title { font-size:clamp(22px,4vw,34px) !important; }
}
@media (max-width:600px) {
 body.iptv365-series-mode #mediaWorkspaceScreen .iptv-media-detail-layout { grid-template-columns:minmax(0,1fr) !important; justify-items:center !important; gap:18px !important; }
 body.iptv365-series-mode #mediaWorkspaceScreen .iptv-media-detail-poster-wrap { width:min(58vw,230px) !important; }
 body.iptv365-series-mode #mediaWorkspaceScreen .iptv-media-detail-copy { width:100% !important; padding:4px !important; }
 body.iptv365-series-mode #mediaWorkspaceScreen .iptv-media-detail-title { font-size:26px !important; }
 body.iptv365-series-mode #mediaWorkspaceScreen .iptv-media-play { width:100% !important; }
}
body.iptv365-series-mode #mediaWorkspaceScreen *, body.iptv365-series-mode #iptv365MoviesHeader * { scrollbar-width:thin; }
@media (max-width:1250px) {
 body.iptv365-series-mode #mediaWorkspaceScreen .split-workspace { grid-template-columns:minmax(210px,25vw) minmax(0,1fr) !important; gap:14px !important; }
 body.iptv365-series-mode #mediaWorkspaceScreen #mediaPosterGrid { grid-template-columns:repeat(4,minmax(0,1fr)) !important; }
 body.iptv365-series-mode .iptv365-movies-header { grid-template-columns:minmax(130px,.7fr) minmax(150px,.8fr) minmax(470px,1.8fr); }
}
@media (max-width:850px) {
 body.iptv365-series-mode .iptv365-movies-header { flex-basis:76px; min-height:76px; grid-template-columns:minmax(115px,1fr) auto minmax(300px,1fr); gap:8px; padding:5px 12px; }
 body.iptv365-series-mode .iptv365-brand-word { font-size:20px; }
 body.iptv365-series-mode .iptv365-brand-play { width:55px; height:43px; }
 body.iptv365-series-mode .iptv365-movies-heading-main { font-size:21px; }
 body.iptv365-series-mode .iptv365-movies-category-subtitle { max-width:28vw; font-size:9px; }
 body.iptv365-series-mode .iptv365-movies-header-tools { gap:7px; }
 body.iptv365-series-mode .iptv365-movies-search-slot { flex:0 1 clamp(250px,30vw,340px) !important; width:clamp(250px,30vw,340px) !important; min-width:210px !important; max-width:340px !important; }
 body.iptv365-series-mode .iptv365-movies-favorites-control { flex-basis:42px; width:42px; height:40px; min-height:40px; padding:0; }
 body.iptv365-series-mode .iptv365-movies-favorites-heart { font-size:26px; }
 body.iptv365-series-mode .iptv365-movies-tool-divider { display:none; }
 body.iptv365-series-mode #mediaWorkspaceScreen .split-workspace { grid-template-columns:minmax(165px,29vw) minmax(0,1fr) !important; gap:10px !important; padding:12px 10px !important; }
 body.iptv365-series-mode #mediaWorkspaceScreen #mediaPosterGrid { grid-template-columns:repeat(3,minmax(0,1fr)) !important; gap:12px !important; }
}
@media (max-width:600px) {
 body.iptv365-series-mode .iptv365-movies-header { flex-basis:76px; min-height:76px; grid-template-columns:minmax(110px,1fr) auto minmax(110px,1fr); gap:5px; padding:4px 8px; }
 body.iptv365-series-mode .iptv365-brand-word { font-size:15px; letter-spacing:-.8px; }
 body.iptv365-series-mode .iptv365-brand-play { width:42px; height:34px; margin-left:2px; }
 body.iptv365-series-mode .iptv365-brand-play b { font-size:14px; }
 body.iptv365-series-mode .iptv365-movies-heading-main { gap:4px; font-size:16px; letter-spacing:-.5px; }
 body.iptv365-series-mode .iptv365-movies-category-subtitle { max-width:26vw; font-size:8px; letter-spacing:0; }
 body.iptv365-series-mode .iptv365-clapper { font-size:21px; }
 body.iptv365-series-mode .iptv365-movies-header-tools { display:grid; grid-template-columns:minmax(72px,1fr) 3px 34px; grid-template-rows:auto; align-items:center; gap:3px 5px; width:100%; }
 body.iptv365-series-mode .iptv365-movies-search-slot { grid-column:1; grid-row:1; width:100% !important; min-width:0 !important; max-width:none !important; flex:1 1 auto !important; }
 body.iptv365-series-mode .iptv365-movies-oval-divider { grid-column:2; grid-row:1; }
 body.iptv365-series-mode .iptv365-movies-favorites-control { grid-column:3; grid-row:1; flex-basis:34px; width:34px; height:34px; min-height:34px; padding:0; }
 body.iptv365-series-mode .iptv365-movies-search-slot #mediaTitleSearch { height:34px !important; padding:0 34px 0 8px !important; background-position:right 9px center !important; background-size:16px 16px !important; font-size:11px !important; }
 body.iptv365-series-mode .iptv365-movies-oval-divider { height:22px; width:3px; flex-basis:3px; }
 body.iptv365-series-mode .iptv365-movies-favorites-control { min-height:34px; gap:0; padding:0; }
 body.iptv365-series-mode .iptv365-movies-favorites-heart { font-size:21px; }
 body.iptv365-series-mode #mediaWorkspaceScreen .split-workspace { grid-template-columns:minmax(105px,31vw) minmax(0,1fr) !important; gap:7px !important; padding:8px 5px !important; }
 body.iptv365-series-mode #mediaWorkspaceScreen .left-list-panel { padding-right:4px !important; }
 body.iptv365-series-mode #mediaWorkspaceScreen .panel-header { display:none !important; }
/* Series retains its original category heading. */

 body.iptv365-series-mode #mediaWorkspaceScreen #mediaPanelSearch { height:34px !important; min-height:34px !important; flex-basis:34px !important; margin:0 2px 8px !important; padding:0 7px !important; font-size:10px !important; }
 body.iptv365-series-mode #mediaWorkspaceScreen .list-item-btn { min-height:36px !important; gap:5px !important; padding:5px 4px !important; border-radius:8px !important; font-size:9px !important; }
 body.iptv365-series-mode #mediaWorkspaceScreen .iptv365-category-icon { flex-basis:18px; font-size:15px; }
 body.iptv365-series-mode #mediaWorkspaceScreen .media-grid-header { display:none !important; flex-wrap:wrap !important; gap:8px !important; min-height:0 !important; margin-bottom:10px !important; }
 body.iptv365-series-mode #mediaWorkspaceScreen #currentCategoryHeading { font-size:15px !important; }
 body.iptv365-series-mode #mediaWorkspaceScreen #mediaTitleSearch { width:100% !important; height:36px !important; }
 body.iptv365-series-mode #mediaWorkspaceScreen #mediaPosterGrid { grid-template-columns:repeat(2,minmax(0,1fr)) !important; gap:9px !important; padding:0 2px 14px !important; }
 body.iptv365-series-mode #mediaWorkspaceScreen #mediaPosterGrid > .poster-card { aspect-ratio:.70 / 1 !important; }
 body.iptv365-series-mode #mediaWorkspaceScreen .poster-info { min-height:46px !important; max-height:36% !important; padding:6px 5px !important; }
 body.iptv365-series-mode #mediaWorkspaceScreen .poster-title { font-size:10px !important; line-height:1.2 !important; text-align:center !important; -webkit-line-clamp:3 !important; }
 body.iptv365-series-mode #mediaWorkspaceScreen .iptv365-fav-star { top:6px !important; right:6px !important; bottom:auto !important; left:auto !important; width:27px !important; height:27px !important; font-size:17px !important; }
}
@media (max-width:380px) {
 body.iptv365-series-mode #mediaWorkspaceScreen .split-workspace { grid-template-columns:minmax(92px,30vw) minmax(0,1fr) !important; }
 body.iptv365-series-mode #mediaWorkspaceScreen .iptv365-category-icon { display:none; }
}
@media (prefers-reduced-motion:reduce) {
 body.iptv365-series-mode #mediaWorkspaceScreen *, body.iptv365-series-mode .iptv365-movies-header * { transition:none !important; animation:none !important; }
}


/* ================================================================
   PLAYER 365 MOVIE DETAILS V10 ÃƒÆ’Ã‚Â¢ÃƒÂ¢Ã¢â‚¬Å¡Ã‚Â¬ÃƒÂ¢Ã¢â€šÂ¬Ã‚Â full available right pane, responsive,
   neon only on hover / keyboard focus, and TV-remote focus affordance.
   This block is scoped to Movies details only.
   ================================================================ */
body.iptv365-series-mode #mediaWorkspaceScreen #mediaPosterGrid.iptv365-details-open {
  display:flex !important;
  flex:1 1 0 !important;
  flex-direction:column !important;
  align-content:stretch !important;
  align-items:stretch !important;
  width:100% !important;
  height:100% !important;
  min-width:0 !important;
  min-height:0 !important;
  max-height:100% !important;
  padding:0 !important;
  margin:0 !important;
  overflow:hidden !important;
  background:transparent !important;
}
body.iptv365-series-mode #mediaWorkspaceScreen #mediaPosterGrid.iptv365-details-open > .iptv-media-details {
  flex:1 1 0 !important;
  width:100% !important;
  height:100% !important;
  min-width:0 !important;
  min-height:0 !important;
  max-height:100% !important;
  margin:0 !important;
  padding:clamp(16px,2vw,30px) !important;
  box-sizing:border-box !important;
  border:1px solid rgba(0,166,255,.34) !important;
  box-shadow:none !important;
  outline:none !important;
  cursor:pointer !important;
  transition:border-color .2s ease, box-shadow .2s ease !important;
}
/* Keep the card quiet until the pointer is over it. */
body.iptv365-series-mode #mediaWorkspaceScreen .iptv-media-details:hover,
body.iptv365-series-mode #mediaWorkspaceScreen .iptv-media-details:focus-visible {
  border-color:#20c8ff !important;
  box-shadow:0 0 12px rgba(0,185,255,.82),0 0 34px rgba(0,135,255,.38),inset 0 0 24px rgba(0,145,255,.10) !important;
}
body.iptv365-series-mode #mediaWorkspaceScreen .iptv-media-detail-layout {
  grid-template-columns:minmax(150px,25%) minmax(0,1fr) !important;
  height:100% !important;
  min-height:0 !important;
  align-items:center !important;
  gap:clamp(18px,2.6vw,42px) !important;
  padding:clamp(8px,1vw,16px) !important;
}
body.iptv365-series-mode #mediaWorkspaceScreen .iptv-media-detail-poster-wrap {
  width:min(100%,clamp(150px,20vw,310px)) !important;
  max-height:calc(100% - 12px) !important;
  aspect-ratio:2 / 3 !important;
}
body.iptv365-series-mode #mediaWorkspaceScreen .iptv-media-detail-copy {
  justify-content:center !important;
  max-height:100% !important;
  overflow-y:auto !important;
  overscroll-behavior:contain !important;
}
body.iptv365-series-mode #mediaWorkspaceScreen .iptv-media-play:focus-visible,
body.iptv365-series-mode #mediaWorkspaceScreen .iptv-media-back:focus-visible {
  outline:2px solid #fff !important;
  outline-offset:3px !important;
  box-shadow:0 0 0 5px #00aaff,0 0 22px rgba(0,170,255,.75) !important;
}
/* Laptop/tablet: let the detail panel use the full height available beside categories. */
@media (min-width:701px) {
  body.iptv365-series-mode #mediaWorkspaceScreen .split-workspace:has(#mediaPosterGrid.iptv365-details-open) {
    min-height:0 !important;
    height:100% !important;
    overflow:hidden !important;
  }
}
/* Smaller devices: remove the cramped category column while a detail is open. */
@media (max-width:700px) {
  body.iptv365-series-mode #mediaWorkspaceScreen .split-workspace:has(#mediaPosterGrid.iptv365-details-open) {
    display:flex !important;
    flex-direction:column !important;
    gap:0 !important;
    padding:8px !important;
    overflow:hidden !important;
  }
  body.iptv365-series-mode #mediaWorkspaceScreen .split-workspace:has(#mediaPosterGrid.iptv365-details-open) .left-list-panel {
    display:none !important;
  }
  body.iptv365-series-mode #mediaWorkspaceScreen .split-workspace:has(#mediaPosterGrid.iptv365-details-open) .media-grid-container {
    flex:1 1 0 !important;
    width:100% !important;
    height:100% !important;
    min-height:0 !important;
  }
  body.iptv365-series-mode #mediaWorkspaceScreen .iptv-media-details {
    padding:12px !important;
    border-radius:15px !important;
  }
  body.iptv365-series-mode #mediaWorkspaceScreen .iptv-media-detail-layout {
    display:grid !important;
    grid-template-columns:minmax(0,34%) minmax(0,1fr) !important;
    gap:12px !important;
    padding:4px !important;
  }
  body.iptv365-series-mode #mediaWorkspaceScreen .iptv-media-detail-poster-wrap {
    width:100% !important;
    max-width:190px !important;
  }
  body.iptv365-series-mode #mediaWorkspaceScreen .iptv-media-detail-title {
    font-size:clamp(20px,4vw,32px) !important;
    margin-bottom:10px !important;
  }
  body.iptv365-series-mode #mediaWorkspaceScreen .iptv-media-detail-meta {
    gap:5px 9px !important;
    margin-bottom:12px !important;
  }
  body.iptv365-series-mode #mediaWorkspaceScreen .iptv-media-detail-description {
    font-size:clamp(12px,2vw,16px) !important;
    line-height:1.45 !important;
    margin-bottom:14px !important;
  }
  body.iptv365-series-mode #mediaWorkspaceScreen .iptv-media-play {
    min-width:0 !important;
    min-height:46px !important;
    width:min(100%,230px) !important;
    padding:0 12px !important;
    font-size:clamp(14px,2vw,18px) !important;
  }
}
@media (max-width:480px) {
  body.iptv365-series-mode #mediaWorkspaceScreen .iptv-media-detail-layout {
    grid-template-columns:minmax(0,1fr) !important;
    align-content:start !important;
    justify-items:center !important;
    gap:10px !important;
    overflow-y:auto !important;
  }
  body.iptv365-series-mode #mediaWorkspaceScreen .iptv-media-detail-poster-wrap {
    width:min(34vw,150px) !important;
    max-width:150px !important;
  }
  body.iptv365-series-mode #mediaWorkspaceScreen .iptv-media-detail-copy {
    width:100% !important;
    padding:4px !important;
  }
  body.iptv365-series-mode #mediaWorkspaceScreen .iptv-media-detail-title {
    font-size:clamp(19px,5vw,25px) !important;
  }
  body.iptv365-series-mode #mediaWorkspaceScreen .iptv-media-detail-description {
    font-size:13px !important;
  }
  body.iptv365-series-mode #mediaWorkspaceScreen .iptv-media-play {
    width:100% !important;
    max-width:none !important;
  }
}
@media (hover:none) {
  body.iptv365-series-mode #mediaWorkspaceScreen .iptv-media-details:hover {
    border-color:rgba(0,166,255,.34) !important;
    box-shadow:none !important;
  }
}

/* =========================================================
   IPTV365 VOD PLAYER ÃƒÆ’Ã‚Â¢ÃƒÂ¢Ã¢â‚¬Å¡Ã‚Â¬ÃƒÂ¢Ã¢â€šÂ¬Ã‚Â TRUE EDGE-TO-EDGE DEVICE LAYOUT
   Loaded after legacy stylesheets to neutralize old modal sizing.
   The video keeps its aspect ratio; unused space remains black.
   ========================================================= */
#cinemaModal:not(.hidden),
#cinemaModal.iptv-cinema-active {
  position: fixed !important;
  inset: 0 !important;
  display: flex !important;
  align-items: stretch !important;
  justify-content: stretch !important;
  width: 100vw !important;
  max-width: none !important;
  height: 100vh !important;
  height: 100dvh !important;
  min-height: 100vh !important;
  min-height: 100dvh !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  overflow: hidden !important;
  background: #000 !important;
  z-index: 2147483000 !important;
}

#cinemaModal:not(.hidden) > .cinema-player-shell,
#cinemaModal.iptv-cinema-active > .cinema-player-shell {
  position: relative !important;
  inset: auto !important;
  display: flex !important;
  flex: 1 1 auto !important;
  flex-direction: column !important;
  width: 100vw !important;
  max-width: none !important;
  min-width: 0 !important;
  height: 100vh !important;
  height: 100dvh !important;
  max-height: none !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  overflow: hidden !important;
  background: #000 !important;
}

#cinemaModal:not(.hidden) .cinema-header {
  display: flex !important;
  flex: 0 0 auto !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  min-height: 54px !important;
  padding: 8px clamp(12px, 2vw, 28px) !important;
  box-sizing: border-box !important;
  background: #151c2d !important;
}

#cinemaModal:not(.hidden) .cinema-header h3 {
  min-width: 0 !important;
  margin: 0 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  color: #fff !important;
  font-size: clamp(14px, 1.6vw, 21px) !important;
}

#cinemaModal:not(.hidden) .cinema-stage {
  position: relative !important;
  display: flex !important;
  flex: 1 1 auto !important;
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  aspect-ratio: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  background: #000 !important;
}

#cinemaModal:not(.hidden) .cinema-stage video {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
  object-fit: contain !important;
  background: #000 !important;
}

#cinemaModal:not(.hidden) .close-modal-btn {
  flex: 0 0 auto !important;
  min-height: 38px !important;
  padding: 8px 14px !important;
  font-size: 13px !important;
}

@media (max-width: 700px) {
  #cinemaModal:not(.hidden) .cinema-header {
    min-height: 46px !important;
    padding: 6px 9px !important;
  }
  #cinemaModal:not(.hidden) .close-modal-btn {
    min-height: 34px !important;
    padding: 6px 10px !important;
    font-size: 11px !important;
  }
}

@media (orientation: landscape) and (max-height: 500px) {
  #cinemaModal:not(.hidden) .cinema-header {
    min-height: 38px !important;
    padding: 4px 10px !important;
  }
  #cinemaModal:not(.hidden) .close-modal-btn {
    min-height: 30px !important;
    padding: 4px 9px !important;
  }
}


/* V13: country flag REPLACES the generic icon in Movies category rows. */
body.iptv365-series-mode #mediaWorkspaceScreen .iptv365-category-flag {
  flex: 0 0 clamp(28px, 2.8vw, 43px) !important;
  width: clamp(28px, 2.8vw, 43px) !important;
  min-width: clamp(28px, 2.8vw, 43px) !important;
  height: 1.35em !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif !important;
  font-size: clamp(22px, 2.2vw, 34px) !important;
  line-height: 1 !important;
  overflow: visible !important;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,.55));
}
body.iptv365-series-mode #mediaWorkspaceScreen .list-item-btn.active .iptv365-category-flag {
  filter: none !important;
}
@media (max-width: 700px) {
  body.iptv365-series-mode #mediaWorkspaceScreen .iptv365-category-flag {
    flex-basis: 28px !important;
    width: 28px !important;
    min-width: 28px !important;
    font-size: 23px !important;
  }
}

/* Series details, seasons and episodes: dedicated static stylesheet. */
      #mediaWorkspaceScreen #mediaPosterGrid:has(> .iptv-series-details) {
        display:block !important; grid-template-columns:none !important;
        grid-auto-flow:row !important; width:100% !important;
        min-width:0 !important; height:100% !important; min-height:0 !important;
        overflow-x:hidden !important; overflow-y:auto !important;
        padding:0 !important; box-sizing:border-box !important;
      }
      #mediaWorkspaceScreen #mediaPosterGrid > .iptv-series-details {
        position:relative !important; isolation:isolate !important;
        display:block !important; width:100% !important; min-width:0 !important;
        max-width:none !important; min-height:100% !important;
        margin:0 !important; padding:clamp(16px,2vw,30px) !important;
        box-sizing:border-box !important; overflow:hidden !important;
        color:#f5f8ff !important;
        background:linear-gradient(135deg,#07172b,#0c1d34 55%,#071426) !important;
        border:1px solid rgba(88,153,218,.22) !important;
        border-radius:18px !important;
      }
      #mediaWorkspaceScreen .iptv-series-details > .iptv-series-backdrop {
        position:absolute !important; inset:0 !important; z-index:0 !important;
        overflow:hidden !important; pointer-events:none !important;
      }
      #mediaWorkspaceScreen .iptv-series-details .iptv-series-backdrop img {
        position:absolute !important; inset:0 !important; width:100% !important;
        height:100% !important; object-fit:cover !important;
        object-position:center 25% !important; opacity:.48 !important;
        filter:blur(2px) saturate(.8) !important; transform:scale(1.04) !important;
      }
      #mediaWorkspaceScreen .iptv-series-details .iptv-series-backdrop:after {
        content:"" !important; position:absolute !important; inset:0 !important;
        background:linear-gradient(90deg,rgba(3,12,25,.94),rgba(4,15,30,.78) 56%,rgba(3,11,24,.88)),
                   linear-gradient(0deg,rgba(3,10,22,.95),rgba(3,10,22,.18)) !important;
      }
      #mediaWorkspaceScreen .iptv-series-details > :not(.iptv-series-backdrop) {
        position:relative !important; z-index:1 !important;
      }
      #mediaWorkspaceScreen .iptv-series-details .iptv-media-back {
        display:inline-flex !important; align-items:center !important; gap:9px !important;
        min-height:42px !important; padding:8px 17px !important;
        margin:0 0 20px !important; border:1px solid rgba(133,183,232,.48) !important;
        border-radius:24px !important; background:rgba(8,26,48,.82) !important;
        color:#fff !important; font-weight:750 !important; cursor:pointer !important;
      }
      #mediaWorkspaceScreen .iptv-series-details .iptv-series-heading {
        display:grid !important;
        grid-template-columns:minmax(170px,260px) minmax(0,1fr) !important;
        align-items:start !important; gap:clamp(20px,2.4vw,38px) !important;
        width:100% !important; min-width:0 !important; max-width:none !important;
        margin:0 0 22px !important; padding:0 0 22px !important;
        border-bottom:1px solid rgba(137,177,220,.24) !important;
      }
      #mediaWorkspaceScreen .iptv-series-details .iptv-series-poster {
        display:block !important; width:100% !important; max-width:260px !important;
        aspect-ratio:2/3 !important; height:auto !important; max-height:390px !important;
        object-fit:cover !important; border-radius:15px !important;
        border:1px solid rgba(160,198,236,.24) !important;
        box-shadow:0 16px 40px rgba(0,0,0,.42) !important;
      }
      #mediaWorkspaceScreen .iptv-series-details .iptv-series-heading > div {
        display:block !important; width:100% !important; min-width:0 !important;
        max-width:none !important; padding-top:4px !important;
      }
      #mediaWorkspaceScreen .iptv-series-details .iptv-series-title {
        display:block !important; width:100% !important; min-width:0 !important;
        max-width:none !important; margin:0 0 14px !important;
        color:#fff !important; font-size:clamp(27px,3vw,48px) !important;
        line-height:1.12 !important; font-weight:900 !important;
        white-space:normal !important; overflow-wrap:anywhere !important;
      }
      #mediaWorkspaceScreen .iptv-series-details .iptv-series-description {
        display:block !important; width:100% !important; min-width:0 !important;
        max-width:1100px !important; margin:0 !important;
        color:#d6e2f2 !important; font-size:clamp(15px,1.2vw,19px) !important;
        line-height:1.7 !important; white-space:normal !important;
        overflow-wrap:break-word !important;
      }
      #mediaWorkspaceScreen .iptv-series-details .iptv-season-tabs {
        display:grid !important; grid-template-columns:repeat(auto-fit,minmax(170px,1fr)) !important;
        gap:12px !important; width:100% !important; min-width:0 !important;
        margin:12px 0 22px !important;
      }
      #mediaWorkspaceScreen .iptv-series-details .iptv-season-tab {
        display:flex !important; align-items:center !important; justify-content:center !important;
        flex-direction:column !important; gap:4px !important; min-height:72px !important;
        padding:12px 16px !important; border:1px solid rgba(113,164,218,.48) !important;
        border-radius:13px !important; background:rgba(8,27,49,.82) !important;
        color:#eaf4ff !important; font-size:17px !important; font-weight:850 !important;
        cursor:pointer !important;
      }
      #mediaWorkspaceScreen .iptv-series-details .iptv-season-tab small {
        color:#c5d8ee !important; font-size:13px !important; font-weight:600 !important;
      }
      #mediaWorkspaceScreen .iptv-series-details .iptv-season-tab.active {
        background:linear-gradient(135deg,#0879ed,#075bd0) !important;
        border-color:#31a8ff !important; color:#fff !important;
        box-shadow:0 0 22px rgba(0,132,255,.3) !important;
      }
      #mediaWorkspaceScreen .iptv-series-details .iptv-episodes-heading {
        display:flex !important; align-items:center !important; gap:14px !important;
        width:100% !important; margin:0 0 12px !important;
        color:#fff !important; font-size:clamp(20px,2vw,29px) !important;
        font-weight:900 !important;
      }
      #mediaWorkspaceScreen .iptv-series-details .iptv-episodes-heading:after {
        content:"" !important; height:2px !important; flex:1 !important;
        background:linear-gradient(90deg,#1689f4,rgba(22,137,244,.05)) !important;
      }
      #mediaWorkspaceScreen .iptv-series-details .iptv-episode-list {
        display:grid !important; grid-template-columns:minmax(0,1fr) !important;
        gap:10px !important; width:100% !important; min-width:0 !important;
      }
      #mediaWorkspaceScreen .iptv-series-details .iptv-episode-row {
        display:grid !important;
        grid-template-columns:minmax(100px,160px) 48px minmax(0,1fr) auto !important;
        grid-template-rows:auto auto !important; align-items:center !important;
        gap:4px 15px !important; width:100% !important; min-width:0 !important;
        min-height:88px !important; padding:9px 14px !important;
        border:1px solid rgba(116,164,216,.4) !important; border-radius:13px !important;
        background:linear-gradient(105deg,rgba(12,31,54,.94),rgba(9,24,43,.9)) !important;
        box-sizing:border-box !important; cursor:pointer !important;
      }
      #mediaWorkspaceScreen .iptv-series-details .iptv-episode-thumb {
        grid-column:1 !important; grid-row:1 / span 2 !important;
        display:block !important; width:100% !important; height:76px !important;
        object-fit:cover !important; border-radius:9px !important;
        background:#14263d !important;
      }
      #mediaWorkspaceScreen .iptv-series-details .iptv-episode-number {
        grid-column:2 !important; grid-row:1 / span 2 !important;
        display:flex !important; align-items:center !important; justify-content:center !important;
        width:46px !important; height:44px !important; border-radius:11px !important;
        background:#0878e8 !important; color:#fff !important;
        font-size:20px !important; font-weight:900 !important;
      }
      #mediaWorkspaceScreen .iptv-series-details .iptv-episode-title {
        grid-column:3 !important; grid-row:1 !important; display:block !important;
        min-width:0 !important; width:100% !important; color:#fff !important;
        font-size:clamp(15px,1.25vw,20px) !important; font-weight:850 !important;
        line-height:1.35 !important; white-space:nowrap !important;
        overflow:hidden !important; text-overflow:ellipsis !important;
      }
      #mediaWorkspaceScreen .iptv-series-details .iptv-episode-meta {
        grid-column:3 !important; grid-row:2 !important; color:#c0d1e4 !important;
        font-size:13px !important; font-weight:650 !important;
      }
      #mediaWorkspaceScreen .iptv-series-details .iptv-episode-play {
        grid-column:4 !important; grid-row:1 / span 2 !important;
        justify-self:end !important; min-width:105px !important; min-height:46px !important;
        padding:8px 18px !important; border:0 !important; border-radius:11px !important;
        background:linear-gradient(135deg,#078bf5,#0862d9) !important;
        color:#fff !important; font-weight:850 !important; cursor:pointer !important;
      }
      #mediaWorkspaceScreen .iptv-series-details .iptv-episode-row:hover,
      #mediaWorkspaceScreen .iptv-series-details .iptv-episode-row:focus-visible {
        outline:2px solid #249bfa !important; outline-offset:1px !important;
        background:rgba(20,52,84,.98) !important;
      }
      @media (max-width:850px) {
        #mediaWorkspaceScreen .iptv-series-details .iptv-series-heading {
          grid-template-columns:minmax(130px,190px) minmax(0,1fr) !important;
          gap:16px !important;
        }
        #mediaWorkspaceScreen .iptv-series-details .iptv-episode-row {
          grid-template-columns:100px 42px minmax(0,1fr) auto !important;
          gap:7px !important;
        }
        #mediaWorkspaceScreen .iptv-series-details .iptv-episode-thumb {height:64px !important;}
        #mediaWorkspaceScreen .iptv-series-details .iptv-episode-play {min-width:82px !important;}
      }
      @media (max-width:560px) {
        #mediaWorkspaceScreen .iptv-series-details .iptv-series-heading {
          grid-template-columns:105px minmax(0,1fr) !important; gap:12px !important;
        }
        #mediaWorkspaceScreen .iptv-series-details .iptv-series-poster {max-width:105px !important;}
        #mediaWorkspaceScreen .iptv-series-details .iptv-series-title {font-size:22px !important;}
        #mediaWorkspaceScreen .iptv-series-details .iptv-series-description {font-size:13px !important;}
        #mediaWorkspaceScreen .iptv-series-details .iptv-episode-row {
          grid-template-columns:42px minmax(0,1fr) auto !important;
          grid-template-rows:auto auto !important; padding:9px !important;
        }
        #mediaWorkspaceScreen .iptv-series-details .iptv-episode-thumb {display:none !important;}
        #mediaWorkspaceScreen .iptv-series-details .iptv-episode-number {
          grid-column:1 !important; grid-row:1 / span 2 !important;
          width:38px !important; height:38px !important; font-size:15px !important;
        }
        #mediaWorkspaceScreen .iptv-series-details .iptv-episode-title,
        #mediaWorkspaceScreen .iptv-series-details .iptv-episode-meta {grid-column:2 !important;}
        #mediaWorkspaceScreen .iptv-series-details .iptv-episode-title {grid-row:1 !important;}
        #mediaWorkspaceScreen .iptv-series-details .iptv-episode-meta {grid-row:2 !important;}
        #mediaWorkspaceScreen .iptv-series-details .iptv-episode-play {
          grid-column:3 !important; grid-row:1 / span 2 !important;
          min-width:64px !important; min-height:38px !important; padding:6px 9px !important;
        }
      }


/* IPTV365 SERIES â€” same premium frame and visual language as Movies. */
body.iptv365-series-mode,
body.iptv365-series-mode #app,
body.iptv365-series-mode .app-container { background:#020812 !important; }
body.iptv365-series-mode #iptv365GlobalNav { display:none !important; }
body.iptv365-series-mode #mediaWorkspaceScreen { background:#020812 var(--iptv365-global-bg) center center / cover no-repeat !important; }
body.iptv365-series-mode .iptv365-movies-category-subtitle { display:block !important; }
body.iptv365-series-mode .iptv365-movies-heading { flex-direction:column !important; gap:0 !important; }
body.iptv365-series-mode .iptv365-movies-heading-main { font-size:clamp(20px,2.3vw,35px) !important; }
body.iptv365-series-mode .iptv365-movies-search-slot { display:flex !important; flex:0 1 clamp(330px,27vw,430px) !important; width:clamp(330px,27vw,430px) !important; min-width:290px !important; max-width:430px !important; }
body.iptv365-series-mode .iptv365-movies-search-slot #mediaTitleSearch { display:block !important; flex:1 1 auto !important; min-width:0 !important; width:100% !important; max-width:none !important; height:42px !important; margin:0 !important; padding:0 48px 0 16px !important; border:1px solid rgba(0,160,255,.58) !important; border-radius:12px !important; background:rgba(1,10,20,.92) !important; color:#fff !important; box-sizing:border-box !important; background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' viewBox='0 0 24 24' fill='none' stroke='%23d9f4ff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-4-4'/%3E%3C/svg%3E") !important; background-repeat:no-repeat !important; background-position:right 15px center !important; background-size:20px 20px !important; }
body.iptv365-series-mode #mediaWorkspaceScreen .media-grid-header { display:none !important; }
body.iptv365-series-mode #mediaWorkspaceScreen .split-workspace { position:relative; z-index:1; display:grid !important; grid-template-columns:minmax(250px,22.5vw) minmax(0,1fr) !important; gap:clamp(18px,2vw,34px) !important; flex:1 1 auto !important; width:100% !important; height:auto !important; min-height:0 !important; box-sizing:border-box !important; margin:0 !important; padding:clamp(16px,2.2vh,26px) clamp(16px,1.6vw,28px) clamp(18px,2.2vh,28px) !important; overflow:hidden !important; border:0 !important; border-radius:0 !important; background:transparent !important; box-shadow:none !important; }
body.iptv365-series-mode #mediaWorkspaceScreen .left-list-panel { display:flex !important; flex-direction:column !important; min-width:0 !important; min-height:0 !important; width:auto !important; height:100% !important; padding:0 clamp(8px,.9vw,15px) 12px 0 !important; overflow:hidden !important; border:0 !important; border-radius:0 !important; background:linear-gradient(180deg,rgba(1,8,17,.72),rgba(1,13,25,.82)) !important; box-shadow:12px 0 26px rgba(0,0,0,.14) !important; }
body.iptv365-series-mode #mediaWorkspaceScreen .panel-header { display:none !important; }
body.iptv365-series-mode #mediaWorkspaceScreen #mediaPanelSearch { flex:0 0 44px !important; width:calc(100% - 10px) !important; height:44px !important; min-height:44px !important; margin:0 5px 13px !important; padding:0 14px !important; box-sizing:border-box !important; border:1px solid rgba(0,160,255,.55) !important; border-radius:12px !important; background:rgba(1,10,20,.92) !important; color:#fff !important; }
body.iptv365-series-mode #mediaWorkspaceScreen #mediaPanelSearch::placeholder { color:#9dbbd2 !important; }
body.iptv365-series-mode #mediaWorkspaceScreen #mediaCategoryList { display:flex !important; flex:1 1 auto !important; flex-direction:column !important; gap:9px !important; min-height:0 !important; overflow:auto !important; padding:0 5px 8px !important; }
body.iptv365-series-mode #mediaWorkspaceScreen #mediaCategoryList .list-item-btn { min-height:58px !important; border:1px solid rgba(0,150,255,.24) !important; border-radius:14px !important; background:linear-gradient(110deg,rgba(2,18,34,.94),rgba(3,25,45,.88)) !important; color:#f7fbff !important; box-shadow:inset 0 1px 0 rgba(255,255,255,.035) !important; }
body.iptv365-series-mode #mediaWorkspaceScreen #mediaCategoryList .list-item-btn.active,
body.iptv365-series-mode #mediaWorkspaceScreen #mediaCategoryList .list-item-btn:hover { border-color:rgba(0,174,255,.78) !important; background:linear-gradient(110deg,rgba(0,74,124,.92),rgba(3,34,62,.96)) !important; box-shadow:0 0 16px rgba(0,145,255,.16) !important; }
body.iptv365-series-mode #mediaWorkspaceScreen .media-grid-container { display:flex !important; flex-direction:column !important; min-width:0 !important; min-height:0 !important; height:100% !important; padding:0 !important; overflow:hidden !important; background:transparent !important; border:0 !important; box-shadow:none !important; }
body.iptv365-series-mode #mediaWorkspaceScreen #mediaPosterGrid { display:grid !important; grid-template-columns:repeat(auto-fill,minmax(clamp(135px,12.5vw,205px),1fr)) !important; align-content:start !important; gap:clamp(14px,1.55vw,24px) !important; flex:1 1 auto !important; min-width:0 !important; min-height:0 !important; height:100% !important; padding:0 !important; overflow:auto !important; background:transparent !important; }
body.iptv365-series-mode #mediaWorkspaceScreen #mediaPosterGrid > .poster-card { position:relative !important; min-width:0 !important; overflow:hidden !important; border:1px solid rgba(164,205,230,.62) !important; border-radius:17px !important; background:linear-gradient(180deg,rgba(6,19,32,.92),rgba(1,8,16,.98)) !important; box-shadow:0 8px 22px rgba(0,0,0,.42),0 0 0 1px rgba(0,145,255,.09) !important; cursor:pointer !important; transition:transform .18s ease,border-color .18s ease,box-shadow .18s ease !important; }
body.iptv365-series-mode #mediaWorkspaceScreen #mediaPosterGrid .poster-img-wrap { position:relative !important; width:100% !important; aspect-ratio:2/3 !important; overflow:hidden !important; background:#071421 !important; }
body.iptv365-series-mode #mediaWorkspaceScreen #mediaPosterGrid .poster-img-wrap img { display:block !important; width:100% !important; height:100% !important; object-fit:cover !important; object-position:center !important; }
body.iptv365-series-mode #mediaWorkspaceScreen #mediaPosterGrid .poster-info { position:absolute !important; right:0 !important; bottom:0 !important; left:0 !important; padding:28px 9px 10px !important; background:linear-gradient(180deg,transparent,rgba(0,0,0,.9) 42%,rgba(0,0,0,.98)) !important; }
body.iptv365-series-mode #mediaWorkspaceScreen #mediaPosterGrid .poster-title { display:-webkit-box !important; overflow:hidden !important; color:#fff !important; font-size:clamp(12px,.92vw,15px) !important; font-weight:850 !important; line-height:1.35 !important; text-align:center !important; -webkit-line-clamp:2 !important; -webkit-box-orient:vertical !important; }
body.iptv365-series-mode #mediaWorkspaceScreen #mediaPosterGrid .iptv365-fav-star { z-index:2 !important; }
body.iptv365-series-mode #mediaWorkspaceScreen #mediaPosterGrid > .poster-card:hover { transform:translateY(-3px) !important; border-color:#20baff !important; box-shadow:0 12px 28px rgba(0,0,0,.48),0 0 18px rgba(0,145,255,.24) !important; }
body.iptv365-series-mode #mediaWorkspaceScreen > .iptv365-media-home-btn,
body.iptv365-series-mode #mediaWorkspaceScreen > .backToHomeBtn { display:none !important; }
body.iptv365-series-mode #mediaWorkspaceScreen #mediaPosterGrid[data-media-view="series-details"] { display:block !important; width:100% !important; height:100% !important; overflow:auto !important; }
@media(max-width:900px) { body.iptv365-series-mode #mediaWorkspaceScreen .split-workspace { grid-template-columns:minmax(190px,28vw) minmax(0,1fr) !important; gap:12px !important; padding:12px !important; } }
@media(max-width:620px) { body.iptv365-series-mode #mediaWorkspaceScreen .split-workspace { grid-template-columns: minmax(110px,34vw) minmax(0,1fr) !important; gap:8px !important; padding:8px !important; } body.iptv365-series-mode #mediaWorkspaceScreen #mediaPosterGrid { grid-template-columns:repeat(auto-fill,minmax(112px,1fr)) !important; gap:10px !important; } }
/* ===== Change #10 (user-approved): Series mirrors the Movies presentation.
   Same background and palette were already shared; this block brings over
   the Movies-only improvements: fit-to-top spacing (Change #8), larger
   cinematic cards (Change #6), title/rating badges (Change #4, styles for
   the series cards that app.js now builds), and the professional search
   toggle (Change #9 — the buttons are created by the same app.js code;
   the global display:none base rule lives in media-visual-fix.css).
   Everything is scoped to Series mode; Movies rules are untouched. ===== */
@media (min-width:851px) {
  body.iptv365-series-mode #mediaWorkspaceScreen .split-workspace { padding-top:6px !important; }
}
@media (min-width:1251px) {
  body.iptv365-series-mode #mediaWorkspaceScreen #mediaPosterGrid { column-gap:12px !important; padding-left:2px !important; padding-right:2px !important; }
  body.iptv365-series-mode #mediaWorkspaceScreen #mediaPosterGrid > .poster-card { aspect-ratio:.695 / 1 !important; }
}
body.iptv365-series-mode #mediaWorkspaceScreen .poster-badges { display:flex !important; flex-wrap:wrap !important; gap:5px !important; justify-content:center !important; align-items:center !important; }
body.iptv365-series-mode #mediaWorkspaceScreen .poster-badge { font-size:10.5px !important; font-weight:800 !important; letter-spacing:.05em !important; line-height:1 !important; padding:3px 8px !important; border-radius:999px !important; border:1px solid rgba(255,255,255,.3) !important; background:rgba(255,255,255,.08) !important; color:#eaf6ff !important; white-space:nowrap !important; }
body.iptv365-series-mode #mediaWorkspaceScreen .poster-badge--year { color:#ffd76a !important; border-color:rgba(255,215,106,.5) !important; }
body.iptv365-series-mode #mediaWorkspaceScreen .poster-badge--rating { color:#ffe9a8 !important; }
@media (min-width:851px) {
  body.iptv365-series-mode .iptv365-search-toggle {
    display:grid !important; place-items:center; flex:0 0 48px; width:48px; height:44px; padding:0;
    border:1px solid rgba(0,166,255,.48); border-radius:13px;
    background:linear-gradient(135deg,rgba(5,29,49,.96),rgba(1,13,27,.96));
    cursor:pointer; box-shadow:inset 0 0 12px rgba(0,140,255,.07);
    transition:border-color .18s ease, box-shadow .18s ease, transform .18s ease;
  }
  body.iptv365-series-mode .iptv365-search-toggle:hover,
  body.iptv365-series-mode .iptv365-search-toggle:focus-visible {
    border-color:#20bdff; box-shadow:0 0 12px rgba(0,166,255,.34), inset 0 0 12px rgba(0,140,255,.12);
    transform:translateY(-1px); outline:none;
  }
  body.iptv365-series-mode .iptv365-search-toggle.is-open {
    border-color:#20bdff; box-shadow:0 0 12px rgba(0,166,255,.34), inset 0 0 12px rgba(0,140,255,.12);
  }
  body.iptv365-series-mode .iptv365-movies-search-slot:not(.iptv365-search-open) {
    flex:0 0 auto !important; width:auto !important; min-width:0 !important;
  }
  body.iptv365-series-mode .iptv365-movies-search-slot:not(.iptv365-search-open) #mediaTitleSearch,
  body.iptv365-series-mode .iptv365-movies-search-slot:not(.iptv365-search-open) .iptv365-search-clear {
    display:none !important;
  }
  body.iptv365-series-mode .iptv365-movies-search-slot.iptv365-search-open {
    align-items:center !important; gap:9px !important;
  }
  body.iptv365-series-mode #mediaWorkspaceScreen .iptv365-movies-search-slot.iptv365-search-open #mediaTitleSearch {
    flex:1 1 auto !important; width:auto !important; max-width:none !important;
    background-image:none !important; padding:0 40px 0 16px !important;
  }
  body.iptv365-series-mode .iptv365-search-clear {
    display:grid !important; place-items:center; flex:0 0 26px; width:26px; height:26px;
    margin:0 0 0 -37px; padding:0; border:0; border-radius:50%;
    background:rgba(0,166,255,.16); color:#cfe9ff; font-size:13px; line-height:1;
    cursor:pointer; z-index:2;
  }
  body.iptv365-series-mode .iptv365-search-clear:hover,
  body.iptv365-series-mode .iptv365-search-clear:focus-visible {
    background:rgba(0,166,255,.32); outline:none;
  }
}

/* ===== Change #11 (user-approved): Series background + sidebar list made
   truly identical to Movies. Diagnosis: the late "same premium frame"
   block in this file re-declared Series values that differ from Movies —
   flat #020812 body background (Movies: the photo, fixed), a blue active
   category (Movies: gold), and taller/different-coloured list buttons
   (58px, radius 14px, blue-tinted border/background, 9px list gap).
   The rules below repeat the Movies values at the same ID-level
   specificity as that block, so Series now matches Movies exactly.
   Movies files are untouched. ===== */
body.iptv365-series-mode,
body.iptv365-series-mode #app,
body.iptv365-series-mode .app-container { background:#020812 var(--iptv365-global-bg) center center / cover no-repeat fixed !important; }
body.iptv365-series-mode #mediaWorkspaceScreen { background-color:#020812 !important; background-image:var(--iptv365-global-bg) !important; background-position:center center !important; background-size:cover !important; background-repeat:no-repeat !important; }
body.iptv365-series-mode #mediaWorkspaceScreen #mediaPanelSearch { border:1px solid rgba(0,157,255,.5) !important; background:rgba(2,13,27,.92) !important; }
body.iptv365-series-mode #mediaWorkspaceScreen #mediaPanelSearch::placeholder { color:rgba(255,255,255,.72) !important; }
body.iptv365-series-mode #mediaWorkspaceScreen #mediaCategoryList { gap:7px !important; padding:0 5px 12px !important; }
body.iptv365-series-mode #mediaWorkspaceScreen #mediaCategoryList .list-item-btn { min-height:clamp(43px,5.7vh,58px) !important; padding:7px clamp(10px,1.15vw,19px) !important; border:1px solid rgba(0,126,205,.13) !important; border-radius:12px !important; background:linear-gradient(105deg,rgba(3,19,34,.92),rgba(1,10,21,.9)) !important; color:#f8fbff !important; font-size:clamp(12px,.98vw,17px) !important; font-weight:650 !important; gap:clamp(10px,1vw,17px) !important; box-shadow:none !important; }
body.iptv365-series-mode #mediaWorkspaceScreen #mediaCategoryList .list-item-btn:hover { border-color:rgba(0,174,255,.72) !important; background:rgba(0,55,94,.68) !important; }
body.iptv365-series-mode #mediaWorkspaceScreen #mediaCategoryList .list-item-btn.active { border:1px solid #ffd72e !important; background:linear-gradient(100deg,#ffdf32,#ffb900 72%,#ff8b00) !important; color:#050b13 !important; box-shadow:0 0 10px rgba(255,208,0,.75),0 0 26px rgba(255,196,0,.4),inset 0 0 12px rgba(255,255,255,.28) !important; }
body.iptv365-series-mode #mediaWorkspaceScreen #mediaCategoryList .list-item-btn.active .iptv365-category-icon { color:#050b13; }

/* ===== Change #14 (user-approved): the user's 365 PLAYER badge (transparent
   assets/player365-badge.png) replaces the old logo in the Series header
   brand and the missing-poster fallback. ===== */
body.iptv365-series-mode .iptv365-movie-brand { width:167px !important; height:56px !important; background:url("assets/player365-fallback-logo.png") center / contain no-repeat !important; }
body.iptv365-series-mode .iptv365-movie-brand > span { display:none !important; }
body.iptv365-series-mode #mediaWorkspaceScreen .poster-fallback {
  background:#020b17 url("assets/player365-fallback-logo.png") center / 72% auto no-repeat !important;
}

/* ===== Change #36 (user-approved): when an episode thumb or the series
   detail poster shows the new neon logo fallback (class added by
   app.js), letterbox it with contain — the cover rules would crop the
   wide pill artwork. Real artwork keeps its cover treatment. ===== */
#mediaWorkspaceScreen .iptv-series-details .iptv-episode-thumb.iptv365-logo-fallback-thumb {
  object-fit:contain !important;
}
#mediaWorkspaceScreen .iptv-series-details .iptv-series-poster.iptv365-logo-fallback-img {
  object-fit:contain !important; background:#050c15 !important;
}

/* ===== Change #38 (user-approved): wide responsive toolbar logo. The new
   neon pill logo (assets/player365-fallback-logo.png) is 3:1, so the brand
   grows wider with the header; smaller sizes at narrow widths so the
   centered heading and header tools never collide. ===== */
@media (max-width:1100px) {
  body.iptv365-series-mode .iptv365-movie-brand { width:143px !important; height:48px !important; }
}
@media (max-width:600px) {
  body.iptv365-series-mode .iptv365-movie-brand { width:119px !important; height:40px !important; }
}

/* ===== Change #53 (user-approved): unified category sidebar — the Live TV
   sidebar design (#45 rows + #51 gold search field, values verbatim) applied
   to Series. Desktop only (min-width:851px); portrait/small screens keep
   their current behavior. Live TV itself is untouched (no rule here targets
   it). The media search handler already exists and works (app.js) — this is
   a restyle only; no DOM or JS change. The gold PIN pill is deliberately
   untouched (media-only, no Live equivalent). Long names WRAP to 2 lines
   like Live (user's pick) instead of the old ellipsis. Values ported from
   the approved preview simulation (smoke24/unifiedsidebar/override.css).
   Appended last: wins ties against the layered Series rules above. */
@media (min-width:851px) {

  /* Sidebar shell — Live #45: transparent, gold-tinted right border. */
  body.iptv365-series-mode #mediaWorkspaceScreen .left-list-panel {
    padding: 0 10px 4px 2px !important;
    background: transparent !important;
    border-right: 1px solid rgba(240, 201, 79, .16) !important;
    box-shadow: none !important;
  }

  /* Search field — Live #51 gold-tinted field, verbatim values. The media
     input is bare (no wrapping label), so the magnifier is a background
     SVG (same technique the title search already uses). */
  body.iptv365-series-mode #mediaWorkspaceScreen #mediaPanelSearch {
    flex: 0 0 50px !important;
    width: 100% !important;
    height: 50px !important;
    min-height: 50px !important;
    margin: 0 0 10px !important;
    padding: 0 14px 0 46px !important;
    box-sizing: border-box !important;
    border: 1px solid rgba(240, 201, 79, 0.85) !important;
    border-radius: 12px !important;
    outline: none !important;
    background-color: transparent !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' viewBox='0 0 24 24' fill='none' stroke='%23ffd76a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-4-4'/%3E%3C/svg%3E"), linear-gradient(100deg, rgba(240, 201, 79, 0.30), rgba(240, 201, 79, 0.13)) !important;
    background-repeat: no-repeat !important;
    background-position: left 14px center, 0 0 !important;
    background-size: 22px 22px, auto !important;
    box-shadow: 0 4px 18px rgba(240, 201, 79, 0.14) !important;
    color: #ffffff !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    letter-spacing: 0.01em !important;
  }
  body.iptv365-series-mode #mediaWorkspaceScreen #mediaPanelSearch::placeholder {
    color: rgba(255, 238, 190, 0.88) !important;
    opacity: 1 !important;
    font-weight: 650 !important;
  }
  body.iptv365-series-mode #mediaWorkspaceScreen #mediaPanelSearch:focus {
    border-color: #ffd76a !important;
    box-shadow: 0 0 0 3px rgba(240, 201, 79, 0.35), 0 4px 22px rgba(240, 201, 79, 0.25) !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' viewBox='0 0 24 24' fill='none' stroke='%23ffd76a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-4-4'/%3E%3C/svg%3E"), linear-gradient(100deg, rgba(240, 201, 79, 0.38), rgba(240, 201, 79, 0.18)) !important;
  }

  /* List — Live #45: gap 8px, padding, gold scrollbar. */
  body.iptv365-series-mode #mediaWorkspaceScreen #mediaCategoryList {
    gap: 8px !important;
    padding: 10px 2px 6px !important;
    scrollbar-width: thin !important;
    scrollbar-color: rgba(240, 201, 79, .55) transparent !important;
  }
  body.iptv365-series-mode #mediaWorkspaceScreen #mediaCategoryList::-webkit-scrollbar {
    width: 6px !important;
  }
  body.iptv365-series-mode #mediaWorkspaceScreen #mediaCategoryList::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #f0c94f, #8a6a1c) !important;
    border-radius: 6px !important;
  }

  /* Rows — Live #45 values verbatim. */
  body.iptv365-series-mode #mediaWorkspaceScreen #mediaCategoryList .list-item-btn {
    min-height: 50px !important;
    padding: 9px 14px !important;
    gap: 12px !important;
    border: 1px solid rgba(255, 255, 255, .09) !important;
    border-radius: 12px !important;
    background: linear-gradient(100deg, rgba(16, 20, 36, .72), rgba(8, 10, 22, .72)) !important;
    color: #f6f8ff !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    letter-spacing: .01em !important;
    box-shadow: none !important;
  }

  /* Label — Live behavior: no ellipsis, long names wrap to 2 lines. */
  body.iptv365-series-mode #mediaWorkspaceScreen #mediaCategoryList .list-item-btn .iptv365-category-label {
    overflow: visible !important;
    text-overflow: clip !important;
    white-space: normal !important;
  }

  /* Icon/flag slot — Live #45: 26px box, 17px, gold. */
  body.iptv365-series-mode #mediaWorkspaceScreen #mediaCategoryList .list-item-btn .iptv365-category-flag,
  body.iptv365-series-mode #mediaWorkspaceScreen #mediaCategoryList .list-item-btn .iptv365-category-icon {
    display: inline-flex !important;
    flex: 0 0 26px !important;
    width: 26px !important;
    min-width: 26px !important;
    height: auto !important;
    align-items: center !important;
    justify-content: center !important;
    color: #f0c94f !important;
    font-size: 17px !important;
    line-height: 1 !important;
    filter: none !important;
  }

  /* Count pill — Live #45 values. The gold PIN pill is NOT touched. */
  body.iptv365-series-mode #mediaWorkspaceScreen #mediaCategoryList .list-item-btn .iptv365-category-count {
    margin-left: auto !important;
    flex: 0 0 auto !important;
    padding: 3px 8px !important;
    border: 1px solid rgba(255, 255, 255, .16) !important;
    border-radius: 999px !important;
    background: rgba(255, 255, 255, .06) !important;
    color: #c9d4e8 !important;
    font-size: 11px !important;
    font-weight: 800 !important;
    letter-spacing: 0 !important;
    line-height: 1 !important;
    white-space: nowrap !important;
  }

  /* Hover + focus — Live #45 values verbatim. */
  body.iptv365-series-mode #mediaWorkspaceScreen #mediaCategoryList .list-item-btn:hover,
  body.iptv365-series-mode #mediaWorkspaceScreen #mediaCategoryList .list-item-btn:focus-visible {
    border-color: rgba(240, 201, 79, .45) !important;
    background: linear-gradient(100deg, rgba(28, 32, 54, .82), rgba(12, 14, 28, .82)) !important;
    box-shadow: none !important;
    outline: none !important;
  }

  /* Active row — Live #45 gold gradient. */
  body.iptv365-series-mode #mediaWorkspaceScreen #mediaCategoryList .list-item-btn.active {
    border: 1px solid #ffd76a !important;
    background: linear-gradient(100deg, #ffd76a, #e8a90c 72%, #d18f00) !important;
    color: #1a1206 !important;
    box-shadow: 0 0 12px rgba(240, 201, 79, .35), inset 0 1px 0 rgba(255, 255, 255, .35) !important;
  }
  body.iptv365-series-mode #mediaWorkspaceScreen #mediaCategoryList .list-item-btn.active .iptv365-category-flag,
  body.iptv365-series-mode #mediaWorkspaceScreen #mediaCategoryList .list-item-btn.active .iptv365-category-icon {
    color: #1a1206 !important;
  }
  body.iptv365-series-mode #mediaWorkspaceScreen #mediaCategoryList .list-item-btn.active .iptv365-category-count {
    border-color: rgba(26, 18, 6, .35) !important;
    background: rgba(26, 18, 6, .12) !important;
    color: #1a1206 !important;
  }
}

/* ===== Change #55 (user-approved): sidebar position alignment — Series.
   Neutralize the stale inset:12px leftover (premium-unified.css L902) and set
   the workspace padding to Live TV's 12px, so the sidebar search field sits
   at exactly Live's spot (left 14 / top 91) and the toolbar gap matches
   (22px). Mirrors the Live precedent (galaxy-workspace-fix.css L169).
   Desktop only (min-width:851px); portrait/small screens unchanged. Values
   verbatim from the proven preview simulation
   (smoke24/sidebarpos/override.css). Grid gap and all other rules untouched. */
@media (min-width: 851px) {
  body.iptv365-series-mode #mediaWorkspaceScreen .split-workspace {
    inset: auto !important;
    padding: 12px !important;
  }
}

/* ================================================================
   Change #128 (2026-11-16): Movies/Series selected category rows
   use the #86 rainbow sky-glass (same 3-layer gradients +
   blur/saturate + glow, #ffe27a text) with rounded corners,
   replacing the gold gradient at every size. Both chain shapes
   (with and without #mediaCategoryList) + the :not() point beat
   the gold rules in this file and in media-visual-fix.css; this
   file loads last, so the ties break here too. Flag/icon/count
   children go #ffe27a to match. Home pills and season tabs
   already use this stack (#86) and are untouched.
   ================================================================ */
body.iptv365-movies-mode #mediaWorkspaceScreen #mediaCategoryList .list-item-btn.active:not(.iptv365-never),
body.iptv365-movies-mode #mediaWorkspaceScreen .list-item-btn.active:not(.iptv365-never),
body.iptv365-series-mode #mediaWorkspaceScreen #mediaCategoryList .list-item-btn.active:not(.iptv365-never),
body.iptv365-series-mode #mediaWorkspaceScreen .list-item-btn.active:not(.iptv365-never) {
  color: #ffe27a !important;
  border: 1px solid transparent !important;
  border-radius: 14px !important;
  background-color: transparent !important;
  background-image:
    linear-gradient(180deg, rgba(255,255,255,0.50), rgba(255,255,255,0.10) 42%, rgba(255,255,255,0.00) 58%),
    linear-gradient(90deg, rgba(255,138,0,0.92), rgba(255,45,149,0.92), rgba(138,43,226,0.92), rgba(0,217,255,0.92)),
    linear-gradient(90deg, #FF8A00, #FF2D95, #8A2BE2, #00D9FF) !important;
  background-origin: padding-box, padding-box, border-box !important;
  background-clip: padding-box, padding-box, border-box !important;
  -webkit-backdrop-filter: blur(8px) saturate(150%) !important;
  backdrop-filter: blur(8px) saturate(150%) !important;
  box-shadow:
    0 0 16px rgba(255, 45, 149, 0.55),
    0 0 32px rgba(138, 43, 226, 0.35),
    0 4px 14px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.55) !important;
  text-shadow: 0 1px 6px rgba(0,0,0,0.35) !important;
}
body.iptv365-movies-mode #mediaWorkspaceScreen #mediaCategoryList .list-item-btn.active:not(.iptv365-never) .iptv365-category-flag,
body.iptv365-movies-mode #mediaWorkspaceScreen #mediaCategoryList .list-item-btn.active:not(.iptv365-never) .iptv365-category-icon,
body.iptv365-movies-mode #mediaWorkspaceScreen .list-item-btn.active:not(.iptv365-never) .iptv365-category-flag,
body.iptv365-movies-mode #mediaWorkspaceScreen .list-item-btn.active:not(.iptv365-never) .iptv365-category-icon,
body.iptv365-series-mode #mediaWorkspaceScreen #mediaCategoryList .list-item-btn.active:not(.iptv365-never) .iptv365-category-flag,
body.iptv365-series-mode #mediaWorkspaceScreen #mediaCategoryList .list-item-btn.active:not(.iptv365-never) .iptv365-category-icon,
body.iptv365-series-mode #mediaWorkspaceScreen .list-item-btn.active:not(.iptv365-never) .iptv365-category-flag,
body.iptv365-series-mode #mediaWorkspaceScreen .list-item-btn.active:not(.iptv365-never) .iptv365-category-icon {
  color: #ffe27a !important;
}
body.iptv365-movies-mode #mediaWorkspaceScreen #mediaCategoryList .list-item-btn.active:not(.iptv365-never) .iptv365-category-count,
body.iptv365-movies-mode #mediaWorkspaceScreen .list-item-btn.active:not(.iptv365-never) .iptv365-category-count,
body.iptv365-series-mode #mediaWorkspaceScreen #mediaCategoryList .list-item-btn.active:not(.iptv365-never) .iptv365-category-count,
body.iptv365-series-mode #mediaWorkspaceScreen .list-item-btn.active:not(.iptv365-never) .iptv365-category-count {
  border-color: rgba(255,255,255,.45) !important;
  background: rgba(0,0,0,.22) !important;
  color: #ffe27a !important;
}

/* Change #128, continued: Series season tabs. The unscoped blue
   active rule above wins wherever the portrait-only
   .iptv365-series-redesign class is absent (desktop/landscape),
   because the #86 rainbow season-tab rule requires that class.
   This rule repeats the blue rule's chain with a :not() point, so
   the selected season gets the same rainbow sky-glass at every
   size; the tab keeps its own 13px radius and the episode-count
   <small> goes #ffe27a like the #86 variant. */
#mediaWorkspaceScreen .iptv-series-details .iptv-season-tab.active:not(.iptv365-never) {
  color: #ffe27a !important;
  border: 1px solid transparent !important;
  border-radius: 13px !important;
  background-color: transparent !important;
  background-image:
    linear-gradient(180deg, rgba(255,255,255,0.50), rgba(255,255,255,0.10) 42%, rgba(255,255,255,0.00) 58%),
    linear-gradient(90deg, rgba(255,138,0,0.92), rgba(255,45,149,0.92), rgba(138,43,226,0.92), rgba(0,217,255,0.92)),
    linear-gradient(90deg, #FF8A00, #FF2D95, #8A2BE2, #00D9FF) !important;
  background-origin: padding-box, padding-box, border-box !important;
  background-clip: padding-box, padding-box, border-box !important;
  -webkit-backdrop-filter: blur(8px) saturate(150%) !important;
  backdrop-filter: blur(8px) saturate(150%) !important;
  box-shadow:
    0 0 16px rgba(255, 45, 149, 0.55),
    0 0 32px rgba(138, 43, 226, 0.35),
    0 4px 14px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.55) !important;
  text-shadow: 0 1px 6px rgba(0,0,0,0.35) !important;
}
#mediaWorkspaceScreen .iptv-series-details .iptv-season-tab.active:not(.iptv365-never) small {
  color: #ffe27a !important;
}

/* Change #131: the Series home glass More button — the #115 Movies
   rule copied verbatim, scoped to the Series redesign screen
   instead of the Movies one. Same .iptv365-mhome-more class, same
   look; NOT the .iptv365-load-more batching hook. Portrait only,
   matching #115's scope. */
@media (max-width: 950px) and (orientation: portrait) {
  #mediaWorkspaceScreen.iptv365-series-redesign #mediaPosterGrid > .iptv365-mhome-more:not(.iptv365-never) {
    display: block !important;
    margin: 8px auto 26px !important;
    padding: 12px 36px !important;
    border-radius: 999px !important;
    border: 1px solid rgba(255,255,255,.28) !important;
    background: rgba(255,255,255,.06) !important;
    color: #fff !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    letter-spacing: .02em !important;
    cursor: pointer !important;
    backdrop-filter: blur(4px) !important;
    -webkit-backdrop-filter: blur(4px) !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.18), 0 8px 22px rgba(0,0,0,.45) !important;
    transition: box-shadow .28s ease, border-color .28s ease !important;
  }
  #mediaWorkspaceScreen.iptv365-series-redesign #mediaPosterGrid > .iptv365-mhome-more:hover:not(.iptv365-never),
  #mediaWorkspaceScreen.iptv365-series-redesign #mediaPosterGrid > .iptv365-mhome-more:focus-visible:not(.iptv365-never) {
    border-color: rgba(103,220,255,.95) !important;
    box-shadow: 0 0 10px rgba(0,194,255,.7), 0 0 26px rgba(0,145,255,.35), inset 0 1px 0 rgba(255,255,255,.18) !important;
    outline: none !important;
  }
}

/* Change #161: Cast buttons — white logo + 'Cast' text ONLY, no
   circle/ring/background/border (user correction 2026-11-16). A
   soft shadow keeps the white glyph legible over video. The buttons
   start hidden (.hidden) and app.js shows them only when
   RemotePlayback is available. */
#livePlayerStage .iptv365-cast-btn-live,
#cinemaModal .cinema-header .iptv365-cast-btn-cinema {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #fff;
  font: 600 13px/1 system-ui, -apple-system, sans-serif;
  letter-spacing: .2px;
  cursor: pointer;
  text-shadow: 0 1px 4px rgba(0, 0, 0, .85);
}
#livePlayerStage .iptv365-cast-btn-live svg,
#cinemaModal .cinema-header .iptv365-cast-btn-cinema svg {
  width: 22px;
  height: 22px;
  display: block;
  flex: 0 0 auto;
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, .85));
}
/* Live: overlay on the video stage, bottom-right above the native
   control bar. Inside #livePlayerStage (the fullscreen element),
   so it survives fullscreen. Above the video, far below the gate
   overlays. */
#livePlayerStage .iptv365-cast-btn-live {
  position: absolute;
  right: 10px;
  bottom: 52px;
  z-index: 4;
}
/* Cinema: in the header, directly left of Close Player. The auto
   left margin consumes the free space so the button sits adjacent
   to Close instead of floating mid-header. */
#cinemaModal .cinema-header .iptv365-cast-btn-cinema {
  flex: 0 0 auto;
  margin-left: auto;
}
/* Change #161: transient honest hint when a visible Cast button
   cannot cast. Positioned by the container it is appended to. */
#livePlayerStage .iptv365-cast-hint {
  position: absolute;
  right: 10px;
  bottom: 96px;
  z-index: 5;
}
#cinemaModal .cinema-stage .iptv365-cast-hint {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 5;
}
.iptv365-cast-hint {
  padding: 8px 12px;
  border-radius: 8px;
  background: rgba(0, 0, 0, .82);
  color: #fff;
  font: 500 12.5px/1.35 system-ui, -apple-system, sans-serif;
  pointer-events: none;
  white-space: nowrap;
}

/* Change #174 (user-approved Preview174 variant 5 + dimmed banner):
   full-screen series details, portrait only. Mirrors the #169 movie
   treatment: the panel fills the viewport and covers the header and
   bottom bar; the series banner art fills the whole screen behind
   the same faint veil; poster, title, chips and plot are centred;
   the full plot scrolls inside the panel (no clamp); the
   Trailer/Cast/Similar row, cast line and Similar section stay
   visible inside the scroll; season pills are rainbow pills and
   episode rows keep the 3-column no-thumbnail design. The gold
   star (top-right) is the real favourites toggle added in app.js.
   Stacking: same :has() approach as #169 — the split-workspace
   backdrop-filter is neutralised and the workspace lifted ONLY
   while a details panel is in the grid; the moment any back path
   removes the panel they stop matching, so filter, stacking,
   scroll, bottom bar and header restore exactly with no JS state.
   Flex-shrink: the panel is a column flex container taller than
   the viewport, so every direct child gets flex:none or the
   season-tabs container collapses (found in the Preview174
   harness). Desktop/landscape are untouched: every rule here is
   inside the portrait media query. */
@media (max-width: 950px) and (orientation: portrait) {
  body.iptv365-series-mode #mediaWorkspaceScreen.iptv365-series-redesign:not(.hidden):has(#mediaPosterGrid > .iptv-series-details) {
    z-index: 99500 !important;
  }
  body.iptv365-series-mode #mediaWorkspaceScreen.iptv365-series-redesign:not(.hidden) .split-workspace:has(#mediaPosterGrid > .iptv-series-details) {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    z-index: 99500 !important;
  }
  body.iptv365-series-mode #mediaWorkspaceScreen.iptv365-series-redesign #mediaPosterGrid:not(.iptv365-never) > .iptv-series-details {
    position: fixed !important; inset: 0 !important;
    z-index: 99000 !important;
    width: auto !important; height: auto !important; max-height: none !important;
    margin: 0 !important; padding: 0 0 26px !important;
    border: 0 !important; border-radius: 0 !important; box-shadow: none !important;
    overflow-y: auto !important; overflow-x: hidden !important;
    display: flex !important; flex-direction: column !important;
    background: #050508 !important;
  }
  body.iptv365-series-mode #mediaWorkspaceScreen.iptv365-series-redesign #mediaPosterGrid:not(.iptv365-never) > .iptv-series-details:hover {
    border-color: transparent !important; box-shadow: none !important;
  }
  body.iptv365-series-mode #mediaWorkspaceScreen.iptv365-series-redesign #mediaPosterGrid:not(.iptv365-never) > .iptv-series-details > * {
    flex: none !important;
  }
  /* Dimmed banner: fixed behind everything so it stays put while the
     content scrolls; the veil leaves the art only faintly visible
     (same values as #169). The veil is the backdrop's own :after. */
  body.iptv365-series-mode #mediaWorkspaceScreen.iptv365-series-redesign #mediaPosterGrid:not(.iptv365-never) .iptv-series-backdrop {
    position: fixed !important; inset: 0 !important;
    height: auto !important; z-index: 0 !important; overflow: hidden !important;
  }
  body.iptv365-series-mode #mediaWorkspaceScreen.iptv365-series-redesign #mediaPosterGrid:not(.iptv365-never) .iptv-series-backdrop img {
    width: 100% !important; height: 100% !important;
    object-fit: cover !important; object-position: center 30% !important;
    opacity: 1 !important; filter: blur(3px) saturate(1.15) !important; transform: none !important;
  }
  body.iptv365-series-mode #mediaWorkspaceScreen.iptv365-series-redesign #mediaPosterGrid:not(.iptv365-never) .iptv-series-backdrop:after {
    background: linear-gradient(180deg, rgba(5,5,8,.88) 0%, rgba(5,5,8,.78) 45%, rgba(5,5,8,.86) 100%) !important;
  }
  /* Back: plain arrow, top-left. The existing one-step back handler
     is untouched; the button's text label is preserved (invisible)
     as the accessible name. */
  body.iptv365-series-mode #mediaWorkspaceScreen.iptv365-series-redesign #mediaPosterGrid:not(.iptv365-never) .iptv-media-back {
    position: absolute !important; top: 18px !important; left: 20px !important;
    z-index: 5 !important; width: auto !important; height: auto !important;
    min-height: 0 !important; margin: 0 !important; padding: 8px 6px !important;
    background: transparent !important; border: 0 !important; border-radius: 0 !important;
    box-shadow: none !important; color: #fff !important;
    font-size: 0 !important; line-height: 1 !important;
  }
  body.iptv365-series-mode #mediaWorkspaceScreen.iptv365-series-redesign #mediaPosterGrid:not(.iptv365-never) .iptv-media-back::before {
    content: "\2190" !important; font-size: 28px !important; line-height: 1 !important;
  }
  /* Favourite star: the real toggle added in app.js. Gold outline =
     not favourited, red filled = favourited (#83 rule, via the
     .is-fav class paintSeriesFav sets). */
  body.iptv365-series-mode #mediaWorkspaceScreen.iptv365-series-redesign #mediaPosterGrid:not(.iptv365-never) .iptv365-mhome-watchlist:not(.iptv365-cw-fromstart) {
    position: absolute !important; top: 16px !important; right: 20px !important;
    left: auto !important; bottom: auto !important; z-index: 6 !important;
    width: 44px !important; height: 44px !important; margin: 0 !important; padding: 0 !important;
    background: transparent !important; border: 0 !important; border-radius: 0 !important;
    box-shadow: none !important; font-size: 29px !important; line-height: 44px !important;
    color: #ffe27a !important; text-align: center !important; cursor: pointer !important;
  }
  body.iptv365-series-mode #mediaWorkspaceScreen.iptv365-series-redesign #mediaPosterGrid:not(.iptv365-never) .iptv365-mhome-watchlist:not(.iptv365-cw-fromstart).is-fav {
    color: #e5484d !important;
  }
  /* Centred content above the veil. */
  body.iptv365-series-mode #mediaWorkspaceScreen.iptv365-series-redesign #mediaPosterGrid:not(.iptv365-never) .iptv-series-heading {
    position: relative !important; z-index: 2 !important;
    display: flex !important; flex-direction: column !important;
    align-items: center !important; text-align: center !important;
    padding: 26px 28px 0 !important; box-sizing: border-box !important;
    margin: 0 !important; border-bottom: 0 !important;
    grid-template-columns: none !important; gap: 0 !important;
  }
  body.iptv365-series-mode #mediaWorkspaceScreen.iptv365-series-redesign #mediaPosterGrid:not(.iptv365-never) .iptv-series-heading > div {
    display: flex !important; flex-direction: column !important; align-items: center !important;
    width: 100% !important; padding: 0 !important;
  }
  body.iptv365-series-mode #mediaWorkspaceScreen.iptv365-series-redesign #mediaPosterGrid:not(.iptv365-never) .iptv-series-poster {
    width: 138px !important; max-width: 138px !important;
    height: 207px !important; max-height: none !important;
    margin: 0 0 12px !important;
    border: 1px solid rgba(255,255,255,.28) !important; border-radius: 20px !important;
    box-shadow: 0 18px 44px rgba(0,0,0,.6) !important;
  }
  body.iptv365-series-mode #mediaWorkspaceScreen.iptv365-series-redesign #mediaPosterGrid:not(.iptv365-never) .iptv-series-title {
    font-size: 23px !important; text-align: center !important;
  }
  body.iptv365-series-mode #mediaWorkspaceScreen.iptv365-series-redesign #mediaPosterGrid:not(.iptv365-never) .iptv365-mhome-chips {
    justify-content: center !important;
  }
  body.iptv365-series-mode #mediaWorkspaceScreen.iptv365-series-redesign #mediaPosterGrid:not(.iptv365-never) .iptv365-mhome-chip {
    background: transparent !important; border-color: rgba(255,255,255,.32) !important;
    color: rgba(255,255,255,.92) !important;
  }
  body.iptv365-series-mode #mediaWorkspaceScreen.iptv365-series-redesign #mediaPosterGrid:not(.iptv365-never) .iptv-series-description {
    text-align: center !important; font-size: 14px !important; line-height: 1.55 !important;
    color: rgba(255,255,255,.78) !important;
  }
  /* Cast line stays visible (when the Cast button reveals it) below
     the plot, inside the scrollable panel. */
  body.iptv365-series-mode #mediaWorkspaceScreen.iptv365-series-redesign #mediaPosterGrid:not(.iptv365-never) .iptv365-mhome-cast {
    text-align: center !important; width: 100% !important;
  }
  /* Resume button, mini row, season pills, heading and episode list:
     inset 28px like the heading, inside the scroll. */
  body.iptv365-series-mode #mediaWorkspaceScreen.iptv365-series-redesign #mediaPosterGrid:not(.iptv365-never) .iptv365-shome-resume {
    margin: 10px 28px 0 !important; width: auto !important;
  }
  body.iptv365-series-mode #mediaWorkspaceScreen.iptv365-series-redesign #mediaPosterGrid:not(.iptv365-never) .iptv365-mhome-mini {
    margin: 10px 28px 0 !important;
  }
  body.iptv365-series-mode #mediaWorkspaceScreen.iptv365-series-redesign #mediaPosterGrid:not(.iptv365-never) .iptv-season-tabs {
    display: flex !important; flex-wrap: wrap !important; gap: 10px !important;
    margin: 10px 28px 0 !important; width: auto !important; justify-content: center !important;
  }
  body.iptv365-series-mode #mediaWorkspaceScreen.iptv365-series-redesign #mediaPosterGrid:not(.iptv365-never) .iptv-season-tab {
    flex: 0 0 auto !important; flex-direction: row !important; gap: 6px !important;
    min-height: 44px !important; padding: 10px 18px !important; border-radius: 999px !important;
    font-size: 15px !important; background: rgba(255,255,255,.07) !important;
    border: 1px solid rgba(255,255,255,.25) !important;
  }
  body.iptv365-series-mode #mediaWorkspaceScreen.iptv365-series-redesign #mediaPosterGrid:not(.iptv365-never) .iptv-season-tab small {
    font-size: 13px !important;
  }
  body.iptv365-series-mode #mediaWorkspaceScreen.iptv365-series-redesign #mediaPosterGrid:not(.iptv365-never) .iptv-season-tab small {
    font-size: 13px !important;
  }
  body.iptv365-series-mode #mediaWorkspaceScreen.iptv365-series-redesign #mediaPosterGrid:not(.iptv365-never) .iptv-season-tab.active small {
    color: #fff !important;
  }
  body.iptv365-series-mode #mediaWorkspaceScreen.iptv365-series-redesign #mediaPosterGrid:not(.iptv365-never) .iptv-season-tab.active {
    background: linear-gradient(100deg,#ff9a3d,#ff2d95 38%,#8a2be2 68%,#00c6ff) !important;
    border-color: transparent !important; color: #fff !important;
    box-shadow: 0 6px 18px rgba(255,45,149,.35) !important;
  }
  body.iptv365-series-mode #mediaWorkspaceScreen.iptv365-series-redesign #mediaPosterGrid:not(.iptv365-never) .iptv-episodes-heading {
    margin: 10px 28px 10px !important; width: auto !important;
    font-size: 20px !important; justify-content: center !important;
  }
  body.iptv365-series-mode #mediaWorkspaceScreen.iptv365-series-redesign #mediaPosterGrid:not(.iptv365-never) .iptv-episodes-heading:after {
    display: none !important;
  }
  body.iptv365-series-mode #mediaWorkspaceScreen.iptv365-series-redesign #mediaPosterGrid:not(.iptv365-never) .iptv-episode-list {
    padding: 0 28px !important; box-sizing: border-box !important; gap: 10px !important;
  }
  /* Episode rows: the 3-column no-thumbnail design. The grid-column
     placements move together with the new grid-template-columns or
     children land in the wrong tracks (found in the Preview174
     harness). The resume mark is absolutely positioned, so it is
     unaffected by the grid. */
  body.iptv365-series-mode #mediaWorkspaceScreen.iptv365-series-redesign #mediaPosterGrid:not(.iptv365-never) .iptv-episode-row {
    grid-template-columns: 40px minmax(0,1fr) auto !important;
    grid-template-rows: auto auto !important; gap: 4px 12px !important;
    min-height: 72px !important; padding: 10px 12px !important; border-radius: 14px !important;
    background: rgba(255,255,255,.04) !important; border: 1px solid rgba(255,255,255,.16) !important;
  }
  body.iptv365-series-mode #mediaWorkspaceScreen.iptv365-series-redesign #mediaPosterGrid:not(.iptv365-never) .iptv-episode-thumb {
    display: none !important;
  }
  body.iptv365-series-mode #mediaWorkspaceScreen.iptv365-series-redesign #mediaPosterGrid:not(.iptv365-never) .iptv-episode-number {
    grid-column: 1 !important; grid-row: 1 / span 2 !important;
    width: 40px !important; height: 40px !important; font-size: 17px !important; border-radius: 10px !important;
  }
  body.iptv365-series-mode #mediaWorkspaceScreen.iptv365-series-redesign #mediaPosterGrid:not(.iptv365-never) .iptv-episode-title {
    grid-column: 2 !important; grid-row: 1 !important; font-size: 14.5px !important;
  }
  body.iptv365-series-mode #mediaWorkspaceScreen.iptv365-series-redesign #mediaPosterGrid:not(.iptv365-never) .iptv-episode-meta {
    grid-column: 2 !important; grid-row: 2 !important; font-size: 12px !important; line-height: 1.35 !important;
  }
  body.iptv365-series-mode #mediaWorkspaceScreen.iptv365-series-redesign #mediaPosterGrid:not(.iptv365-never) .iptv-episode-play {
    grid-column: 3 !important; grid-row: 1 / span 2 !important;
    min-width: 66px !important; min-height: 40px !important;
    padding: 6px 10px !important; border-radius: 10px !important; font-size: 12px !important;
    background: linear-gradient(100deg,#ffe875,#ffc400 70%,#ffad00) !important; color: #1a0d00 !important;
  }
  /* Similar section stays visible below the episodes, inside the
     scrollable panel. */
  body.iptv365-series-mode #mediaWorkspaceScreen.iptv365-series-redesign #mediaPosterGrid:not(.iptv365-never) .iptv365-mhome-similar {
    position: relative !important; z-index: 2 !important;
    margin: 18px 0 0 !important; padding: 0 28px 30px !important;
    width: 100% !important; box-sizing: border-box !important;
  }
}

/* ================================================================
   Change #192 (2026-11-16): custom player controls. The native
   `controls` attributes are removed from both <video> elements in
   index.php — Android Chrome's white control pill (with a seek
   timeline on DVR-window streams) looked odd, and Live TV must
   never offer seek. These dark-glass bars replace them: Live gets
   play/pause + mute + fullscreen ONLY (no timeline, no time, no
   seek — ever); cinema gets play/pause + gold seek bar + time +
   mute + fullscreen + close. Bars sit inside the stage elements
   (the fullscreen elements), so they survive fullscreen. The bar
   container is pointer-events:none so taps on empty bar area reach
   the video (Live keeps its tap-to-fullscreen); only the buttons
   and the seek slider take pointer events. Show/hide is instant
   (no fade): app.js toggles .hidden. The #161 Cast button and the
   #162 stage badge/chip are untouched; the Live cast button keeps
   its bottom:52px seat just above this bar. The seek track fill
   comes from --iptv365-pc-fill (set by app.js: gold played +
   pale buffered + dark rest) on Chromium; Firefox uses its native
   range-progress (gold, no buffered segment). Change #194: inline,
   the play/pause button hides and a Cast button takes its LEFT seat
   in the Live bar (same 44px round button, white glyph per the #161
   white-logo language); fullscreen restores play/pause in the bar
   and the standalone #161 button above it. app.js owns the swap. */

/* Bar: bottom-anchored, full-width, gradient scrim. */
#livePlayerStage .iptv365-pc-bar,
#cinemaModal .cinema-stage .iptv365-pc-bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 6px;
  box-sizing: border-box;
  padding: 14px 12px calc(10px + env(safe-area-inset-bottom, 0px));
  background: linear-gradient(180deg, rgba(0, 0, 0, 0), rgba(0, 0, 0, .55) 34%, rgba(0, 0, 0, .78));
  pointer-events: none;
}
/* Round buttons: dark glass, gold glyph. 44px tap targets. */
#livePlayerStage .iptv365-pc-btn,
#cinemaModal .cinema-stage .iptv365-pc-btn {
  pointer-events: auto;
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 50%;
  background: rgba(10, 10, 14, .55);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  color: #ffe27a;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
#livePlayerStage .iptv365-pc-btn svg,
#cinemaModal .cinema-stage .iptv365-pc-btn svg {
  width: 22px;
  height: 22px;
  display: block;
  flex: 0 0 auto;
}
#livePlayerStage .iptv365-pc-btn:active,
#cinemaModal .cinema-stage .iptv365-pc-btn:active {
  transform: scale(.94);
}
#livePlayerStage .iptv365-pc-btn:focus-visible,
#cinemaModal .cinema-stage .iptv365-pc-btn:focus-visible {
  outline: 2px solid #ffe27a;
  outline-offset: 2px;
}
/* Change #194: the in-bar Live Cast button keeps the bar's round
   dark-glass shape and 44px tap target; only the glyph stays white,
   the #161 white-logo language. */
#livePlayerStage .iptv365-pc-btn.iptv365-pc-cast {
  color: #fff;
}
/* Icon swap: .is-alt shows the alternate glyph (play when paused,
   muted speaker when muted). */
#livePlayerStage .iptv365-pc-btn .ic-alt,
#cinemaModal .cinema-stage .iptv365-pc-btn .ic-alt {
  display: none;
}
#livePlayerStage .iptv365-pc-btn.is-alt .ic-main,
#cinemaModal .cinema-stage .iptv365-pc-btn.is-alt .ic-main {
  display: none;
}
#livePlayerStage .iptv365-pc-btn.is-alt .ic-alt,
#cinemaModal .cinema-stage .iptv365-pc-btn.is-alt .ic-alt {
  display: block;
}
/* Spacer pushes mute/fullscreen/close to the right. */
#livePlayerStage .iptv365-pc-spacer,
#cinemaModal .cinema-stage .iptv365-pc-spacer {
  flex: 1 1 auto;
  pointer-events: none;
}
/* Cinema seek slider: gold fill via --iptv365-pc-fill. */
#cinemaModal .cinema-stage .iptv365-pc-seek {
  pointer-events: auto;
  flex: 1 1 auto;
  min-width: 0;
  height: 26px;
  margin: 0;
  padding: 0;
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  border: 0;
  cursor: pointer;
}
#cinemaModal .cinema-stage .iptv365-pc-seek::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 3px;
  background: var(--iptv365-pc-fill, rgba(255, 255, 255, .18));
}
#cinemaModal .cinema-stage .iptv365-pc-seek::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  margin-top: -5px;
  border-radius: 50%;
  background: #ffe27a;
  border: 2px solid #8a6d1a;
  box-shadow: 0 1px 6px rgba(0, 0, 0, .6);
}
#cinemaModal .cinema-stage .iptv365-pc-seek::-moz-range-track {
  height: 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, .18);
}
#cinemaModal .cinema-stage .iptv365-pc-seek::-moz-range-progress {
  height: 6px;
  border-radius: 3px;
  background: linear-gradient(90deg, #ffe27a, #d4af37);
}
#cinemaModal .cinema-stage .iptv365-pc-seek::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #ffe27a;
  border: 2px solid #8a6d1a;
  box-shadow: 0 1px 6px rgba(0, 0, 0, .6);
}
#cinemaModal .cinema-stage .iptv365-pc-seek:focus-visible {
  outline: 2px solid #ffe27a;
  outline-offset: 2px;
  border-radius: 4px;
}
/* Cinema time readout. */
#cinemaModal .cinema-stage .iptv365-pc-time {
  flex: 0 0 auto;
  color: #fff;
  font: 600 12.5px/1 system-ui, -apple-system, sans-serif;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 1px 3px rgba(0, 0, 0, .8);
  white-space: nowrap;
  pointer-events: none;
}
/* Cinema LIVE pill: only when the duration is unknown (the
   .iptv365-pc-noduration state hides the timeline + time). */
#cinemaModal .cinema-stage .iptv365-pc-livepill {
  flex: 0 0 auto;
  background: #e11d48;
  color: #fff;
  border-radius: 5px;
  padding: 3px 8px;
  font: 700 10px/1.4 system-ui, -apple-system, sans-serif;
  letter-spacing: .6px;
  pointer-events: none;
}
#cinemaModal .cinema-stage .iptv365-pc-bar.iptv365-pc-noduration .iptv365-pc-seek,
#cinemaModal .cinema-stage .iptv365-pc-bar.iptv365-pc-noduration .iptv365-pc-time {
  display: none;
}
#cinemaModal .cinema-stage .iptv365-pc-bar:not(.iptv365-pc-noduration) .iptv365-pc-livepill {
  display: none;
}

/* ================================================================
   Change #196 (2026-11-16): GLOBAL BACKGROUND — one shared asset.
   Every page/section background rule in the six stylesheets and the
   injected <style> blocks now paints var(--iptv365-global-bg)
   instead of galaxy-background.jpg / mybgpicture.jpg. The variable
   is defined ONCE here (this file loads last) so all sheets and
   runtime-injected styles resolve the same asset: the owner's
   portrait artwork on portrait viewports, the landscape artwork
   everywhere else. background-size/position/repeat/attachment are
   unchanged at each use site (cover, no-repeat, fixed where the
   rule already used fixed), so nothing stretches or distorts.
   EXCLUDED by the order: the #130 splash (inline SVG, index.php)
   and the login page (login-design.js wallpaper) — neither rule
   references this variable. Card/tile gradients, logo fallbacks,
   the cinema letterbox black and the #169/#174 details veils are
   untouched.
   ================================================================ */
:root {
  /* Change #224 (2026-11-17): the owner's new landscape wallpaper
     replaces the old landscape artwork on desktop/landscape
     viewports. New asset filename (the old file stays on the
     server, unused) so no cached copy of the old image can
     survive. Portrait override below untouched. */
  --iptv365-global-bg: url("assets/player365-global-bg-desktop.jpg");
}
@media (orientation: portrait) {
  :root {
    /* Change #221 (2026-11-17): the owner's own wallpaper replaces
       the burgundy portrait artwork. New asset filename (the old
       file stays on the server, unused) so no cached copy of the
       old image can survive. Landscape asset untouched. */
    --iptv365-global-bg: url("assets/player365-global-bg-ownerwall.jpg");
  }
}
