:root{--bg: #0f172a;--panel: #1e293b;--panel-2: #273449;--accent: #3b82f6;--accent-2: #2563eb;--text: #e2e8f0;--muted: #94a3b8;--border: #334155;--bubble-me: #2563eb;--bubble-other: #334155}*{box-sizing:border-box}html,body,#root{height:100%;margin:0}body{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,PingFang SC,Microsoft YaHei,sans-serif;background:var(--bg);color:var(--text)}button{cursor:pointer;font:inherit}input{font:inherit}.auth-wrap{height:100%;display:flex;align-items:center;justify-content:center;background:linear-gradient(135deg,#0f172a,#1e293b)}.auth-card{width:340px;background:var(--panel);padding:28px;border-radius:14px;border:1px solid var(--border);box-shadow:0 20px 60px #0006}.auth-card h1{margin:0 0 4px;font-size:22px}.auth-card p{margin:0 0 20px;color:var(--muted);font-size:13px}.auth-card input{width:100%;padding:11px 12px;margin-bottom:12px;border-radius:9px;border:1px solid var(--border);background:var(--panel-2);color:var(--text);outline:none}.auth-card input:focus{border-color:var(--accent)}.auth-card button{width:100%;padding:11px;border:none;border-radius:9px;background:var(--accent);color:#fff;font-weight:600}.auth-card button:hover{background:var(--accent-2)}.auth-switch{margin-top:14px;font-size:13px;color:var(--muted);text-align:center}.auth-switch span{color:var(--accent);cursor:pointer}.auth-err{color:#f87171;font-size:13px;margin-bottom:10px;min-height:16px}.auth-notice{color:#34d399;font-size:13px;margin-bottom:10px;min-height:16px}.app{display:grid;grid-template-columns:300px 1fr;height:100%}.sidebar{background:var(--panel);border-right:1px solid var(--border);display:flex;flex-direction:column;min-width:0}.sidebar-head{display:flex;align-items:center;justify-content:space-between;padding:14px 16px;border-bottom:1px solid var(--border)}.sidebar-head .me{font-weight:600}.sidebar-head button{background:transparent;border:1px solid var(--border);color:var(--muted);border-radius:8px;padding:5px 9px}.sidebar-head button:hover{color:var(--text);border-color:var(--accent)}.conv-list{overflow-y:auto;flex:1}.conv-item{padding:12px 16px;border-bottom:1px solid var(--border);cursor:pointer;display:flex;flex-direction:column;gap:3px}.conv-item:hover{background:var(--panel-2)}.conv-item.active{background:var(--panel-2);border-left:3px solid var(--accent);padding-left:13px}.conv-item .title{font-weight:600;font-size:14px}.conv-item .preview{color:var(--muted);font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.chat{display:flex;flex-direction:column;min-width:0;background:var(--bg)}.chat-empty{flex:1;display:flex;align-items:center;justify-content:center;color:var(--muted)}.chat-head{padding:14px 18px;border-bottom:1px solid var(--border);font-weight:600;display:flex;align-items:center;justify-content:space-between}.chat-head button{background:transparent;border:1px solid var(--border);color:var(--muted);border-radius:8px;padding:5px 9px}.messages{flex:1;overflow-y:auto;padding:18px;display:flex;flex-direction:column;gap:10px}.msg{max-width:70%;padding:9px 12px;border-radius:12px;font-size:14px;line-height:1.4;word-break:break-word}.msg.me{align-self:flex-end;background:var(--bubble-me);border-bottom-right-radius:3px}.msg.other{align-self:flex-start;background:var(--bubble-other);border-bottom-left-radius:3px}.msg .meta{font-size:11px;color:#fff9;margin-top:4px}.msg img{max-width:240px;border-radius:8px;display:block}.msg a.file{color:#bfdbfe;text-decoration:underline}.composer{display:flex;gap:8px;padding:12px 16px;border-top:1px solid var(--border);align-items:center}.composer input[type=text]{flex:1;padding:11px 12px;border-radius:10px;border:1px solid var(--border);background:var(--panel-2);color:var(--text);outline:none}.composer input[type=text]:focus{border-color:var(--accent)}.composer button.send{padding:11px 18px;border:none;border-radius:10px;background:var(--accent);color:#fff;font-weight:600}.composer label.attach{padding:11px 14px;border-radius:10px;border:1px solid var(--border);color:var(--muted);cursor:pointer}.composer label.attach:hover{color:var(--text);border-color:var(--accent)}.modal-mask{position:fixed;top:0;right:0;bottom:0;left:0;background:#00000080;display:flex;align-items:center;justify-content:center;z-index:10}.modal{width:380px;background:var(--panel);border:1px solid var(--border);border-radius:14px;padding:20px}.modal h3{margin:0 0 14px}.modal input[type=text]{width:100%;padding:10px 12px;margin-bottom:12px;border-radius:9px;border:1px solid var(--border);background:var(--panel-2);color:var(--text)}.user-row{display:flex;align-items:center;gap:10px;padding:8px;border-radius:8px;cursor:pointer}.user-row:hover{background:var(--panel-2)}.user-row.selected{background:var(--panel-2);outline:1px solid var(--accent)}.modal-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:8px}.modal-actions button{padding:9px 16px;border-radius:9px;border:1px solid var(--border);background:transparent;color:var(--text)}.modal-actions button.primary{background:var(--accent);border-color:var(--accent);color:#fff}
