:root{
  --panel: rgba(18, 22, 33, .72);
  --panel2: rgba(14, 18, 30, .78);
  --border: rgba(255,255,255,.10);
  --text:#e9edf7;
  --muted:#9aa3b2;
  --accent:#ff6a00;
  --accent2:#ff9a3d;
  --good:#58f0a8;
  --danger:#ff6b6b;
  --shadow: 0 18px 70px rgba(0,0,0,.35);
  --radius: 18px;
  --radius2: 22px;
  --sidebar: 260px;
  --topbar: 72px;
  --maxw: 1320px;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family: "Helvetica Neue", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  color:var(--text);
  background:#0b0d12;
  overflow-x:hidden;
}

/* Common helpers */
.muted{color: var(--muted);}
.code{
  display:inline-flex;
  align-items:center;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size:12px;
  padding:3px 8px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.18);
  color: rgba(255,255,255,.92);
}
.badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:5px 10px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.14);
  background: rgba(0,0,0,.18);
  font-weight:900;
  font-size:12px;
  letter-spacing:.25px;
  color: rgba(255,255,255,.90);
}
.badge.good{border-color: rgba(88,240,168,.35); background: rgba(88,240,168,.12); color: rgba(210,255,235,.96);}
.badge.bad{border-color: rgba(255,107,107,.35); background: rgba(255,107,107,.12); color: rgba(255,220,220,.96);}

.alert{
  border:1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.18);
  padding:12px 14px;
  border-radius:16px;
}
.alert.bad{border-color: rgba(255,107,107,.35); background: rgba(255,107,107,.10);}

/* Background theme (same vibe as admin login) */
body::before{
  content:"";
  position:fixed; inset:0;
  background-image:
    radial-gradient(1200px 600px at 30% 10%, rgba(55,115,255,.30), transparent 65%),
    radial-gradient(900px 520px at 80% 20%, rgba(255,106,0,.30), transparent 62%),
    url('/admin/login-bg.jpg');
  background-size:cover;
  background-position:center;
  filter: blur(18px) saturate(1.25) contrast(1.05);
  transform: scale(1.08);
  opacity:0.55;
  z-index:-3;
}
body::after{
  content:"";
  position:fixed; inset:0;
  background: linear-gradient(90deg, rgba(0,0,0,.62), rgba(0,0,0,.40));
  z-index:-2;
}

/* Sliding background wall (used on home pages) */
.bgwall{
  position:fixed;
  inset:0;
  overflow:hidden;
  pointer-events:none;
  z-index:-1;
  opacity:.40;
  filter:saturate(1.10) contrast(1.05);
}
.bgwall::after{
  content:"";
  position:absolute;
  inset:0;
  background:
    linear-gradient(90deg, rgba(0,0,0,.55), rgba(0,0,0,.22)),
    radial-gradient(1200px 700px at 25% 12%, rgba(55,115,255,.22), transparent 65%),
    radial-gradient(900px 540px at 78% 20%, rgba(255,106,0,.18), transparent 62%);
}
.bgwall .bgrow{
  position:absolute;
  left:0; right:0;
  height:34%;
  overflow:hidden;
}
.bgwall .bgrow.top{ top:0; }
.bgwall .bgrow.mid{ top:33%; }
.bgwall .bgrow.bottom{ bottom:0; }

.bgwall .bgtrack{
  position:absolute;
  top:0; left:0;
  height:100%;
  display:flex;
  width:max-content;
  will-change:transform;
}
.bgwall .bgcell{
  flex:0 0 auto;
  height:100%;
  width:clamp(260px, 30vw, 560px);
  border-left: 1px solid rgba(255,255,255,.06);
}
.bgwall .bgimg{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
  filter: saturate(1.15) contrast(1.05);
  opacity:.95;
}

@keyframes bgScrollL{ from{ transform: translateX(0);} to{ transform: translateX(-50%);} }
@keyframes bgScrollR{ from{ transform: translateX(-50%);} to{ transform: translateX(0);} }

.bgwall .bgrow.top .bgtrack{ animation: bgScrollR 90s linear infinite; }
.bgwall .bgrow.mid .bgtrack{ animation: bgScrollL 78s linear infinite; }
.bgwall .bgrow.bottom .bgtrack{ animation: bgScrollR 102s linear infinite; }

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce){
  .bgwall .bgtrack{ animation: none !important; }
}

.portal{
  min-height:100vh;
  display:grid;
  grid-template-columns: var(--sidebar) 1fr;
  grid-template-rows: var(--topbar) 1fr;
}

