:root{--bg:#0f1115;--panel:#171a21;--panel2:#1f232c;--text:#e8eaf0;--muted:#8b93a7;--acc:#4f8cff;--err:#ff6b6b;--line:#2a2f3a}
*{box-sizing:border-box}
html,body{margin:0;height:100%}
body{background:var(--bg);color:var(--text);font:15px/1.4 system-ui,-apple-system,"Segoe UI",Roboto,sans-serif}
.hidden{display:none!important}
button{background:var(--acc);color:#fff;border:0;border-radius:8px;padding:9px 14px;font:inherit;cursor:pointer;white-space:nowrap}
button:disabled{opacity:.6;cursor:default}
button.ghost{background:transparent;border:1px solid var(--line);color:var(--text)}
input,select{background:var(--panel2);color:var(--text);border:1px solid var(--line);border-radius:8px;padding:9px 10px;font:inherit;width:100%;min-width:0}
.card{background:var(--panel);border:1px solid var(--line);border-radius:12px;padding:18px}
.login{min-height:100%;display:grid;place-items:center;padding:16px}
.login .card{width:100%;max-width:380px;display:grid;gap:12px}
.login h1{margin:0;font-size:22px}
label{display:grid;gap:6px;color:var(--muted)}
label.row{display:flex;align-items:center;gap:8px}
label.row input{width:auto}
.muted{color:var(--muted);margin:0}
.small{font-size:13px}
.err{color:var(--err);min-height:1.2em;margin:0}
header{display:flex;align-items:center;gap:16px;padding:10px 16px;background:var(--panel);border-bottom:1px solid var(--line);flex-wrap:wrap}
header .brand{font-weight:700;font-size:18px}
nav{display:flex;gap:6px}
.tab{background:transparent;color:var(--muted)}
.tab.active{background:var(--panel2);color:var(--text)}
.user{margin-left:auto;display:flex;gap:10px;align-items:center;color:var(--muted)}
main{padding:16px}
.tv{display:grid;grid-template-columns:minmax(0,1fr) 340px;gap:16px;height:calc(100vh - 92px)}
.playerCol{display:flex;flex-direction:column;gap:12px;min-width:0}
.videoWrap{position:relative;background:#000;border-radius:12px;overflow:hidden;aspect-ratio:16/9;width:100%;max-height:calc(100vh - 190px)}
video{width:100%;height:100%;display:block;background:#000}
.overlay{position:absolute;inset:0;display:grid;place-items:center;text-align:center;padding:24px;color:#cfd3dc;pointer-events:none;background:rgba(0,0,0,.45)}
.nowbox{display:flex;gap:12px;align-items:center}
.nowbox img{width:56px;height:56px;object-fit:contain;background:var(--panel2);border-radius:8px;flex:none}
.nowName{font-weight:600;font-size:17px}
#nowEpg{white-space:pre-line}
.listCol{display:flex;flex-direction:column;gap:10px;min-height:0;background:var(--panel);border:1px solid var(--line);border-radius:12px;padding:10px}
.filters{display:grid;gap:8px}
.list{list-style:none;margin:0;padding:0;overflow:auto;flex:1}
.list li{display:flex;align-items:center;gap:10px;padding:7px 8px;border-radius:8px;cursor:pointer}
.list li:hover{background:var(--panel2)}
.list li.active{background:var(--acc);color:#fff}
.list img{width:34px;height:34px;object-fit:contain;flex:none}
.list .ph{width:34px;height:34px;flex:none;border-radius:6px;background:var(--panel2)}
.list .num{color:var(--muted);min-width:2.2em;text-align:right;flex:none;font-variant-numeric:tabular-nums}
.list li.active .num{color:#fff}
.links{display:grid;gap:16px;max-width:900px}
.links h2{margin:0 0 6px;font-size:17px}
.copyRow{display:flex;gap:8px;align-items:center;margin:8px 0}
.copyRow .lbl{width:64px;color:var(--muted);flex:none}
.qr{background:#fff;padding:10px;border-radius:8px;width:max-content;margin-top:8px}
@media (max-width:900px){
  .tv{grid-template-columns:1fr;height:auto}
  .videoWrap{max-height:none}
  .listCol{max-height:65vh}
  main{padding:10px}
}
