:root{
  --bg0:#07070b;
  --bg1:#0b0b10;
  --card:rgba(255,255,255,.06);
  --card2:rgba(255,255,255,.09);
  --line:rgba(255,255,255,.10);
  --txt:rgba(255,255,255,.92);
  --muted:rgba(255,255,255,.70);
  --muted2:rgba(255,255,255,.55);
  --accent:#8a5cff;   /* Neon Purple */
  --accent2:#3cffc6;  /* Neon Mint */
  --danger:#ff4d6d;
  --radius:18px;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, "Helvetica Neue", Arial;
  background: radial-gradient(1200px 600px at 20% 0%, rgba(138,92,255,.16), transparent 60%),
              radial-gradient(900px 500px at 80% 10%, rgba(60,255,198,.10), transparent 55%),
              linear-gradient(180deg, var(--bg0), var(--bg1));
  color:var(--txt);
}

code{
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size:.92em;
  padding:.12em .45em;
  border-radius:10px;
  background:rgba(255,255,255,.08);
  border:1px solid rgba(255,255,255,.08);
}

.topbar{
  position:sticky; top:0; z-index:20;
  display:flex; align-items:center; justify-content:space-between;
  padding:14px 18px;
  background:rgba(10,10,16,.72);
  backdrop-filter: blur(14px);
  border-bottom:1px solid var(--line);
}

.brand{display:flex; align-items:center; gap:14px}
.logo{width:38px;height:38px}
.brandName{font-weight:800; letter-spacing:.2px; font-size:18px}
.brandTag{font-size:12px;color:var(--muted2);margin-top:2px}
.dot{color:var(--accent2)}

.topbarActions{display:flex; gap:10px; align-items:center}
.pill{
  display:flex; align-items:center; gap:10px;
  padding:8px 12px;
  border-radius:999px;
  background:rgba(255,255,255,.06);
  border:1px solid rgba(255,255,255,.10);
  color:var(--muted);
  user-select:none;
}
.pulse{
  width:8px;height:8px;border-radius:999px;
  background:var(--accent2);
  box-shadow: 0 0 0 0 rgba(60,255,198,.35);
  animation:pulse 1.6s infinite;
}
@keyframes pulse{
  0%{box-shadow:0 0 0 0 rgba(60,255,198,.35)}
  70%{box-shadow:0 0 0 12px rgba(60,255,198,0)}
  100%{box-shadow:0 0 0 0 rgba(60,255,198,0)}
}

.btn{
  appearance:none;
  border:1px solid rgba(255,255,255,.12);
  background:linear-gradient(180deg, rgba(255,255,255,.10), rgba(255,255,255,.06));
  color:var(--txt);
  padding:9px 12px;
  border-radius:12px;
  cursor:pointer;
  transition: transform .08s ease, background .15s ease, border-color .15s ease;
}
.btn:hover{border-color:rgba(255,255,255,.22)}
.btn:active{transform:translateY(1px)}
.btn.ghost{
  background:rgba(255,255,255,.04);
}

.layout{
  display:grid;
  grid-template-columns: 340px 1fr;
  gap:18px;
  padding:18px;
  max-width: 1400px;
  margin: 0 auto;
}

.sidebar{
  border:1px solid var(--line);
  background:rgba(255,255,255,.04);
  border-radius:var(--radius);
  overflow:hidden;
}
.sidebarHead{
  padding:16px 16px 12px;
  border-bottom:1px solid var(--line);
}
.sidebarHead h2{
  margin:0 0 8px;
  font-size:16px;
}
.hint{font-size:12px;color:var(--muted2)}
.channelList{padding:12px; display:flex; flex-direction:column; gap:10px}

.channelBtn{
  display:flex; gap:12px; align-items:center;
  padding:12px;
  border-radius:16px;
  border:1px solid rgba(255,255,255,.10);
  background:rgba(255,255,255,.05);
  cursor:pointer;
  transition: border-color .15s ease, transform .08s ease, background .15s ease;
}
.channelBtn:hover{border-color:rgba(255,255,255,.22)}
.channelBtn:active{transform:translateY(1px)}
.channelBtn.active{
  border-color:rgba(138,92,255,.65);
  background:linear-gradient(180deg, rgba(138,92,255,.18), rgba(255,255,255,.04));
}

