Files
productcanvas/css/style.css

492 lines
9.2 KiB
CSS

body {
font-family: 'Inter', sans-serif;
}
/* 统一处理 Iconify 图标的对齐方式,避免在按钮与文字中出现垂直偏移 */
iconify-icon {
display: inline-flex;
align-items: center;
justify-content: center;
vertical-align: middle;
line-height: 1;
}
/* 狂野线条效果 */
.wild-border {
border: 3px solid;
box-shadow: 4px 4px 0px rgba(0,0,0,0.3);
}
/* 切换按钮激活状态 */
.mode-btn-active {
transform: translateY(-2px);
box-shadow: 0 4px 0 rgba(0,0,0,0.3);
}
.mode-btn-inactive {
opacity: 0.6;
}
/* 对话气泡样式 */
.chat-bubble-user {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
color: white;
padding: 10px 14px;
max-width: 80%;
border: 2px solid #000;
box-shadow: 2px 2px 0 rgba(0,0,0,0.2);
}
.chat-bubble-user .bubble-action-btn {
color: white;
}
.chat-bubble-ai {
background: #fff;
color: #1f2937;
padding: 10px 14px;
max-width: 85%;
max-height: 300px;
overflow-y: auto;
border: 2px solid #10b981;
box-shadow: 2px 2px 0 rgba(16, 185, 129, 0.3);
}
/* Markdown样式 */
.chat-bubble-ai h1 {
font-size: 1.5em;
font-weight: bold;
margin: 0.5em 0;
color: #1f2937;
}
.chat-bubble-ai h2 {
font-size: 1.3em;
font-weight: bold;
margin: 0.5em 0;
color: #1f2937;
}
.chat-bubble-ai h3 {
font-size: 1.1em;
font-weight: bold;
margin: 0.5em 0;
color: #1f2937;
}
.chat-bubble-ai p {
margin: 0.5em 0;
line-height: 1.5;
}
.chat-bubble-ai ul, .chat-bubble-ai ol {
margin: 0.5em 0;
padding-left: 1.5em;
}
.chat-bubble-ai li {
margin: 0.25em 0;
line-height: 1.4;
}
.chat-bubble-ai code {
background: #f3f4f6;
padding: 0.2em 0.4em;
border-radius: 3px;
font-family: 'Courier New', monospace;
font-size: 0.9em;
color: #e11d48;
}
.chat-bubble-ai pre {
background: #f9fafb;
border: 1px solid #e5e7eb;
border-radius: 4px;
padding: 0.75em;
overflow-x: auto;
margin: 0.5em 0;
}
.chat-bubble-ai pre code {
background: none;
padding: 0;
color: #1f2937;
}
.chat-bubble-ai blockquote {
border-left: 4px solid #d1d5db;
padding-left: 1em;
margin: 0.5em 0;
color: #6b7280;
font-style: italic;
}
.chat-bubble-ai strong {
font-weight: bold;
color: #1f2937;
}
.chat-bubble-ai em {
font-style: italic;
color: #4b5563;
}
.chat-bubble-ai a {
color: #3b82f6;
text-decoration: underline;
}
.chat-bubble-ai a:hover {
color: #1d4ed8;
}
.chat-bubble-ai table {
border-collapse: collapse;
width: 100%;
margin: 0.5em 0;
}
.chat-bubble-ai th, .chat-bubble-ai td {
border: 1px solid #e5e7eb;
padding: 0.5em;
text-align: left;
}
.chat-bubble-ai th {
background: #f9fafb;
font-weight: bold;
}
/* SVG占位符样式 - 块级换行 + 新配色 */
.svg-placeholder-block {
display: block;
background: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
color: white;
padding: 8px 14px;
margin: 8px 0;
border: 2px solid #000;
box-shadow: 3px 3px 0 rgba(0,0,0,0.25);
font-weight: bold;
font-size: 13px;
cursor: pointer;
transition: all 0.2s;
text-align: center;
}
.svg-placeholder-block:hover {
transform: translateX(2px) translateY(-2px);
box-shadow: 4px 4px 0 rgba(0,0,0,0.3);
background: linear-gradient(135deg, #fb923c 0%, #f87171 100%);
}
/* SVG绘制中状态占位符 */
.svg-drawing-placeholder {
display: block;
background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
color: white;
padding: 8px 14px;
margin: 8px 0;
border: 2px solid #000;
box-shadow: 3px 3px 0 rgba(0,0,0,0.25);
font-weight: bold;
font-size: 13px;
cursor: pointer;
transition: all 0.2s;
text-align: center;
position: relative;
overflow: hidden;
}
.svg-drawing-placeholder:hover {
transform: translateX(2px) translateY(-2px);
box-shadow: 4px 4px 0 rgba(0,0,0,0.3);
background: linear-gradient(135deg, #60a5fa 0%, #a78bfa 100%);
}
/* 绘制中动画效果 */
@keyframes drawing-pulse {
0% { opacity: 1; }
50% { opacity: 0.7; }
100% { opacity: 1; }
}
.svg-drawing-placeholder::before {
content: '';
position: absolute;
top: 0;
left: -100%;
width: 100%;
height: 100%;
background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
animation: drawing-shine 2s infinite;
}
@keyframes drawing-shine {
0% { left: -100%; }
100% { left: 100%; }
}
.svg-drawing-text {
animation: drawing-pulse 1.5s infinite;
}
/* 气泡操作按钮 */
.bubble-action-btn {
opacity: 1;
transition: color 0.2s ease;
}
/* 消息删除浮动按钮 */
.message-with-delete {
position: relative;
padding-right: 48px;
}
.message-delete-btn {
position: absolute;
top: 8px;
right: 8px;
width: 30px;
height: 30px;
border-radius: 9999px;
border: 2px solid #1f2937;
background: rgba(255, 255, 255, 0.92);
color: #dc2626;
display: inline-flex;
align-items: center;
justify-content: center;
box-shadow: 2px 2px 0 rgba(0,0,0,0.2);
transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}
.message-delete-btn:hover {
background: #dc2626;
color: #ffffff;
transform: scale(1.05);
}
.message-delete-btn iconify-icon {
font-size: 16px;
}
.svg-placeholder-block {
position: relative;
}
@keyframes svg-active-pulse {
0% { box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.35), 0 6px 12px rgba(15, 23, 42, 0.15); }
50% { box-shadow: 0 0 0 6px rgba(37, 99, 235, 0.15), 0 10px 18px rgba(15, 23, 42, 0.2); }
100% { box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.35), 0 6px 12px rgba(15, 23, 42, 0.15); }
}
.svg-placeholder-active {
border-color: #1d4ed8;
background: linear-gradient(135deg, #e0f2fe 0%, #dbeafe 100%);
color: #1e3a8a;
transform: translateY(-2px);
/* animation: svg-active-pulse 1.6s ease-in-out infinite; */
}
.svg-content-wrapper {
/* flex: 1; */
/* margin: 1rem; */
display: inline-block;
/* text-align: center; */
transform-origin: center top;
}
.svg-content-wrapper--mermaid {
flex: 1;
margin: 1rem;
text-align: center;
width: 100%;
height: 100%;
object-fit: contain;
max-width: 100% !important;
}
/* 小手摇摆动画 */
@keyframes wave {
0%, 100% {transform: translateX(0px) rotate(90deg);}
10%, 30%, 50%, 70%, 90% {transform: translateX(-1px) rotate(90deg);}
20%, 40%, 60%, 80% {transform: translateX(1px) rotate(90deg);}
}
.wave-hand {
animation: wave 3s ease-in-out infinite;
display: inline-block;
transform: rotate(90deg);
}
/* 模态窗样式 */
.modal-overlay {
display: none;
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(0, 0, 0, 0.7);
z-index: 1000;
align-items: center;
justify-content: center;
}
.modal-overlay.active {
display: flex;
}
.modal-content {
background: white;
border: 4px solid #000;
box-shadow: 8px 8px 0 rgba(0,0,0,0.4);
max-width: 500px;
width: 90%;
max-height: 90vh;
overflow-y: auto;
}
.code-modal-content {
max-width: 760px;
}
.page-preview-modal {
width: 98vw;
height: 98vh;
max-width: 98vw;
max-height: 98vh;
display: flex;
flex-direction: column;
padding: 0;
}
.page-preview-body {
flex: 1;
background: #0f172a;
display: flex;
align-items: center;
justify-content: center;
padding: 8px;
}
.page-preview-iframe {
width: 100%;
height: 100%;
border: 3px solid #000;
background: white;
border-radius: 8px;
box-shadow: 0 8px 24px rgba(15, 23, 42, 0.45);
}
.code-viewer {
background: #0f172a;
color: #f8fafc;
border: 2px solid #000;
padding: 16px;
font-family: 'Fira Code', 'Courier New', Courier, monospace;
font-size: 14px;
line-height: 1.6;
border-radius: 6px;
max-height: 60vh;
overflow: auto;
white-space: pre-wrap;
word-break: break-word;
}
/* 表单输入框样式 */
.config-input {
width: 100%;
padding: 10px;
border: 2px solid #000;
font-size: 14px;
transition: all 0.2s;
}
.config-input:focus {
outline: none;
border-color: #667eea;
box-shadow: 3px 3px 0 rgba(102, 126, 234, 0.3);
}
/* 齿轮旋转动画 */
@keyframes rotate {
from { transform: rotate(0deg); }
to { transform: rotate(360deg); }
}
.settings-btn:hover iconify-icon {
animation: rotate 1s linear infinite;
}
/* 自适应高度输入框 */
.auto-resize-input {
min-height: 40px;
max-height: 120px; /* 5行左右的高度 */
resize: none;
overflow-y: auto;
line-height: 1.5;
padding: 8px 12px;
}
/* 清空按钮样式 */
.clear-btn {
transition: all 0.2s;
}
.clear-btn:hover {
transform: scale(1.05);
}
.clear-btn:active {
transform: scale(0.95);
}
/* 流式输出动画 */
@keyframes fadeIn {
from { opacity: 0; transform: translateY(10px); }
to { opacity: 1; transform: translateY(0); }
}
.streaming-text {
animation: fadeIn 0.3s ease-in-out;
}
/* 打字机效果光标 */
@keyframes blink {
0%, 50% { opacity: 1; }
51%, 100% { opacity: 0; }
}
.typing-cursor::after {
content: '|';
animation: blink 1s infinite;
color: #667eea;
font-weight: bold;
}
/* 清空历史按钮摇动动画 */
@keyframes shake {
0%, 100% { transform: translateX(0); }
10%, 30%, 50%, 70%, 90% { transform: translateX(-2px); }
20%, 40%, 60%, 80% { transform: translateX(2px); }
}
.clear-history-btn:hover iconify-icon {
animation: shake 0.5s ease-in-out;
}
#send-button.terminate-mode {
border-color: #dc2626;
}
#mermaidSvg {
width: 100%;
height: 100%;
object-fit: contain;
max-width: 100% !important;
}
#dmermaidSvg{ height: 0px;}