279 lines
6.6 KiB
CSS
279 lines
6.6 KiB
CSS
/* 运行模式动画 —— 共享样式(主页与 anim-demo 共用)
|
||
token(--text-1 等)由宿主页面提供。 */
|
||
|
||
/* ───────── 动画容器:透明无框,浮在背景上 ───────── */
|
||
|
||
.anim-window {
|
||
position: relative;
|
||
width: 100%;
|
||
height: 100%;
|
||
display: flex;
|
||
flex-direction: column;
|
||
overflow: hidden;
|
||
}
|
||
|
||
/* 顶部模式切换 */
|
||
.anim-topbar {
|
||
display: flex;
|
||
gap: 2px;
|
||
padding: 0 2px 12px;
|
||
flex: none;
|
||
}
|
||
|
||
.anim-mode-tab {
|
||
height: 26px;
|
||
padding: 0 13px;
|
||
border: 0;
|
||
border-radius: 6px;
|
||
background: transparent;
|
||
color: var(--text-3);
|
||
font-size: 12.5px;
|
||
font-family: inherit;
|
||
cursor: pointer;
|
||
transition: background-color 0.25s ease, color 0.25s ease;
|
||
}
|
||
.anim-mode-tab:hover { color: var(--text-2); }
|
||
.anim-mode-tab.is-active {
|
||
background: rgba(169, 194, 240, 0.14);
|
||
color: var(--accent-strong);
|
||
}
|
||
|
||
/* ───────── 消息区 ───────── */
|
||
|
||
.anim-chat {
|
||
flex: 1;
|
||
padding: 4px 2px;
|
||
display: flex;
|
||
flex-direction: column;
|
||
gap: 10px;
|
||
overflow: hidden;
|
||
}
|
||
|
||
/* 入场:上浮淡入 */
|
||
.anim-item {
|
||
animation: anim-in 0.32s cubic-bezier(0.22, 0.9, 0.3, 1) both;
|
||
}
|
||
@keyframes anim-in {
|
||
from { opacity: 0; transform: translateY(8px); }
|
||
to { opacity: 1; transform: translateY(0); }
|
||
}
|
||
|
||
/* 用户气泡:右侧 */
|
||
.msg-user {
|
||
align-self: flex-end;
|
||
max-width: 78%;
|
||
background: var(--accent);
|
||
color: #0c1120;
|
||
font-size: 13px;
|
||
line-height: 1.5;
|
||
padding: 8px 12px;
|
||
border-radius: 12px 12px 4px 12px;
|
||
}
|
||
|
||
/* AI 消息:裸文字,无气泡 */
|
||
.msg-ai {
|
||
align-self: flex-start;
|
||
max-width: 92%;
|
||
color: var(--text-1);
|
||
font-size: 13px;
|
||
line-height: 1.65;
|
||
}
|
||
|
||
/* 打字光标 */
|
||
.type-caret {
|
||
display: inline-block;
|
||
width: 7px;
|
||
height: 14px;
|
||
margin-left: 2px;
|
||
vertical-align: -2px;
|
||
background: var(--accent);
|
||
animation: caret-blink 0.8s steps(1) infinite;
|
||
}
|
||
@keyframes caret-blink { 50% { opacity: 0; } }
|
||
|
||
/* 思考:只有三点动画,无文字 */
|
||
.think-row {
|
||
align-self: flex-start;
|
||
display: flex;
|
||
align-items: center;
|
||
padding: 6px 0;
|
||
}
|
||
.think-dots { display: inline-flex; gap: 5px; }
|
||
.think-dots i {
|
||
width: 6px; height: 6px;
|
||
border-radius: 50%;
|
||
background: var(--text-2);
|
||
animation: think-wave 1.2s ease-in-out infinite;
|
||
}
|
||
.think-dots i:nth-child(2) { animation-delay: -0.2s; }
|
||
.think-dots i:nth-child(3) { animation-delay: -0.4s; }
|
||
@keyframes think-wave {
|
||
0%, 100% { transform: translateY(0); opacity: 0.5; }
|
||
50% { transform: translateY(-4px); opacity: 1; }
|
||
}
|
||
|
||
/* ───────── 工具摘要行(主对话极简模式风格) ─────────
|
||
一行:状态图标 + intent + 关键参数;无框无底,不显示工具名 */
|
||
.tool-line {
|
||
align-self: stretch;
|
||
display: flex;
|
||
align-items: baseline;
|
||
gap: 8px;
|
||
padding: 3px 0;
|
||
font-size: 12.5px;
|
||
line-height: 1.5;
|
||
min-width: 0;
|
||
}
|
||
.tool-status {
|
||
flex: none;
|
||
width: 13px;
|
||
display: inline-flex;
|
||
align-items: center;
|
||
align-self: center;
|
||
justify-content: center;
|
||
/* 状态图标在行尾:左侧是 intent+参数 */
|
||
order: 3;
|
||
margin-left: auto;
|
||
}
|
||
/* 运行中:转圈 */
|
||
.tool-line.is-running .tool-status::before {
|
||
content: "";
|
||
width: 9px; height: 9px;
|
||
border-radius: 50%;
|
||
border: 1.6px solid rgba(168, 180, 210, 0.3);
|
||
border-top-color: var(--accent);
|
||
animation: tool-spin 0.7s linear infinite;
|
||
}
|
||
@keyframes tool-spin { to { transform: rotate(360deg); } }
|
||
/* 完成:对勾 */
|
||
.tool-line.is-done .tool-status::before {
|
||
content: "✓";
|
||
color: var(--ok);
|
||
font-size: 11.5px;
|
||
font-weight: 700;
|
||
}
|
||
.tool-intent {
|
||
color: var(--text-1);
|
||
flex: none;
|
||
}
|
||
.tool-param {
|
||
font-family: var(--font-mono);
|
||
font-size: 11.5px;
|
||
color: var(--text-3);
|
||
white-space: nowrap;
|
||
overflow: hidden;
|
||
text-overflow: ellipsis;
|
||
min-width: 0;
|
||
}
|
||
.tool-line.is-done .tool-intent { color: var(--text-2); }
|
||
|
||
/* ───────── 计划展示:无卡片,裸内容 ───────── */
|
||
|
||
.plan-body {
|
||
align-self: stretch;
|
||
padding: 2px 0 0;
|
||
}
|
||
.plan-title {
|
||
font-size: 13.5px;
|
||
font-weight: 620;
|
||
color: var(--text-1);
|
||
margin-bottom: 6px;
|
||
min-height: 20px;
|
||
}
|
||
.plan-item {
|
||
display: flex;
|
||
gap: 8px;
|
||
font-size: 12.5px;
|
||
color: var(--text-2);
|
||
line-height: 1.6;
|
||
padding: 1.5px 0;
|
||
}
|
||
.plan-item b {
|
||
color: var(--text-3);
|
||
font-weight: 500;
|
||
font-family: var(--font-mono);
|
||
font-size: 11.5px;
|
||
margin-top: 1px;
|
||
flex: none;
|
||
}
|
||
.plan-actions {
|
||
margin-top: 12px;
|
||
display: flex;
|
||
gap: 10px;
|
||
max-height: 40px;
|
||
overflow: hidden;
|
||
}
|
||
.plan-actions.is-gone {
|
||
/* 与输入栏同理:transition 与入场动画 fill 同帧交互不可靠,退场统一用 keyframes */
|
||
animation: plan-actions-out 0.35s ease both;
|
||
}
|
||
@keyframes plan-actions-out {
|
||
from { opacity: 1; max-height: 40px; margin-top: 12px; }
|
||
to { opacity: 0; max-height: 0; margin-top: 0; }
|
||
}
|
||
.plan-btn {
|
||
height: 30px;
|
||
padding: 0 16px;
|
||
border-radius: 7px;
|
||
border: 1px solid var(--line);
|
||
background: transparent;
|
||
color: var(--text-2);
|
||
font-size: 12.5px;
|
||
font-family: inherit;
|
||
}
|
||
.plan-btn.is-primary {
|
||
background: var(--accent);
|
||
border-color: transparent;
|
||
color: #0c1120;
|
||
font-weight: 600;
|
||
}
|
||
.plan-btn.is-pressed { transform: scale(0.93); transition: transform 0.1s ease; }
|
||
.plan-btn.is-approved {
|
||
background: transparent;
|
||
border-color: var(--ok);
|
||
color: var(--ok);
|
||
transition: all 0.2s ease;
|
||
}
|
||
|
||
/* ───────── 输入栏:直接显示正在输入的内容 ───────── */
|
||
|
||
.anim-composer {
|
||
flex: none;
|
||
margin: 10px 2px 0;
|
||
height: 40px;
|
||
border: 1px solid var(--line);
|
||
border-radius: 10px;
|
||
display: none;
|
||
align-items: center;
|
||
padding: 0 13px;
|
||
}
|
||
.anim-composer.is-visible { display: flex; animation: anim-in 0.32s ease both; }
|
||
.anim-composer.is-sent {
|
||
/* 退场用 keyframes:不依赖 transition 与入场动画 fill 值的交互 */
|
||
animation: composer-out 0.25s ease both;
|
||
}
|
||
@keyframes composer-out {
|
||
from { opacity: 1; transform: none; }
|
||
to { opacity: 0; transform: translateY(6px); }
|
||
}
|
||
.anim-composer-text { font-size: 12.5px; color: var(--text-1); }
|
||
.anim-composer-caret {
|
||
width: 1.5px; height: 15px;
|
||
background: var(--text-2);
|
||
animation: caret-blink 1s steps(1) infinite;
|
||
}
|
||
|
||
/* ───────── 假鼠标指针 ───────── */
|
||
|
||
.anim-cursor {
|
||
position: absolute;
|
||
left: 0; top: 0;
|
||
opacity: 0;
|
||
pointer-events: none;
|
||
transition: transform 0.7s cubic-bezier(0.3, 0.7, 0.3, 1), opacity 0.25s ease;
|
||
filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.5));
|
||
}
|
||
.anim-cursor.is-visible { opacity: 1; }
|
||
.anim-cursor.is-clicking svg { transform: scale(0.82); transition: transform 0.09s ease; }
|
||
.anim-cursor svg { display: block; transition: transform 0.12s ease; }
|