.topbar{
  grid-column:1/-1;
  height:var(--topbar);
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:0 18px;
  background: rgba(10,13,20,.52);
  backdrop-filter: blur(12px);
  border-bottom:1px solid var(--border);
}

.brand{
  display:flex;
  align-items:center;
  gap:12px;
  user-select:none;
}
.brand .logoX{
  font-weight:900;
  font-size:34px;
  line-height:1;
  color:#b30000;
  text-shadow: 0 10px 20px rgba(0,0,0,.35);
}
.brand .textblock{display:flex;flex-direction:column;line-height:1.05}
.brand .title{
  font-weight:900;
  letter-spacing:.3px;
  font-size:16px;
}
.brand .title .ui{margin-left: .18em; font-weight:800; opacity:.92;}
.brand .subtitle{
  font-weight:800;
  letter-spacing:.9px;
  font-size:12px;
  color:rgba(255,255,255,.78);
}

.topnav{display:flex;gap:10px;align-items:center}
.topnav a{
  color:rgba(255,255,255,.88);
  text-decoration:none;
  font-weight:700;
  font-size:14px;
  padding:10px 12px;
  border-radius:14px;
  border:1px solid transparent;
}
.topnav a:hover{background: rgba(255,255,255,.05)}
.topnav a.active{
  background: rgba(255,255,255,.06);
  border-color: rgba(255,255,255,.12);
}

.userbox{display:flex;align-items:center;gap:10px}
.userbox .avatar{
  width:34px;height:34px;border-radius:999px;
  background: rgba(255,255,255,.10);
  border:1px solid rgba(255,255,255,.14);
  display:flex;align-items:center;justify-content:center;
  font-weight:900;color:rgba(255,255,255,.86);
}
.userbox .name{font-weight:800;font-size:14px}
.userbox a{color:rgba(255,255,255,.75);text-decoration:none;font-size:13px}
.userbox a:hover{text-decoration:underline}

.sidebar{
  grid-row:2;
  padding:16px 10px;
  border-right:1px solid var(--border);
  background: rgba(14,18,30,.58);
  backdrop-filter: blur(12px);
}
.sidegroup{padding:0 10px 10px}
.sidegroup .label{
  font-size:12px;
  color:rgba(255,255,255,.60);
  font-weight:900;
  letter-spacing:1px;
  text-transform:uppercase;
  margin:10px 0 8px;
}

.sideitem{
  display:flex;align-items:center;gap:10px;
  padding:10px 12px;
  border-radius:16px;
  color:rgba(255,255,255,.90);
  text-decoration:none;
  font-weight:800;
  border:1px solid transparent;
}
.sideitem:hover{background: rgba(255,255,255,.05)}
.sideitem.active{
  background: rgba(255,255,255,.06);
  border-color: rgba(255,255,255,.12);
}
.sideitem .icon{
  width:28px;height:28px;border-radius:10px;
  display:grid;
  place-items:center;
  background: rgba(0,0,0,.22);
  border:1px solid rgba(255,255,255,.10);
  padding:0;
  color: rgba(255,255,255,.90);
}
.sideitem.active .icon{ color: rgba(255,255,255,.98); }

.sideitem .icon svg{
  width:18px;height:18px;
  display:block;
  /* Make icons "fill in" on the active page */
  stroke: currentColor !important;
  fill: currentColor !important;
  fill-opacity: 0;
}
.sideitem.active .icon svg{
  fill-opacity: 1;
}



.main{
  grid-row:2;
  padding:22px;
}
.container{max-width:var(--maxw);margin:0 auto}

