:root{
--bg:#f5f7fa;
--panel:#ffffff;
--panel2:#f0f2f5;
--text:#1a1a2e;
--muted:#8b949e;
--accent:#4f8cff;
--user:#1f6feb;
--assistant:#f0f2f5;
--border:#e1e4e8;
}
*{
box-sizing:border-box}
html,body,#app{
height:100%;
margin:0}
body{
background:var(--bg);
color:var(--text);
font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Noto Sans SC","PingFang SC","Microsoft Yahei",sans-serif;
font-size:15px;
line-height:1.6}
button{
font-family:inherit}
.hide{
display:none!important}
.login{
height:100%;
display:flex;
align-items:center;
justify-content:center;
padding:24px}
.login-card{
background:var(--panel);
padding:24px;
border-radius:12px;
width:100%;
max-width:360px;
border:1px solid var(--border);
box-shadow:0 4px 12px rgba(0,0,0,.1)}
.login-card h1{
margin:0 0 16px;
font-size:20px;
color:var(--text)}
.login-card input{
width:100%;
padding:10px 12px;
border-radius:8px;
border:1px solid var(--border);
background:var(--bg);
color:var(--text);
font-size:15px;
outline:none}
.login-card input:focus{
border-color:var(--accent)}
.login-card button{
margin-top:12px;
width:100%;
padding:10px;
border-radius:8px;
border:none;
background:var(--accent);
color:#fff;
font-size:15px;
cursor:pointer}
.login-err{
color:#ff6b6b;
margin-top:8px;
font-size:13px;
min-height:18px}
.layout{
height:100dvh;
display:flex}
.sidebar{
width:260px;
background:var(--panel);
border-right:1px solid var(--border);
display:flex;
flex-direction:column}
.sidebar-head{
padding:12px;
display:flex;
gap:8px}
.sidebar-head button{
flex:1;
padding:8px;
border-radius:8px;
border:1px solid var(--border);
background:var(--bg);
color:var(--text);
cursor:pointer}
.sidebar-head button.primary{
background:var(--accent);
border-color:var(--accent);
color:#fff}
.chat-list{
flex:1;
overflow:auto;
padding:0 8px 8px}
.chat-item{
position:relative;
padding:8px 10px;
border-radius:8px;
cursor:pointer;
display:flex;
align-items:center;
gap:6px;
color:var(--text);
margin-bottom:4px}
.chat-item:hover{
background:var(--panel2)}
.chat-item.active{
background:var(--panel2);
outline:1px solid var(--border)}
.chat-item .t{
flex:1;
overflow:hidden;
text-overflow:ellipsis;
white-space:nowrap;
font-size:14px}
.chat-menu-btn{
background:none;
border:none;
color:var(--muted);
cursor:pointer;
font-size:14px;
padding:2px 4px;
border-radius:4px;
opacity:.6;
transition:all .2s}
.chat-menu-btn:hover{
opacity:1;
background:var(--bg)}
.chat-menu{
position:absolute;
right:8px;
top:32px;
background:var(--panel);
border:1px solid var(--border);
border-radius:8px;
padding:4px;
box-shadow:0 4px 12px rgba(0,0,0,.15);
z-index:20;
min-width:100px;
display:none}
.chat-menu.show{
display:block}
.chat-menu-item{
padding:6px 10px;
border-radius:6px;
cursor:pointer;
font-size:13px;
color:var(--text);
transition:background .2s;
white-space:nowrap}
.chat-menu-item:hover{
background:var(--panel2)}
.chat-menu-item.delete{
color:#e74c3c}
.chat-menu-item.delete:hover{
background:#fff0f0}
.sidebar-foot{
padding:8px 12px;
border-top:1px solid var(--border);
font-size:12px;
color:var(--muted);
display:flex;
justify-content:space-between;
align-items:center}
.sidebar-foot button{
background:none;
border:none;
color:var(--muted);
cursor:pointer}
.sidebar-foot-links{
display:flex;
gap:8px;
align-items:center}
.sidebar-foot-links .icon-link{
display:flex;
align-items:center;
justify-content:center;
width:28px;
height:28px;
border-radius:6px;
color:var(--muted);
transition:all .2s}
.sidebar-foot-links .icon-link:hover{
background:var(--panel2);
color:var(--accent)}
.main{
flex:1;
display:flex;
flex-direction:column;
min-width:0;
min-height:0;
background:transparent}
.topbar{
padding:10px 14px;
border-bottom:1px solid var(--border);
display:flex;
align-items:center;
gap:8px;
background:var(--panel);
flex-shrink:0;
position:relative;
z-index:300}
.topbar .menu-btn{
display:inline-flex;
align-items:center;
justify-content:center;
width:32px;
height:32px;
background:none;
border:1.5px solid var(--border);
color:var(--text);
font-size:14px;
cursor:pointer;
padding:0;
border-radius:8px;
transition:all .2s}
.topbar .menu-btn:hover{
background:var(--bg);
border-color:var(--accent)}
.topbar select{
background:var(--bg);
color:var(--text);
border:1px solid var(--border);
border-radius:6px;
padding:6px 8px;
font-size:14px;
min-width:0}
.topbar #providerSel{
flex-shrink:0;
max-width:140px;
min-width:80px}
.topbar #refreshModelsBtn{
background:transparent;
border:1px solid var(--border);
color:var(--muted);
border-radius:6px;
padding:2px 6px;
font-size:14px;
cursor:pointer;
line-height:1}
.topbar #refreshModelsBtn:hover{
color:var(--text);
border-color:var(--primary)}
.topbar #refreshModelsBtn:disabled{
opacity:0.5;
cursor:not-allowed}
.topbar #checkModelBtn{
background:transparent;
border:1px solid var(--border);
color:var(--muted);
border-radius:6px;
padding:2px 6px;
font-size:14px;
cursor:pointer;
line-height:1}
.topbar #checkModelBtn:hover{
color:var(--accent);
border-color:var(--accent)}
.topbar #checkModelBtn:disabled{
opacity:0.5;
cursor:not-allowed}
.topbar #checkModelBtn.checking{
color:var(--accent);
animation:spin 1s linear infinite}
@keyframes spin{
from{
transform:rotate(0deg)}
to{
transform:rotate(360deg)}
}
.topbar #checkModelBtn.available{
color:#2ecc71;
border-color:#2ecc71}
.topbar #checkModelBtn.unavailable{
color:#e74c3c;
border-color:#e74c3c}
.topbar .title{
flex:1;
overflow:hidden;
text-overflow:ellipsis;
white-space:nowrap;
color:var(--muted);
font-size:13px}
.topbar-center{
position:absolute;
left:50%;
transform:translateX(-50%);
display:flex;
align-items:center;
gap:8px;
width:800px;
justify-content:center}
.topbar-center > *{
flex-shrink:0}
.topbar-center .model-search-dropdown{
flex:0 0 auto;
width:500px}
.messages{
flex:1;
overflow:auto;
padding:16px 32px;
padding-bottom:200px;
display:flex;
flex-direction:column;
gap:12px;
background:transparent;
align-items:center}
.messages-inner{
width:100%;
max-width:800px;
display:flex;
flex-direction:column;
gap:12px}
.bubble{
max-width:80%;
padding:10px 14px;
border-radius:14px;
word-wrap:break-word;
line-height:1.65}
.bubble.user{
align-self:flex-end;
background:var(--user);
color:#fff;
border-bottom-right-radius:4px;
white-space:pre-wrap}
.bubble.assistant{
align-self:flex-start;
background:var(--assistant);
color:var(--text);
border-bottom-left-radius:4px;
border:1px solid var(--border)}
.bubble.error{
background:#fff0f0;
color:#e74c3c;
align-self:flex-start;
border:1px solid #ffcdd2}
.search-failed-tip{
font-size:12px;
color:#8b949e;
margin-bottom:8px;
padding:6px 10px;
background:#fff8e6;
border:1px solid #ffd700;
border-radius:8px;
display:flex;
align-items:center;
gap:6px}
.thinking-dots{
display:inline-flex;
align-items:center;
gap:2px}
.thinking-dots .dot{
animation:thinkingBlink 1.4s infinite both;
font-weight:bold}
.thinking-dots .dot:nth-child(2){
animation-delay:.2s}
.thinking-dots .dot:nth-child(3){
animation-delay:.4s}
@keyframes thinkingBlink{
0%,80%,100%{
opacity:.3}
40%{
opacity:1}
}
.bubble pre{
background:#f6f8fa;
padding:10px;
border-radius:8px;
overflow:auto;
margin:8px 0;
border:1px solid var(--border)}
.bubble code{
background:#f6f8fa;
padding:1px 5px;
border-radius:4px;
font-size:13px;
color:#e83e8c}
.bubble pre code{
padding:0;
background:transparent}
.bubble pre{
position:relative}
.code-copy-btn{
position:absolute;
top:8px;
right:8px;
width:28px;
height:28px;
border:none;
border-radius:6px;
background:rgba(255,255,255,.9);
color:#666;
cursor:pointer;
display:flex;
align-items:center;
justify-content:center;
opacity:0;
transition:all .2s;
box-shadow:0 1px 3px rgba(0,0,0,.1)}
.bubble pre:hover .code-copy-btn{
opacity:1}
.code-copy-btn:hover{
background:#fff;
color:var(--accent);
box-shadow:0 2px 6px rgba(0,0,0,.15)}
.code-copy-btn.copied{
background:#2ecc71;
color:#fff;
opacity:1}
.bubble table{
border-collapse:collapse;
margin:8px 0;
width:100%}
.bubble th,.bubble td{
border:1px solid var(--border);
padding:6px 10px;
text-align:left}
.bubble th{
background:#f6f8fa;
font-weight:600}
.bubble em,.bubble i,.bubble cite,.bubble address,.bubble dfn{
font-style:normal}
.citation-link{
display:inline-flex;
align-items:center;
gap:3px;
background:rgba(79,140,255,.1);
color:var(--accent);
font-size:11px;
line-height:12px;
padding:2px 5px;
border-radius:10px;
text-decoration:none;
font-weight:600;
vertical-align:super;
transition:all .2s;
margin:0 2px}
.citation-link:hover{
background:rgba(79,140,255,.2);
transform:scale(1.05);
text-decoration:none}
.citation-icon{
width:12px;
height:12px;
border-radius:2px;
object-fit:cover;
mix-blend-mode:multiply}
.citation-num{
font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,sans-serif}
.composer{
position:fixed;
bottom:20px;
left:50%;
transform:translateX(-50%);
width:80%;
max-width:760px;
background:transparent;
z-index:10}
.composer.dragover .input-box{
outline:2px dashed var(--accent);
outline-offset:-2px}
.composer.dragover::after{
content:"松开上传";
position:absolute;
inset:16px;
display:flex;
align-items:center;
justify-content:center;
background:rgba(79,140,255,.15);
color:var(--accent);
font-size:16px;
font-weight:500;
border-radius:16px;
pointer-events:none;
z-index:10}
.input-box{
position:relative;
background:#ffffff;
border:1px solid #e1e4e8;
border-radius:16px;
padding:12px 16px;
padding-top:28px;
box-shadow:0 4px 20px rgba(0,0,0,.08);
transition:border-color .2s,box-shadow .2s}
.input-box:focus-within{
border-color:#4f8cff;
box-shadow:0 4px 24px rgba(79,140,255,.15)}
.input-box::before{
content:"";
position:absolute;
top:0;
left:0;
right:0;
height:8px;
cursor:row-resize;
z-index:5}
.composer-toggle{
position:absolute;
top:6px;
right:8px;
width:20px;
height:20px;
border:none;
background:transparent;
color:#8c959f;
cursor:pointer;
font-size:10px;
display:flex;
align-items:center;
justify-content:center;
transition:color .2s,transform .2s;
z-index:10;
border-radius:4px}
.composer-toggle:hover{
color:#57606a;
background:#f6f8fa}
.composer.collapsed .composer-toggle{
transform:rotate(180deg)}
.composer textarea{
width:100%;
resize:none;
min-height:24px;
max-height:200px;
padding:4px 0;
border:none;
background:transparent;
color:#24292f;
font-size:15px;
outline:none;
font-family:inherit;
line-height:1.5;
box-sizing:border-box}
.composer textarea::placeholder{
color:#8c959f}
.input-actions{
display:flex;
align-items:center;
gap:8px;
margin-top:8px;
padding-top:8px;
border-top:1px solid #f0f2f5}
.input-actions .left{
display:flex;
align-items:center;
gap:6px;
flex:1;
overflow:hidden}
.input-actions .right{
display:flex;
align-items:center;
gap:6px}
.input-actions button{
padding:6px 12px;
border:none;
border-radius:16px;
background:#f6f8fa;
color:#57606a;
cursor:pointer;
font-size:13px;
font-weight:500;
transition:all .2s;
display:flex;
align-items:center;
gap:4px}
.input-actions button:hover{
background:#f0f2f5;
color:#24292f}
.input-actions button.primary{
background:var(--accent);
color:#fff;
padding:6px 16px}
.input-actions button.primary:hover{
background:#3d7be8}
.input-actions button:disabled{
opacity:.5;
cursor:not-allowed}
.input-actions .icon-btn{
width:32px;
height:32px;
padding:0;
border-radius:50%;
justify-content:center;
font-size:16px}
#webSearchBtn{
color:#8c959f;
border:1px solid transparent}
#webSearchBtn:hover{
color:#4f8cff;
background:#f0f4ff;
border-color:#c8d8ff}
#webSearchBtn.active{
color:#fff;
background:#4f8cff;
border-color:#4f8cff;
box-shadow:0 0 0 3px rgba(79,140,255,.25)}
#sendBtn.stop-mode{
background:#e74c3c !important;
color:#fff !important}
#sendBtn.stop-mode:hover{
background:#c0392b !important}
.role-inline{
display:flex;
gap:4px;
overflow-x:auto;
scrollbar-width:none;
flex-shrink:0;
max-width:100%;
flex:1}
.role-inline::-webkit-scrollbar{
display:none}
.role-inline .role-btn{
flex-shrink:0;
padding:4px 10px;
border-radius:12px;
border:1px solid #e1e4e8;
background:#f6f8fa;
color:#57606a;
cursor:pointer;
font-size:12px;
display:flex;
align-items:center;
gap:4px;
transition:all .2s;
white-space:nowrap;
font-family:inherit}
.role-inline .role-btn:hover{
border-color:#4f8cff;
color:#4f8cff;
background:#fff}
.role-inline .role-btn.active{
background:#4f8cff;
color:#fff;
border-color:#4f8cff}
.role-btn{
flex-shrink:0;
padding:6px 12px;
border-radius:16px;
border:1px solid var(--border);
background:var(--panel2);
color:var(--text);
cursor:pointer;
font-size:13px;
display:flex;
align-items:center;
gap:4px;
transition:all .2s;
white-space:nowrap;
font-family:inherit}
.role-btn:hover{
border-color:var(--accent);
color:var(--accent)}
.role-btn.active{
background:var(--accent);
border-color:var(--accent);
color:#fff}
.role-btn.temp{
background:#ff9800;
border-color:#ff9800;
color:#fff}
.role-btn .badge{
font-size:10px;
background:rgba(255,255,255,0.3);
padding:0 4px;
border-radius:8px;
margin-left:2px}
@keyframes pulse{
0%,100%{
opacity:1}
50%{
opacity:0.7}
}
.role-add-btn{
width:28px;
height:28px;
padding:0;
border-radius:50%;
border:1px dashed var(--border);
background:transparent;
color:var(--muted);
cursor:pointer;
font-size:16px;
transition:all .2s}
.role-add-btn:hover{
border-color:var(--accent);
color:var(--accent)}
.role-modal-overlay{
position:fixed;
inset:0;
background:rgba(0,0,0,.5);
z-index:100;
display:flex;
align-items:center;
justify-content:center}
.role-modal{
background:var(--panel);
border:1px solid var(--border);
border-radius:12px;
padding:20px;
width:360px;
max-width:90vw;
max-height:80vh;
overflow-y:auto;
box-shadow:0 4px 20px rgba(0,0,0,.15)}
.role-modal h3{
margin:0 0 16px;
font-size:16px;
color:var(--text)}
.role-modal label{
display:block;
font-size:13px;
color:var(--muted);
margin-bottom:4px;
margin-top:12px}
.role-modal label:first-of-type{
margin-top:0}
.role-modal input,.role-modal textarea{
width:100%;
padding:8px 10px;
border-radius:8px;
border:1px solid var(--border);
background:var(--bg);
color:var(--text);
font-size:14px;
outline:none;
font-family:inherit}
.role-modal textarea{
min-height:80px;
resize:vertical}
.role-modal input:focus,.role-modal textarea:focus{
border-color:var(--accent)}
.role-modal .modal-btns{
display:flex;
gap:8px;
margin-top:16px;
justify-content:flex-end}
.role-modal .modal-btns button{
padding:6px 16px;
border-radius:8px;
border:none;
cursor:pointer;
font-size:13px;
font-family:inherit}
.role-modal .modal-btns .save{
background:var(--accent);
color:#fff}
.role-modal .modal-btns .cancel{
background:var(--panel2);
color:var(--text);
border:1px solid var(--border)}
.role-modal .modal-btns .del{
background:#e74c3c;
color:#fff;
margin-right:auto}
.composer .img-btn{
display:flex;
align-items:center;
justify-content:center;
width:40px;
height:40px;
padding:0;
border:none;
border-radius:20px;
background:#ffffff;
color:#24292f;
cursor:pointer;
font-size:16px;
flex-shrink:0;
border:1px solid #d0d7de;
transition:background .2s,border-color .2s}
.composer .img-btn:hover{
border-color:#4f8cff;
background:#f3f4f6}
.composer .img-btn input{
display:none}
.composer .btn-row{
display:flex;
align-items:center;
gap:8px;
justify-content:flex-end}
.composer-content{
display:flex;
flex-direction:column;
gap:8px;
width:100%}
.composer.collapsed .composer-content{
display:none}
.composer.collapsed{
padding:0 !important}
.composer.collapsed .input-box{
display:none}
.composer.collapsed::after{
content:"点击展开输入框";
display:flex;
align-items:center;
justify-content:center;
color:#6e7781;
font-size:13px;
padding:12px}
.img-preview{
display:flex;
flex-wrap:wrap;
gap:6px;
padding:6px 0;
max-width:100%}
.img-preview .thumb{
position:relative;
width:48px;
height:48px;
border-radius:6px;
overflow:hidden;
border:1px solid #d0d7de;
flex-shrink:0}
.img-preview .thumb img{
width:100%;
height:100%;
object-fit:cover}
.img-preview .thumb .rm{
position:absolute;
top:2px;
right:2px;
width:18px;
height:18px;
background:rgba(0,0,0,.6);
border:none;
border-radius:50%;
color:#fff;
font-size:12px;
cursor:pointer;
line-height:18px;
text-align:center}
.img-preview .file-item{
position:relative;
display:flex;
flex-direction:column;
align-items:center;
justify-content:center;
width:48px;
height:48px;
border-radius:6px;
overflow:hidden;
border:1px solid #d0d7de;
background:#ffffff;
padding:4px;
flex-shrink:0}
.img-preview .file-item .f-icon{
font-size:20px;
margin-bottom:2px}
.img-preview .file-item .f-name{
font-size:9px;
color:#6e7781;
text-align:center;
word-break:break-all;
max-width:100%;
overflow:hidden;
text-overflow:ellipsis;
white-space:nowrap}
.bubble img.msg-img{
max-width:200px;
max-height:200px;
border-radius:8px;
margin:6px 0;
display:block;
cursor:pointer}
.bubble img.msg-img:hover{
opacity:.85}
.bubble .att-card{
background:#f6f8fa;
border:1px solid #d0d7de;
border-radius:8px;
padding:8px 10px;
margin:6px 0;
font-size:13px}
.bubble .att-header{
display:flex;
align-items:center;
gap:6px;
margin-bottom:4px}
.bubble .att-icon{
font-size:16px}
.bubble .att-name{
font-weight:500;
color:#24292f;
word-break:break-all;
flex:1}
.bubble .att-preview{
background:#ffffff;
border:1px solid #e1e4e8;
border-radius:4px;
padding:6px 8px;
margin:4px 0;
font-size:12px;
line-height:1.5;
white-space:pre-wrap;
word-break:break-all;
max-height:120px;
overflow:hidden}
.bubble .att-binary{
color:#6e7781;
font-size:12px}
.att-view-btn{
padding:2px 8px;
border:1px solid #d0d7de;
border-radius:4px;
background:#ffffff;
color:#4f8cff;
font-size:11px;
cursor:pointer;
transition:background .2s}
.att-view-btn:hover{
background:#f0f4ff;
border-color:#4f8cff}
.file-modal{
display:none;
position:fixed;
inset:0;
z-index:100;
align-items:center;
justify-content:center}
.file-modal-backdrop{
position:absolute;
inset:0;
background:rgba(0,0,0,.5)}
.file-modal-content{
position:relative;
background:#ffffff;
border-radius:12px;
width:90%;
max-width:800px;
max-height:85vh;
display:flex;
flex-direction:column;
box-shadow:0 20px 60px rgba(0,0,0,.3)}
.file-modal-header{
display:flex;
align-items:center;
justify-content:space-between;
padding:16px 20px;
border-bottom:1px solid #e1e4e8}
.file-modal-title{
font-weight:600;
font-size:15px;
color:#24292f;
word-break:break-all}
.file-modal-close{
width:32px;
height:32px;
border:none;
border-radius:6px;
background:transparent;
color:#666;
font-size:20px;
cursor:pointer;
display:flex;
align-items:center;
justify-content:center;
transition:background .2s}
.file-modal-close:hover{
background:#f0f2f5}
.file-modal-body{
flex:1;
padding:20px;
margin:0;
overflow:auto;
font-size:13px;
line-height:1.6;
white-space:pre-wrap;
word-break:break-all;
background:#f6f8fa;
border-radius:0 0 12px 12px}
.bubble.user{
cursor:default}
.msg-row{
display:flex;
flex-direction:column;
margin-bottom:8px;
position:relative}
/* 引用消息样式 */.quote-box{
background:var(--panel2);
border-left:3px solid var(--accent);
padding:8px 12px;
margin-bottom:8px;
border-radius:0 8px 8px 0;
font-size:13px;
color:var(--muted);
max-height:80px;
overflow:hidden;
position:relative}
.quote-box::after{
content:"";
position:absolute;
bottom:0;
left:0;
right:0;
height:20px;
background:linear-gradient(transparent,var(--panel2))}
.quote-box .quote-author{
font-weight:600;
color:var(--text);
font-size:12px;
margin-bottom:4px}
.quote-box .quote-content{
color:var(--muted);
line-height:1.4;
display:-webkit-box;
display:-moz-box;
display:box;
-webkit-line-clamp:2;
-moz-line-clamp:2;
line-clamp:2;
-webkit-box-orient:vertical;
-moz-box-orient:vertical;
box-orient:vertical;
overflow:hidden}
.quote-close{
position:absolute;
top:4px;
right:4px;
width:18px;
height:18px;
border:none;
background:transparent;
color:var(--muted);
cursor:pointer;
font-size:14px;
display:flex;
align-items:center;
justify-content:center;
border-radius:4px}
.quote-close:hover{
background:var(--border);
color:var(--text)}
/* 分支对话标记 */.branch-indicator{
display:inline-flex;
align-items:center;
gap:4px;
font-size:11px;
color:var(--accent);
background:rgba(79,140,255,.1);
padding:2px 8px;
border-radius:10px;
margin-left:8px}
.branch-indicator svg{
width:12px;
height:12px}
.msg-actions{
display:flex;
gap:6px;
margin-top:4px;
opacity:0;
transition:opacity .2s}
.msg-row:hover .msg-actions{
opacity:1}
.msg-actions{
align-self:flex-end}
.msg-row:has(.bubble.assistant) .msg-actions{
align-self:flex-start}
.msg-action-btn{
display:flex;
align-items:center;
justify-content:center;
width:28px;
height:28px;
border:none;
border-radius:6px;
background:transparent;
color:#8c959f;
cursor:pointer;
transition:background .2s,color .2s}
.msg-action-btn:hover{
background:#f6f8fa;
color:#57606a}
.msg-action-btn.speaking{
color:#4f8cff;
animation:pulse 1.5s infinite}
@keyframes pulse{
0%,100%{
opacity:1}
50%{
opacity:.5}
}
.toast{
position:fixed!important;
bottom:80px;
left:50%;
transform:translateX(-50%) translateY(20px);
background:rgba(0,0,0,.85);
color:#fff;
padding:8px 14px;
border-radius:6px;
font-size:12px;
line-height:1.4;
opacity:0;
transition:opacity .2s,transform .2s;
pointer-events:none;
z-index:9999;
max-width:280px;
word-break:break-word;
box-shadow:0 4px 12px rgba(0,0,0,.2)}
.toast.show{
opacity:1;
transform:translateX(-50%) translateY(0)}
.edit-wrapper{
margin-bottom:8px}
.edit-box{
background:#ffffff;
border:1px solid #4f8cff;
border-radius:16px;
padding:12px 16px;
box-shadow:0 2px 8px rgba(79,140,255,.15)}
.edit-box textarea{
width:100%;
min-height:60px;
max-height:200px;
padding:4px 0;
border:none;
background:transparent;
color:#24292f;
font-size:15px;
outline:none;
resize:none;
font-family:inherit;
line-height:1.5}
.edit-attachments{
display:flex;
flex-wrap:wrap;
gap:6px;
margin-top:8px;
padding-top:8px;
border-top:1px solid #e1e4e8}
.edit-attachments img{
width:60px;
height:60px;
object-fit:cover;
border-radius:8px;
border:1px solid #e1e4e8}
.edit-attachment-item{
position:relative}
.edit-attachment-remove{
position:absolute;
top:-6px;
right:-6px;
width:18px;
height:18px;
border-radius:50%;
background:#ff4757;
color:#fff;
border:none;
font-size:12px;
line-height:18px;
text-align:center;
cursor:pointer;
opacity:0;
transition:opacity .2s}
.edit-attachment-item:hover .edit-attachment-remove{
opacity:1}
.edit-actions{
display:flex;
justify-content:flex-end;
gap:8px;
margin-top:12px;
padding-top:8px}
.edit-cancel-btn{
padding:6px 14px;
border:1px solid #d0d7de;
border-radius:8px;
background:#ffffff;
color:#24292f;
font-size:13px;
cursor:pointer;
transition:background .2s}
.edit-cancel-btn:hover{
background:#f6f8fa}
.edit-send-btn{
padding:6px 16px;
border:none;
border-radius:8px;
background:#4f8cff;
color:#fff;
font-size:13px;
cursor:pointer;
transition:background .2s}
.edit-send-btn:hover{
background:#3a7ce8}
@media (max-width: 768px){
.edit-box{
border-radius:12px;
padding:10px 12px}
.edit-box textarea{
font-size:16px;
min-height:80px}
.edit-attachments img{
width:50px;
height:50px}
}
.empty{
margin:auto;
color:var(--muted);
text-align:center;
font-size:14px}
/* 引用角标 */.citation{
display:inline-block;
min-width:14px;
height:14px;
line-height:14px;
text-align:center;
background:#e8f0fe;
color:#4f8cff;
font-size:10px;
border-radius:3px;
margin:0 1px;
padding:0 3px;
cursor:pointer;
vertical-align:super;
text-decoration:none;
font-weight:500}
.citation:hover{
background:#4f8cff;
color:#fff}
/* 来源栏 */.sources-bar{
margin-top:12px;
padding-top:10px;
border-top:1px solid #e1e4e8}
.sources-toggle{
display:inline-flex;
align-items:center;
gap:6px;
color:#57606a;
font-size:13px;
cursor:pointer;
padding:4px 8px;
border-radius:6px;
transition:background .2s}
.sources-toggle:hover{
background:#f6f8fa}
.sources-toggle svg{
color:#8c959f}
.sources-header{
display:inline-flex;
align-items:center;
gap:6px;
color:#57606a;
font-size:13px;
font-weight:500;
margin-bottom:8px}
.sources-header svg{
color:#8c959f;
flex-shrink:0}
.sources-list{
display:none;
margin-top:8px;
gap:8px;
flex-wrap:wrap}
.sources-bar.expanded .sources-list{
display:flex}
.sources-bar.expanded .sources-toggle{
color:#24292f}
.source-item{
display:flex;
align-items:center;
gap:6px;
padding:6px 10px;
background:#f6f8fa;
border:1px solid #d0d7de;
border-radius:8px;
text-decoration:none;
color:#24292f;
font-size:12px;
max-width:280px;
transition:background .2s,border-color .2s}
.source-item:hover{
background:#ffffff;
border-color:#4f8cff}
.source-num{
display:flex;
align-items:center;
justify-content:center;
min-width:18px;
height:18px;
background:#e8f0fe;
color:#4f8cff;
font-size:10px;
border-radius:3px;
font-weight:500;
flex-shrink:0}
.source-info{
display:flex;
flex-direction:column;
overflow:hidden;
flex:1;
min-width:0}
.source-title{
overflow:hidden;
text-overflow:ellipsis;
white-space:nowrap;
font-size:12px;
color:#24292f}
.source-meta{
display:flex;
gap:6px;
margin-top:2px;
font-size:11px;
color:#8c959f}
.source-domain{
overflow:hidden;
text-overflow:ellipsis;
white-space:nowrap}
.source-date{
flex-shrink:0}
.backdrop{
display:none;
position:fixed;
inset:0;
background:rgba(0,0,0,.4);
z-index:9}
/* 电脑端侧边栏默认展开 */@media (min-width: 769px){
.sidebar{
position:fixed;
left:0;
top:0;
bottom:0;
width:260px;
z-index:100;
transform:translateX(0);
transition:transform .25s ease}
.sidebar.collapsed{
transform:translateX(-260px)}
.main{
margin-left:260px;
transition:margin-left .25s ease}
.sidebar.collapsed ~ .main{
margin-left:0}
.composer{
left:calc(50% + 130px);
transform:translateX(-50%);
transition:left .25s ease,max-width .25s ease}
.sidebar.collapsed ~ .main .composer{
left:50%}
.backdrop.show{
display:none}
}
@media (max-width: 768px){
.sidebar{
position:fixed;
left:-280px;
top:0;
bottom:0;
width:260px;
z-index:400;
transition:left .25s ease}
.sidebar.open{
left:0}
.topbar{
position:fixed;
top:0;
left:0;
right:0;
width:100%;
z-index:300;
padding:8px 10px;
gap:6px;
background:var(--panel);
border-bottom:1px solid var(--border)}
.topbar .menu-btn{
width:40px;
height:40px;
font-size:18px}
.topbar #providerSel{
flex-shrink:0;
max-width:90px;
min-width:60px}
.topbar-center{
position:absolute;
left:60px;
right:10px;
transform:none;
gap:6px;
width:auto}
.topbar-center .model-search-dropdown{
width:auto;
flex:1 1 auto;
min-width:80px;
max-width:none}
.topbar .title{
display:none}
.backdrop.show{
display:block}
.bubble{
max-width:90%}
.messages{
padding:12px 16px}
.messages-inner{
max-width:100%}
.layout{
display:flex;
flex-direction:column;
height:100dvh}
.main{
flex:1;
display:flex;
flex-direction:column;
min-height:0;
overflow:hidden;
position:relative}
.messages{
flex:1;
overflow-y:auto;
padding:12px 8px;
padding-bottom:220px;
padding-top:60px;
-webkit-overflow-scrolling:touch;
scroll-padding-bottom:220px;
transition:padding-bottom .2s ease}
.messages.composer-collapsed{
padding-bottom:80px !important}
.composer{
position:fixed !important;
bottom:0;
left:0 !important;
right:0 !important;
transform:none !important;
width:100% !important;
max-width:100% !important;
margin:0 !important;
padding:8px 12px 24px;
background:#f5f7fa;
border-top:1px solid #e1e4e8;
transition:bottom .2s ease,box-shadow .2s ease}
.composer .input-box{
border-radius:12px;
padding:10px 12px;
padding-top:24px;
box-shadow:0 -2px 10px rgba(0,0,0,.05)}
.composer.keyboard-up{
bottom:0 !important;
box-shadow:0 -4px 20px rgba(0,0,0,.1) !important}
.composer.collapsed{
max-height:44px !important;
padding:8px 12px !important}
.composer.collapsed::after{
font-size:12px;
padding:0}
.composer-toggle{
top:4px !important;
right:6px !important;
width:18px;
height:18px;
font-size:9px}
.input-box{
border-radius:12px;
padding:10px 12px;
padding-top:24px}
.composer textarea{
min-height:24px;
font-size:16px}
.input-actions{
margin-top:6px;
padding-top:6px}
.input-actions button{
font-size:12px;
padding:5px 10px}
.input-actions .icon-btn{
width:28px;
height:28px}
#webSearchBtn{
width:28px;
height:28px;
padding:0}
.role-inline{
max-width:100%;
flex:1}
.role-inline .role-btn{
padding:3px 8px;
font-size:11px}
.role-selector{
padding:4px 0;
gap:4px}
.role-btn{
padding:4px 8px;
font-size:12px}
.role-add-btn{
width:24px;
height:24px;
font-size:12px}
.role-modal{
width:90vw;
padding:16px}
.msg-actions{
opacity:1}
.msg-action-btn{
width:32px;
height:32px}
}
