
/* ============================================================
   KOSOVA TV V3239 — PREMIUM OTT UI
   UI-only layer. Playback V3237 remains untouched.
   ============================================================ */

:root{
  --ktv-bg:#05080d;
  --ktv-panel:#0b1017;
  --ktv-panel-2:#0f151e;
  --ktv-panel-3:#121923;
  --ktv-line:rgba(255,255,255,.075);
  --ktv-line-strong:rgba(255,255,255,.12);
  --ktv-text:#f7f9fc;
  --ktv-muted:#8f9aaa;
  --ktv-red:#ff2245;
  --ktv-red-2:#d91336;
  --ktv-red-soft:rgba(255,34,69,.14);
  --ktv-blue:#42a5ff;
  --ktv-gold:#f6b73c;
  --ktv-shadow:0 24px 80px rgba(0,0,0,.38);
  --ktv-radius-xl:22px;
  --ktv-radius-lg:18px;
  --ktv-radius-md:14px;
  --ktv-radius-sm:11px;
}

html.ktv-v3239,
html.ktv-v3239 body{
  background:
    radial-gradient(circle at 10% -10%,rgba(40,94,180,.13),transparent 30%),
    radial-gradient(circle at 95% 0%,rgba(255,34,69,.11),transparent 26%),
    var(--ktv-bg);
}

html.ktv-v3239 body{
  color:var(--ktv-text);
}

/* ---------- Player overlay/shell ---------- */

html.ktv-v3239 #live{
  background:
    radial-gradient(circle at 0% 0%,rgba(24,64,118,.18),transparent 38%),
    rgba(2,5,9,.96);
  backdrop-filter:blur(16px);
  -webkit-backdrop-filter:blur(16px);
}

html.ktv-v3239 #live .player-shell{
  width:min(1440px,calc(100vw - 34px));
  height:min(860px,calc(100vh - 34px));
  max-height:none;
  border:1px solid var(--ktv-line-strong);
  border-radius:24px;
  overflow:hidden;
  background:linear-gradient(180deg,#080c12,#05080d);
  box-shadow:0 36px 120px rgba(0,0,0,.60);
}

html.ktv-v3239 #live .player-top,
html.ktv-v3239 #live .player-header{
  min-height:64px;
  border-bottom:1px solid var(--ktv-line);
  background:
    linear-gradient(180deg,rgba(255,255,255,.018),transparent),
    #080c12;
}

/* Premium brand strip injected by JS */
.ktv-v3239-brand{
  display:flex;
  align-items:center;
  gap:11px;
  min-width:0;
}

.ktv-v3239-brandmark{
  width:34px;
  height:34px;
  display:grid;
  place-items:center;
  flex:0 0 auto;
  border-radius:10px;
  background:linear-gradient(145deg,var(--ktv-red),#9b0b25);
  box-shadow:0 8px 24px rgba(255,34,69,.23);
  position:relative;
}

.ktv-v3239-brandmark:before{
  content:"";
  width:0;
  height:0;
  border-top:7px solid transparent;
  border-bottom:7px solid transparent;
  border-left:11px solid #fff;
  margin-left:3px;
}

.ktv-v3239-brandcopy{
  display:flex;
  flex-direction:column;
  min-width:0;
}

.ktv-v3239-brandcopy b{
  font-size:14px;
  letter-spacing:.015em;
  white-space:nowrap;
}

.ktv-v3239-brandcopy small{
  margin-top:2px;
  color:#6f7b8b;
  font-size:9px;
  font-weight:800;
  letter-spacing:.14em;
  text-transform:uppercase;
}

/* ---------- Desktop player body ---------- */

html.ktv-v3239 #live .player-body,
html.ktv-v3239 #live .player-content{
  min-height:0;
  background:#05080d;
}

html.ktv-v3239 #live .video-wrap{
  background:
    linear-gradient(180deg,rgba(6,10,16,.18),rgba(3,5,8,.42)),
    #090d13;
  border-right:1px solid var(--ktv-line);
}

html.ktv-v3239 #live video{
  background:#05070a;
}

html.ktv-v3239 #playerLoading{
  backdrop-filter:blur(7px);
}

/* Better offline state */
html.ktv-v3239 #playerEmpty{
  background:
    radial-gradient(circle at 50% 46%,rgba(255,34,69,.08),transparent 24%),
    linear-gradient(180deg,rgba(10,16,26,.25),rgba(3,5,8,.58));
  color:#fff;
}

