:root{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,sans-serif;line-height:1.5;font-weight:400;color:#1f2937;background-color:#f9fafb;font-synthesis:none;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}*{margin:0;padding:0;box-sizing:border-box}body{margin:0;min-width:320px;min-height:100vh}#root{width:100%;height:100vh}a{color:#3b82f6;text-decoration:none}a:hover{text-decoration:underline}button{font-family:inherit}::-webkit-scrollbar{width:6px;height:6px}::-webkit-scrollbar-track{background:transparent}::-webkit-scrollbar-thumb{background:#d1d5db;border-radius:3px}::-webkit-scrollbar-thumb:hover{background:#9ca3af}.chat-history{display:flex;flex-direction:column;height:100%;background:#f9fafb;border-right:1px solid #e5e7eb}.chat-history-header{display:flex;justify-content:space-between;align-items:center;padding:16px;border-bottom:1px solid #e5e7eb;background:#fff}.chat-history-title{font-size:14px;font-weight:600;color:#1f2937;margin:0}.new-chat-btn{display:flex;align-items:center;gap:6px;background:#3b82f6;color:#fff;border:none;padding:8px 12px;border-radius:8px;font-size:13px;font-weight:500;cursor:pointer;transition:background .2s ease}.new-chat-btn:hover{background:#2563eb}.chat-history-content{flex:1;overflow-y:auto;padding:12px;display:flex;flex-direction:column;gap:8px}.chat-session-item{display:flex;align-items:stretch;gap:12px;background:#fff;border:1px solid #e5e7eb;border-radius:8px;padding:12px;cursor:pointer;transition:all .2s ease}.chat-session-item:hover{border-color:#d1d5db;box-shadow:0 2px 4px #0000000d}.chat-session-item.active{border-color:#3b82f6;background:#eff6ff}.session-left{flex:1;min-width:0;display:flex;flex-direction:column;justify-content:center;gap:4px}.session-title{font-size:13px;font-weight:500;color:#1f2937;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.session-count{font-size:11px;color:#6b7280}.session-right{flex-shrink:0;display:flex;flex-direction:column;align-items:flex-end;justify-content:space-between;gap:4px}.session-time{font-size:11px;color:#9ca3af}.delete-btn{background:none;border:none;color:#9ca3af;padding:4px;border-radius:4px;cursor:pointer;transition:all .2s ease}.delete-btn:hover{background:#fee2e2;color:#dc2626}.empty-state{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;color:#9ca3af;text-align:center}.empty-icon{font-size:32px;margin-bottom:8px}.empty-state p{margin:0;font-size:14px}.empty-hint{font-size:12px!important;color:#d1d5db;margin-top:4px!important}.chat-input-container{display:flex;align-items:flex-end;gap:12px;padding:16px 20px;background:#fff;border-top:1px solid #e5e7eb}.chat-input{flex:1;padding:12px 16px;border:1px solid #e5e7eb;border-radius:12px;font-size:14px;line-height:1.5;resize:none;outline:none;font-family:inherit;min-height:44px;max-height:120px;background:#f9fafb}.chat-input:focus{border-color:#3b82f6;background:#fff}.chat-input:disabled{background:#f3f4f6;cursor:not-allowed}.chat-input::placeholder{color:#9ca3af}.send-btn{width:44px;height:44px;border-radius:12px;border:none;background:#3b82f6;color:#fff;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:background .2s ease;flex-shrink:0}.send-btn:hover:not(:disabled){background:#2563eb}.send-btn:disabled{background:#d1d5db;cursor:not-allowed}.chat-message{display:flex;gap:12px;padding:16px 20px}.chat-message.user{background:#f9fafb}.chat-message.assistant{background:#fff}.chat-message.system{background:#fef3c7}.message-avatar{width:36px;height:36px;border-radius:50%;background:#e5e7eb;display:flex;align-items:center;justify-content:center;font-size:18px;flex-shrink:0;position:relative}.chat-message.user .message-avatar{background:#dbeafe}.chat-message.assistant .message-avatar{width:38px;height:38px}.avatar-img{width:100%;height:100%;object-fit:cover;border-radius:50%}.message-avatar.ai-avatar{background:transparent;border-radius:0}.ai-avatar-img{width:100%;height:100%;object-fit:contain}.message-content{flex:1;min-width:0}.message-header{display:flex;align-items:center;gap:8px;margin-bottom:4px}.message-role{font-size:13px;font-weight:600;color:#1f2937}.message-time{font-size:11px;color:#9ca3af}.message-text{font-size:15px;color:#374151;line-height:1.6;word-break:break-word}.message-text ol,.message-text ul{padding-left:1.5em;margin:.5em 0}.message-text p{margin:.5em 0}.message-text p:first-child{margin-top:0}.message-text p:last-child{margin-bottom:0}.message-text table{width:100%;border-collapse:collapse;margin:1em 0;font-size:14px;overflow-x:auto;display:block}.message-text thead{background:#f3f4f6}.message-text th,.message-text td{border:1px solid #e5e7eb;padding:8px 12px;text-align:left;white-space:nowrap}.message-text th{font-weight:600;color:#374151}.message-text td{color:#4b5563}.message-text tr:nth-child(2n){background:#f9fafb}.message-text tr:hover{background:#f3f4f6}.message-text code{background:#f3f4f6;padding:2px 6px;border-radius:4px;font-family:Monaco,Menlo,monospace;font-size:13px;color:#e11d48}.message-text pre{background:#1f2937;color:#f9fafb;padding:12px 16px;border-radius:8px;overflow-x:auto;margin:1em 0}.message-text pre code{background:transparent;color:inherit;padding:0}.message-loading{display:inline-flex;gap:4px}.message-loading .dot{font-size:12px;color:#9ca3af;animation:loading-bounce 1.4s ease-in-out infinite}.message-loading .dot:nth-child(1){animation-delay:0s}.message-loading .dot:nth-child(2){animation-delay:.2s}.message-loading .dot:nth-child(3){animation-delay:.4s}@keyframes loading-bounce{0%,80%,to{opacity:.3;transform:translateY(0)}40%{opacity:1;transform:translateY(-4px)}}.message-error-detail{margin-top:12px;background:#fef2f2;border:1px solid #fecaca;border-radius:8px;padding:12px}.error-detail-header{margin-bottom:8px}.error-detail-type{font-size:11px;font-weight:600;color:#dc2626;background:#fee2e2;padding:2px 8px;border-radius:4px}.error-stack{font-size:12px;color:#991b1b;margin:0;white-space:pre-wrap;word-break:break-word;font-family:Monaco,Menlo,monospace;line-height:1.5}.chat-panel{display:flex;flex-direction:column;height:100%;background:#fff}.chat-panel-header{display:flex;justify-content:space-between;align-items:center;padding:16px 20px;border-bottom:1px solid #e5e7eb;background:#fff}.chat-panel-title{font-size:14px;font-weight:600;color:#1f2937;margin:0}.chat-messages{flex:1;overflow-y:auto;display:flex;flex-direction:column}.chat-empty{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;padding:40px;text-align:center}.chat-empty-icon{font-size:48px;margin-bottom:16px}.chat-empty h3{font-size:18px;font-weight:600;color:#1f2937;margin:0 0 12px}.chat-empty p{font-size:14px;color:#6b7280;margin:0 0 16px;max-width:320px;line-height:1.5}.chat-suggestions{list-style:none;padding:0;margin:0;text-align:left}.chat-suggestions li{font-size:13px;color:#3b82f6;padding:8px 12px;background:#eff6ff;border-radius:8px;margin-bottom:8px;cursor:default}.loading-indicator{display:flex;align-items:center;justify-content:center;gap:6px;padding:20px}.loading-dot{width:8px;height:8px;background:#3b82f6;border-radius:50%;animation:loading-bounce 1.4s ease-in-out infinite both}.loading-dot:nth-child(1){animation-delay:-.32s}.loading-dot:nth-child(2){animation-delay:-.16s}@keyframes loading-bounce{0%,80%,to{transform:scale(0)}40%{transform:scale(1)}}.header{display:flex;justify-content:space-between;align-items:center;padding:12px 20px;background:#fff;border-bottom:1px solid #e5e7eb;position:sticky;top:0;z-index:100}.header-left{display:flex;align-items:center;gap:12px}.header .logo{height:32px;width:auto}.header .title{font-size:18px;font-weight:600;color:#1f2937;margin:0}.header-right{display:flex;align-items:center;gap:12px}.session-badge{background:#eff6ff;color:#3b82f6;padding:4px 12px;border-radius:16px;font-size:13px;font-weight:500}*{box-sizing:border-box}.app{display:flex;flex-direction:column;height:100vh;background:#f9fafb}.main-content{display:flex;flex:1;overflow:hidden}.sidebar{width:360px;flex-shrink:0;overflow:hidden}.chat-section{flex:1;overflow:hidden}@media(max-width:768px){.main-content{flex-direction:column}.sidebar{width:100%;height:40%}.chat-section{height:60%}}
