:root{
  --bg:#0a0d14;
  --card:#0f1624;
  --muted:#7f8ba3;
  --text:#e6ecf5;
  --line:#1f2a3d;
  --accent:#4fc3ff;
  --accent-soft: rgba(79,195,255,.18);
}

*{box-sizing:border-box}

body{
  margin:0;
  font-family:system-ui,-apple-system,Segoe UI,Roboto,Arial;
  background:#000000;
  color:var(--text);
}

/* ===== PLAYER TABS ===== */
.playerTabs{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  margin:10px 0 8px 6px;
}

button.playerTab{
  background:#111827;
  border:1px solid var(--line);
  color:var(--muted);
  padding:7px 14px;
  border-radius:999px;
  cursor:pointer;
  font-size:13px;
  font-weight:600;
  transition:.2s ease;
  appearance:none;
  -webkit-appearance:none;
}

button.playerTab:hover{
  color:var(--text);
  border-color:var(--accent);
  background:#0f1b2f;
}

button.playerTab.active{
  background:#0f2136;
  color:var(--text);
  border-color:var(--accent);
  box-shadow:0 0 0 1px var(--accent-soft);
}

/* ===== LAYOUT ===== */
.wrap{
  max-width:1200px;
  margin:0 auto;
  padding:14px;
}

.top{
  display:flex;
  gap:12px;
  align-items:center;
  justify-content:space-between;
  margin-bottom:12px;
}

.title{
  font-size:18px;
  font-weight:700;
}

.sub{
  font-size:12px;
  color:var(--muted);
}

.actions{
  display:flex;
  gap:8px;
}

.btn{
  background:#0e1624;
  border:1px solid var(--line);
  color:var(--text);
  padding:8px 12px;
  border-radius:10px;
  cursor:pointer;
  transition:.2s;
}

.btn:hover{
  border-color:var(--accent);
  background:#0f2136;
}

/* ===== GRID ===== */
.grid{
  display:grid;
  grid-template-columns:1.6fr 1fr;
  gap:12px;
}

@media (max-width:980px){
  .grid{grid-template-columns:1fr}
}

/* ===== CARDS ===== */
.playerCard,
.listCard{
  background: #0a0a0a;
  border: 1px solid #51111117;
  border-radius: 16px;
  overflow: hidden;
}

/* ===== PLAYER ===== */
.playerFrame{
  aspect-ratio:16/9;
  width:100%;
  background:#000;
  display:flex;
  align-items:center;
  justify-content:center;
}

.playerFrame iframe,
.playerFrame video{
  width:100%;
  height:100%;
  border:0;
  display:block;
}

.skeleton{
  color:var(--muted);
  font-size:13px;
}

.meta{
  padding:10px 14px;
  border-top:1px solid #51111117;
  color:var(--muted);
  font-size:12px;
}

/* ===== LIST / TABS ===== */
.tabs{
  display:flex;
  border-bottom:1px solid var(--line);
}

.tab{
  flex:1;
  padding:10px 12px;
  text-align:center;
  font-size:13px;
  color:var(--muted);
  cursor:pointer;
}

.tab.active{
  color:var(--text);
  font-weight:700;
  border-bottom:2px solid var(--accent);
}

/* ===== EPISODES ===== */
.pane{
  display:flex;
  gap:10px;
  padding:10px;
}

.seasons{
  width:120px;
  border-right:1px solid var(--line);
  padding-right:10px;
}

.seasonBtn{
  width:100%;
  text-align:left;
  background:#0e1624;
  border:1px solid var(--line);
  color:var(--text);
  padding:8px 10px;
  border-radius:10px;
  cursor:pointer;
  margin-bottom:8px;
  transition:.2s;
}

.seasonBtn:hover{
  border-color:var(--accent);
}

.seasonBtn.active{
  border-color:var(--accent);
  background:#0f2136;
}

.episodes{
  flex:1;
  max-height:520px;
  overflow:auto;
  padding-right:6px;
}

/* ===== EP ITEM ===== */
.ep{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:9px 12px;
  border:1px solid var(--line);
  border-radius:14px;
  margin-bottom:8px;
  cursor:pointer;
  transition:.2s;
  background:#0e1624;
}

.ep:hover{
  border-color:var(--accent);
  background:#0f2136;
}

.ep.active{
  border-color:var(--accent);
  box-shadow:0 0 0 1px var(--accent-soft);
}

.ep .left{
  display:flex;
  flex-direction:column;
}

.ep .n{
  font-weight:700;
}

.ep .t{
  font-size:12px;
  color:var(--muted);
}

.badge{
  font-size:11px;
  color:var(--muted);
  border:1px solid var(--line);
  padding:4px 10px;
  border-radius:999px;
  background:#0c1422;
}

/* =========================
   MODO EMBED (embed=1)
   deixa só o player, sem lista/texto
   ========================= */
html.embed body{
  background: transparent !important;
}

/* esconde tudo que cria altura extra */
html.embed .top,
html.embed .meta,
html.embed .tabs,
html.embed .pane,
html.embed .episodes,
html.embed .seasons,
html.embed .listCard,
html.embed .playerTabs{
  display:none !important;
}

/* layout vira “só o player” */
html.embed .wrap{
  max-width:none !important;
  padding:0 !important;
}
html.embed .grid{
  display:block !important;
  padding:0 !important;
}
html.embed .playerCard{
  border:0 !important;
  border-radius:14px !important;
  overflow:hidden !important;
}

/* garante 16:9 sem scroll interno */
html.embed .playerFrame{
  position:relative !important;
  aspect-ratio:auto !important;
}
html.embed .playerFrame::before{
  content:"";
  display:block;
  padding-top:56.25%;
}
html.embed .playerFrame iframe,
html.embed .playerFrame video{
  position:absolute !important;
  inset:0 !important;
  width:100% !important;
  height:100% !important;
}
