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;} /* ========== 图片上传相关样式 ========== */ /* 图片上传按钮 */ .image-upload-btn { flex-shrink: 0; border-radius: 8px; transition: all 0.2s ease; } .image-upload-btn:hover { background: rgba(6, 182, 212, 0.1); transform: scale(1.05); } .image-upload-btn:disabled { opacity: 0.4; cursor: not-allowed; } .image-upload-btn:disabled:hover { background: transparent; transform: none; } /* 图片缩略图容器 */ #image-preview-container { padding: 8px; background: rgba(255, 255, 255, 0.8); border: 2px dashed #d1d5db; border-radius: 8px; } #image-preview-container:not(.hidden) { display: flex; } /* 单个图片缩略图项 */ .image-thumbnail-item { position: relative; width: 72px; height: 72px; border-radius: 8px; overflow: hidden; border: 2px solid #e5e7eb; background: #f9fafb; cursor: pointer; transition: all 0.2s ease; flex-shrink: 0; } .image-thumbnail-item:hover { border-color: #06b6d4; transform: scale(1.05); box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); } .image-thumbnail-item img { width: 100%; height: 100%; object-fit: cover; } /* 图片删除按钮 */ .image-thumbnail-delete { position: absolute; top: 2px; right: 2px; width: 20px; height: 20px; border-radius: 50%; background: rgba(220, 38, 38, 0.9); color: white; border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity 0.2s ease; z-index: 10; } .image-thumbnail-item:hover .image-thumbnail-delete { opacity: 1; } .image-thumbnail-delete:hover { background: #dc2626; transform: scale(1.1); } .image-thumbnail-delete iconify-icon { font-size: 12px; } /* 图片数量限制提示 */ .image-count-badge { position: absolute; bottom: 2px; left: 2px; background: rgba(0, 0, 0, 0.7); color: white; font-size: 10px; padding: 1px 4px; border-radius: 4px; } /* 图片预览模态窗 */ .image-preview-modal-content { position: relative; display: flex; align-items: center; justify-content: center; width: 90vw; height: 90vh; background: rgba(0, 0, 0, 0.95); border-radius: 8px; } .image-preview-modal-content img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 4px; } /* 聊天气泡中的图片显示 */ .chat-bubble-images { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; } .chat-bubble-image { width: 80px; height: 80px; border-radius: 6px; overflow: hidden; border: 2px solid rgba(255, 255, 255, 0.3); cursor: pointer; transition: all 0.2s ease; } .chat-bubble-image:hover { transform: scale(1.05); border-color: rgba(255, 255, 255, 0.6); } .chat-bubble-image img { width: 100%; height: 100%; object-fit: cover; } /* 图片加载中状态 */ .image-loading { display: flex; align-items: center; justify-content: center; background: #f3f4f6; } .image-loading::after { content: ''; width: 24px; height: 24px; border: 2px solid #d1d5db; border-top-color: #06b6d4; border-radius: 50%; animation: spin 0.8s linear infinite; } @keyframes spin { to { transform: rotate(360deg); } } /* 图片上传拖拽区域高亮 */ .image-drop-active { background: rgba(6, 182, 212, 0.1) !important; border-color: #06b6d4 !important; border-style: solid !important; } /* 图片大小/格式错误提示 */ .image-error-toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: #dc2626; color: white; padding: 12px 20px; border-radius: 8px; font-weight: 500; z-index: 9999; animation: toast-in 0.3s ease; } @keyframes toast-in { from { opacity: 0; transform: translateX(-50%) translateY(20px); } to { opacity: 1; transform: translateX(-50%) translateY(0); } }