.ktv-v3239-offline-card{
  width:min(500px,86%);
  margin:auto;
  text-align:center;
  padding:24px 26px;
  border:1px solid rgba(255,255,255,.08);
  border-radius:22px;
  background:rgba(6,10,16,.74);
  box-shadow:0 22px 70px rgba(0,0,0,.28);
  backdrop-filter:blur(12px);
}

.ktv-v3239-offline-icon{
  width:54px;
  height:54px;
  display:grid;
  place-items:center;
  margin:0 auto 13px;
  border-radius:50%;
  border:2px solid var(--ktv-red);
  color:var(--ktv-red);
  font-size:26px;
  font-weight:900;
  box-shadow:0 0 0 8px rgba(255,34,69,.07);
}

.ktv-v3239-offline-card b{
  display:block;
  font-size:18px;
  line-height:1.25;
}

.ktv-v3239-offline-card small{
  display:block;
  margin-top:7px;
  color:var(--ktv-muted);
  font-size:10px;
  font-weight:800;
  letter-spacing:.13em;
  text-transform:uppercase;
}

.ktv-v3239-retry{
  margin-top:17px;
  min-height:40px;
  padding:0 18px;
  border-radius:11px;
  border:1px solid rgba(255,34,69,.45);
  background:rgba(255,34,69,.08);
  color:#fff;
  font-weight:800;
  cursor:pointer;
  transition:.16s ease;
}

.ktv-v3239-retry:hover{
  background:var(--ktv-red);
  border-color:var(--ktv-red);
}

/* ---------- Premium now-playing bar ---------- */

.ktv-v3239-nowbar{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  align-items:center;
  gap:18px;
  padding:14px 16px;
  border-top:1px solid var(--ktv-line);
  background:
    linear-gradient(180deg,rgba(255,255,255,.014),transparent),
    #080d13;
}

.ktv-v3239-nowleft{
  display:flex;
  align-items:center;
  min-width:0;
  gap:12px;
}

.ktv-v3239-nowlogo{
  width:48px;
  height:48px;
  flex:0 0 auto;
  border-radius:13px;
  object-fit:contain;
  background:#111824;
  border:1px solid var(--ktv-line);
}

.ktv-v3239-nowfallback{
  width:48px;
  height:48px;
  display:grid;
  place-items:center;
  border-radius:13px;
  background:linear-gradient(145deg,var(--ktv-red),#8e0b20);
  color:#fff;
  font-weight:900;
}

.ktv-v3239-nowcopy{
  min-width:0;
}

.ktv-v3239-nowtitle{
  display:flex;
  align-items:center;
  gap:8px;
  min-width:0;
}

.ktv-v3239-nowtitle b{
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  font-size:15px;
}

.ktv-v3239-live-pill{
  display:inline-flex;
  height:22px;
  align-items:center;
  padding:0 8px;
  border-radius:999px;
  background:var(--ktv-red);
  color:#fff;
  font-size:9px;
  font-weight:900;
  letter-spacing:.04em;
}

.ktv-v3239-nowcopy small{
  display:block;
  margin-top:3px;
  color:var(--ktv-muted);
  font-size:10px;
  font-weight:700;
}

.ktv-v3239-nowactions{
  display:flex;
  gap:7px;
}

.ktv-v3239-action{
  min-height:38px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:7px;
  padding:0 13px;
  border-radius:11px;
  border:1px solid var(--ktv-line-strong);
  background:rgba(255,255,255,.035);
  color:#fff;
  font-size:11px;
  font-weight:800;
  cursor:pointer;
}

.ktv-v3239-action:hover{
  background:rgba(255,255,255,.07);
}

/* ---------- Right channel drawer ---------- */

html.ktv-v3239 #live .player-drawer{
  width:420px;
  min-width:420px;
  max-width:420px;
  background:
    radial-gradient(circle at 50% -10%,rgba(255,34,69,.07),transparent 30%),
    linear-gradient(180deg,#0b1017,#080c12);
  border-left:1px solid var(--ktv-line);
  box-shadow:-18px 0 60px rgba(0,0,0,.22);
}

.ktv-v3239-drawer{
  height:100%;
  min-height:0;
  display:flex;
  flex-direction:column;
}

.ktv-v3239-drawer-head{
  padding:16px 14px 12px;
  border-bottom:1px solid var(--ktv-line);
  background:rgba(10,15,22,.97);
  position:sticky;
  top:0;
  z-index:5;
}

.ktv-v3239-drawer-title-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:10px;
}

.ktv-v3239-drawer-title b{
  display:block;
  font-size:16px;
}

