/* =========================================================================
   WebPlayer 2.0 — design system (dark streaming)
   ========================================================================= */
:root{
  --accent:#28e0b0;
  --accent2:#7b5cff;
  --bg:#0b0c10;
  --bg-soft:#121420;
  --surface:#171a27;
  --surface-2:#1f2333;
  --line:rgba(255,255,255,.07);
  --txt:#eef1f7;
  --txt-dim:#9aa3b8;
  --txt-faint:#5e6680;
  --shadow:0 18px 50px -12px rgba(0,0,0,.7);
  --radius:14px;
  --radius-sm:10px;
  --header-h:68px;
  --font-display:"Bricolage Grotesque",system-ui,sans-serif;
  --font-body:"Outfit",system-ui,sans-serif;
}

*{box-sizing:border-box;margin:0;padding:0}
html{scroll-behavior:smooth}
body{
  font-family:var(--font-body);
  background:var(--bg);
  color:var(--txt);
  min-height:100vh;
  -webkit-font-smoothing:antialiased;
  overflow-x:hidden;
}
/* atmosfera de fundo */
body::before{
  content:"";position:fixed;inset:0;z-index:-2;
  background:
    radial-gradient(1100px 600px at 12% -8%, color-mix(in srgb,var(--accent2) 18%,transparent), transparent 60%),
    radial-gradient(900px 500px at 100% 0%, color-mix(in srgb,var(--accent) 12%,transparent), transparent 55%),
    var(--bg);
}
body::after{ /* grão sutil */
  content:"";position:fixed;inset:0;z-index:-1;opacity:.035;pointer-events:none;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
a{color:inherit;text-decoration:none}
img{display:block;max-width:100%}
button{font-family:inherit;cursor:pointer;border:none;background:none;color:inherit}
::selection{background:var(--accent);color:#04130e}

/* scrollbar */
::-webkit-scrollbar{width:10px;height:10px}
::-webkit-scrollbar-thumb{background:var(--surface-2);border-radius:20px}
::-webkit-scrollbar-thumb:hover{background:#2c3145}

/* ============================ LOGIN ============================ */
.auth{min-height:100vh;display:grid;place-items:center;padding:24px}
.auth-card{
  width:100%;max-width:400px;background:rgba(23,26,39,.72);
  backdrop-filter:blur(22px);border:1px solid var(--line);
  border-radius:22px;padding:40px 34px;box-shadow:var(--shadow);
  animation:rise .6s cubic-bezier(.2,.8,.2,1) both;
}
.auth-logo{height:120px;margin:0 auto 18px;object-fit:contain}
.auth-card h1{font-family:var(--font-display);font-size:1.5rem;text-align:center;letter-spacing:-.02em}
.auth-card p.sub{text-align:center;color:var(--txt-dim);margin:6px 0 26px;font-size:.92rem}
.field{margin-bottom:16px}
.field label{display:block;font-size:.78rem;color:var(--txt-dim);margin-bottom:7px;letter-spacing:.03em;text-transform:uppercase}
.field .wrap{position:relative;display:flex;align-items:center}
.field .wrap svg{position:absolute;left:14px;width:18px;height:18px;color:var(--txt-faint)}
.field input{
  width:100%;padding:13px 14px 13px 42px;background:var(--bg-soft);
  border:1px solid var(--line);border-radius:var(--radius-sm);color:var(--txt);
  font-size:.98rem;transition:border-color .2s,box-shadow .2s;
}
.field input:focus{outline:none;border-color:var(--accent);box-shadow:0 0 0 3px color-mix(in srgb,var(--accent) 22%,transparent)}
.btn-primary{
  width:100%;padding:14px;border-radius:var(--radius-sm);font-weight:700;font-size:1rem;
  color:#04130e;background:linear-gradient(120deg,var(--accent),color-mix(in srgb,var(--accent) 55%,var(--accent2)));
  transition:transform .15s,filter .2s;letter-spacing:.02em;
}
.btn-primary:hover{filter:brightness(1.08)}
.btn-primary:active{transform:scale(.98)}
.alert{padding:12px 14px;border-radius:var(--radius-sm);font-size:.88rem;margin-bottom:18px;border:1px solid}
.alert-err{background:rgba(255,77,79,.12);border-color:rgba(255,77,79,.35);color:#ff9ea0}
.btn-ghost{
  display:block;width:100%;text-align:center;margin-top:14px;padding:12px;
  border:1px solid var(--line);border-radius:var(--radius-sm);color:var(--txt-dim);
  font-weight:600;transition:.2s;
}
.btn-ghost:hover{border-color:var(--accent);color:var(--txt)}

/* ============================ APP SHELL ============================ */
.topbar{
  position:sticky;top:0;z-index:50;height:var(--header-h);
  display:flex;align-items:center;gap:22px;padding:0 clamp(16px,4vw,40px);
  background:linear-gradient(to bottom,rgba(11,12,16,.96),rgba(11,12,16,.78));
  backdrop-filter:blur(14px);border-bottom:1px solid var(--line);
}
.brand{display:flex;align-items:center;gap:10px;font-family:var(--font-display);font-weight:800;font-size:1.15rem;letter-spacing:-.02em;white-space:nowrap}
.brand img{height:38px;width:auto}
.nav{display:flex;gap:4px;margin-left:6px}
.nav a{
  padding:9px 15px;border-radius:9px;font-weight:600;font-size:.93rem;color:var(--txt-dim);
  transition:.18s;position:relative;
}
.nav a:hover{color:var(--txt);background:var(--surface)}
.nav a.active{color:var(--txt)}
.nav a.active::after{
  content:"";position:absolute;left:15px;right:15px;bottom:2px;height:2px;border-radius:2px;
  background:var(--accent);
}
.search-box{
  margin-left:auto;position:relative;display:flex;align-items:center;
  width:clamp(160px,28vw,360px);
}
.search-box svg{position:absolute;left:13px;width:17px;height:17px;color:var(--txt-faint)}
.search-box input{
  width:100%;padding:10px 14px 10px 40px;background:var(--surface);
  border:1px solid var(--line);border-radius:30px;color:var(--txt);font-size:.92rem;transition:.2s;
}
.search-box input:focus{outline:none;border-color:var(--accent);background:var(--surface-2);width:100%}
.profile{display:flex;align-items:center;gap:12px;white-space:nowrap}
.profile .info{text-align:right;line-height:1.25;font-size:.74rem;color:var(--txt-dim)}
.profile .info b{color:var(--txt);font-size:.82rem;display:block}
.profile .out{
  width:38px;height:38px;border-radius:10px;display:grid;place-items:center;
  background:var(--surface);border:1px solid var(--line);transition:.2s;
}
.profile .out:hover{border-color:#ff4d4f;color:#ff7d7e}
.profile .out svg{width:17px;height:17px}

/* mobile nav toggle */
.menu-toggle{display:none}

/* ============================ CONTENT ============================ */
.main{padding:clamp(18px,3vw,34px) clamp(16px,4vw,40px) 80px}
.section-head{display:flex;align-items:center;justify-content:space-between;margin:6px 0 18px;gap:16px}
.section-head h2{font-family:var(--font-display);font-size:clamp(1.2rem,2.4vw,1.7rem);letter-spacing:-.02em}
.section-head .count{color:var(--txt-faint);font-size:.86rem;font-weight:500}

/* chips de categoria */
.chips{display:flex;gap:9px;overflow-x:auto;padding:4px 2px 14px;scrollbar-width:none;-webkit-overflow-scrolling:touch}
.chips::-webkit-scrollbar{display:none}
.chip{
  flex:0 0 auto;padding:8px 16px;border-radius:30px;background:var(--surface);
  border:1px solid var(--line);color:var(--txt-dim);font-weight:600;font-size:.86rem;
  transition:.18s;white-space:nowrap;
}
.chip:hover{color:var(--txt);border-color:var(--txt-faint)}
.chip.active{background:var(--accent);color:#04130e;border-color:transparent}
.chip.adult::after{content:" 🔞";font-size:.8em}

/* layout: sidebar de categorias + conteúdo */
.catlayout{display:flex;gap:clamp(16px,2.2vw,28px);align-items:flex-start}
.catside{
  flex:0 0 250px;position:sticky;top:calc(var(--header-h) + 16px);
  max-height:calc(100vh - var(--header-h) - 32px);overflow-y:auto;overflow-x:hidden;
  background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);
  padding:10px;scrollbar-width:thin;
}
.catside::-webkit-scrollbar{width:8px}
.catside-title{
  font-size:.72rem;text-transform:uppercase;letter-spacing:.06em;color:var(--txt-faint);
  font-weight:700;padding:8px 12px 10px;
}
.catitem{
  display:flex;align-items:center;gap:8px;width:100%;text-align:left;
  padding:10px 12px;border-radius:10px;color:var(--txt-dim);font-weight:600;font-size:.9rem;
  transition:background .16s,color .16s;
}
.catitem span{flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.catitem:hover{background:var(--surface-2);color:var(--txt)}
.catitem.active{background:var(--accent);color:#04130e}
.catitem.adult::after{content:"🔞";margin-left:auto;font-size:.85em;flex:0 0 auto}
.catside-skel{display:flex;flex-direction:column;gap:8px;padding:6px}
.catside-skel span{height:38px;border-radius:10px;background:linear-gradient(100deg,var(--surface) 30%,var(--surface-2) 50%,var(--surface) 70%);background-size:200% 100%;animation:shimmer 1.3s infinite}
.catmain{flex:1;min-width:0}
.catmain .section-head{margin-top:2px}

/* GRID de pôsteres */
.grid{
  display:grid;gap:clamp(10px,1.4vw,18px);
  grid-template-columns:repeat(auto-fill,minmax(150px,1fr));
}
.grid.live{grid-template-columns:repeat(auto-fill,minmax(180px,1fr))}
.card{
  position:relative;border-radius:var(--radius);overflow:hidden;background:var(--surface);
  border:1px solid var(--line);cursor:pointer;
  transition:transform .22s cubic-bezier(.2,.8,.2,1),box-shadow .22s,border-color .22s;
  animation:fade .4s both;
}
.card:hover{transform:translateY(-5px);box-shadow:var(--shadow);border-color:color-mix(in srgb,var(--accent) 40%,transparent)}
.card .poster{position:relative;aspect-ratio:2/3;background:var(--bg-soft);overflow:hidden}
.card.live .poster{aspect-ratio:16/9;display:grid;place-items:center;padding:14px}
.card .poster img{width:100%;height:100%;object-fit:cover;transition:transform .4s,opacity .4s;opacity:0}
.card.live .poster img{object-fit:contain}
.card .poster img.loaded{opacity:1}
.card:hover .poster img{transform:scale(1.06)}
.card .play-fab{
  position:absolute;inset:0;display:grid;place-items:center;opacity:0;transition:.22s;
  background:linear-gradient(to top,rgba(0,0,0,.55),transparent 55%);
}
.card:hover .play-fab{opacity:1}
.card .play-fab span{
  width:52px;height:52px;border-radius:50%;display:grid;place-items:center;
  background:color-mix(in srgb,var(--accent) 92%,#fff);color:#04130e;
  box-shadow:0 8px 24px rgba(0,0,0,.5);transform:scale(.85);transition:.22s;
}
.card:hover .play-fab span{transform:scale(1)}
.card .play-fab svg{width:22px;height:22px;margin-left:3px}
.card .badge{
  position:absolute;top:9px;left:9px;padding:3px 8px;border-radius:6px;font-size:.66rem;font-weight:700;
  text-transform:uppercase;letter-spacing:.04em;backdrop-filter:blur(6px);
}
.badge.vod{background:rgba(123,92,255,.85)}
.badge.series{background:rgba(40,224,176,.85);color:#04130e}
.badge.tv{background:rgba(255,77,79,.85)}
.card .meta{padding:10px 11px 12px}
.card .meta h3{font-size:.88rem;font-weight:600;line-height:1.3;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.card .meta .stars{margin-top:5px;font-size:.72rem;color:var(--accent);letter-spacing:1px}

/* skeleton */
.skel{aspect-ratio:2/3;border-radius:var(--radius);background:linear-gradient(100deg,var(--surface) 30%,var(--surface-2) 50%,var(--surface) 70%);background-size:200% 100%;animation:shimmer 1.3s infinite}
.skel.live{aspect-ratio:16/9}

/* estados */
.state{text-align:center;padding:70px 20px;color:var(--txt-dim)}
.state svg{width:54px;height:54px;margin:0 auto 16px;color:var(--txt-faint);opacity:.6}
.state h3{font-family:var(--font-display);color:var(--txt);font-size:1.25rem;margin-bottom:6px}
.sentinel{height:40px;display:grid;place-items:center;color:var(--txt-faint)}
.spinner{width:26px;height:26px;border:3px solid var(--line);border-top-color:var(--accent);border-radius:50%;animation:spin .7s linear infinite}

/* rows da home (carrossel horizontal) */
.row-sec{margin-bottom:34px}
.row-sec .section-head{margin-bottom:14px}
.hscroll{display:flex;gap:14px;overflow-x:auto;padding:4px 2px 12px;scroll-snap-type:x mandatory;scrollbar-width:none}
.hscroll::-webkit-scrollbar{display:none}
.hscroll .card{flex:0 0 clamp(140px,30vw,168px);scroll-snap-align:start;animation:none}
.hscroll .card.live{flex-basis:clamp(180px,42vw,240px)}

/* ============================ MODAL ============================ */
.modal{position:fixed;inset:0;z-index:100;display:none;align-items:flex-start;justify-content:center;padding:0;overflow-y:auto}
.modal.open{display:flex}
.modal-bg{position:fixed;inset:0;background:rgba(4,5,8,.82);backdrop-filter:blur(8px);animation:fade .3s}
.modal-card{
  position:relative;z-index:1;width:100%;max-width:1000px;margin:clamp(20px,5vh,70px) 16px 60px;
  background:var(--bg-soft);border:1px solid var(--line);border-radius:18px;overflow:hidden;
  box-shadow:var(--shadow);animation:rise .4s cubic-bezier(.2,.8,.2,1) both;
}
.modal-close{
  position:absolute;top:14px;right:14px;z-index:5;width:40px;height:40px;border-radius:50%;
  background:rgba(0,0,0,.55);display:grid;place-items:center;backdrop-filter:blur(6px);transition:.2s;
}
.modal-close:hover{background:rgba(0,0,0,.85);transform:rotate(90deg)}
.modal-close svg{width:20px;height:20px}

/* player */
.player-wrap{position:relative;aspect-ratio:16/9;background:#000}
.player-wrap video,.player-wrap #clappr{width:100%;height:100%}
.player-loading{position:absolute;inset:0;display:grid;place-items:center;background:#000}

/* detalhe */
.detail{padding:0}
.detail-hero{position:relative;min-height:300px;display:flex;gap:26px;padding:30px;align-items:flex-end}
.detail-hero .bd{position:absolute;inset:0;z-index:0}
.detail-hero .bd img{width:100%;height:100%;object-fit:cover;opacity:.25;filter:saturate(1.1)}
.detail-hero .bd::after{content:"";position:absolute;inset:0;background:linear-gradient(to top,var(--bg-soft),transparent 70%),linear-gradient(to right,var(--bg-soft) 5%,transparent 60%)}
.detail-hero .poster{position:relative;z-index:1;flex:0 0 180px;aspect-ratio:2/3;border-radius:12px;overflow:hidden;box-shadow:var(--shadow);background:var(--surface)}
.detail-hero .poster img{width:100%;height:100%;object-fit:cover}
.detail-hero .txt{position:relative;z-index:1;flex:1;min-width:0}
.detail-hero h2{font-family:var(--font-display);font-size:clamp(1.4rem,3vw,2.1rem);letter-spacing:-.02em;line-height:1.1}
.detail-tags{display:flex;flex-wrap:wrap;gap:8px;margin:14px 0}
.detail-tags span{font-size:.78rem;color:var(--txt-dim);background:var(--surface);padding:5px 11px;border-radius:20px;border:1px solid var(--line)}
.detail-tags span.rate{color:var(--accent);border-color:color-mix(in srgb,var(--accent) 40%,transparent)}
.detail-hero .plot{color:var(--txt-dim);font-size:.94rem;line-height:1.6;max-width:62ch;margin-bottom:18px;display:-webkit-box;-webkit-line-clamp:4;-webkit-box-orient:vertical;overflow:hidden}
.detail-actions{display:flex;gap:12px;flex-wrap:wrap}
.btn-play{
  display:inline-flex;align-items:center;gap:9px;padding:12px 26px;border-radius:30px;font-weight:700;
  color:#04130e;background:var(--accent);transition:.18s;
}
.btn-play:hover{filter:brightness(1.08);transform:translateY(-1px)}
.btn-play svg{width:18px;height:18px}

/* temporadas / episódios */
.seasons{padding:26px 30px 34px}
.season-tabs{display:flex;gap:8px;overflow-x:auto;margin-bottom:18px;scrollbar-width:none}
.season-tabs::-webkit-scrollbar{display:none}
.season-tab{flex:0 0 auto;padding:8px 16px;border-radius:9px;background:var(--surface);border:1px solid var(--line);color:var(--txt-dim);font-weight:600;font-size:.88rem;transition:.18s}
.season-tab.active{background:var(--accent);color:#04130e;border-color:transparent}
.episodes{display:flex;flex-direction:column;gap:10px}
.ep{
  display:flex;gap:14px;align-items:center;padding:11px;border-radius:12px;background:var(--surface);
  border:1px solid var(--line);cursor:pointer;transition:.18s;
}
.ep:hover{background:var(--surface-2);border-color:color-mix(in srgb,var(--accent) 40%,transparent)}
.ep .epimg{flex:0 0 120px;aspect-ratio:16/9;border-radius:8px;overflow:hidden;background:var(--bg-soft);position:relative}
.ep .epimg img{width:100%;height:100%;object-fit:cover}
.ep .epimg .pin{position:absolute;inset:0;display:grid;place-items:center;background:rgba(0,0,0,.35);opacity:0;transition:.2s}
.ep:hover .epimg .pin{opacity:1}
.ep .epimg .pin svg{width:26px;height:26px;color:#fff}
.ep .epinfo{flex:1;min-width:0}
.ep .epinfo .n{font-size:.72rem;color:var(--accent);font-weight:700;letter-spacing:.03em}
.ep .epinfo h4{font-size:.95rem;margin:2px 0 4px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ep .epinfo p{font-size:.82rem;color:var(--txt-dim);display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}

/* player picker */
.player-pick{display:flex;gap:8px;align-items:center;padding:12px 16px;background:var(--bg);border-top:1px solid var(--line);flex-wrap:wrap}
.player-pick span{font-size:.8rem;color:var(--txt-dim);margin-right:4px}
.player-pick button{padding:7px 15px;border-radius:8px;background:var(--surface);border:1px solid var(--line);font-size:.84rem;font-weight:600;color:var(--txt-dim);transition:.18s}
.player-pick button.active{background:var(--accent);color:#04130e;border-color:transparent}

/* toast */
.toast{position:fixed;bottom:24px;left:50%;transform:translateX(-50%) translateY(20px);z-index:200;background:var(--surface-2);border:1px solid var(--line);padding:12px 20px;border-radius:12px;font-size:.9rem;opacity:0;transition:.3s;box-shadow:var(--shadow)}
.toast.show{opacity:1;transform:translateX(-50%) translateY(0)}

/* ============================ ANIMS ============================ */
@keyframes spin{to{transform:rotate(360deg)}}
@keyframes shimmer{to{background-position:-200% 0}}
@keyframes fade{from{opacity:0}to{opacity:1}}
@keyframes rise{from{opacity:0;transform:translateY(22px)}to{opacity:1;transform:translateY(0)}}

/* ============================ RESPONSIVE ============================ */
@media(max-width:860px){
  .nav,.profile .info{display:none}
  .menu-toggle{display:grid;place-items:center;width:38px;height:38px;border-radius:10px;background:var(--surface);border:1px solid var(--line)}
  .menu-toggle svg{width:20px;height:20px}
  .search-box{width:auto;flex:1}
  .grid{grid-template-columns:repeat(auto-fill,minmax(120px,1fr))}
  .grid.live{grid-template-columns:repeat(auto-fill,minmax(150px,1fr))}
  /* sidebar de categorias vira barra horizontal no topo */
  .catlayout{flex-direction:column;gap:14px}
  .catside{
    position:static;flex:0 0 auto;width:100%;max-height:none;overflow-x:auto;overflow-y:hidden;
    display:flex;gap:8px;padding:8px;scrollbar-width:none;
  }
  .catside::-webkit-scrollbar{display:none}
  .catside-title,.catside-skel{display:none}
  .catitem{flex:0 0 auto;width:auto;border-radius:24px;background:var(--bg-soft);padding:9px 16px}
  .catitem span{white-space:nowrap}
  .catitem.adult::after{margin-left:6px}
  .detail-hero{flex-direction:column;align-items:flex-start}
  .detail-hero .poster{flex-basis:auto;width:130px}
  .ep .epimg{flex-basis:92px}
  /* drawer mobile */
  .nav.open{
    display:flex;flex-direction:column;position:absolute;top:var(--header-h);left:0;right:0;
    background:var(--bg-soft);border-bottom:1px solid var(--line);padding:10px;gap:2px;
  }
  .nav.open a{padding:12px 15px}
  .nav.open a.active::after{display:none}
  .nav.open a.active{background:var(--surface);color:var(--accent)}
}

/* ============================ TV AO VIVO — GUIA 3 COLUNAS ============================ */
.lg{display:flex;flex-direction:column;height:calc(100vh - var(--header-h) - 56px);min-height:520px}
.lg-head{display:flex;align-items:center;gap:12px;margin-bottom:14px;flex:0 0 auto}
.lg-back{width:40px;height:40px;border-radius:10px;display:grid;place-items:center;background:var(--surface);border:1px solid var(--line);transition:.18s}
.lg-back:hover{border-color:var(--accent);color:var(--accent)}
.lg-back svg{width:20px;height:20px}
.lg-head h2{font-family:var(--font-display);font-size:clamp(1.3rem,2.4vw,1.8rem);letter-spacing:-.02em}

.lg-body{flex:1;min-height:0;display:grid;grid-template-columns:300px minmax(340px,460px) minmax(380px,1fr);gap:14px}
.lg-cats,.lg-chans,.lg-side{min-height:0;background:var(--surface);border:1px solid var(--line);border-radius:var(--radius)}
.lg-cats,.lg-chans{overflow-y:auto;scrollbar-width:thin;padding:8px}
.lg-side{overflow-y:auto;padding:14px;display:flex;flex-direction:column;gap:14px}
.lg-loading,.lg-msg{display:grid;place-items:center;height:100%;color:var(--txt-faint);text-align:center;padding:20px;font-size:.92rem}
.lg-msg.sm{min-height:120px}

/* categorias */
.lg-cat{display:flex;align-items:center;gap:10px;width:100%;text-align:left;padding:13px 14px;border-radius:10px;color:var(--txt-dim);font-weight:700;font-size:.9rem;letter-spacing:.01em;transition:background .15s,color .15s;border:1px solid transparent}
.lg-cat .nm{flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-transform:uppercase}
.lg-cat .ct{flex:0 0 auto;font-size:.82rem;color:var(--txt-faint);font-weight:600}
.lg-cat:hover{background:var(--surface-2);color:var(--txt)}
.lg-cat.active{background:var(--accent);color:#04130e}
.lg-cat.active .ct{color:#04130e;opacity:.7}
.lg-cat.adult .nm::after{content:" 🔞";font-size:.85em}

/* canais */
.lg-list{display:flex;flex-direction:column;gap:4px}
.lg-chan{display:grid;grid-template-columns:34px 52px 1fr;align-items:center;gap:12px;width:100%;text-align:left;padding:10px 12px;border-radius:10px;color:var(--txt);font-weight:600;font-size:.95rem;border:1px solid transparent;transition:background .15s,border-color .15s}
.lg-chan .num{color:var(--txt-faint);font-weight:700;text-align:center}
.lg-chan .logo{width:52px;height:34px;display:grid;place-items:center;background:var(--bg-soft);border-radius:6px;overflow:hidden}
.lg-chan .logo img{max-width:100%;max-height:100%;object-fit:contain}
.lg-chan .cname{min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.lg-chan:hover{background:var(--surface-2)}
.lg-chan.active{background:color-mix(in srgb,var(--accent) 22%,transparent);border-color:var(--accent)}
.lg-chan.active .num{color:var(--accent)}
.lg-sentinel{height:30px;display:grid;place-items:center}
.spinner.sm{width:18px;height:18px;border-width:2px}

/* preview + info (coluna direita) */
.lg-prevwrap{position:relative;flex:0 0 auto}
.lg-prev{position:relative;aspect-ratio:16/9;background:#000;border-radius:12px;overflow:hidden}
.lg-prev video,.lg-prev #clappr{width:100%;height:100%}
.lg-prev .player-loading{position:absolute;inset:0;display:grid;place-items:center;background:#000}
.lg-fs{position:absolute;top:10px;right:10px;width:38px;height:38px;border-radius:9px;display:grid;place-items:center;background:rgba(0,0,0,.55);backdrop-filter:blur(6px);color:#fff;border:1px solid rgba(255,255,255,.15);transition:.18s;z-index:3}
.lg-fs:hover{background:rgba(0,0,0,.85);color:var(--accent)}
.lg-fs svg{width:18px;height:18px}

.lg-chrow{display:flex;align-items:center;gap:12px}
.lg-chlogo{width:54px;height:54px;border-radius:12px;background:var(--bg-soft);display:grid;place-items:center;overflow:hidden;flex:0 0 auto}
.lg-chlogo img{max-width:100%;max-height:100%;object-fit:contain}
.lg-chrow h3{font-family:var(--font-display);font-size:1.15rem;letter-spacing:-.01em;min-width:0;overflow:hidden;text-overflow:ellipsis}
.lg-actions{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.lg-act{display:flex;align-items:center;justify-content:center;gap:8px;padding:12px;border-radius:12px;background:var(--surface-2);border:1px solid var(--line);color:var(--txt-dim);font-weight:600;font-size:.85rem;transition:.16s}
.lg-act svg{width:18px;height:18px}
.lg-act:hover{color:var(--txt);border-color:var(--txt-faint)}
.lg-act.on{color:var(--accent);border-color:color-mix(in srgb,var(--accent) 45%,transparent)}
.lg-act.on svg{fill:color-mix(in srgb,var(--accent) 30%,transparent)}

.lg-info .muted{color:var(--txt-faint);font-size:.88rem}
.lg-prog{font-weight:600;color:var(--txt);font-size:.95rem;margin-bottom:8px}
.lg-bar{height:6px;border-radius:6px;background:var(--surface-2);overflow:hidden}
.lg-bar i{display:block;height:100%;background:var(--accent);border-radius:6px}
.lg-times{display:flex;justify-content:space-between;color:var(--txt-faint);font-size:.78rem;margin-top:6px}
.lg-epglist{margin-top:4px;border-top:1px solid var(--line);padding-top:8px;display:flex;flex-direction:column;gap:2px;max-height:240px;overflow-y:auto}
.lg-epgrow{display:flex;gap:10px;padding:6px 2px;font-size:.86rem;border-bottom:1px solid var(--line)}
.lg-epgrow b{color:var(--accent);flex:0 0 44px}
.lg-epgrow span{color:var(--txt-dim);min-width:0}

/* responsivo */
@media(max-width:1023px){
  .lg-body{grid-template-columns:260px minmax(0,1fr)}
  .lg-side{display:none}
}
@media(max-width:640px){
  .lg{height:calc(100vh - var(--header-h) - 24px)}
  .lg-body{display:flex;flex-direction:column;gap:10px}
  .lg-cats{flex:0 0 auto;max-height:120px;display:flex;flex-direction:row;gap:8px;overflow-x:auto;overflow-y:hidden}
  .lg-cat{flex:0 0 auto;width:auto;border-radius:22px;background:var(--bg-soft)}
  .lg-cat .nm{text-transform:none}
  .lg-chans{flex:1}
}
