
:root {
  --bg:#080a0f; --panel:rgba(17,20,29,.76); --line:rgba(255,255,255,.085); --line2:rgba(255,255,255,.14);
  --text:#f7f8fb; --muted:#858c9c; --red:var(--tone-ff2449,#ff2449); --green:#3ce5a1;
}
*{box-sizing:border-box} html{color-scheme:dark} body{margin:0;min-height:100vh;background:radial-gradient(circle at 50% -20%,var(--tone-rgba255367312,rgba(255,36,73,.12)),transparent 38%),var(--bg);color:var(--text);font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;overflow-x:hidden}
button,input{font:inherit}.hidden{display:none!important}
.bg-grid{position:fixed;inset:0;pointer-events:none;opacity:.34;background-image:linear-gradient(rgba(255,255,255,.022) 1px,transparent 1px),linear-gradient(90deg,rgba(255,255,255,.022) 1px,transparent 1px);background-size:54px 54px;mask-image:linear-gradient(to bottom,black,transparent 72%)}
.ambient{position:fixed;width:36vw;height:36vw;border-radius:999px;filter:blur(120px);pointer-events:none;opacity:.11}.ambient-a{background:var(--tone-ff1949,#ff1949);top:10vh;left:-24vw}.ambient-b{background:#5435ff;right:-28vw;top:52vh}
.shell{position:relative;width:min(1320px,calc(100% - 48px));margin:0 auto;padding-bottom:70px}.topbar{height:88px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--line)}
.brand{display:inline-flex;align-items:center;gap:12px;color:inherit;text-decoration:none}.brand-mark{width:42px;height:42px;display:grid;place-items:center;border-radius:13px;background:linear-gradient(145deg,var(--tone-ff3656,#ff3656),var(--tone-dc002f,#dc002f));box-shadow:0 8px 28px var(--tone-rgba25524692,rgba(255,24,69,.2))}.brand-mark svg{width:23px;fill:white}.brand strong,.brand small{display:block}.brand strong{font-size:15px}.brand small{margin-top:2px;color:var(--muted);font-size:11px}
.topbar-actions{display:flex;gap:8px}.page-link{height:38px;display:inline-flex;align-items:center;padding:0 14px;border:1px solid var(--line);border-radius:999px;color:#aeb4c0;text-decoration:none;font-size:12px;font-weight:750;background:rgba(255,255,255,.025)}.page-link.active{color:white;border-color:var(--tone-rgba255367335,rgba(255,36,73,.35));background:var(--tone-rgba255367309,rgba(255,36,73,.09))}
.hero{padding:72px 0 54px;text-align:center}.eyebrow{display:inline-flex;align-items:center;gap:8px;color:#b5bac5;font-size:11px;font-weight:750;letter-spacing:.13em}.eyebrow span{width:6px;height:6px;border-radius:99px;background:var(--red);box-shadow:0 0 14px var(--tone-rgba25536738,rgba(255,36,73,.8))}
.hero h1{max-width:820px;margin:17px auto 16px;font-size:clamp(48px,5.5vw,78px);line-height:.96;letter-spacing:-.055em}.hero h1 em{font-style:normal;color:transparent;-webkit-text-stroke:1px rgba(255,255,255,.52)}.hero>p{width:min(650px,100%);margin:0 auto;color:var(--muted);font-size:15px;line-height:1.7}
.search-box{width:min(830px,100%);height:70px;margin:32px auto 0;padding:7px;display:flex;align-items:center;gap:9px;border:1px solid var(--line2);border-radius:20px;background:rgba(18,21,30,.88);box-shadow:0 22px 70px rgba(0,0,0,.28);backdrop-filter:blur(18px)}.search-icon{width:48px;height:48px;display:grid;place-items:center;flex:0 0 auto}.search-icon svg{width:20px;fill:none;stroke:#6f7686;stroke-width:1.8;stroke-linecap:round}.search-box input{min-width:0;flex:1;height:100%;border:0;outline:0;background:transparent;color:var(--text);font-size:14px}.search-box input::placeholder{color:#5d6473}.search-box button{height:54px;display:inline-flex;align-items:center;gap:10px;padding:0 21px;border:0;border-radius:14px;background:linear-gradient(145deg,var(--tone-ff3153,#ff3153),var(--tone-e20034,#e20034));color:white;font-weight:750;cursor:pointer}.search-box button:disabled{opacity:.55}.search-box button svg{width:17px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.empty-state{min-height:290px;display:grid;place-items:center;align-content:center;text-align:center;border:1px dashed rgba(255,255,255,.09);border-radius:24px;background:rgba(255,255,255,.015)}.empty-icon{width:58px;height:58px;display:grid;place-items:center;border:1px solid var(--line);border-radius:18px;background:rgba(255,255,255,.025)}.empty-icon svg{width:25px;fill:none;stroke:#666d7d;stroke-width:1.4;stroke-linejoin:round}.empty-state h2{margin:17px 0 6px;font-size:18px}.empty-state p{margin:0;color:var(--muted);font-size:13px}
.workspace{display:grid;grid-template-columns:minmax(0,1.25fr) minmax(340px,.75fr);gap:14px}.panel{border:1px solid var(--line);background:linear-gradient(145deg,rgba(20,24,34,.84),rgba(13,16,23,.72));box-shadow:0 24px 80px rgba(0,0,0,.35);backdrop-filter:blur(18px);border-radius:24px}.chat-panel,.export-panel{padding:24px}.panel-head{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;margin-bottom:18px}.panel-kicker{color:#686f7e;font-size:9px;font-weight:800;letter-spacing:.13em}.panel-head h2,.export-panel h2{margin:5px 0 4px;font-size:23px;letter-spacing:-.03em}.panel-head p{margin:0;color:var(--muted);font-size:12px}.live-badge{padding:7px 9px;border-radius:8px;background:var(--red);font-size:10px;font-weight:850;letter-spacing:.08em;box-shadow:0 8px 22px var(--tone-rgba255367328,rgba(255,36,73,.28))}
.chat-frame-wrap{height:660px;overflow:hidden;border-radius:18px;border:1px solid var(--line);background:#0c0f16}.chat-frame-wrap iframe{width:100%;height:100%;border:0;display:block;background:#0c0f16}.export-panel>p{margin:0 0 20px;color:var(--muted);font-size:13px;line-height:1.6}.preview-box{border:1px solid var(--line);border-radius:18px;padding:16px;background:rgba(0,0,0,.2);margin-bottom:20px}.preview-head{display:flex;align-items:center;gap:8px;font-size:10px;font-weight:850;letter-spacing:.1em;color:#b8bec9;margin-bottom:15px}.live-dot{width:7px;height:7px;border-radius:50%;background:var(--red);box-shadow:0 0 12px var(--tone-rgba25536737,rgba(255,36,73,.7))}.preview-message{display:flex;gap:10px;align-items:flex-start;margin-top:12px}.avatar{width:28px;height:28px;border-radius:50%;background:linear-gradient(145deg,var(--tone-ff3153,#ff3153),var(--tone-7e1639,#7e1639));flex:0 0 auto}.avatar.blue{background:linear-gradient(145deg,#4f8fff,#21478a)}.preview-message strong{font-size:11px}.preview-message p{margin:2px 0 0;color:#9aa1ae;font-size:11px}.export-panel label{display:block;margin:0 0 7px;color:#7a8290;font-size:10px;font-weight:800;letter-spacing:.08em}.url-row{display:flex;gap:8px}.url-row input{min-width:0;flex:1;height:46px;border:1px solid var(--line);border-radius:12px;background:rgba(255,255,255,.03);padding:0 12px;color:#dfe3ea;font-size:11px;outline:0}.url-row button{border:1px solid var(--line);border-radius:12px;padding:0 14px;background:rgba(255,255,255,.045);color:white;font-size:11px;font-weight:800;cursor:pointer}.obs-settings{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:14px 0}.obs-settings div{padding:12px;border:1px solid var(--line);border-radius:12px;background:rgba(255,255,255,.025)}.obs-settings span,.obs-settings strong{display:block}.obs-settings span{color:#686f7e;font-size:9px;text-transform:uppercase;letter-spacing:.09em}.obs-settings strong{margin-top:4px;font-size:14px}.export-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px}.secondary-btn,.primary-btn{height:44px;display:inline-flex;align-items:center;justify-content:center;border-radius:12px;text-decoration:none;font-size:11px;font-weight:800;cursor:pointer}.secondary-btn{border:1px solid var(--line);background:rgba(255,255,255,.025);color:#d4d8e0}.primary-btn{border:0;background:linear-gradient(145deg,var(--tone-ff3153,#ff3153),var(--tone-e20034,#e20034));color:white}
.toast{position:fixed;right:22px;bottom:22px;width:min(420px,calc(100% - 44px));display:flex;align-items:flex-start;gap:12px;padding:15px;border:1px solid var(--tone-rgba255639325,rgba(255,63,93,.25));border-radius:15px;background:rgba(25,14,18,.96);box-shadow:0 24px 70px rgba(0,0,0,.38);transform:translateY(130%);opacity:0;transition:.25s ease;z-index:30}.toast.show{transform:translateY(0);opacity:1}.toast-icon{width:27px;height:27px;display:grid;place-items:center;border-radius:8px;background:var(--tone-rgba255367313,rgba(255,36,73,.13));color:var(--tone-ff5570,#ff5570);font-weight:850}.toast strong{display:block;font-size:12px}.toast p{margin:3px 0 0;color:#a0a5b0;font-size:11px;line-height:1.45}.toast button{margin-left:auto;border:0;background:transparent;color:#6e7482;font-size:21px;cursor:pointer}
@media(max-width:980px){.workspace{grid-template-columns:1fr}.chat-frame-wrap{height:600px}}
@media(max-width:640px){.shell{width:min(100% - 26px,1320px)}.topbar{height:72px}.brand small{display:none}.hero{padding:56px 0 42px}.hero h1{font-size:clamp(42px,13vw,62px)}.search-box{height:auto;display:grid;grid-template-columns:38px 1fr}.search-icon{width:38px;height:46px}.search-box input{height:46px}.search-box button{grid-column:1/-1;justify-content:center;height:48px}.chat-panel,.export-panel{padding:18px}.chat-frame-wrap{height:520px}.export-actions{grid-template-columns:1fr}.page-link{padding:0 10px;font-size:11px}}

/* API-rendered live chat */
.chat-frame-wrap{position:relative;display:flex;flex-direction:column;height:660px;overflow:hidden;border-radius:18px;border:1px solid var(--line);background:linear-gradient(180deg,#0a0d14,#090c12)}
.chat-bar{height:46px;flex:0 0 auto;display:flex;align-items:center;gap:8px;padding:0 15px;border-bottom:1px solid var(--line);background:rgba(255,255,255,.018);font-size:10px;letter-spacing:.09em}.chat-status{margin-left:auto;color:#6f7786;font-size:10px;font-weight:750;letter-spacing:.02em}
.chat-messages{min-height:0;flex:1;overflow-y:auto;padding:12px 12px 18px;scrollbar-width:thin;scrollbar-color:rgba(255,255,255,.12) transparent}.chat-messages::-webkit-scrollbar{width:7px}.chat-messages::-webkit-scrollbar-thumb{background:rgba(255,255,255,.12);border-radius:99px}
.chat-message{display:flex;gap:10px;align-items:flex-start;padding:9px 8px;border-radius:12px;transition:background .2s ease}.chat-message:hover{background:rgba(255,255,255,.025)}.chat-message.new{animation:chatIn .35s ease both}.chat-message.superchat{background:linear-gradient(90deg,rgba(255,185,40,.09),transparent);border:1px solid rgba(255,185,40,.12)}
.chat-avatar{width:32px;height:32px;flex:0 0 auto;border-radius:50%;overflow:hidden;display:grid;place-items:center;background:linear-gradient(145deg,#30394a,#1e2430);color:#dce2ec;font-size:11px;font-weight:850}.chat-avatar img{width:100%;height:100%;object-fit:cover;display:block}
.chat-content{min-width:0;flex:1}.chat-meta{display:flex;align-items:center;gap:6px;min-width:0}.chat-meta strong{max-width:55%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#dfe4ec;font-size:11px}.chat-content p{margin:3px 0 0;color:#bec4cf;font-size:12px;line-height:1.45;overflow-wrap:anywhere}
.role-badge{padding:2px 5px;border-radius:5px;font-size:7px;font-weight:900;letter-spacing:.06em}.role-badge.owner{background:var(--tone-rgba255367314,rgba(255,36,73,.14));color:var(--tone-ff7088,#ff7088)}.role-badge.mod{background:rgba(65,146,255,.14);color:#78b5ff}.role-badge.member{background:rgba(62,229,161,.13);color:#63eab0}.super-amount{margin-left:auto;color:#ffd46a;font-size:9px;font-weight:850}
.chat-empty{position:absolute;inset:47px 0 0;display:grid;place-items:center;align-content:center;text-align:center;pointer-events:none;padding:20px;color:#7f8796}.chat-empty.hidden{display:none!important}.chat-empty-icon{font-size:26px;filter:grayscale(1);opacity:.7}.chat-empty strong{margin-top:10px;color:#c7ccd5;font-size:13px}.chat-empty span{margin-top:5px;max-width:320px;font-size:11px;line-height:1.45}
@keyframes chatIn{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}
@media(max-width:980px){.chat-frame-wrap{height:600px}}@media(max-width:640px){.chat-frame-wrap{height:520px}}