.ktv-v3239-drawer-title small{
  display:block;
  margin-top:2px;
  color:var(--ktv-muted);
  font-size:10px;
}

.ktv-v3239-count{
  min-width:34px;
  height:26px;
  padding:0 8px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:999px;
  background:var(--ktv-red-soft);
  color:#fff;
  font-size:10px;
  font-weight:900;
}

.ktv-v3239-search{
  position:relative;
  margin-bottom:10px;
}

.ktv-v3239-search:before{
  content:"⌕";
  position:absolute;
  left:12px;
  top:50%;
  transform:translateY(-50%);
  color:#778394;
  font-size:14px;
}

html.ktv-v3239 #drawerSearch{
  width:100%;
  height:42px;
  padding:0 13px 0 35px;
  border-radius:12px;
  border:1px solid var(--ktv-line-strong);
  background:#101722;
  color:#fff;
  outline:none;
}

html.ktv-v3239 #drawerSearch:focus{
  border-color:rgba(255,34,69,.65);
  box-shadow:0 0 0 3px rgba(255,34,69,.10);
}

.ktv-v3239-cats{
  display:flex;
  gap:7px;
  overflow-x:auto;
  padding:1px 0 2px;
  scrollbar-width:none;
}

.ktv-v3239-cats::-webkit-scrollbar{display:none}

.ktv-v3239-cat{
  flex:0 0 auto;
  height:32px;
  padding:0 11px;
  border-radius:999px;
  border:1px solid var(--ktv-line);
  background:#111823;
  color:#a8b2bf;
  font-size:9px;
  font-weight:900;
  white-space:nowrap;
  cursor:pointer;
}

.ktv-v3239-cat.active{
  color:#fff;
  background:linear-gradient(135deg,var(--ktv-red),#dc1535);
  border-color:transparent;
  box-shadow:0 8px 20px rgba(255,34,69,.18);
}

html.ktv-v3239 #drawerList{
  flex:1;
  min-height:0;
  overflow-y:auto;
  padding:10px 10px 18px;
  scrollbar-width:thin;
  scrollbar-color:rgba(255,255,255,.18) transparent;
}

html.ktv-v3239 #drawerList .drawer-channel{
  width:100%;
  min-height:64px;
  display:grid;
  grid-template-columns:46px minmax(0,1fr) auto;
  align-items:center;
  gap:10px;
  margin:0 0 7px;
  padding:8px 9px;
  border-radius:14px;
  border:1px solid transparent;
  background:#101620;
  color:#fff;
  text-align:left;
  transition:.15s ease;
}

html.ktv-v3239 #drawerList .drawer-channel:hover{
  transform:translateY(-1px);
  background:#141c28;
  border-color:var(--ktv-line-strong);
}

html.ktv-v3239 #drawerList .drawer-channel.active{
  background:linear-gradient(90deg,rgba(255,34,69,.15),#121922 72%);
  border-color:rgba(255,34,69,.58);
  box-shadow:
    inset 3px 0 0 var(--ktv-red),
    0 10px 28px rgba(0,0,0,.16);
}

html.ktv-v3239 #drawerList .drawer-channel img,
html.ktv-v3239 #drawerList .drawer-fallback{
  width:46px;
  height:46px;
  border-radius:10px;
  object-fit:contain;
  background:#e9edf2;
  border:1px solid rgba(255,255,255,.08);
}

html.ktv-v3239 #drawerList .drawer-fallback{
  display:grid;
  place-items:center;
  color:#111;
  font-size:10px;
  font-weight:900;
}

html.ktv-v3239 #drawerList .drawer-channel>span:not(.drawer-fallback){
  min-width:0;
  display:flex;
  flex-direction:column;
  gap:3px;
}

html.ktv-v3239 #drawerList .drawer-channel b{
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  font-size:12px;
  line-height:1.2;
}

html.ktv-v3239 #drawerList .drawer-channel small{
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  color:#7f8998;
  font-size:9px;
}

html.ktv-v3239 #drawerList .drawer-channel em{
  height:22px;
  min-width:38px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:0 7px;
  border-radius:999px;
  background:rgba(255,34,69,.14);
  border:1px solid rgba(255,34,69,.28);
  color:#fff;
  font-size:8px;
  font-style:normal;
  font-weight:900;
}

html.ktv-v3239 #drawerList .drawer-channel.locked em{
  color:#ffd16d;
  background:rgba(246,183,60,.11);
  border-color:rgba(246,183,60,.30);
}

/* ---------- Main site polish ---------- */

