agent-Specialization/static/demo/minimal-mode/style.css

504 lines
8.4 KiB
CSS

* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica', 'Arial', sans-serif;
background: #f8f9fa;
color: #1a1a1a;
line-height: 1.6;
}
.container {
max-width: 900px;
margin: 0 auto;
padding: 40px 20px;
}
.chat-area {
background: white;
border-radius: 12px;
padding: 32px;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}
/* 消息块 */
.message-block {
margin-bottom: 32px;
}
.message-header {
display: flex;
align-items: center;
gap: 8px;
margin-bottom: 12px;
font-size: 14px;
font-weight: 600;
color: #666;
}
.icon {
flex-shrink: 0;
}
/* 用户消息 */
.user-message {
display: flex;
flex-direction: column;
align-items: flex-end;
}
.user-message .message-text {
background: rgba(0, 0, 0, 0.03);
padding: 14px 18px;
border-radius: 16px;
max-width: 60%;
font-size: 15px;
line-height: 1.5;
}
/* AI消息 */
.assistant-message {
display: flex;
flex-direction: column;
align-items: flex-start;
}
/* 等待动画 */
.generating-placeholder {
display: flex;
gap: 4px;
padding: 12px 0;
font-size: 15px;
font-weight: 500;
color: #999;
}
.generating-placeholder .letter {
display: inline-block;
animation: wave 1.6s ease-in-out infinite;
opacity: 0.4;
}
.generating-placeholder .letter:nth-child(1) { animation-delay: 0s; }
.generating-placeholder .letter:nth-child(2) { animation-delay: 0.1s; }
.generating-placeholder .letter:nth-child(3) { animation-delay: 0.2s; }
.generating-placeholder .letter:nth-child(4) { animation-delay: 0.3s; }
.generating-placeholder .letter:nth-child(5) { animation-delay: 0.4s; }
.generating-placeholder .letter:nth-child(6) { animation-delay: 0.5s; }
@keyframes wave {
0%, 100% {
opacity: 0.4;
transform: translateY(0);
}
50% {
opacity: 1;
transform: translateY(-3px);
}
}
/* 摘要行 */
.summary-line {
display: flex;
align-items: flex-start;
gap: 8px;
padding: 10px 0;
cursor: pointer;
position: relative;
overflow: hidden;
transition: opacity 0.15s ease;
}
.summary-line:hover {
opacity: 0.7;
}
.summary-icon {
flex-shrink: 0;
color: #999;
margin-top: 2px;
}
.summary-text {
font-size: 13px;
color: #999;
position: relative;
display: inline-block;
line-height: 1.5;
}
/* 文字渐变消失效果 */
.summary-text::after {
content: '';
position: absolute;
right: 0;
top: 0;
bottom: 0;
width: 30px;
background: linear-gradient(to right, transparent, white);
pointer-events: none;
}
/* 运行中的闪光效果 */
.shimmer-overlay {
position: absolute;
top: 0;
left: -100%;
width: 100%;
height: 100%;
background: linear-gradient(
90deg,
transparent 0%,
rgba(100, 100, 255, 0.15) 50%,
transparent 100%
);
animation: shimmer 2s infinite;
pointer-events: none;
}
@keyframes shimmer {
0% {
left: -100%;
}
100% {
left: 100%;
}
}
.summary-line.completed .shimmer-overlay {
display: none;
}
/* 摘要行展开时的连接线 */
.summary-line.expanded {
padding-bottom: 0;
}
.summary-line.expanded .summary-icon {
position: relative;
}
.summary-line.expanded .summary-icon::after {
content: '';
position: absolute;
left: 50%;
top: 100%;
transform: translateX(-50%);
width: 2px;
height: 8px;
background: #e0e0e0;
}
/* 详细视图 */
.detail-view {
margin-top: 0;
opacity: 0;
max-height: 0;
overflow: hidden;
transition: opacity 0.15s ease, max-height 0.15s ease;
}
.detail-view.show {
opacity: 1;
max-height: 2000px;
}
.timeline-container {
display: flex;
gap: 20px;
align-items: flex-start;
}
/* 时间线 */
.timeline {
display: flex;
flex-direction: column;
padding-top: 0;
flex-shrink: 0;
}
.timeline-item {
display: flex;
flex-direction: column;
align-items: center;
opacity: 0;
transform: translateY(-5px);
}
/* 第一个时间线项(没有图标,只有竖线) */
.timeline-item-first {
padding-top: 0;
}
.timeline-item-first .timeline-line {
margin-top: 0;
}
.timeline-item.instant {
animation: fadeInInstant 0.1s ease forwards;
}
.timeline-item.animated {
animation: fadeInDown 0.4s ease forwards;
}
.timeline-icon {
flex-shrink: 0;
color: #666;
background: white;
border-radius: 50%;
padding: 2px;
}
.timeline-line {
width: 2px;
background: #e0e0e0;
margin: 4px 0;
transition: height 0.2s ease;
}
.timeline-item:last-child .timeline-line {
display: none;
}
@keyframes fadeInDown {
to {
opacity: 1;
transform: translateY(0);
}
}
@keyframes fadeInInstant {
to {
opacity: 1;
transform: translateY(0);
}
}
/* 内容区域 */
.content-area {
flex: 1;
display: flex;
flex-direction: column;
gap: 0;
min-width: 0;
}
.content-item {
opacity: 0;
transform: translateX(-5px);
margin-bottom: 20px;
}
.content-item.instant {
animation: fadeInInstant 0.1s ease forwards;
}
.content-item.animated {
animation: fadeInLeft 0.4s ease forwards;
}
@keyframes fadeInLeft {
to {
opacity: 1;
transform: translateX(0);
}
}
.content-header {
font-size: 12px;
font-weight: 600;
color: #999;
text-transform: uppercase;
letter-spacing: 0.5px;
margin-bottom: 8px;
}
/* 第一个内容项不显示header */
.content-item[data-step="0"] .content-header {
display: none;
}
/* 思考类型的内容项不显示header */
.content-item.thinking-type .content-header {
display: none;
}
.content-body {
font-size: 14px;
line-height: 1.6;
color: #333;
}
/* 思考内容 */
.thinking-content {
color: #666;
font-size: 14px;
line-height: 1.7;
max-height: 100px;
overflow: hidden;
position: relative;
}
.thinking-content-full {
color: #666;
font-size: 14px;
line-height: 1.7;
}
.show-more-btn,
.show-less-btn {
display: inline-block;
margin-top: 8px;
padding: 4px 12px;
background: transparent;
border: 1px solid #ddd;
border-radius: 6px;
font-size: 12px;
color: #666;
cursor: pointer;
transition: all 0.2s ease;
}
.show-more-btn:hover,
.show-less-btn:hover {
background: #f5f5f5;
border-color: #999;
}
/* 工具内容 */
.tool-intent {
font-weight: 500;
color: #444;
margin-bottom: 12px;
}
.tool-result {
background: #f8f9fa;
border-radius: 8px;
padding: 12px;
}
.result-item {
padding: 8px 0;
border-bottom: 1px solid #e0e0e0;
}
.result-item:last-child {
border-bottom: none;
}
.result-title {
font-weight: 500;
color: #333;
margin-bottom: 4px;
}
.result-url {
font-size: 12px;
color: #999;
}
/* 命令块 */
.command-block {
background: #f8f9fa;
border-radius: 8px;
overflow: hidden;
}
.command-header {
background: #e9ecef;
padding: 8px 12px;
font-size: 12px;
color: #666;
}
.command-code {
padding: 12px;
font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
font-size: 13px;
color: #333;
overflow-x: auto;
}
.command-output {
padding: 12px;
border-top: 1px solid #e0e0e0;
}
.output-line {
font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
font-size: 12px;
color: #666;
line-height: 1.8;
}
/* 最终输出 */
.text-output {
margin-top: 16px;
opacity: 0;
transform: translateY(10px);
transition: all 0.5s ease;
}
.text-output.show {
opacity: 1;
transform: translateY(0);
}
.text-content {
font-size: 15px;
line-height: 1.7;
color: #333;
}
.text-content p {
margin-bottom: 16px;
}
.text-content ol {
margin-left: 24px;
margin-bottom: 16px;
}
.text-content li {
margin-bottom: 12px;
}
.text-content strong {
font-weight: 600;
color: #1a1a1a;
}
/* 控制面板 */
.control-panel {
margin-top: 32px;
display: flex;
gap: 12px;
justify-content: center;
}
.control-btn {
padding: 10px 20px;
background: #007bff;
color: white;
border: none;
border-radius: 8px;
font-size: 14px;
font-weight: 500;
cursor: pointer;
transition: all 0.2s ease;
}
.control-btn:hover {
background: #0056b3;
transform: translateY(-1px);
}
.control-btn:active {
transform: translateY(0);
}