/* ================= দেখি (Dekhi) — style.css ================= */
:root{
  --bg:#fff; --bg2:#f2f2f2; --bg3:#e3e3e3; --text:#0f0f0f; --text2:#606060; --line:#e5e5e5;
  --accent:#f4511e; --accent2:#ff8a00; --hdr-h:56px; --r:12px;
}
html[data-theme="dark"]{ --bg:#0f0f0f; --bg2:#272727; --bg3:#3f3f3f; --text:#f1f1f1; --text2:#aaa; --line:#2f2f2f; }
html{ color-scheme:light; }
html[data-theme="dark"]{ color-scheme:dark; }

*{ box-sizing:border-box; margin:0; }
html{ -webkit-text-size-adjust:100%; }
body{
  font-family:"Hind Siliguri","Noto Sans Bengali","Segoe UI",system-ui,-apple-system,Roboto,sans-serif;
  background:var(--bg); color:var(--text); line-height:1.5; -webkit-tap-highlight-color:transparent;
}
body.noscroll{ overflow:hidden; }
a{ color:inherit; text-decoration:none; }
button{ font:inherit; color:inherit; cursor:pointer; border:0; background:none; }
img{ display:block; max-width:100%; }
.ic{ width:24px; height:24px; fill:currentColor; flex:none; }
[hidden]{ display:none !important; }

/* ---------- top bar ---------- */
.topbar{
  position:sticky; top:0; z-index:60; background:var(--bg);
  display:flex; align-items:center; gap:12px; padding:8px 16px; min-height:56px;
}
.tb-l{ display:flex; align-items:center; gap:6px; flex:none; }
.tb-r{ display:flex; align-items:center; gap:6px; flex:none; margin-left:auto; }
.icon-btn{ width:40px; height:40px; border-radius:50%; display:grid; place-items:center; flex:none; }
.icon-btn:hover{ background:var(--bg2); }
.logo{ display:flex; align-items:center; gap:8px; font-weight:700; font-size:23px; letter-spacing:-.01em; }
.logo-mark{ width:32px; height:32px; }
.lang-btn{ height:36px; padding:0 14px; border:1px solid var(--line); border-radius:18px; font-weight:600; font-size:14px; }
.lang-btn:hover{ background:var(--bg2); }

.search{ flex:1 1 auto; max-width:620px; margin:0 auto; display:flex; position:relative; }
.search input{
  flex:1; min-width:0; height:42px; border:1px solid var(--line); border-radius:42px 0 0 42px;
  background:var(--bg); color:var(--text); padding:0 20px; font:inherit; font-size:16px; outline:none;
  -webkit-appearance:none; appearance:none;
}
.search input::-webkit-search-cancel-button{ -webkit-appearance:none; }
.search input:focus{ border-color:var(--accent); box-shadow:inset 0 0 0 1px var(--accent); }
.search .go{
  width:66px; height:42px; border:1px solid var(--line); border-left:0; border-radius:0 42px 42px 0;
  background:var(--bg2); display:grid; place-items:center;
}
.search .go:hover{ background:var(--bg3); }
.sugg{
  position:absolute; top:46px; left:0; right:0; background:var(--bg); border:1px solid var(--line);
  border-radius:14px; padding:8px 0; box-shadow:0 8px 28px rgba(0,0,0,.18); z-index:70; overflow:hidden;
}
.sugg button{ display:flex; align-items:center; gap:12px; width:100%; text-align:left; padding:8px 16px; font-size:15px; }
.sugg button .ic{ width:18px; height:18px; color:var(--text2); }
.sugg button:hover, .sugg button.on{ background:var(--bg2); }

/* ---------- sidebar ---------- */
.sidebar{
  position:fixed; top:var(--hdr-h); left:0; bottom:0; width:240px; padding:12px; background:var(--bg);
  overflow-y:auto; z-index:55; transform:translateX(-102%); border-right:1px solid var(--line);
}
body.anim .sidebar{ transition:transform .22s ease; }
body.sidebar-open .sidebar{ transform:none; box-shadow:0 0 40px rgba(0,0,0,.25); }
.scrim{ position:fixed; inset:0; top:var(--hdr-h); background:rgba(0,0,0,.4); z-index:50; display:none; }
body.sidebar-open .scrim{ display:block; }
.side-item{ display:flex; align-items:center; gap:18px; padding:10px 12px; border-radius:10px; font-size:15px; }
.side-item .ic{ width:22px; height:22px; }
.side-item:hover{ background:var(--bg2); }
.side-item.on{ background:var(--bg2); font-weight:600; }
.side-item span{ overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.side-h{ padding:16px 12px 6px; font-size:13px; font-weight:600; color:var(--text2); border-top:1px solid var(--line); margin-top:10px; }

@media (min-width:1100px){
  body.page-home .sidebar, body.page-search .sidebar{ transform:none; box-shadow:none; }
  body.page-home:not(.side-hidden) #app, body.page-search:not(.side-hidden) #app{ margin-left:240px; }
  body.side-hidden.page-home .sidebar, body.side-hidden.page-search .sidebar{ transform:translateX(-102%); }
  body.page-home .scrim, body.page-search .scrim{ display:none !important; }
}

/* ---------- main ---------- */
#app{ padding:0 24px 32px; min-height:calc(100vh - var(--hdr-h)); }
.pad{ padding:0; }

.chips{
  display:flex; gap:12px; overflow-x:auto; padding:12px 24px; margin:0 -24px 8px; position:sticky; top:var(--hdr-h);
  background:var(--bg); z-index:30; scrollbar-width:none;
}
.chips::-webkit-scrollbar{ display:none; }
.chip{ white-space:nowrap; padding:6px 14px; border-radius:8px; background:var(--bg2); font-size:14px; font-weight:500; flex:none; }
.chip:hover{ background:var(--bg3); }
.chip.on{ background:var(--text); color:var(--bg); }

/* ---------- video cards ---------- */
.grid{ display:grid; grid-template-columns:repeat(auto-fill,minmax(300px,1fr)); gap:28px 16px; margin-top:8px; }
.card{ display:block; min-width:0; }
.thumb{ position:relative; aspect-ratio:16/9; border-radius:var(--r); overflow:hidden; background:var(--bg2); }
.thumb img{ width:100%; height:100%; object-fit:cover; transition:transform .35s ease; }
.card:hover .thumb img, .rec:hover .thumb img, .sr:hover .thumb img{ transform:scale(1.04); }
.thumb.broken{ background:linear-gradient(135deg,var(--bg3),var(--bg2)); }
.dur{ position:absolute; right:6px; bottom:6px; background:rgba(0,0,0,.82); color:#fff; font-size:12px; font-weight:600; padding:1px 6px; border-radius:5px; }
.meta{ display:flex; gap:12px; margin-top:12px; }
.mt{ min-width:0; }
.title{ font-size:16px; font-weight:600; line-height:1.45; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.sub{ font-size:13.5px; color:var(--text2); line-height:1.5; }
.avatar{ width:36px; height:36px; border-radius:50%; display:grid; place-items:center; color:#fff; font-weight:700; font-size:16px; flex:none; }
.avatar.lg{ width:44px; height:44px; font-size:19px; }

/* ---------- ads ---------- */
.ad{ background:var(--bg2); border-radius:var(--r); padding:6px 8px 10px; margin:16px 0; display:flex; flex-direction:column; overflow:hidden; }
.ad-top{ margin:12px 0 20px; }
.ad-label{ font-size:11px; color:var(--text2); padding:2px 4px 6px; letter-spacing:.03em; }
.ad-body{ display:flex; justify-content:center; width:100%; }
.ad-fit{ position:relative; overflow:hidden; flex:none; }
.ad-fit > *{ position:absolute; top:0; left:0; transform-origin:0 0; }
.ad-ph{
  display:flex; flex-direction:column; align-items:center; justify-content:center; gap:2px;
  border:2px dashed var(--bg3); border-radius:8px; color:var(--text2); background:var(--bg);
}
.ad-ph small{ font-size:12px; opacity:.8; }
.ad-cell{ display:flex; min-width:0; }
.ad-cell .ad{ margin:0; width:100%; justify-content:center; }
.ad-band{ grid-column:1 / -1; }
.ad-band .ad{ margin:4px 0; }

/* ---------- watch page ---------- */
.watch{ display:grid; grid-template-columns:minmax(0,1fr) 402px; gap:24px; max-width:1760px; margin:0 auto; padding-top:24px; }
.player-box{ position:relative; width:100%; aspect-ratio:16/9; background:#000; border-radius:var(--r); overflow:hidden; }
.player-box.ad-mode{ min-height:372px; }
.player-box iframe, .player-box #yt-host{ position:absolute; inset:0; width:100%; height:100%; border:0; }
.poster{ position:absolute; inset:0; width:100%; height:100%; object-fit:cover; filter:blur(18px) brightness(.55); transform:scale(1.15); }
.player-box:fullscreen{ aspect-ratio:auto; min-height:0; width:100vw; height:100vh; border-radius:0; }
.player-box:-webkit-full-screen{ aspect-ratio:auto; min-height:0; width:100vw; height:100vh; border-radius:0; }
.player-box.pseudo-fs{ position:fixed; inset:0; z-index:200; border-radius:0; aspect-ratio:auto; min-height:0; width:100%; height:100%; }
.fs-close{ display:none; position:absolute; top:10px; right:10px; z-index:9; width:40px; height:40px; border-radius:50%; background:rgba(0,0,0,.6); color:#fff; place-items:center; }
.pseudo-fs .fs-close{ display:grid; }

.roll{
  position:absolute; inset:0; z-index:5; display:flex; flex-direction:column; align-items:center; justify-content:center;
  gap:8px; padding:10px 12px; background:rgba(10,10,12,.84); backdrop-filter:blur(6px); -webkit-backdrop-filter:blur(6px); color:#fff;
}
.roll-ad{ width:100%; flex:1 1 auto; min-height:0; display:flex; flex-direction:column; justify-content:center; }
.roll .ad{ background:transparent; margin:0; padding:0; }
.roll .ad-label{ color:#cfcfcf; text-align:center; }
.roll-bar{ flex:none; display:flex; align-items:center; justify-content:center; gap:10px 14px; width:100%; flex-wrap:wrap; min-height:44px; }
.roll-msg{ font-size:14px; color:#e8e8e8; }
.roll-btns{ display:flex; gap:10px; flex-wrap:wrap; justify-content:center; }
.btn-primary{ background:var(--accent); color:#fff; border-radius:999px; padding:9px 20px; font-weight:600; display:inline-flex; gap:6px; align-items:center; }
.btn-primary .ic{ width:20px; height:20px; }
.btn-primary:hover{ filter:brightness(1.08); }
.btn-primary:disabled{ background:#555; color:#bbb; cursor:not-allowed; filter:none; }
.btn-ghost{ background:rgba(255,255,255,.15); color:#fff; border-radius:999px; padding:9px 18px; font-weight:500; display:inline-flex; gap:6px; align-items:center; }
.btn-ghost .ic{ width:20px; height:20px; }
.btn-ghost:hover{ background:rgba(255,255,255,.25); }

.w-title{ font-size:21px; font-weight:700; line-height:1.45; margin:14px 0 10px; }
.w-row{ display:flex; align-items:center; justify-content:space-between; gap:12px 16px; flex-wrap:wrap; }
.w-chan{ display:flex; align-items:center; gap:12px; min-width:0; }
.chan-name{ font-weight:600; font-size:16px; line-height:1.3; }
.w-actions{ display:flex; gap:8px; flex-wrap:wrap; }
.pill{ display:inline-flex; align-items:center; gap:8px; background:var(--bg2); border-radius:999px; padding:0 16px; height:38px; font-weight:500; font-size:14.5px; }
.pill:hover{ background:var(--bg3); }
.pill .ic{ width:20px; height:20px; }
.desc{ background:var(--bg2); border-radius:var(--r); padding:12px 14px; margin-top:14px; }
.desc-head{ font-weight:600; font-size:14px; }
.desc-body{ margin-top:6px; font-size:14.5px; line-height:1.65; word-break:break-word; }
.desc-body.clamp{ display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical; overflow:hidden; }
.desc-body a{ color:#065fd4; }
html[data-theme="dark"] .desc-body a{ color:#6ab0ff; }
.desc-more{ margin-top:4px; font-weight:600; font-size:14px; }
.side-title{ font-size:17px; font-weight:700; margin:4px 0 12px; }
.rec-list{ display:flex; flex-direction:column; gap:12px; }
.rec{ display:flex; gap:10px; min-width:0; }
.rec .thumb{ width:168px; flex:none; border-radius:10px; }
.rec .title{ font-size:14.5px; -webkit-line-clamp:2; }
.rec .mt{ padding-top:1px; }
.secondary .ad{ margin:0 0 16px; }
.rec-list .ad{ margin:4px 0; }

/* ---------- search page ---------- */
.sr-head{ margin:16px 0 14px; }
.sr-head h1{ font-size:20px; font-weight:700; }
.sr-list{ display:flex; flex-direction:column; gap:20px; max-width:1100px; margin:0 auto; }
.sr{ display:flex; gap:16px; min-width:0; }
.sr .thumb{ width:360px; flex:none; }
.sr-meta{ min-width:0; padding-top:2px; }
.sr-meta h3{ font-size:18px; font-weight:600; line-height:1.45; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.sr-desc{ margin-top:8px; font-size:13.5px; color:var(--text2); display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.sr-chan{ display:flex; align-items:center; gap:8px; margin-top:8px; font-size:13px; color:var(--text2); }
.sr-chan .avatar{ width:24px; height:24px; font-size:12px; }
.sr-tags{ display:flex; gap:6px; flex-wrap:wrap; margin-top:8px; }
.tagpill{ background:var(--bg2); border-radius:6px; padding:1px 8px; font-size:12.5px; color:var(--text2); }

/* ---------- empty / not found ---------- */
.empty{ text-align:center; padding:72px 16px; max-width:520px; margin:0 auto; }
.empty .big{ width:84px; height:84px; margin:0 auto 18px; }
.empty h2{ font-size:22px; margin-bottom:6px; }
.empty p{ color:var(--text2); margin-bottom:18px; }
.btn{ display:inline-flex; align-items:center; gap:8px; background:var(--text); color:var(--bg); border-radius:999px; padding:9px 20px; font-weight:600; }

.foot{ text-align:center; color:var(--text2); font-size:13px; padding:34px 0 6px; }

/* ---------- modal / toast ---------- */
.modal-bg{ position:fixed; inset:0; background:rgba(0,0,0,.55); z-index:300; display:grid; place-items:center; padding:16px; }
.modal{ background:var(--bg); border-radius:18px; width:min(480px,100%); padding:20px; box-shadow:0 20px 60px rgba(0,0,0,.35); }
.modal-top{ display:flex; align-items:center; justify-content:space-between; margin-bottom:14px; }
.modal-top h2{ font-size:19px; }
.share-apps{ display:flex; gap:14px; overflow-x:auto; padding:4px 2px 14px; }
.share-app{ display:flex; flex-direction:column; align-items:center; gap:6px; font-size:12.5px; flex:none; width:64px; }
.share-app i{ width:52px; height:52px; border-radius:50%; display:grid; place-items:center; color:#fff; font-style:normal; font-weight:700; font-size:20px; }
.copy-row{ display:flex; gap:8px; align-items:center; background:var(--bg2); border-radius:12px; padding:6px 6px 6px 14px; }
.copy-row input{ flex:1; min-width:0; background:transparent; border:0; color:var(--text); font:inherit; font-size:14px; outline:none; }
.copy-row button{ background:var(--accent); color:#fff; border-radius:999px; padding:8px 18px; font-weight:600; }
.toast{
  position:fixed; left:50%; bottom:24px; transform:translate(-50%,30px); background:#222; color:#fff; padding:10px 20px;
  border-radius:10px; font-size:14.5px; opacity:0; pointer-events:none; transition:.25s; z-index:400; max-width:90vw; text-align:center;
}
.toast.show{ opacity:1; transform:translate(-50%,0); }

/* ---------- skeleton ---------- */
.sk .thumb, .sk .l{ background:linear-gradient(90deg,var(--bg2) 25%,var(--bg3) 37%,var(--bg2) 63%); background-size:400% 100%; animation:sk 1.3s infinite; }
.sk .l{ height:14px; border-radius:6px; margin-top:10px; }
@keyframes sk{ 0%{ background-position:100% 50% } 100%{ background-position:0 50% } }

/* ================= responsive ================= */
@media (max-width:1100px){
  .watch{ grid-template-columns:minmax(0,1fr); gap:8px; padding-top:0; }
  .secondary{ padding:8px 0 0; }
  .rec .thumb{ width:168px; }
}
@media (max-width:860px){
  .sr .thumb{ width:240px; }
}
@media (max-width:720px){
  .topbar{ flex-wrap:wrap; padding:6px 8px; gap:6px 8px; }
  .search{ order:3; flex:1 1 100%; max-width:none; margin:0 0 2px; }
  .sugg{ top:46px; }
  .logo{ font-size:21px; }
  #app{ padding:0 12px 28px; }
  .chips{ padding:10px 12px; margin:0 -12px 6px; gap:8px; }
  .grid{ grid-template-columns:1fr; gap:22px; }
  .grid .thumb{ border-radius:var(--r); }
  .watch{ margin:0 -12px; }
  .watch .player-box{ border-radius:0; }
  .watch .primary > .pad, .watch .secondary{ padding-left:12px; padding-right:12px; }
  .w-title{ font-size:18px; }
  .sr{ flex-direction:column; gap:10px; }
  .sr .thumb{ width:100%; }
  .rec .thumb{ width:150px; }
  .player-box.ad-mode{ min-height:372px; }
}
@media (max-width:380px){
  .lang-btn{ padding:0 10px; }
  .rec .thumb{ width:132px; }
}
@media (prefers-reduced-motion:reduce){ *{ animation:none !important; transition:none !important; } }
