:root{color-scheme:dark;--bg:#090a12;--panel:rgba(18,20,34,.72);--line:rgba(255,255,255,.09);--text:#f4f4fb;--muted:#9295aa;--purple:#a78bfa;--cyan:#6ee7f9;--glass:rgba(255,255,255,.045)}
*{box-sizing:border-box}html,body{margin:0;min-height:100%;background:var(--bg);color:var(--text);font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}body{overflow:hidden;background:radial-gradient(ellipse at 52% 40%,#17152d 0%,#0b0c16 45%,#080910 100%)}button,textarea{font:inherit}.ambient{position:fixed;pointer-events:none;filter:blur(90px);opacity:.2;border-radius:50%;z-index:0}.ambient-a{width:340px;height:340px;background:#6c3be8;top:-170px;left:24%}.ambient-b{width:300px;height:300px;background:#087f9b;bottom:-190px;right:4%}
.app-shell{position:relative;z-index:1;display:flex;width:100%;height:100dvh;min-height:500px}.rail{width:72px;flex:none;border-right:1px solid var(--line);background:rgba(9,10,18,.64);backdrop-filter:blur(24px);display:flex;align-items:center;flex-direction:column;padding:18px 0;gap:13px}.brand-mark{height:42px;width:42px;display:grid;place-items:center;text-decoration:none;margin-bottom:23px}.brand-glyph,.mini-glyph{font-weight:900;background:linear-gradient(135deg,#e0d6ff,#8c6aff 55%,#5de5ee);color:transparent;background-clip:text;-webkit-background-clip:text}.brand-glyph{font-size:34px;filter:drop-shadow(0 0 12px #8e6aff88)}.rail-button,.icon-button{border:1px solid transparent;color:#9295aa;background:transparent;display:grid;place-items:center;cursor:pointer;transition:.2s}.rail-button{width:42px;height:42px;border-radius:14px}.rail-button svg,.icon-button svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}.rail-button:hover,.rail-button.active{color:#eee9ff;background:linear-gradient(135deg,rgba(147,107,255,.2),rgba(83,214,237,.08));border-color:#9d7aff30}.rail-spacer{flex:1}.avatar,.message-avatar{display:grid;place-items:center;border-radius:50%;font-weight:700}.avatar{width:34px;height:34px;background:linear-gradient(135deg,#6146ad,#168da0);color:white;font-size:13px}
.main-panel{flex:1;min-width:0;display:flex;flex-direction:column;position:relative}.topbar{height:72px;flex:none;display:flex;align-items:center;justify-content:space-between;padding:0 clamp(18px,4vw,56px);border-bottom:1px solid var(--line);background:rgba(10,11,19,.36);backdrop-filter:blur(22px)}.top-brand{display:flex;align-items:center;gap:9px;font-size:15px;letter-spacing:.01em}.top-brand b{font-weight:700;color:#c7b7ff}.mini-glyph{font-size:25px}.version{font-size:9px;letter-spacing:.15em;color:#9c83e9;border:1px solid #a78bfa44;border-radius:5px;padding:3px 6px;margin-left:3px}.top-actions{display:flex;align-items:center;gap:16px}.connection{font-size:11px;color:#9ca0b5;display:flex;align-items:center;gap:7px}.connection i{width:6px;height:6px;border-radius:50%;background:#5be0ad;box-shadow:0 0 10px #5be0ad}.icon-button{width:34px;height:34px;border-radius:10px;font-size:22px}.icon-button:hover{background:var(--glass);color:white}
.chat-area{flex:1;overflow:auto;scrollbar-width:thin;scrollbar-color:#39344d transparent;padding:28px 20px 22px}.welcome{max-width:690px;margin:3vh auto 0;text-align:center}.orb-wrap{width:126px;height:126px;margin:0 auto 23px;position:relative;display:grid;place-items:center}.orb{width:76px;height:76px;border-radius:25px;transform:rotate(45deg);display:grid;place-items:center;background:linear-gradient(145deg,rgba(180,153,255,.27),rgba(45,201,225,.08));border:1px solid #b59aff66;box-shadow:0 0 45px #845cff36,inset 0 0 24px #8c75ff22}.orb span{transform:rotate(-45deg);font-size:43px;font-weight:900;background:linear-gradient(135deg,#e7ddff,#a38aff 55%,#65e9ef);color:transparent;background-clip:text;-webkit-background-clip:text}.orb-ring{position:absolute;border:1px solid #a78bfa35;border-radius:50%;inset:5px;animation:spin 18s linear infinite}.ring-two{inset:0 16px;border-color:#68ddeb30;transform:rotate(50deg);animation-direction:reverse}@keyframes spin{to{transform:rotate(360deg)}}.eyebrow{font-size:9px;letter-spacing:.22em;color:#9c8acb;margin-bottom:15px}.welcome h1{font-size:clamp(34px,5vw,52px);line-height:1.08;letter-spacing:-.055em;margin:0;font-weight:650}.welcome h1 span{background:linear-gradient(90deg,#b9a5ff,#79dce9);color:transparent;background-clip:text;-webkit-background-clip:text}.welcome-copy{font-size:14px;color:var(--muted);margin:15px 0 30px}.suggestions{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;text-align:left}.suggestion{display:flex;align-items:center;gap:11px;min-width:0;padding:14px 13px;border-radius:16px;border:1px solid var(--line);background:linear-gradient(145deg,rgba(255,255,255,.055),rgba(255,255,255,.018));color:var(--text);cursor:pointer;text-align:left;transition:.2s}.suggestion:hover{transform:translateY(-3px);border-color:#a78bfa66;background:rgba(133,103,221,.12)}.suggestion-icon{font-size:18px;color:#bba7ff}.suggestion b,.suggestion small{display:block}.suggestion b{font-size:11px;font-weight:600}.suggestion small{font-size:10px;color:var(--muted);margin-top:5px;white-space:nowrap}.suggestion-arrow{margin-left:auto;color:#777b91}.messages{max-width:820px;margin:0 auto}.message{display:flex;gap:14px;margin:28px 0;animation:appear .25s ease both}.message-avatar{width:30px;height:30px;flex:none;font-size:12px;background:linear-gradient(135deg,#5b469d,#286e83);color:#fff}.message-avatar.user{background:#29253c;color:#d6c8ff}.message-body{min-width:0;flex:1;padding-top:2px}.message-label{font-size:9px;letter-spacing:.16em;color:#9991bb;margin-bottom:8px;font-weight:700}.message-content{font-size:14px;line-height:1.75;color:#e4e4ef;overflow-wrap:anywhere}.message-content strong{color:#d8caff}.message-content pre{white-space:pre-wrap;background:#080912;border:1px solid var(--line);border-radius:10px;padding:13px;overflow:auto}.message-content code{font-family:ui-monospace,monospace;font-size:12px;color:#9ce8ef}.message.error .message-content{color:#ff9eae}.typing{display:flex;gap:5px;padding:8px 0}.typing i{width:6px;height:6px;border-radius:50%;background:#a78bfa;animation:pulse 1s infinite}.typing i:nth-child(2){animation-delay:.15s}.typing i:nth-child(3){animation-delay:.3s}@keyframes pulse{50%{opacity:.25;transform:translateY(-4px)}}@keyframes appear{from{opacity:0;transform:translateY(7px)}to{opacity:1;transform:none}}
.composer-wrap{width:min(820px,calc(100% - 40px));margin:0 auto;padding:0 0 max(16px,env(safe-area-inset-bottom));flex:none}.composer{border:1px solid #a78bfa38;border-radius:20px;background:rgba(25,25,42,.78);backdrop-filter:blur(25px);box-shadow:0 12px 50px #0004,0 0 25px #7551c511;padding:15px 16px 11px;transition:.2s}.composer:focus-within{border-color:#a78bfa80;box-shadow:0 12px 50px #0005,0 0 30px #7551c51c}.composer textarea{display:block;width:100%;resize:none;max-height:180px;min-height:30px;border:0;outline:0;background:transparent;color:var(--text);font-size:14px;line-height:1.5;padding:2px 1px}.composer textarea::placeholder{color:#777b91}.composer-bottom{display:flex;align-items:center;justify-content:space-between;margin-top:8px}.composer-hint{font-size:10px;color:#777b91}.sparkle{color:#b49cff;font-size:15px;margin-right:5px}.composer-controls{display:flex;align-items:center;gap:12px}.char-count{font-size:9px;color:#686c80}.send-button{width:35px;height:35px;border:0;border-radius:12px;background:linear-gradient(135deg,#a78bfa,#5bcfdf);color:#0b0b16;display:grid;place-items:center;cursor:pointer;transition:.2s}.send-button:disabled{opacity:.35;cursor:not-allowed}.send-button:not(:disabled):hover{transform:translateY(-2px);box-shadow:0 4px 18px #a78bfa55}.send-button svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}.footer-note{text-align:center;color:#626579;font-size:9px;margin-top:10px}
.history-panel{position:absolute;z-index:5;left:72px;top:72px;bottom:0;width:280px;padding:22px;background:rgba(17,18,30,.96);border-right:1px solid var(--line);backdrop-filter:blur(25px);transform:translateX(-110%);transition:.25s}.history-panel.open{transform:translateX(0)}.history-head{display:flex;align-items:center;justify-content:space-between;font-size:13px}.history-panel p,.history-empty{font-size:11px;color:var(--muted);line-height:1.6}.history-entry{display:block;width:100%;padding:11px;text-align:left;color:#dcd8ed;background:var(--glass);border:1px solid var(--line);border-radius:10px;font-size:11px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.toast{position:fixed;z-index:9;bottom:28px;left:50%;transform:translate(-50%,20px);opacity:0;pointer-events:none;padding:11px 16px;border-radius:12px;background:#292137;border:1px solid #a78bfa55;color:#f4edff;font-size:12px;transition:.25s}.toast.show{opacity:1;transform:translate(-50%,0)}
body.light{--bg:#f2f2f8;--text:#191829;--muted:#66677c;--line:rgba(30,25,60,.12);background:radial-gradient(ellipse at 52% 40%,#e5defa,#f4f4f8 65%)}body.light .rail,body.light .topbar{background:rgba(255,255,255,.65)}body.light .composer{background:rgba(255,255,255,.8)}body.light .message-content{color:#29283b}body.light .suggestion{background:#ffffffaa;color:#222}body.light .history-panel{background:#f5f3fc}
@media(max-width:650px){.rail{width:56px;padding:13px 0}.brand-mark{margin-bottom:12px}.rail-button{width:38px;height:38px}.topbar{height:60px;padding:0 15px}.connection{display:none}.chat-area{padding:18px 15px}.welcome{margin-top:5vh}.orb-wrap{transform:scale(.82);margin-bottom:10px}.welcome h1{font-size:39px}.welcome-copy{font-size:12px;margin:12px 0 23px}.suggestions{grid-template-columns:1fr;gap:8px;max-width:380px;margin:auto}.suggestion{padding:11px 13px}.suggestion small{white-space:normal}.composer-wrap{width:calc(100% - 24px)}.composer{border-radius:17px;padding:12px}.composer-hint{font-size:9px}.history-panel{left:56px;top:60px;width:min(280px,calc(100vw - 56px))}.message{gap:10px}.message-content{font-size:13px}}
