*{box-sizing:border-box;margin:0;padding:0}body,html,#root{height:100%;font-family:-apple-system,Segoe UI,PingFang SC,sans-serif}.app{background:#f4f5f7;height:100vh;display:flex}.sidebar{background:#fff;border-right:1px solid #e0e0e0;flex-direction:column;width:300px;display:flex}.sidebar-header{border-bottom:1px solid #eee;gap:6px;padding:12px;display:flex}.sidebar-header input{border:1px solid #ccc;border-radius:4px;outline:none;flex:1;padding:6px 8px}.sidebar-header input:focus{border-color:#4a90e2}.sidebar-header button{color:#fff;cursor:pointer;background:#4a90e2;border:none;border-radius:4px;padding:6px 12px}.sidebar-header button:hover{background:#3b7dcf}.conv-list{flex:1;overflow-y:auto}.conv-item{cursor:pointer;border-bottom:1px solid #f0f0f0;justify-content:space-between;align-items:center;gap:8px;padding:10px 12px;display:flex}.conv-item:hover{background:#f9f9f9}.conv-item.active{background:#eaf2fc}.conv-info{overflow:hidden}.conv-title{white-space:nowrap;text-overflow:ellipsis;font-size:14px;font-weight:500;overflow:hidden}.conv-time{color:#888;margin-top:2px;font-size:11px}.del-btn{color:#c00;cursor:pointer;opacity:0;background:0 0;border:none;font-size:12px;transition:opacity .15s}.conv-item:hover .del-btn{opacity:1}.main{flex-direction:column;flex:1;min-width:0;display:flex}.main-header{background:#fff;border-bottom:1px solid #e0e0e0;align-items:center;gap:10px;padding:12px 16px;font-weight:600;display:flex}.conv-id{color:#999;font-size:12px;font-weight:400}.messages{flex:1;padding:16px;overflow-y:auto}.msg{background:#fff;border:1px solid #e8e8e8;border-radius:6px;margin-bottom:12px;padding:10px 12px}.msg-meta{color:#888;align-items:center;gap:10px;margin-bottom:6px;font-size:12px;display:flex}.msg-meta .role{font-weight:600}.msg.role-user .role{color:#4a90e2}.msg.role-assistant .role{color:#2ca02c}.msg.role-system .role{color:#aa7300}.msg-content{white-space:pre-wrap;word-break:break-word;font-size:14px;line-height:1.6}.link{color:#4a90e2;cursor:pointer;background:0 0;border:none;margin-left:auto;padding:0;font-size:12px}.link.danger{color:#c00;margin-left:4px}.link:hover{text-decoration:underline}.composer{background:#fff;border-top:1px solid #e0e0e0;align-items:stretch;gap:8px;padding:12px;display:flex}.composer select{background:#fff;border:1px solid #ccc;border-radius:4px;padding:6px}.composer textarea{resize:none;border:1px solid #ccc;border-radius:4px;outline:none;flex:1;height:70px;padding:8px;font-family:inherit;font-size:14px}.composer textarea:focus{border-color:#4a90e2}.composer button{color:#fff;cursor:pointer;background:#4a90e2;border:none;border-radius:4px;padding:0 20px}.composer button:hover{background:#3b7dcf}.empty{color:#999;text-align:center;padding:24px;font-size:14px}.empty.large{padding:60px}.msg-edit{margin-top:4px}.edit-area{resize:vertical;box-sizing:border-box;border:1px solid #4a90e2;border-radius:4px;outline:none;width:100%;min-height:80px;padding:8px;font-family:inherit;font-size:14px;line-height:1.6}.edit-actions{justify-content:flex-end;align-items:center;gap:8px;margin-top:6px;display:flex}.edit-actions .hint{color:#999;margin-right:auto;font-size:12px}.btn-primary,.btn-secondary{cursor:pointer;border:1px solid #0000;border-radius:4px;padding:4px 12px;font-size:13px}.btn-primary{color:#fff;background:#4a90e2;border-color:#4a90e2}.btn-primary:hover{background:#3b7dcf}.btn-secondary{color:#333;background:#fff;border-color:#ccc}.btn-secondary:hover{background:#f5f5f5}.msg-content{cursor:text}.status-badge{border-radius:12px;align-items:center;gap:6px;margin-left:auto;padding:3px 10px;font-size:12px;font-weight:400;display:inline-flex}.status-badge.idle{color:#2ca02c;background:#e8f5e9}.status-badge.loading{color:#856404;background:#fff3cd}.status-badge.sending{color:#4a90e2;background:#eaf2fc}.thinking-bubble{color:#666;background:#fff;border:1px solid #e8e8e8;border-radius:6px;align-items:center;gap:10px;margin-bottom:12px;padding:10px 14px;font-size:13px;display:inline-flex}.thinking-text{font-style:italic}.dots{gap:4px;display:inline-flex}.dots span{background:#4a90e2;border-radius:50%;width:6px;height:6px;animation:1.2s ease-in-out infinite dot-bounce}.dots span:nth-child(2){animation-delay:.2s}.dots span:nth-child(3){animation-delay:.4s}@keyframes dot-bounce{0%,80%,to{opacity:.4;transform:translateY(0)}40%{opacity:1;transform:translateY(-6px)}}.dot-spinner{border:2px solid #4a90e2;border-top-color:#0000;border-radius:50%;width:8px;height:8px;animation:.8s linear infinite spin}.btn-loading{align-items:center;gap:6px;display:inline-flex}.spinner{border:2px solid #fff;border-top-color:#0000;border-radius:50%;width:12px;height:12px;animation:.8s linear infinite spin}@keyframes spin{to{transform:rotate(360deg)}}.composer.disabled{opacity:.85}.composer textarea:disabled,.composer button:disabled,.composer select:disabled{cursor:not-allowed;background:#f7f7f7}.composer button:disabled{background:#8fb7e0}
