:root{
--bg:#18181b;--bg-dark:#0e0e10;--bg-mid:#252528;
--text:#efeff1;--text-dim:#adadb8;--text-muted:#888;
--accent:#F7931A;--red:#dc2626;--green:#22c55e;--twitch:#9147ff;
--border:#333;--input-bg:#0e0e10;--input-border:#444;
--radius:4px
}
*{box-sizing:border-box;margin:0;padding:0}
html,body{height:100%;background:var(--bg-dark);font-family:system-ui,-apple-system,sans-serif;color:var(--text)}
a{color:inherit;text-decoration:none}

#container{display:flex;height:100%}
#content{flex:1;display:flex;flex-direction:column;overflow:hidden}

header{display:flex;align-items:center;justify-content:space-between;padding:2px 12px;background:var(--bg);border-bottom:1px solid var(--border);flex-shrink:0}
.logo{font-size:16px;font-weight:700;color:var(--accent)}

#main-area{flex:1;overflow-y:auto;padding:12px}

.main-stream{background:var(--bg);border-radius:10px;padding:4px 12px 12px;margin-bottom:12px;width:min(100%,calc((100vh - 140px) * 16 / 9 + 24px));margin-left:auto}
.main-stream h2{font-size:13px;color:var(--text-dim);text-transform:uppercase;letter-spacing:1px;margin-bottom:6px;display:flex;align-items:center;gap:8px}
.main-video-wrap{position:relative;width:100%;aspect-ratio:16/9;background:#000;border-radius:6px;overflow:hidden}
.main-video-wrap video{width:100%;height:100%;object-fit:contain}
.pause-overlay{position:absolute;inset:0;background:rgba(0,0,0,0.5);display:none;align-items:center;justify-content:center;cursor:pointer;z-index:20}
.pause-overlay svg{width:80px;height:80px;fill:#fff;opacity:0.9}
.main-status{display:flex;align-items:center;gap:8px;margin-top:10px;font-size:12px;color:var(--text-dim)}

.featured{background:var(--bg);border-radius:10px;padding:12px;margin-bottom:12px}
.featured h2{font-size:13px;color:var(--text-dim);text-transform:uppercase;letter-spacing:1px;margin-bottom:6px}
.featured-empty{color:#666;font-size:13px;text-align:center;padding:12px}

.section{margin-bottom:24px}
.section-header{display:flex;align-items:center;gap:8px;margin-bottom:12px}
.section-title{font-size:16px;font-weight:600}

#chat{width:320px;min-width:320px;max-width:600px;display:flex;flex-direction:column;background:var(--bg);border-left:1px solid var(--border);position:relative}
#chat-collapse-bar{width:2%;min-width:12px;background:rgba(247,147,26,0);cursor:pointer;display:none;align-items:center;justify-content:center;transition:background 0.2s;position:fixed;right:0;top:80px;bottom:80px;z-index:100}
#chat-collapse-bar:hover{background:rgba(247,147,26,0.2)}
#chat-collapse-bar .collapse-text{color:#fff;font-size:13px;writing-mode:vertical-rl;text-orientation:mixed;opacity:0;transition:opacity 0.2s}
#chat-collapse-bar:hover .collapse-text{opacity:1}
#chat-resize{position:absolute;left:0;top:0;bottom:0;width:6px;cursor:ew-resize;background:transparent;z-index:10}
#chat-resize:hover{background:rgba(247,147,26,0.3)}
#popout-btn{background:var(--accent)!important}
#popout-btn:hover{background:#d4790f!important}
#mobile-collapse-btn{display:none;background:none;border:none;color:var(--text-muted);font-size:14px;padding:4px 8px;cursor:pointer}
#mobile-collapse-btn:hover{color:#fff}

#streamer-menu-btn{background:none;border:none;cursor:pointer;padding:4px;display:none;align-items:center;justify-content:center;margin-left:auto}
#streamer-menu-btn svg{width:20px;height:20px;fill:var(--accent);transition:fill 0.15s}
#streamer-menu-btn:hover svg{fill:#fff}
#settings-menu{width:80%;max-height:40%}
#streamer-menu{position:absolute;top:40px;right:10px;width:85%;background:var(--bg-mid);border-radius:8px;box-shadow:0 4px 20px rgba(0,0,0,0.4);padding:14px;box-sizing:border-box;transform:translateY(-20px);opacity:0;visibility:hidden;transition:transform 0.25s ease-out,opacity 0.25s ease-out,visibility 0.25s;display:flex;flex-direction:column;gap:6px;overflow-y:auto;max-height:60%;z-index:11}
#streamer-menu.open{transform:translateY(0);opacity:1;visibility:visible}

.toggle-switch{position:relative;width:44px;height:24px;flex-shrink:0}
.toggle-switch input{opacity:0;width:0;height:0}
.toggle-slider{position:absolute;cursor:pointer;inset:0;background:#f44;border-radius:24px;transition:0.3s}
.toggle-slider:before{position:absolute;content:"";height:18px;width:18px;left:3px;bottom:3px;background:#fff;border-radius:50%;transition:0.3s}
.toggle-switch input:checked+.toggle-slider{background:var(--green)}
.toggle-switch input:checked+.toggle-slider:before{transform:translateX(20px)}

.whitelist-chip{display:inline-flex;align-items:center;gap:4px;background:#1f1f23;padding:4px 8px;border-radius:var(--radius);font-size:12px;color:#fff;margin:2px}
.whitelist-chip button{background:none;border:none;color:#f44;cursor:pointer;padding:0;font-size:14px;line-height:1}
#whitelist-search-results{max-height:150px;overflow-y:auto;background:#1f1f23;border-radius:4px;margin-top:4px}
.whitelist-search-item{padding:8px;cursor:pointer;color:#fff;font-size:13px}
.whitelist-search-item:hover{background:var(--border)}
#mod-search-results{max-height:120px;overflow-y:auto;background:#1f1f23;border-radius:var(--radius);margin-top:4px}
.mod-search-item{padding:8px;cursor:pointer;color:#fff;font-size:13px}
.mod-search-item:hover{background:var(--border)}
#mod-list{margin-top:4px}
.mod-header{display:flex;align-items:center;gap:8px;padding:2px 0;font-size:11px;color:#666}
.mod-header span:first-child{flex:1}
.mod-header span{text-align:center;width:60px}
.mod-row{display:flex;align-items:center;gap:8px;padding:4px 0}
.mod-row .mod-name{flex:1;color:#fff;font-size:13px}
.mod-row .mod-check{width:60px;text-align:center}
.mod-row .mod-check input{accent-color:var(--accent)}
.mod-row .mod-remove{background:none;border:none;color:#f44;cursor:pointer;font-size:14px;padding:0 4px}

body.resizing *{pointer-events:none!important}body.resizing #chat-resize{pointer-events:auto!important}

.donate-btn{background:none;border:1px solid var(--accent);border-radius:var(--radius);color:var(--accent);cursor:pointer;display:inline-flex;align-items:center;gap:4px;padding:2px 8px;font-size:12px;font-weight:600;margin-left:auto;transition:background 0.15s}
.donate-btn:hover{background:rgba(247,147,26,0.15)}

@media (max-aspect-ratio:1/1),(max-width:600px){
#container{flex-direction:column}
#content{flex:1;min-height:0}
#main-area{flex:1;overflow-y:auto}
#chat{width:100%!important;max-width:100%;min-width:100%;flex:0 0 32%;max-height:50%;border-left:none;border-top:1px solid var(--border)}
#chat-resize{left:0;right:0;top:0;bottom:auto;width:100%;height:8px;cursor:ns-resize}
#mobile-collapse-btn{display:none!important}
#chat-collapse-bar{position:fixed;left:0;right:0;top:auto;bottom:0;width:100%;height:22px;min-width:auto}
#chat-collapse-bar .collapse-text{writing-mode:horizontal-tb}
.chat-collapsed #content{flex:1}
.chat-collapsed #chat{display:none}
#streamer-menu{width:90%;right:5%}
}