.card{
  background: linear-gradient(135deg, rgba(18,22,33,.62), rgba(18,22,33,.30));
  border:1px solid var(--border);
  border-radius: var(--radius2);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

/* Optional padding helper for simple pages (Support, etc.) */
.card.pad{padding:22px;}
@media (max-width: 720px){
  .card.pad{padding:18px;}
}

.hero{padding:26px;position:relative;overflow:hidden}
.hero::before{
  content:"";
  position:absolute;
  inset:-120px;
  background:
    radial-gradient(720px 260px at 20% 25%, rgba(255,106,0,.22), transparent 60%),
    radial-gradient(640px 240px at 70% 20%, rgba(88,240,168,.16), transparent 60%),
    radial-gradient(860px 260px at 80% 75%, rgba(55,115,255,.18), transparent 60%);
  transform: rotate(-8deg);
}

/* TMDB hero banner (uses CSS var --hero-bg:url(...)) */
.hero.tmdb::before{
  inset:-24px;
  transform:none;
  background:
    linear-gradient(135deg, rgba(10,12,18,.86), rgba(10,12,18,.38) 52%, rgba(10,12,18,.86)),
    var(--hero-bg);
  background-size: cover;
  background-position: center;
  filter: saturate(1.08) contrast(1.06);
}

.hero .hero-sub{
  margin-top:10px;
  color:rgba(255,255,255,.88);
  font-size:14px;
  display:flex;
  flex-wrap:wrap;
  gap:10px;
}

.hero .chip{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:7px 10px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.14);
  background: rgba(0,0,0,.28);
  backdrop-filter: blur(6px);
}
.hero > *{position:relative}
.hero h1{margin:0;font-size:42px;letter-spacing:.4px}
.hero p{margin:10px 0 0;color:var(--muted);font-size:16px;max-width:820px}

.big-buttons{display:flex;gap:14px;flex-wrap:wrap;margin-top:18px}
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding:12px 16px;
  border-radius:16px;
  border:1px solid rgba(255,255,255,.12);
  background: rgba(12,16,26,.55);
  color:rgba(255,255,255,.92);
  text-decoration:none;
  font-weight:900;
  letter-spacing:.3px;
  transition:.12s ease;
  cursor:pointer;
  appearance:none;
  -webkit-appearance:none;
}
.btn:hover{transform: translateY(-1px)}

/* Tables (Support, lists) */
.tablewrap{
  margin-top:14px;
  overflow:auto;
  border-radius: 18px;
  border:1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.16);
}
.table{
  width:100%;
  border-collapse: separate;
  border-spacing: 0;
  min-width: 640px;
}
.table th,.table td{
  padding:12px 14px;
  text-align:left;
  vertical-align:middle;
  white-space: nowrap;
}
.table thead th{
  position: sticky;
  top: 0;
  z-index: 1;
  background: rgba(12,16,26,.88);
  color: rgba(255,255,255,.84);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: .35px;
  border-bottom:1px solid rgba(255,255,255,.12);
}
.table tbody td{
  border-bottom:1px solid rgba(255,255,255,.06);
  color: rgba(255,255,255,.92);
}
.table tbody tr:hover td{background: rgba(255,255,255,.03)}
.table tbody tr:last-child td{border-bottom:0}
.table th:last-child,.table td:last-child{text-align:right}
.table td:nth-child(2){white-space: normal}
.table .empty td{
  text-align:center;
  padding:18px 14px;
  white-space: normal;
}

/* Support page */
.support-header{
  display:flex;
  justify-content:space-between;
  gap:12px;
  align-items:center;
  flex-wrap:wrap;
}
.support-footer-note{margin-top:12px;}

/* Support Desk UI (portal) */
.btn.sm{padding:8px 12px;border-radius:14px;font-size:13px;}
.sd-sub{margin-top:6px;}
.sd-tabs{display:flex; gap:8px; flex-wrap:wrap;}
.sd-pane{padding:18px;}
.sd-msg{padding:12px;border:1px solid rgba(255,255,255,.12);border-radius:16px;margin-bottom:10px;background: rgba(0,0,0,.28);}
.sd-msg .meta{display:flex;justify-content:space-between;gap:10px;align-items:center;}
.sd-msg .who{font-weight:900;}
.sd-msg .ts{font-size:12px;color:var(--muted);}
.sd-msg .body{margin-top:8px;line-height:1.55;}

/* Support desk forms (portal) */
.sd-form label{display:block;margin:0 0 6px 0;font-weight:900;color:rgba(255,255,255,.85);}
.sd-input{display:block;width:100%;box-sizing:border-box;}
textarea.sd-input{height:auto;min-height:180px;padding:10px 12px;line-height:1.5;}
.sd-form-grid{display:grid;grid-template-columns: 2fr 1fr;gap:12px;}
@media (max-width:780px){.sd-form-grid{grid-template-columns:1fr;}}
.btn.primary{
  background: linear-gradient(180deg, var(--accent2), var(--accent));
  color:#121212;
  border-color: rgba(255,255,255,.10);
}
.btn.ghost{background: rgba(255,255,255,.05)}

.row{
  margin-top:18px;
  padding:18px;
}
.row h2{margin:0 0 10px;font-size:16px;letter-spacing:.6px}

.toolbar{display:flex;gap:10px;flex-wrap:wrap;align-items:center;margin:0 0 14px}

