*,*:before,*:after{box-sizing:border-box;margin:0;padding:0}:root{--bg: #0b0b10;--surface: #14141e;--surface2: #1c1c2a;--border: #252535;--accent: #c084fc;--accent-dim: #a855f730;--user-bg: #6d28d9;--text: #e8e8f0;--text-muted: #606080;--radius: 18px;--avatar-bg: #4f2da8}body{background:var(--bg);color:var(--text);font-family:PingFang SC,Hiragino Sans GB,Microsoft YaHei,system-ui,sans-serif;height:100dvh;display:flex;align-items:center;justify-content:center}.app-shell{width:100%;max-width:480px;height:100dvh;display:flex;flex-direction:column}.auth-panel{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:32px 28px;gap:28px}.auth-logo{display:flex;flex-direction:column;align-items:center;gap:10px;color:var(--accent)}.auth-logo h1{font-size:28px;font-weight:700;color:var(--text);letter-spacing:2px}.auth-logo p{font-size:13px;color:var(--text-muted)}.auth-tabs{display:flex;background:var(--surface2);border-radius:12px;padding:4px;width:100%;max-width:320px}.auth-tab{flex:1;padding:9px;border:none;background:none;color:var(--text-muted);border-radius:9px;font-size:14px;font-weight:500;cursor:pointer;transition:background .2s,color .2s}.auth-tab.active{background:var(--accent);color:#fff}.auth-form{width:100%;max-width:320px;display:flex;flex-direction:column;gap:16px}.field{display:flex;flex-direction:column;gap:7px}.field label{font-size:13px;color:var(--text-muted)}.field input{background:var(--surface2);border:1px solid var(--border);border-radius:12px;padding:12px 16px;color:var(--text);font-size:15px;outline:none;transition:border-color .2s}.field input:focus{border-color:var(--accent)}.field input::placeholder{color:var(--text-muted)}.auth-error{font-size:13px;color:#f87171;text-align:center}.auth-submit{width:100%;padding:13px;background:var(--accent);border:none;border-radius:12px;color:#fff;font-size:16px;font-weight:600;cursor:pointer;transition:opacity .2s;margin-top:4px}.auth-submit:disabled{opacity:.5;cursor:not-allowed}.auth-submit:not(:disabled):hover{opacity:.88}.chat-panel{display:flex;flex-direction:column;height:100%;background:var(--surface);border-left:1px solid var(--border);border-right:1px solid var(--border)}.chat-header{display:flex;align-items:center;justify-content:space-between;padding:14px 18px;border-bottom:1px solid var(--border);background:var(--surface);-webkit-backdrop-filter:blur(12px);backdrop-filter:blur(12px)}.avatar,.msg-avatar{width:38px;height:38px;border-radius:50%;background:var(--avatar-bg);color:#fff;font-size:14px;font-weight:700;display:flex;align-items:center;justify-content:center;flex-shrink:0}.msg-avatar{width:30px;height:30px;font-size:12px;align-self:flex-end;margin-bottom:2px}.brand{display:flex;align-items:center;gap:11px}.brand h1{font-size:16px;font-weight:600;color:var(--text)}.model-tag{font-size:11px;color:var(--accent);margin-top:2px}.header-actions{display:flex;align-items:center;gap:4px}.current-user{display:flex;align-items:center;gap:4px;font-size:12px;color:var(--text-muted);padding:4px 10px;background:var(--surface2);border-radius:20px;margin-right:4px}.icon-btn{background:none;border:none;color:var(--text-muted);cursor:pointer;padding:7px;border-radius:8px;transition:color .2s,background .2s;display:flex;align-items:center}.icon-btn:hover{color:var(--text);background:var(--surface2)}.messages{flex:1;overflow-y:auto;padding:20px 16px;display:flex;flex-direction:column;gap:14px;scroll-behavior:smooth}.message-row{display:flex;align-items:flex-end;gap:8px}.message-row.user{justify-content:flex-end}.message-row.assistant{justify-content:flex-start}.bubble{max-width:75%;padding:12px 16px;border-radius:var(--radius);line-height:1.65;font-size:15px;position:relative}.message-row.user .bubble{background:var(--user-bg);color:#fff;border-bottom-right-radius:4px}.message-row.assistant .bubble{background:var(--surface2);color:var(--text);border-bottom-left-radius:4px}.ts{display:block;font-size:10px;color:var(--text-muted);margin-top:5px;text-align:right;opacity:.8}.typing{display:flex;gap:5px;align-items:center;padding:14px 18px}.typing span{width:7px;height:7px;background:var(--accent);border-radius:50%;animation:bounce 1.2s infinite}.typing span:nth-child(2){animation-delay:.2s}.typing span:nth-child(3){animation-delay:.4s}.cursor{color:var(--accent);animation:cursor-blink 1s step-end infinite}@keyframes bounce{0%,80%,to{transform:translateY(0);opacity:.4}40%{transform:translateY(-6px);opacity:1}}@keyframes cursor-blink{0%,50%{opacity:1}51%,to{opacity:0}}.composer{display:flex;gap:8px;padding:14px 16px;border-top:1px solid var(--border)}.composer input{flex:1;background:var(--surface2);border:1px solid var(--border);border-radius:24px;padding:11px 18px;color:var(--text);font-size:15px;outline:none;transition:border-color .2s}.composer input:focus{border-color:var(--accent)}.composer input::placeholder{color:var(--text-muted)}.composer button{width:44px;height:44px;background:var(--accent);border:none;border-radius:50%;color:#fff;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:opacity .2s;flex-shrink:0}.composer button:disabled{opacity:.35;cursor:not-allowed}.composer button:not(:disabled):hover{opacity:.85}.messages::-webkit-scrollbar{width:4px}.messages::-webkit-scrollbar-track{background:transparent}.messages::-webkit-scrollbar-thumb{background:var(--border);border-radius:4px}