.avatar{
  width:44px;height:44px;border-radius:14px;
  background:linear-gradient(135deg, rgba(138,92,255,.55), rgba(60,255,198,.35));
  border:1px solid rgba(255,255,255,.16);
  flex:0 0 auto;
  overflow:hidden;
  display:grid; place-items:center;
  font-weight:800;
}
.avatar img{width:100%;height:100%;object-fit:cover}

.channelMeta{display:flex;flex-direction:column; gap:3px; min-width:0}
.channelName{font-weight:750; white-space:nowrap; overflow:hidden; text-overflow:ellipsis}
.channelFile{font-size:12px;color:var(--muted2)}
.badges{margin-left:auto; display:flex; gap:8px; align-items:center}
.badge{
  font-size:12px;
  padding:4px 8px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(255,255,255,.05);
  color:var(--muted);
}
.badge.live{border-color: rgba(60,255,198,.35); color: rgba(210,255,245,.95)}
.badge.off{border-color: rgba(255,255,255,.10); color: var(--muted2)}

.sidebarFoot{
  padding:12px 16px;
  border-top:1px solid var(--line);
  color:var(--muted2);
  font-size:12px;
}

.content{display:flex; flex-direction:column; gap:18px}
.playerCard{
  border:1px solid var(--line);
  background:rgba(255,255,255,.04);
  border-radius:var(--radius);
  overflow:hidden;
}

.playerTop{
  display:flex; align-items:center; justify-content:space-between;
  gap:12px;
  padding:14px 14px 12px;
  border-bottom:1px solid var(--line);
}
.nowTitle{font-size:18px;font-weight:850}
.nowMeta{font-size:12px;color:var(--muted2); margin-top:4px}

.playerActions{display:flex; gap:10px; flex-wrap:wrap}

.playerWrap{position:relative; background:#000}
.video{
  width:100%;
  aspect-ratio: 16/9;
  display:block;
  background:#000;
}

.overlay{
  position:absolute; inset:0;
  display:flex; align-items:center; justify-content:center;
  padding:18px;
  background: radial-gradient(900px 500px at 50% 0%, rgba(138,92,255,.18), rgba(0,0,0,.55));
  opacity:0; pointer-events:none;
  transition: opacity .18s ease;
}
.overlay.show{opacity:1; pointer-events:auto}
.overlayCard{
  width:min(520px, 100%);
  border:1px solid rgba(255,255,255,.14);
  border-radius:18px;
  background:rgba(10,10,16,.68);
  backdrop-filter: blur(12px);
  padding:16px;
}
.overlayTitle{font-size:16px;font-weight:850}
.overlayText{margin-top:8px;color:var(--muted); line-height:1.45}
.overlayButtons{display:flex; gap:10px; margin-top:14px; flex-wrap:wrap}

.playerBottom{
  display:flex; align-items:center; justify-content:space-between;
  padding:10px 14px;
  border-top:1px solid var(--line);
  color:var(--muted);
  font-size:13px;
}

.chip{
  display:inline-flex; align-items:center;
  padding:5px 10px;
  border-radius:999px;
  background:rgba(255,255,255,.05);
  border:1px solid rgba(255,255,255,.10);
  margin-left:8px;
  color:var(--muted2);
}

.grid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:18px;
}
.infoCard{
  border:1px solid var(--line);
  background:rgba(255,255,255,.04);
  border-radius:var(--radius);
  padding:16px;
}
.infoCard h3{margin:0 0 8px; font-size:14px; letter-spacing:.2px}
.infoCard p{margin:0; color:var(--muted); line-height:1.55}
.muted{color:var(--muted2)}

.theater .layout{
  grid-template-columns: 1fr;
}
.theater .sidebar{display:none}
.theater .video{aspect-ratio:auto; height: calc(100vh - 170px);}
@media (max-width: 980px){
  .layout{grid-template-columns: 1fr}
  .sidebar{order:2}
  .grid{grid-template-columns: 1fr}
}