.seg{
  display:inline-flex;
  gap:6px;
  padding:6px;
  border-radius:16px;
  border:1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.18);
}
.segbtn{
  height:30px;
  padding:0 12px;
  border-radius:12px;
  border:1px solid transparent;
  background: transparent;
  color: rgba(255,255,255,.85);
  font-weight:900;
  cursor:pointer;
}
.segbtn.on{
  background: rgba(255,255,255,.08);
  border-color: rgba(255,255,255,.14);
}
.input{
  height:42px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.22);
  color:var(--text);
  padding:0 12px;
  outline:none;
}
.select{height:42px}

.grid{
  display:grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap:12px;
}

.pager{display:flex;justify-content:center;margin-top:14px}
@media (max-width:1200px){.grid{grid-template-columns: repeat(5, minmax(0,1fr));}}
@media (max-width:1020px){.portal{grid-template-columns: 1fr; grid-template-rows: var(--topbar) auto 1fr;}
  .sidebar{grid-row:2; border-right:0; border-bottom:1px solid var(--border)}
  .grid{grid-template-columns: repeat(4, minmax(0,1fr));}
}
@media (max-width:720px){.grid{grid-template-columns: repeat(2, minmax(0,1fr));} .main{padding:14px} .hero h1{font-size:34px}}

.tile{
  border:1px solid rgba(255,255,255,.10);
  border-radius:18px;
  overflow:hidden;
  background: rgba(0,0,0,.22);
  cursor:pointer;
  transition:.12s ease;
}
.tile:hover{transform: translateY(-1px); border-color: rgba(255,255,255,.18)}
.tile .thumb{
  width:100%;
  aspect-ratio: 2/3;
  background: rgba(255,255,255,.06);
  display:block;
  object-fit: cover;
}
.tile .tpad{padding:10px}
.tile .tname{font-weight:900;font-size:13px;line-height:1.2}
.tile .tmeta{margin-top:4px;color:rgba(255,255,255,.65);font-size:12px}

.list{
  display:flex;
  flex-direction:column;
  gap:10px;
}
.item{
  display:flex;
  gap:12px;
  align-items:center;
  padding:10px;
  border-radius:18px;
  border:1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.22);
  cursor:pointer;
  transition:.12s ease;
}
.item:hover{transform: translateY(-1px); border-color: rgba(255,255,255,.18)}
.item img{
  width:44px;height:44px;border-radius:12px;
  object-fit:cover;
  background: rgba(255,255,255,.06);
  border:1px solid rgba(255,255,255,.10);
}
.item .name{font-weight:900}
.item .meta{color:rgba(255,255,255,.65);font-size:12px}

.playerwrap{
  margin-top:14px;
  border:1px solid rgba(255,255,255,.12);
  border-radius:22px;
  overflow:hidden;
  background:#000;
}
.playerwrap video{width:100%;height:420px;display:block;background:#000}

/* jPlayer inside the modal */
#jp_container{
  width:100%;
  height:420px;
  border:1px solid rgba(255,255,255,.12);
  border-radius:18px;
  overflow:hidden;
  background:#000;
}
#jp_container .jp-jplayer{height:420px !important;background:#000}
#jp_container video{width:100% !important;height:420px !important;background:#000;object-fit:contain}
/* Make blue.monday skin blend with our theme a bit */
#jp_container .jp-interface{
  background: rgba(10,12,18,.85) !important;
  border-top:1px solid rgba(255,255,255,.10);
}
#jp_container .jp-controls button,
#jp_container .jp-toggles button,
#jp_container .jp-volume-controls button{
  filter: brightness(1.1);
}

.modal{
  position:fixed; inset:0;
  display:none;
  align-items:center;
  justify-content:center;
  padding:16px;
  background: rgba(0,0,0,.65);
  z-index:9999;
}
.modal.on{display:flex}
.modal .box{
  width:min(980px, 100%);
  border-radius:22px;
  border:1px solid rgba(255,255,255,.14);
  background: rgba(10,12,18,.92);
  box-shadow: var(--shadow);
  overflow:hidden;
}
.modal .boxhead{
  display:flex;justify-content:space-between;align-items:center;
  padding:14px 16px;
  border-bottom:1px solid rgba(255,255,255,.10);
}
.modal .boxhead .title{font-weight:900}
.modal .close{
  background: rgba(255,255,255,.07);
  border:1px solid rgba(255,255,255,.12);
  color:rgba(255,255,255,.92);
  border-radius:14px;
  padding:8px 10px;
  cursor:pointer;
  font-weight:900;
}
.modal .body{padding:16px}
.modal .desc{color:rgba(255,255,255,.70);font-size:13px;line-height:1.4}

