*{box-sizing:border-box}
html,body{margin:0;height:100%;background:#0e0e10;color:#efeff1;font-family:system-ui,-apple-system,BlinkMacSystemFont,sans-serif}
.topbar{height:56px;display:flex;align-items:center;justify-content:space-between;padding:0 16px;background:#18181b;border-bottom:1px solid #2a2a2d}
.topbar-left{display:flex;align-items:center;gap:10px;min-width:0}
.topbar-channel{color:#cfcfd2;font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:50vw}
.brand{font-size:18px;font-weight:800;letter-spacing:.2px}
.toplink{color:#cfcfd2;text-decoration:none;font-size:14px}
.toplink:hover{text-decoration:underline}
.app{padding:12px}
.view.hidden{display:none}
.view-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}
.h1{margin:0;font-size:18px}
.btn{background:#2a2a2d;border:1px solid #3a3a3d;color:#efeff1;border-radius:8px;padding:8px 10px;cursor:pointer}
.btn:hover{filter:brightness(1.1)}
.grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:12px}
.card{background:#18181b;border:1px solid #2a2a2d;border-radius:10px;overflow:hidden;cursor:pointer;text-decoration:none;color:inherit}
.card:hover{border-color:#3a3a3d}
.thumb{width:100%;aspect-ratio:16/9;background:#000;display:block}
.card-body{padding:10px 12px;display:flex;flex-direction:column;gap:6px}
.card-title{font-weight:800}
.card-meta{display:flex;gap:8px;align-items:center;color:#cfcfd2;font-size:13px}
.badge{display:inline-flex;align-items:center;gap:6px;background:#e91916;color:white;font-weight:800;border-radius:999px;padding:2px 8px;font-size:12px}
.badge-muted{background:#3a3a3d;color:#efeff1}
.dot{opacity:.5}
.empty{padding:16px;background:#18181b;border:1px dashed #2a2a2d;border-radius:10px;color:#cfcfd2}
.hint{margin-top:12px;color:#cfcfd2;font-size:13px}
.hint code{background:#18181b;border:1px solid #2a2a2d;padding:2px 6px;border-radius:6px}

.watch-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:10px}
.watch-title{display:flex;flex-direction:column;gap:4px}
.logo{font-size:18px;font-weight:900;color:#9146ff}
.subtitle{display:flex;align-items:center;gap:8px;color:#cfcfd2;font-size:13px}

.layout{display:grid;grid-template-columns:1fr 340px;height:calc(100vh - 56px - 12px - 12px - 44px)}
.player-area{background:#000;position:relative}
.chat-area{background:#18181b;border-left:1px solid #2a2a2d}
.stream{width:100%;height:100%;background:#000}
.hidden{display:none}

/* Toggle */
.toggle{display:flex;align-items:center;gap:10px;cursor:pointer;user-select:none}
.toggle-label{font-size:13px;color:#cfcfd2}
.toggle input{display:none}
.slider{width:44px;height:24px;background:#3a3a3d;border-radius:999px;position:relative;transition:background .2s}
.slider::after{content:"";width:18px;height:18px;background:#fff;border-radius:50%;position:absolute;top:3px;left:3px;transition:transform .2s}
.toggle input:checked + .slider{background:#9146ff}
.toggle input:checked + .slider::after{transform:translateX(20px)}

/* Responsive */
@media (max-width: 900px){
  .layout{grid-template-columns:1fr;height:auto}
  .chat-area{height:420px;border-left:0;border-top:1px solid #2a2a2d}
}


.chip{display:inline-flex;align-items:center;background:#2a2a2d;border:1px solid #3a3a3d;color:#efeff1;border-radius:999px;padding:2px 8px;font-size:12px;font-weight:800}


/* OnlyQuack theme */
body.onlyquack .topbar{
  background:#ffd400;
  border-bottom-color:#d4b000;
}
body.onlyquack .brand,
body.onlyquack .toplink{
  color:#000;
}
body.onlyquack .toggle-label{
  color:#000;
}
body.onlyquack .slider{
  background:#000;
}
body.onlyquack .slider::after{
  background:#fff;
}
body.onlyquack .logo{
  color:#000;
}


/* Watch page: player column + info bar */
.player-col{
  display:flex;
  flex-direction:column;
  min-height:0;
}
.player-col .player-area{
  flex:1 1 auto;
  min-height:0;
}
.stream-info{
  background:#18181b;
  border-top:1px solid #2a2a2d;
  padding:10px 12px;
}
.stream-info-row{
  display:flex;
  gap:10px;
  align-items:flex-start;
}
.avatar{
  width:44px;
  height:44px;
  border-radius:999px;
  background:#2a2a2d;
  border:1px solid #3a3a3d;
  flex:0 0 auto;
  overflow:hidden;
}
.avatar img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}
.meta{display:flex;flex-direction:column;gap:4px;min-width:0}
.name-line{display:flex;gap:8px;align-items:baseline;min-width:0}
.display-name{font-weight:900}
.login{color:#cfcfd2;font-size:12px}
.title{font-size:13px;color:#efeff1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.submeta{display:flex;gap:8px;align-items:center;color:#cfcfd2;font-size:12px}

.topbar-right{display:flex;align-items:center;gap:12px}


/* Overview: avatar next to username */
.card-title-row{display:flex;align-items:center;gap:10px;min-width:0}
.card-avatar{width:28px;height:28px;border-radius:999px;background:#2a2a2d;border:1px solid #3a3a3d;flex:0 0 auto;overflow:hidden}
.card-avatar img{width:100%;height:100%;object-fit:cover;display:block}
.card-title{min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
