:root{--bg-color-light:#f0f4f9;--text-color-light:#1f2937;--chat-bg-light:#fff;--user-message-bg-light:#e7f0fe;--bot-message-bg-light:#f8f9fa;--input-bg-light:#f8f9fa;--input-border-light:#dcdfe2;--icon-color-light:#5f6368;--secondary-text-light:#5f6368;--scrollbar-track-light:#e4e4e7;--scrollbar-thumb-light:#a8a29e;--scrollbar-thumb-hover-light:#78716c;--code-bg-light:#e5e7eb;--sidebar-bg-light:#f0f4f9;--sidebar-border-light:#e5e7eb;--sidebar-button-bg-hover-light:#d1d1d1;--sidebar-active-bg-light:#e5e7eb;--bg-color-dark:#131314;--text-color-dark:#e3e3e3;--chat-bg-dark:#1e1f20;--user-message-bg-dark:#2f3b4d;--bot-message-bg-dark:#2c2d2f;--input-bg-dark:#2c2d2f;--input-border-dark:#444746;--icon-color-dark:#bdc1c6;--secondary-text-dark:#9aa0a6;--scrollbar-track-dark:#27272a;--scrollbar-thumb-dark:#52525b;--scrollbar-thumb-hover-dark:#71717a;--code-bg-dark:#374151;--sidebar-bg-dark:#282a2c;--sidebar-border-dark:#374151;--sidebar-button-bg-hover-dark:#374151;--sidebar-active-bg-dark:#3f3f46}body.light-mode{background-color:var(--bg-color-light);color:var(--text-color-light)}.light-mode .chat-container,.light-mode .main-header,.light-mode .message-input-container{background-color:var(--chat-bg-light)}.light-mode .chat-message.user .message-bubble{background-color:var(--user-message-bg-light)}.light-mode .chat-message.bot .message-bubble{background-color:var(--bot-message-bg-light)}.light-mode .message-input{background-color:var(--input-bg-light);border-color:var(--input-border-light);color:var(--text-color-light)}.light-mode .icon-button,.light-mode .send-button{color:var(--icon-color-light)}.light-mode .helper-text{color:var(--secondary-text-light)}.light-mode #chat-container::-webkit-scrollbar-track,.light-mode #conversation-history::-webkit-scrollbar-track,.light-mode #message-input::-webkit-scrollbar-track{background:var(--scrollbar-track-light)}.light-mode #chat-container::-webkit-scrollbar-thumb,.light-mode #conversation-history::-webkit-scrollbar-thumb,.light-mode #message-input::-webkit-scrollbar-thumb{background-color:var(--scrollbar-thumb-light)}.light-mode #chat-container::-webkit-scrollbar-thumb:hover,.light-mode #conversation-history::-webkit-scrollbar-thumb:hover,.light-mode #message-input::-webkit-scrollbar-thumb:hover{background-color:var(--scrollbar-thumb-hover-light)}.light-mode .message-bubble pre{background-color:var(--code-bg-light)}.light-mode .sidebar{background-color:var(--sidebar-bg-light);border-right:1px solid var(--sidebar-border-light)}.light-mode .conversation-item:hover{background-color:var(--sidebar-button-bg-hover-light)}.light-mode .conversation-item.active{background-color:var(--sidebar-active-bg-light)}.light-mode .sidebar-footer-border{border-color:var(--sidebar-border-light)}.light-mode .sidebar-input{background-color:var(--input-bg-light);border-color:var(--input-border-light);color:var(--text-color-light)}.light-mode .edit-textarea{background-color:var(--bg-color-light)}.light-mode .cancel-edit-btn,.light-mode .edit-textarea{border:1px solid var(--input-border-light);color:var(--text-color-light)}.light-mode .cancel-edit-btn:hover{background-color:var(--bot-message-bg-light)}body.dark-mode{background-color:var(--bg-color-dark)}.dark-mode .app-name,.dark-mode .theme-switch,body.dark-mode{color:var(--text-color-dark)}.dark-mode .chat-container,.dark-mode .main-header,.dark-mode .message-input-container{background-color:var(--chat-bg-dark)}.dark-mode .chat-message.user .message-bubble{background-color:var(--user-message-bg-dark)}.dark-mode .chat-message.bot .message-bubble{background-color:var(--bot-message-bg-dark)}.dark-mode .message-input{background-color:var(--input-bg-dark);border-color:var(--input-border-dark);color:var(--text-color-dark)}.dark-mode .message-input::-moz-placeholder{color:var(--secondary-text-dark)}.dark-mode .message-input::placeholder{color:var(--secondary-text-dark)}.dark-mode .icon-button,.dark-mode .send-button{color:var(--icon-color-dark)}.dark-mode .helper-text{color:var(--secondary-text-dark)}.dark-mode #chat-container::-webkit-scrollbar-track,.dark-mode #conversation-history::-webkit-scrollbar-track,.dark-mode #message-input::-webkit-scrollbar-track{background:var(--scrollbar-track-dark)}.dark-mode #chat-container::-webkit-scrollbar-thumb,.dark-mode #conversation-history::-webkit-scrollbar-thumb,.dark-mode #message-input::-webkit-scrollbar-thumb{background-color:var(--scrollbar-thumb-dark)}.dark-mode #chat-container::-webkit-scrollbar-thumb:hover,.dark-mode #conversation-history::-webkit-scrollbar-thumb:hover,.dark-mode #message-input::-webkit-scrollbar-thumb:hover{background-color:var(--scrollbar-thumb-hover-dark)}.dark-mode .message-bubble pre{background-color:var(--code-bg-dark)}.dark-mode .sidebar{background-color:var(--sidebar-bg-dark);border-right:1px solid var(--sidebar-border-dark)}.dark-mode .conversation-item:hover{background-color:var(--sidebar-button-bg-hover-dark)}.dark-mode .conversation-item.active{background-color:var(--sidebar-active-bg-dark)}.dark-mode .sidebar-footer-border{border-color:var(--sidebar-border-dark)}.dark-mode .sidebar-input{background-color:var(--input-bg-dark);border-color:var(--input-border-dark);color:var(--text-color-dark)}.dark-mode .edit-textarea{background-color:var(--chat-bg-dark)}.dark-mode .cancel-edit-btn,.dark-mode .edit-textarea{border:1px solid var(--input-border-dark);color:var(--text-color-dark)}.dark-mode .cancel-edit-btn:hover{background-color:var(--bot-message-bg-dark)}.sidebar{flex-shrink:0;transition:transform .3s ease-in-out,width .3s ease-in-out,opacity .3s ease-in-out}@media (min-width:768px){.sidebar{width:280px;opacity:1;transform:translateX(0)}.sidebar-collapsed .sidebar{width:0;opacity:0;overflow:hidden;transform:translateX(-20px);pointer-events:none}}@media (max-width:767px){.sidebar{position:fixed;left:0;top:0;height:100%;z-index:50;width:280px;transform:translateX(-100%)}.sidebar.open{transform:translateX(0)}}.dark-mode .theme-switch .sun-icon{display:block}.dark-mode .theme-switch .moon-icon,.light-mode .theme-switch .sun-icon{display:none}.light-mode .theme-switch .moon-icon{display:block}#chat-container::-webkit-scrollbar,#conversation-history::-webkit-scrollbar,#message-input::-webkit-scrollbar{width:10px}#chat-container::-webkit-scrollbar-thumb,#conversation-history::-webkit-scrollbar-thumb,#message-input::-webkit-scrollbar-thumb{border-radius:10px;border:3px solid transparent;background-clip:content-box}#message-input::-webkit-scrollbar{width:8px}@keyframes pulse{0%,to{opacity:1}50%{opacity:.5}}.typing-indicator span{display:inline-block;width:8px;height:8px;border-radius:50%;background-color:currentColor;margin:0 2px;animation:pulse 1.4s ease-in-out infinite both}.typing-indicator span:first-child{animation-delay:-.32s}.typing-indicator span:nth-child(2){animation-delay:-.16s}textarea#message-input{line-height:1.5rem;min-height:1.75rem;transition:height .2s ease-in-out}textarea#message-input.enlarged{height:240px}.message-bubble h3{font-size:1.25rem;font-weight:600;margin-bottom:.5rem;margin-top:1rem}.message-bubble ul{list-style-type:disc;padding-left:1.5rem;margin-bottom:.5rem}.message-bubble li{margin-bottom:.25rem}.message-bubble pre{padding:1rem;border-radius:.5rem;margin-top:.5rem;overflow-x:auto;font-size:.9rem}.message-bubble code{font-family:Courier New,Courier,monospace}.message-bubble.streaming{-webkit-mask-image:linear-gradient(180deg,#000 70%,transparent);mask-image:linear-gradient(180deg,#000 70%,transparent);transition:-webkit-mask-image .4s ease-out,mask-image .4s ease-out}.message-bubble{-webkit-mask-image:linear-gradient(180deg,#000 100%,#000 0);mask-image:linear-gradient(180deg,#000 100%,#000 0)}.light-mode .main-area{background-color:var(--chat-bg-light)}.dark-mode .main-area{background-color:var(--chat-bg-dark)}.light-mode .api-key-modal-content{background-color:var(--chat-bg-light);color:var(--text-color-light)}.dark-mode .api-key-modal-content{background-color:var(--chat-bg-dark);color:var(--text-color-dark)}.light-mode .api-key-modal-content .api-key-text{color:var(--secondary-text-light)}.dark-mode .api-key-modal-content .api-key-text{color:var(--secondary-text-dark)}.light-mode .api-key-modal-content .api-key-input{background-color:var(--input-bg-light);border:1px solid var(--input-border-light);color:var(--text-color-light)}.dark-mode .api-key-modal-content .api-key-input{background-color:var(--input-bg-dark);border:1px solid var(--input-border-dark);color:var(--text-color-dark)}.message-actions{position:absolute;bottom:2px;right:8px;display:flex;align-items:center;gap:4px;opacity:0;transition:opacity .2s ease-in-out}.message-bubble:hover .message-actions{opacity:1}.message-actions button{border-radius:5px;padding:4px}.light-mode .message-actions button{background-color:rgba(0,0,0,.05);color:var(--icon-color-light)}.light-mode .message-actions button:hover{background-color:rgba(0,0,0,.1)}.dark-mode .message-actions button{background-color:hsla(0,0%,100%,.1);color:var(--icon-color-dark)}.dark-mode .message-actions button:hover{background-color:hsla(0,0%,100%,.2)}.edit-container{display:flex;flex-direction:column;width:100%}.edit-textarea{width:100%;min-height:80px;padding:8px;border-radius:6px;resize:vertical;margin-bottom:8px}.edit-actions{display:flex;justify-content:flex-end;gap:8px}.edit-actions button{padding:6px 12px;border-radius:6px;border:none;cursor:pointer;font-size:.875rem;font-weight:600}.save-edit-btn{background-color:#2563eb;color:#fff}.save-edit-btn:hover{background-color:#1d4ed8}.cancel-edit-btn{background-color:transparent}.welcome-container{height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:1rem}.light-mode .welcome-container{background-color:var(--chat-bg-light);color:var(--text-color-light)}.dark-mode .welcome-container{background-color:var(--chat-bg-dark);color:var(--text-color-dark)}.light-mode .sidebar-button:hover{background-color:var(--sidebar-button-bg-hover-light)}.light-mode .sidebar-button-destructive{color:#ef4444}.light-mode .sidebar-button-destructive:hover{background-color:#fee2e2;color:#b91c1c}.dark-mode .sidebar-button{border-color:transparent}.dark-mode .sidebar-button:hover{background-color:var(--sidebar-button-bg-hover-dark)}.dark-mode .sidebar-button-destructive{color:#f87171}.dark-mode .sidebar-button-destructive:hover{background-color:#450a0a;color:#fecaca}.light-mode .sidebar-button-functional{background-color:#3b82f6;color:#fff}.light-mode .sidebar-button-functional:hover{background-color:#2563eb}.dark-mode .sidebar-button-functional{background-color:#2563eb;color:#fff}.dark-mode .sidebar-button-functional:hover{background-color:#1d4ed8}@keyframes spinContinuous{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}.bot-logo-spin-active{animation:spinContinuous 1s linear infinite}@keyframes spinOnce{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}.bot-logo-spin-once{animation:spinOnce 1s ease-in-out forwards}@keyframes fadeInUp{0%{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}.message-fade-in{animation:fadeInUp .5s ease-in-out forwards}.menu-container{position:absolute;right:0;margin-top:.5rem;width:10rem;border-radius:.375rem;box-shadow:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -2px rgba(0,0,0,.1);z-index:10}.menu-button{display:block;width:100%;text-align:left;padding:.5rem 1rem;font-size:.875rem}.light-mode .menu-container{background-color:var(--chat-bg-light);border:1px solid var(--sidebar-border-light)}.light-mode .menu-button{color:var(--text-color-light)}.light-mode .menu-button:hover{background-color:var(--sidebar-button-bg-hover-light)}.light-mode .menu-button-destructive{color:#ef4444}.light-mode .menu-button-destructive:hover{color:#b91c1c;background-color:#fee2e2}.dark-mode .menu-container{background-color:var(--sidebar-bg-dark);border:1px solid var(--sidebar-border-dark)}.dark-mode .menu-button{color:var(--text-color-dark)}.dark-mode .menu-button:hover{background-color:var(--sidebar-button-bg-hover-dark)}.dark-mode .menu-button-destructive{color:#f87171}.dark-mode .menu-button-destructive:hover{color:#fecaca;background-color:#450a0a}.alert-backdrop{position:fixed;inset:0;display:flex;align-items:center;justify-content:center;background-color:rgba(0,0,0,.5);z-index:100;backdrop-filter:blur(4px)}.alert-container{position:relative;padding:1.5rem;border-radius:1rem;max-width:500px;width:90%;box-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -2px rgba(0,0,0,.05);display:flex;flex-direction:column;gap:.75rem}.alert-title{font-size:1.25rem;font-weight:600;text-align:center}.alert-content{text-align:center;max-width:420px;margin:0 auto}.alert-close-button{position:absolute;top:.5rem;right:.5rem;background:transparent;border:none;font-size:1.5rem;cursor:pointer;padding:.25rem;line-height:1;border-radius:9999px;width:2rem;height:2rem;align-items:center;transition:background-color .2s}.alert-actions,.alert-close-button{display:flex;justify-content:center}.alert-actions{margin-top:1rem}.alert-confirm-button{border:none;cursor:pointer;padding:.5rem 1.25rem;border-radius:9999px;font-weight:500;font-size:.875rem;transition:background-color .2s;display:flex;align-items:center;justify-content:center;gap:.5rem}.light-mode .alert-container{background-color:var(--bg-color-light);color:var(--text-color-light)}.light-mode .alert-title{color:#ef4444}.light-mode .alert-close-button{color:var(--icon-color-light)}.light-mode .alert-close-button:hover{background-color:rgba(0,0,0,.1)}.light-mode .alert-confirm-button{color:#ef4444}.light-mode .alert-confirm-button:hover{color:#b91c1c;background-color:#fee2e2}.dark-mode .alert-container{background-color:var(--bg-color-dark);color:var(--text-color-dark)}.dark-mode .alert-title{color:#f87171}.dark-mode .alert-close-button{color:var(--icon-color-dark)}.dark-mode .alert-close-button:hover{background-color:hsla(0,0%,100%,.1)}.dark-mode .alert-confirm-button{color:#f87171}.dark-mode .alert-confirm-button:hover{color:#fecaca;background-color:#450a0a}.report-block-wrapper{margin-top:1rem;margin-bottom:1rem}.report-block-container{overflow:hidden;border-radius:.5rem;--tw-shadow:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -2px rgba(0,0,0,.1);--tw-shadow-colored:0 4px 6px -1px var(--tw-shadow-color),0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.report-block-header{display:flex;align-items:center;justify-content:space-between;padding:1.25rem 1rem}@media (min-width:640px){.report-block-header{padding-left:1.5rem;padding-right:1.5rem}}.report-divider{border-top-width:1px}@media (min-width:640px){.report-divider-fields>:not([hidden])~:not([hidden]){--tw-divide-y-reverse:0;border-top-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)));border-bottom-width:calc(1px * var(--tw-divide-y-reverse))}}.report-text-title{font-size:1.125rem;font-weight:500;line-height:1.5rem}.report-text-subtitle{margin-top:.25rem;max-width:42rem;font-size:.875rem;line-height:1.25rem}.report-field-grid{padding:.75rem 1rem}@media (min-width:640px){.report-field-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:1rem;padding-left:1.5rem;padding-right:1.5rem}}.report-label{font-weight:500}.report-label,.report-value{font-size:.875rem;line-height:1.25rem}.report-value{margin-top:.25rem}@media (min-width:640px){.report-value{grid-column:span 2/span 2;margin-top:0}}.light-mode .report-block-container{background-color:var(--bot-message-bg-light);border:1px solid var(--input-border-light)}.light-mode .report-divider,.light-mode .report-divider-fields{border-color:var(--input-border-light)}.light-mode .report-text-title,.light-mode .report-value{color:var(--text-color-light)}.light-mode .report-label,.light-mode .report-text-subtitle{color:var(--secondary-text-light)}.light-mode .report-field-grid{border-color:var(--input-border-light)}.dark-mode .report-block-container{background-color:var(--bot-message-bg-dark);border:1px solid var(--input-border-dark)}.dark-mode .report-divider,.dark-mode .report-divider-fields{border-color:var(--input-border-dark)}.dark-mode .report-text-title,.dark-mode .report-value{color:var(--text-color-dark)}.dark-mode .report-label,.dark-mode .report-text-subtitle{color:var(--secondary-text-dark)}.dark-mode .report-field-grid{border-color:var(--input-border-dark)}