:root { --bg:#0b0d12; --panel:#141821; --panel2:#1b2130; --line:#272e3f; --text:#e8ebf2; --muted:#8c95a8; --accent:#e50914; --accent2:#ff4d58; --good:#3ecf8e; --bad:#ff6b6b; --gold:#f5c518; }
* { box-sizing: border-box; }
html { color-scheme: dark; }
body { margin:0; background:var(--bg); color:var(--text); font:15px/1.5 system-ui,-apple-system,"Segoe UI",Roboto,sans-serif; }
a { color:#7db4ff; }
code, pre { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
:focus-visible { outline:2px solid #7db4ff; outline-offset:2px; }
.sr-only, .skip:not(:focus) { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; }
.skip:focus { position:fixed; top:8px; left:8px; background:#fff; color:#000; padding:8px 12px; z-index:100; }
.muted { color:var(--muted); }
.topbar { position:sticky; top:0; z-index:20; display:flex; flex-wrap:wrap; gap:12px 20px; align-items:center; padding:10px 20px; background:rgba(11,13,18,.92); backdrop-filter:blur(8px); border-bottom:1px solid var(--line); }
.brand { font-weight:800; font-size:20px; color:var(--accent); letter-spacing:.5px; }
.brand span { color:var(--text); font-weight:500; margin-left:6px; }
.tabs { display:flex; gap:4px; flex:1; }
.tabs button { background:none; border:0; color:var(--muted); padding:8px 14px; font:inherit; font-weight:600; cursor:pointer; border-radius:8px; }
.tabs button:hover { color:var(--text); }
.tabs button[aria-selected=true] { color:#fff; background:var(--panel2); box-shadow:inset 0 -2px 0 var(--accent); }
.top-actions { display:flex; gap:8px; }
.btn { display:inline-block; background:var(--panel2); color:var(--text); border:1px solid var(--line); border-radius:8px; padding:7px 14px; font:inherit; cursor:pointer; text-decoration:none; }
.btn:hover { border-color:#3a4560; }
.btn.primary { background:var(--accent); border-color:var(--accent); color:#fff; font-weight:700; }
.btn.primary:hover { background:var(--accent2); }
.btn.ghost { background:transparent; }
.btn.active { border-color:var(--good); }
.btn.small { padding:3px 10px; font-size:13px; }
main { padding:20px; max-width:1500px; margin:0 auto; }
.toolbar { display:flex; flex-wrap:wrap; gap:12px; margin-bottom:8px; }
.field { display:flex; flex-direction:column; gap:4px; font-size:13px; color:var(--muted); }
.field.grow { flex:1; min-width:220px; }
input, select { background:var(--panel); color:var(--text); border:1px solid var(--line); border-radius:8px; padding:9px 11px; font:inherit; min-width:0; }
.status { color:var(--muted); padding:8px 0; }
.status.error { color:var(--bad); background:rgba(255,107,107,.08); border:1px solid rgba(255,107,107,.3); border-radius:8px; padding:10px 12px; }
.spinner { display:inline-block; width:14px; height:14px; border:2px solid var(--line); border-top-color:var(--accent); border-radius:50%; animation:spin .8s linear infinite; vertical-align:-2px; }
@keyframes spin { to { transform:rotate(360deg); } }
@media (prefers-reduced-motion:reduce) { .spinner { animation-duration:3s; } }
.grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(160px,1fr)); gap:16px; }
.empty { grid-column:1/-1; text-align:center; color:var(--muted); padding:60px 0; }
.card { display:flex; flex-direction:column; text-align:left; padding:0; background:var(--panel); color:inherit; border:1px solid var(--line); border-radius:10px; overflow:hidden; cursor:pointer; font:inherit; transition:transform .15s, border-color .15s; }
.card:hover { transform:translateY(-3px); border-color:#3a4560; }
.poster { width:100%; aspect-ratio:2/3; object-fit:cover; background:var(--panel2); display:block; }
.poster.noimg { visibility:visible; min-height:180px; }
.cbody { padding:8px 10px 10px; }
.ctitle { font-weight:600; line-height:1.25; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.cmeta { display:flex; justify-content:space-between; color:var(--muted); font-size:13px; margin-top:3px; }
.rating { color:var(--gold); }
.cgen { color:var(--muted); font-size:12px; margin-top:2px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
dialog { background:var(--panel); color:var(--text); border:1px solid var(--line); border-radius:14px; padding:0; max-width:min(900px,96vw); width:100%; max-height:92vh; overflow:auto; }
dialog::backdrop { background:rgba(0,0,0,.75); }
dialog > h2, #keyForm { padding:16px 20px 0; }
#keyForm, #player { padding-bottom:20px; }
#player { max-width:min(1100px,96vw); }
#player > *:not(.close):not(video) { margin-left:20px; margin-right:20px; }
.close { position:absolute; top:8px; right:10px; z-index:5; background:rgba(0,0,0,.6); color:#fff; border:1px solid var(--line); width:36px; height:36px; border-radius:50%; font-size:22px; line-height:1; cursor:pointer; }
.hero { height:220px; background:var(--panel2) center/cover no-repeat; mask-image:linear-gradient(#000 60%,transparent); -webkit-mask-image:linear-gradient(#000 60%,transparent); }
.dtop { display:flex; gap:20px; padding:0 20px 20px; margin-top:-80px; position:relative; }
.dposter { width:160px; flex:none; border-radius:10px; align-self:flex-start; border:1px solid var(--line); }
.dinfo { min-width:0; padding-top:70px; }
.dinfo h2 { margin:0 0 4px; font-size:26px; }
.dinfo p { margin:6px 0; }
.desc { color:#cfd5e3; }
.chips { display:flex; flex-wrap:wrap; gap:6px; margin:8px 0; }
.chip { background:var(--panel2); border:1px solid var(--line); border-radius:99px; padding:1px 10px; font-size:12px; }
.row { display:flex; flex-wrap:wrap; gap:8px; margin:12px 0 0; align-items:center; }
.seasons { padding:0 20px 20px; }
.eps { list-style:none; margin:12px 0 0; padding:0; display:grid; gap:6px; }
.ep { width:100%; display:flex; gap:12px; align-items:center; text-align:left; background:var(--panel2); color:inherit; border:1px solid var(--line); border-radius:8px; padding:8px 12px; font:inherit; cursor:pointer; }
.ep:hover { border-color:var(--accent); }
.epn { color:var(--muted); min-width:3em; font-variant-numeric:tabular-nums; }
.ept { flex:1; min-width:0; }
.ept small { color:var(--muted); }
.ept .plot { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.play { color:var(--accent); }
video { width:100%; max-height:70vh; background:#000; display:block; margin-top:8px; }
#pTitle { margin:0; padding:14px 56px 0 20px; }
.console { display:grid; grid-template-columns:minmax(260px,360px) 1fr; gap:16px; align-items:start; }
.panel { background:var(--panel); border:1px solid var(--line); border-radius:12px; padding:16px; }
.panel h2 { font-size:15px; margin:20px 0 6px; }
.params { display:grid; gap:10px; margin:12px 0; }
.tag { color:var(--accent2); }
.history { list-style:none; padding:0; margin:0; display:grid; gap:4px; }
.hist { width:100%; display:flex; gap:8px; align-items:center; background:none; color:inherit; border:1px solid transparent; border-radius:6px; padding:4px 6px; font:inherit; font-size:13px; cursor:pointer; text-align:left; }
.hist:hover { background:var(--panel2); }
.hp { flex:1; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-family:ui-monospace,monospace; }
.st, .meta.good strong { color:var(--good); } .st.bad, .meta.bad { color:var(--bad); }
.meta { margin-bottom:10px; }
.curl { display:flex; gap:8px; align-items:flex-start; background:#0a0c11; border:1px solid var(--line); border-radius:8px; padding:8px; }
.curl code { flex:1; word-break:break-all; font-size:13px; }
.hdrs { margin:10px 0; } .hdrs pre { background:#0a0c11; padding:8px; border-radius:8px; overflow:auto; font-size:12px; margin:6px 0 0; }
.tree { margin-top:12px; font:13px/1.55 ui-monospace,monospace; max-height:70vh; overflow:auto; background:#0a0c11; border:1px solid var(--line); border-radius:8px; padding:10px; }
.jc { margin-left:18px; border-left:1px dashed var(--line); padding-left:8px; }
.jl { padding-left:14px; word-break:break-word; }
.jn > summary { cursor:pointer; }
.j-key { color:#9cdcfe; } .j-string { color:#ce9178; } .j-number { color:#b5cea8; } .j-boolean { color:#569cd6; } .j-null { color:var(--muted); }
.rawtxt { white-space:pre-wrap; margin:0; }
@media (max-width:800px) {
  .console { grid-template-columns:1fr; }
  .dtop { flex-direction:column; margin-top:-40px; } .dinfo { padding-top:0; } .dposter { width:110px; }
  .grid { grid-template-columns:repeat(auto-fill,minmax(130px,1fr)); gap:10px; }
  main { padding:12px; }
}