.badge{
  display:inline-flex;align-items:center;gap:8px;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.05);
  color:rgba(255,255,255,.85);
  font-weight:800;
  font-size:12px;
}
.badge.good{border-color: rgba(88,240,168,.30); color: rgba(88,240,168,.92)}
.badge.bad{border-color: rgba(255,107,107,.30); color: rgba(255,107,107,.92)}

.notice{
  /* Space notice cards away from surrounding cards (e.g., “No active subscription” banner) */
  margin:14px 0 16px;
  padding:14px;
  border-radius:18px;
  border:1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.22);
  color:rgba(255,255,255,.85);
}
.notice a{color:rgba(255,255,255,.92)}


/* Channel cards (Live TV) */
.tile.channel .thumb{
  aspect-ratio: 16/9;
  object-fit: contain;
  padding: 14px;
  background: rgba(255,255,255,.06);
}
.tile.channel .tname{font-size:14px; line-height:1.2;}
.tile.channel .tmeta{opacity:.8; font-size:12px; margin-top:6px;}
.tile.channel .tnow{margin-top:8px; font-size:12px; opacity:.95; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden;}
.tile.channel .tnow.muted{opacity:.55;}


/* Avatar image support */
.avatar{
  width:34px;height:34px;
  border-radius:999px;
  background: rgba(255,255,255,.10);
  border:1px solid rgba(255,255,255,.14);
  display:flex;align-items:center;justify-content:center;
  font-weight:900;
  color:rgba(255,255,255,.86);
  overflow:hidden;
  line-height:1;
  flex:0 0 auto;
}
.avatar img{width:100%;height:100%;object-fit:cover;border-radius:999px;display:block}
.avatar.guest img{width:60%;height:60%;object-fit:contain;opacity:.9}
.avatar.big{width:72px;height:72px;font-size:28px}


/* LegalVOD Season/Episode selects (modal badge row) */
.lv-select{
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.14);
  color: #fff;
  padding: 6px 12px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 12px;
  outline: none;
}
.lv-select option{
  color: #111;
}


/* LegalVOD dropdown theme */
.js-lv-control{ color-scheme: dark; }


/* LegalVOD Season/Episode dropdowns in modal */
.js-modal-badges select.js-lv-control{
  background: rgba(255,255,255,.04);
  color: rgba(255,255,255,.92);
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 999px;
}
.js-modal-badges select.js-lv-control option{
  background: #0b0f14;
  color: rgba(255,255,255,.92);
}

/* ================================
   Global Portal Dropdown Styling
   ================================ */
:root{
  color-scheme: dark;
}
select{
  background: rgba(255,255,255,.04);
  color: rgba(255,255,255,.92);
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 12px;
}
select:focus{
  outline: none;
  border-color: rgba(255,255,255,.30);
  box-shadow: 0 0 0 3px rgba(179,0,0,.18);
}
select:disabled{
  opacity: .6;
  cursor: not-allowed;
}
select option,
select optgroup{
  background: #0b0f14;
  color: rgba(255,255,255,.92);
}








/* Notifications bell */
.bell{position:relative;display:inline-flex;align-items:center;justify-content:center;padding:8px 10px;border-radius:12px;text-decoration:none !important;color:inherit;opacity:.95;}
.bell:hover{background:rgba(255,255,255,0.06);text-decoration:none;}
.bell.active{background:rgba(255,255,255,0.08);}
.nbadge{position:absolute;top:3px;right:4px;min-width:18px;height:18px;padding:0 5px;display:inline-flex;align-items:center;justify-content:center;font-size:12px;font-weight:700;border-radius:999px;background:#ff3b3b;color:#fff;box-shadow:0 6px 16px rgba(0,0,0,0.35);}


/* SVG icon helpers */
.btn-ico{ display:inline-flex; align-items:center; }
.btn-ico svg{ width:18px; height:18px; display:block; }

.hero .chip svg,
.chip svg{ width:16px; height:16px; display:block; }

.badge .bico{ width:14px; height:14px; display:block; margin-right:6px; }
.badge .btxt{ line-height:1; }


.bell svg{width:18px;height:18px;display:block;stroke:currentColor !important;fill:currentColor !important;fill-opacity:0;}
.bell.active svg{fill-opacity:1;}
