/* ============================================================
   Masala — LIGHT THEME (ixxx-style clean) v1 — 2026-11-18
   Loaded AFTER app-shell/decor/home-extra. Prefix: body.light
   Default theme = light (settings toggle still allows dark).
   Player surfaces (xh-card, fullscreen overlays) stay dark.
   ============================================================ */

/* ---------- palette + density ---------- */
body.light{
  --bg:#f5f6f8; --bg-2:#fff; --panel:#ffffff; --panel-2:#eceef2; --panel-3:#ffffffd9;
  --line:rgba(16,24,40,.09); --line-2:rgba(16,24,40,.16);
  --text:#17181d; --muted:#5c6270; --muted-2:#8a8f9c;
  --violet:#7c3aed; --violet-hi:#8b5cf6;
  --shadow:0 6px 18px rgba(16,24,40,.10);
  /* MASALA_GRID_OFF_V1: no density override — default 320px (dense toggle 210px) */

/* ---------- base ---------- */
body.light{background:var(--bg);color:var(--text)}
body.light ::-webkit-scrollbar-thumb{background:#c9ccd4}
body.light ::-webkit-scrollbar-thumb:hover{background:#b3b7c2}
body.light :focus-visible{outline-color:var(--violet)}

/* ---------- topbar / search ---------- */
body.light .topbar{background:rgba(255,255,255,.92);border-bottom:1px solid var(--line)}
body.light .brand-text{background:linear-gradient(92deg,#1a1a24,#7c3aed);
  -webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent}
body.light .search-input{background:#f1f2f5;color:#17181d;border:1px solid var(--line-2)}
body.light .search-input::placeholder{color:#9aa0ac}
body.light .search-clear:hover{background:#e4e6ec;color:#17181d}
body.light .icon-btn:hover{background:#eef0f4}
body.light .m-sg-dd{background:#fff;border:1px solid var(--line);box-shadow:var(--shadow)}
body.light .m-sg-head{color:var(--muted);border-bottom:1px solid var(--line)}
body.light .m-sg-item{color:var(--text);border-bottom:1px solid var(--line)}
body.light .m-sg-item:hover{background:#f4f5f8}
body.light .m-sg-item img{background:#eef0f4}
body.light .m-sg-pill{background:#f1f2f5;border:1px solid var(--line-2);color:var(--text)}

/* ---------- sidebar / settings ---------- */
body.light .sidebar{background:var(--panel);border-right:1px solid var(--line)}
body.light .nav-item:hover{background:#f1f2f5}
body.light .nav-item.active{background:#f3efff;color:#5b21b6}
body.light .nav-item.active .nav-ico{color:#7c3aed}
body.light .set-group{background:#fafbfc;border:1px solid var(--line)}
body.light .switch{background:#c9ccd4}
body.light .switch[aria-checked="true"]{background:var(--violet)}

/* ---------- hero / filter bar (ixxx-style white pill) ---------- */
body.light .hero-row h1{color:#17181d}
body.light .hero-sub,.sec-count{color:var(--muted)}
body.light .filter-bar{background:#fff;border:1px solid var(--line);border-radius:14px;
  box-shadow:0 2px 8px rgba(16,24,40,.06);padding:10px 14px}
body.light .filter-label{color:var(--muted)}
body.light .seg--inline{background:#f1f2f5;border:1px solid var(--line)}
body.light .seg--inline button{color:var(--muted)}
body.light .seg--inline button:hover{color:#17181d;background:#e6e8ee}
body.light .seg--inline button.active{background:var(--violet);color:#fff}
body.light .seg-hint{color:#9aa0ac}
body.light .chip{background:#fff;border:1px solid var(--line-2);color:var(--muted)}
body.light .chip:hover{border-color:var(--violet);color:var(--violet)}
body.light .chip.active{background:linear-gradient(135deg,#7c3aed,#db2777);color:#fff;border-color:transparent}

/* ---------- cards / grid ---------- */
body.light .card{background:transparent;border:0;overflow:hidden;   /* MASALA_GRID_OFF_V1: borderless */
  transition:transform .18s ease,box-shadow .18s ease}
body.light .card:hover{transform:translateY(-3px);box-shadow:0 10px 26px rgba(16,24,40,.16)}
body.light .card .thumb{border-radius:12px}
body.light .card:hover .thumb img{transform:scale(1.05)}
body.light .thumb{background:linear-gradient(135deg,#e6e8ee,#d9dce4)}
body.light .thumb img{transition:transform .25s ease}
body.light .card-title{color:#1b1c22}
body.light .card-title:hover{color:var(--violet)}
body.light .card-sub{color:var(--muted)}
body.light .badge{background:rgba(12,16,24,.82);color:#fff}        /* keep dark badge on thumb */
body.light .views-badge{background:rgba(12,16,24,.78);color:#fff}
body.light .sk::before,body.light .sk::after{
  background:linear-gradient(100deg,#eceef2 25%,#f7f8fa 50%,#eceef2 75%);background-size:220% 100%}

/* ---------- pager ---------- */
body.light .pg{background:#fff;border:1px solid var(--line-2);color:var(--muted)}
body.light .pg:hover{border-color:var(--violet);color:var(--violet)}
body.light .pg.cur{background:linear-gradient(135deg,#7c3aed,#db2777);color:#fff;border-color:transparent}
body.light .pg-gap{color:var(--muted-2)}

/* ---------- subnav + category tiles ---------- */
body.light .subnav{background:rgba(255,255,255,.75);border-bottom:1px solid var(--line)}
body.light .subnav-inner a{color:var(--muted)}
body.light .subnav-inner a:hover{background:#eef0f4;color:#17181d}
body.light .subnav-inner a.active{background:linear-gradient(135deg,#7c3aed,#a855f7);color:#fff}
body.light .category-tile{background:linear-gradient(140deg,#ffffff,#f3f4f7);border:1px solid var(--line)}
body.light .category-tile:hover{border-color:rgba(124,58,237,.4);box-shadow:0 8px 20px rgba(16,24,40,.10)}
body.light .category-tile__name{color:#1b1c22}
body.light .category-tile__count{color:var(--muted)}

/* ---------- watch-page components (from decor.css) ---------- */
body.light .fnr-drawer{background:#fff;border-left:1px solid var(--line);box-shadow:-8px 0 24px rgba(16,24,40,.08)}
body.light .fnr-fav-title{color:#17181d}
body.light .fnr-rating-wrap{background:#fafbfc;border:1px solid var(--line)}
body.light .fnr-vote-btn{color:var(--muted)}
body.light .fnr-vote-btn:hover{background:#eef0f4;color:#17181d}
body.light .fnr-upnext-card{background:#fff;border:1px solid var(--line);box-shadow:var(--shadow)}
body.light .fnr-upnext-btn{background:linear-gradient(135deg,#7c3aed,#8b5cf6);color:#fff}
body.light .fnr-mini-player{background:#fff;border:1px solid var(--line);box-shadow:var(--shadow)}
body.light .fnr-mini-header{background:#fafbfc;border-bottom:1px solid var(--line)}
body.light .fnr-mini-btns button{color:var(--muted)}
body.light .fnr-mini-btns button:hover{background:#eef0f4;color:#17181d}
body.light .fnr-bottom-nav{background:rgba(255,255,255,.96);border-top:1px solid var(--line)}
body.light .fnr-bottom-nav button{color:var(--muted)}
body.light .fnr-bottom-nav button.active{color:var(--violet)}
body.light .fnr-infeed-ad-card{background:#fff !important;border:1px solid var(--line) !important}
body.light .fnr-smart-tag-chip{background:#f1f2f5;border:1px solid var(--line-2);color:#4b5058}
body.light .fnr-search-dropdown{background:#fff;border:1px solid var(--line);box-shadow:var(--shadow)}
body.light .fnr-dd-recent-pill{color:var(--muted)}
body.light .fnr-dd-recent-pill:hover{background:#eef0f4;color:#17181d}
body.light .fnr-dd-title{color:var(--text)}
body.light .fnr-card-fav{background:rgba(255,255,255,.9);border:1px solid var(--line-2);color:#17181d}
body.light .fnr-card-fav:hover{background:#fff;color:#7c3aed}
body.light .video-info,.facts-row{color:var(--text)}
body.light .video-description{color:var(--muted)}

/* player surfaces — intentionally stay dark:
   .xh-card, .player-box, .fnr-exit-fullscreen-btn, .fnr-fullscreen overlays */

/* ---------- sticky ad bar (mobile) ---------- */
body.light #masala-sticky-bar{background:rgba(255,255,255,.97);border-top:1px solid var(--line)}
body.light #masala-sticky-close{background:#eef0f4;border:1px solid var(--line-2);color:#5c6270}

/* ---------- scrim ---------- */
body.light .scrim{background:rgba(23,24,29,.38)}

/* ---------- BRAND: site name visible on mobile + polish (MASALA_BRAND_V1) ---------- */
.brand{gap:10px}
.brand-mark{box-shadow:0 0 0 1px rgba(255,255,255,.10),0 4px 16px rgba(139,92,246,.45)}
body.light .brand-mark{box-shadow:0 0 0 1px rgba(16,24,40,.08),0 4px 14px rgba(124,58,237,.35)}
@media(max-width:768px){
  .brand-text{display:block !important;font-size:.99rem;letter-spacing:-.02em;
    max-width:118px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .brand{gap:8px;flex:0 0 auto}
  .search-wrap{min-width:90px}
}
@media(max-width:380px){
  .brand-text{font-size:.92rem;max-width:92px}
}

/* ---------- infinite scroll sentinel ---------- */
.inf-sentinel{height:1px}
.inf-status{display:flex;align-items:center;justify-content:center;gap:10px;
  padding:18px 0 26px;color:var(--muted);font-size:.92rem;grid-column:1/-1}
.inf-status .spin{width:18px;height:18px;border-radius:50%;border:2px solid var(--line-2);
  border-top-color:var(--violet);animation:inf-rot .8s linear infinite}
@keyframes inf-rot{to{transform:rotate(360deg)}}
@media (prefers-reduced-motion:reduce){
  .inf-status .spin{animation:none}
  body.light .card,body.light .thumb img{transition:none}
}

/* ---------- MASALA_HERO2_V2 (user 11-18): compact + DARK box in both themes ---------- */
.hero2{margin:2px 0 14px;border-radius:14px;position:relative;overflow:hidden;
  background:linear-gradient(135deg,#12121c,#1a1626 55%,#221a30);
  border:1px solid rgba(139,92,246,.35);
  box-shadow:0 4px 18px rgba(0,0,0,.25)}
.hero2::before{content:"";position:absolute;inset:0;pointer-events:none;
  background:radial-gradient(45% 70% at 15% 20%,rgba(139,92,246,.22),transparent 70%),
             radial-gradient(40% 60% at 85% 80%,rgba(236,72,153,.16),transparent 70%)}
.hero2-in{position:relative;display:flex;gap:14px;align-items:center;justify-content:space-between;
  padding:13px 16px;flex-wrap:wrap}
.hero2-main{min-width:220px;flex:1 1 280px}
.hero2-badge{display:inline-flex;align-items:center;gap:6px;font-size:.68rem;font-weight:700;
  color:#f3c34e;background:rgba(243,195,78,.10);border:1px solid rgba(243,195,78,.35);
  padding:3px 10px;border-radius:999px;letter-spacing:.02em}
.hero2-badge i{font-style:normal;font-size:.8rem}
.hero2-title{margin:8px 0 9px;font-size:clamp(1.12rem,2.6vw,1.5rem);line-height:1.15;
  letter-spacing:-.03em;color:#fff;font-weight:800}
.hero2-title em{font-style:normal;background:linear-gradient(92deg,#a78bfa,#ec4899 55%,#f3c34e);
  -webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent}
.hero2-chips{display:flex;flex-wrap:wrap;gap:6px}
.hero2-chip{font-size:.66rem;font-weight:600;color:#c9c9d4;background:rgba(255,255,255,.06);
  border:1px solid rgba(255,255,255,.12);padding:3px 9px;border-radius:999px}
.hero2-cats{display:grid;grid-template-columns:repeat(3,minmax(78px,1fr));gap:7px;flex:0 1 auto}
.hero2-cat{display:flex;flex-direction:column;gap:2px;align-items:center;text-align:center;
  padding:8px 6px;border-radius:10px;background:rgba(255,255,255,.05);
  border:1px solid rgba(255,255,255,.09);
  transition:transform .18s ease,border-color .18s ease,background .18s ease}
.hero2-cat b{font-size:.86rem;color:#fff;letter-spacing:-.02em}
.hero2-cat span{font-size:.62rem;color:#9494a8;white-space:nowrap}
.hero2-cat:hover{transform:translateY(-2px);border-color:rgba(139,92,246,.55);background:rgba(139,92,246,.12)}
@media(max-width:768px){
  .hero2-in{padding:11px 11px;gap:10px}
  .hero2-cats{grid-template-columns:repeat(3,1fr);width:100%}
  .hero2-title{font-size:1.05rem;margin:6px 0 7px}
}
/* dark box stays dark even in LIGHT theme (user: "box ekata dark colour add kareanna") */
body.light .hero2{background:linear-gradient(135deg,#12121c,#1a1626 55%,#221a30);
  border-color:rgba(124,58,237,.4);box-shadow:0 4px 16px rgba(16,24,40,.18)}
body.light .hero2-title{color:#fff}
body.light .hero2-chip{color:#c9c9d4;background:rgba(255,255,255,.06);border-color:rgba(255,255,255,.12)}
body.light .hero2-cat{background:rgba(255,255,255,.05);border-color:rgba(255,255,255,.09)}
body.light .hero2-cat b{color:#fff}
body.light .hero2-cat span{color:#9494a8}
@media (prefers-reduced-motion:reduce){.hero2-cat{transition:none}}