html.ktv-v3239 .channel-card,
html.ktv-v3239 .rail-card,
html.ktv-v3239 .poster-card,
html.ktv-v3239 .guide-card{
  border-radius:16px !important;
  border-color:var(--ktv-line) !important;
  background:linear-gradient(180deg,#0d131c,#0a0f16) !important;
  box-shadow:0 10px 32px rgba(0,0,0,.12);
  transition:transform .16s ease,border-color .16s ease,box-shadow .16s ease;
}

html.ktv-v3239 .channel-card:hover,
html.ktv-v3239 .rail-card:hover,
html.ktv-v3239 .poster-card:hover,
html.ktv-v3239 .guide-card:hover{
  transform:translateY(-2px);
  border-color:rgba(255,255,255,.14) !important;
  box-shadow:0 16px 38px rgba(0,0,0,.20);
}

html.ktv-v3239 .channel-card.selected{
  border-color:rgba(255,34,69,.58) !important;
  box-shadow:0 0 0 1px rgba(255,34,69,.28),0 16px 40px rgba(0,0,0,.22);
}

/* ---------- Tablet ---------- */

@media (max-width:1180px){
  html.ktv-v3239 #live .player-shell{
    width:calc(100vw - 20px);
    height:calc(100vh - 20px);
    border-radius:20px;
  }

  html.ktv-v3239 #live .player-drawer{
    width:360px;
    min-width:360px;
    max-width:360px;
  }

  .ktv-v3239-nowbar{
    gap:10px;
  }

  .ktv-v3239-action span{
    display:none;
  }

  .ktv-v3239-action{
    width:38px;
    padding:0;
  }
}

/* ---------- Mobile ---------- */

@media (max-width:760px){
  html.ktv-v3239 #live{
    align-items:stretch;
    padding:0;
  }

  html.ktv-v3239 #live .player-shell{
    width:100vw;
    height:100dvh;
    min-height:100dvh;
    border:0;
    border-radius:0;
  }

  html.ktv-v3239 #live .video-wrap{
    border-right:0;
  }

  html.ktv-v3239 #live .player-drawer{
    position:absolute;
    left:0;
    right:0;
    bottom:0;
    top:auto;
    width:100%;
    min-width:0;
    max-width:none;
    height:min(72dvh,680px);
    border-left:0;
    border-top:1px solid var(--ktv-line-strong);
    border-radius:22px 22px 0 0;
    transform:translateY(104%);
    box-shadow:0 -26px 80px rgba(0,0,0,.52);
    z-index:50;
  }

  html.ktv-v3239 #live.drawer-open .player-drawer{
    transform:translateY(0);
  }

  html.ktv-v3239 #live .player-drawer:before{
    content:"";
    display:block;
    width:42px;
    height:4px;
    margin:8px auto 0;
    border-radius:999px;
    background:rgba(255,255,255,.22);
  }

  .ktv-v3239-drawer-head{
    padding-top:10px;
  }

  .ktv-v3239-nowbar{
    grid-template-columns:1fr;
    padding:11px 12px;
  }

  .ktv-v3239-nowactions{
    display:none;
  }

  .ktv-v3239-nowlogo,
  .ktv-v3239-nowfallback{
    width:42px;
    height:42px;
    border-radius:11px;
  }

  .ktv-v3239-nowtitle b{
    font-size:13px;
  }

  .ktv-v3239-offline-card{
    padding:18px 15px;
    border-radius:17px;
  }

  .ktv-v3239-offline-icon{
    width:46px;
    height:46px;
    font-size:22px;
  }

  .ktv-v3239-offline-card b{
    font-size:15px;
  }

  html.ktv-v3239 #drawerList{
    padding:8px 8px calc(22px + env(safe-area-inset-bottom));
  }

  html.ktv-v3239 #drawerList .drawer-channel{
    min-height:60px;
    grid-template-columns:42px minmax(0,1fr) auto;
    border-radius:13px;
  }

  html.ktv-v3239 #drawerList .drawer-channel img,
  html.ktv-v3239 #drawerList .drawer-fallback{
    width:42px;
    height:42px;
  }
}

/* Extra-small mobile */
@media (max-width:420px){
  html.ktv-v3239 #live .player-drawer{
    height:75dvh;
  }

  .ktv-v3239-drawer-title b{font-size:14px}
  .ktv-v3239-drawer-title small{font-size:9px}

  .ktv-v3239-cat{
    height:30px;
    padding:0 10px;
    font-size:8px;
  }
}
