From 8e8026848f5875194c56a5019b8a49a867dbde84 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=94=A8=E6=88=B7=E5=B7=B2=E6=B3=A8=E9=94=80?= Date: Fri, 6 Jun 2025 16:54:22 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E6=96=87=E4=BB=B6=E8=87=B3?= =?UTF-8?q?=20static/css?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- static/css/modern-style.css | 892 ++++++++++++++++++++ static/css/style.css | 1531 +++++++++++++++++++++++++++++++++++ 2 files changed, 2423 insertions(+) create mode 100644 static/css/modern-style.css create mode 100644 static/css/style.css diff --git a/static/css/modern-style.css b/static/css/modern-style.css new file mode 100644 index 0000000..145efc6 --- /dev/null +++ b/static/css/modern-style.css @@ -0,0 +1,892 @@ +/* 现代科技感UI样式 */ +@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&family=Space+Grotesk:wght@300;400;500;600;700&family=Noto+Sans+SC:wght@300;400;500;700&display=swap'); + +:root { + /* 更亮的色彩方案 */ + --primary-color: #6366f1; + /* 更明亮的主色调 */ + --primary-light: #a5b4fc; + --primary-dark: #4f46e5; + --accent-color: #06b6d4; + /* 更明亮的强调色 */ + --accent-light: #22d3ee; + --danger-color: #f87171; + /* 更亮的危险色 */ + --warning-color: #fbbf24; + /* 更亮的警告色 */ + --info-color: #38bdf8; + /* 更亮的信息色 */ + --dark-bg: #334155; + /* 更亮的深色背景 */ + --darker-bg: #1e293b; + /* 更亮的深色背景 */ + --light-bg: #f8fafc; + /* 浅色背景 */ + --border-color: #94a3b8; + /* 更亮的边框色 */ + --text-light: #f9fafb; + /* 浅色文本 */ + --text-dark: #1e293b; + /* 深色文本 */ + --text-muted: #cbd5e1; + /* 次要文本 - 更亮 */ + --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.1); + --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1), 0 2px 4px rgba(0, 0, 0, 0.06); + --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1), 0 4px 6px rgba(0, 0, 0, 0.05); + --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.1), 0 10px 10px rgba(0, 0, 0, 0.04); + --glow: 0 0 15px rgba(165, 180, 252, 0.6); + --transition-fast: 0.2s ease; + --transition-normal: 0.3s ease; + --transition-slow: 0.5s ease; + --border-radius-sm: 6px; + --border-radius-md: 10px; + --border-radius-lg: 16px; + --border-radius-xl: 24px; + --border-radius-full: 9999px; +} + +/* 全局样式增强 */ +body { + background: linear-gradient(135deg, var(--dark-bg), var(--darker-bg)); + color: var(--text-light); + font-family: 'Poppins', 'Noto Sans SC', sans-serif; + margin: 0; + padding: 0; +} + +.container { + display: flex; + height: 100vh; + overflow: hidden; +} + +.sidebar { + width: 250px; + background: rgba(51, 65, 85, 0.85); + border-right: 1px solid rgba(255, 255, 255, 0.15); + backdrop-filter: blur(10px); + box-shadow: 5px 0 15px rgba(0, 0, 0, 0.2); + display: flex; + flex-direction: column; + transition: all var(--transition-normal); +} + +.main-content { + flex: 1; + overflow: hidden; + background: rgba(51, 65, 85, 0.75); + backdrop-filter: blur(5px); + transition: all var(--transition-normal); +} + +.content-section { + padding: 25px; + height: 100%; + overflow-y: auto; + display: none; +} + +.content-section.active { + display: flex; + flex-direction: column; +} + +.container.full-width .sidebar { + width: 80px; +} + +.container.full-width .logo span, +.container.full-width .nav-item span, +.container.full-width .session-info { + display: none; +} + +.main-content.full-width { + flex: 1; +} + +/* 标志样式 */ +.logo { + padding: 20px; + display: flex; + align-items: center; + gap: 12px; + font-size: 20px; + font-weight: 600; + color: var(--primary-light); + border-bottom: 1px solid rgba(255, 255, 255, 0.15); +} + +.logo i { + font-size: 24px; +} + +/* 改进的导航菜单 */ +.nav-menu { + margin: 20px 0; + padding: 0 15px; +} + +.nav-item { + display: flex; + align-items: center; + padding: 12px 15px; + color: var(--text-muted); + text-decoration: none; + border-radius: var(--border-radius-md); + margin-bottom: 8px; + transition: all var(--transition-normal); + position: relative; + overflow: hidden; +} + +.nav-item:hover { + background: rgba(99, 102, 241, 0.2); + color: var(--primary-light); +} + +.nav-item.active { + background: linear-gradient(90deg, rgba(99, 102, 241, 0.25), transparent); + color: var(--primary-light); + font-weight: 500; + box-shadow: inset 3px 0 0 var(--primary-color); +} + +.nav-item i { + margin-right: 12px; + font-size: 18px; + color: currentColor; +} + +/* 会话信息样式 */ +.session-info { + margin-top: auto; + padding: 15px; + background: rgba(30, 41, 59, 0.5); + border-top: 1px solid rgba(255, 255, 255, 0.15); +} + +.session-info h4 { + margin-top: 0; + margin-bottom: 10px; + color: var(--primary-light); + font-size: 16px; +} + +.session-info p { + margin: 5px 0; + font-size: 14px; + color: var(--text-muted); +} + +.session-info span { + color: var(--text-light); + font-weight: 500; +} + +/* 聊天输入区域 */ +.chat-input-area { + display: flex; + gap: 15px; + padding-top: 20px; + border-top: 1px solid rgba(255, 255, 255, 0.15); + position: relative; + z-index: 1; +} + +#user-input { + flex-grow: 1; + padding: 16px 20px; + background: rgba(51, 65, 85, 0.7); + border: 1px solid rgba(255, 255, 255, 0.25); + border-radius: var(--border-radius-md); + font-size: 16px; + resize: vertical; + min-height: 60px; + max-height: 150px; + color: var(--text-light); + font-family: 'Poppins', 'Noto Sans SC', sans-serif; + transition: all var(--transition-normal); + box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1); + backdrop-filter: blur(4px); +} + +#user-input:focus { + border-color: var(--primary-color); + box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.3), inset 0 2px 4px rgba(0, 0, 0, 0.1); + outline: none; +} + +#user-input::placeholder { + color: var(--text-muted); +} + +#send-btn { + padding: 15px 30px; + font-size: 18px; + background: linear-gradient(145deg, var(--primary-color), var(--primary-dark)); + color: white; + border: none; + border-radius: var(--border-radius-md); + cursor: pointer; + transition: all var(--transition-normal); + box-shadow: 0 4px 10px rgba(99, 102, 241, 0.3); + display: flex; + align-items: center; + justify-content: center; + gap: 8px; + position: relative; + overflow: hidden; +} + +#send-btn:hover { + transform: translateY(-2px); + box-shadow: 0 6px 15px rgba(99, 102, 241, 0.4), 0 0 0 2px rgba(99, 102, 241, 0.3); +} + +#send-btn:active { + transform: translateY(0); + box-shadow: 0 2px 5px rgba(99, 102, 241, 0.4); +} + +#send-btn::before { + content: ''; + position: absolute; + top: -50%; + left: -50%; + width: 200%; + height: 200%; + background: radial-gradient(circle, rgba(255, 255, 255, 0.3) 0%, transparent 70%); + opacity: 0; + transition: opacity 0.5s ease; +} + +#send-btn:hover::before { + opacity: 1; +} + +#send-btn i { + font-size: 18px; +} + +/* 按钮样式 */ +.action-button { + padding: 12px 25px; + border: none; + border-radius: var(--border-radius-md); + cursor: pointer; + font-size: 16px; + font-weight: 500; + transition: all var(--transition-normal); + display: inline-flex; + align-items: center; + gap: 8px; + position: relative; + overflow: hidden; +} + +.action-button i { + font-size: 18px; +} + +.action-button.primary { + background: linear-gradient(145deg, var(--primary-color), var(--primary-dark)); + color: white; + box-shadow: 0 4px 10px rgba(99, 102, 241, 0.3); +} + +.action-button.primary:hover { + transform: translateY(-2px); + box-shadow: 0 6px 15px rgba(99, 102, 241, 0.4), 0 0 0 2px rgba(99, 102, 241, 0.3); +} + +.action-button.secondary { + background: linear-gradient(145deg, #64748b, #475569); + color: white; + box-shadow: 0 4px 10px rgba(71, 85, 105, 0.3); +} + +.action-button.secondary:hover { + transform: translateY(-2px); + box-shadow: 0 6px 15px rgba(71, 85, 105, 0.4), 0 0 0 2px rgba(100, 116, 139, 0.3); +} + +.action-button:active { + transform: translateY(0); + box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2); +} + +.action-button::before { + content: ''; + position: absolute; + top: -50%; + left: -50%; + width: 200%; + height: 200%; + background: radial-gradient(circle, rgba(255, 255, 255, 0.2) 0%, transparent 70%); + opacity: 0; + transition: opacity 0.5s ease; +} + +.action-button:hover::before { + opacity: 1; +} + +/* 模态框样式 */ +.modal-overlay { + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100%; + background-color: rgba(0, 0, 0, 0.7); + backdrop-filter: blur(5px); + display: flex; + justify-content: center; + align-items: center; + z-index: 1000; + opacity: 0; + visibility: hidden; + transition: all var(--transition-normal); +} + +.modal-overlay.active { + opacity: 1; + visibility: visible; +} + +.modal-content { + background: linear-gradient(145deg, rgba(51, 65, 85, 0.9), rgba(71, 85, 105, 0.9)); + padding: 30px; + border-radius: var(--border-radius-lg); + box-shadow: var(--shadow-xl); + text-align: center; + max-width: 450px; + width: 90%; + transform: translateY(-50px); + transition: transform var(--transition-normal); + border: 1px solid rgba(255, 255, 255, 0.15); + color: var(--text-light); +} + +.modal-overlay.active .modal-content { + transform: translateY(0); +} + +.modal-content h3 { + margin-top: 0; + color: var(--text-light); + font-size: 24px; + margin-bottom: 15px; + font-weight: 600; +} + +.modal-content p { + color: var(--text-muted); + font-size: 17px; + line-height: 1.6; + margin-bottom: 30px; +} + +.modal-buttons { + display: flex; + justify-content: center; + gap: 15px; +} + +.modal-buttons .action-button { + min-width: 120px; +} + +/* 记忆更新状态样式 */ +#memory-update-status { + display: none; + align-items: center; + margin-top: 10px; + padding: 8px 12px; + background: rgba(51, 65, 85, 0.7); + border-radius: var(--border-radius-md); + font-size: 14px; + color: var(--text-light); + border: 1px solid rgba(255, 255, 255, 0.15); +} + +#memory-update-status .status-dot { + width: 8px; + height: 8px; + border-radius: 50%; + margin-right: 10px; +} + +#memory-update-status .status-dot.updating { + background-color: var(--warning-color); + box-shadow: 0 0 10px var(--warning-color); + animation: pulse 1.5s infinite; +} + +#memory-update-status .status-dot.success { + background-color: var(--accent-color); + box-shadow: 0 0 10px var(--accent-color); +} + +#memory-update-status .status-dot.error { + background-color: var(--danger-color); + box-shadow: 0 0 10px var(--danger-color); +} + +#memory-update-status .status-text { + color: var(--text-muted); +} + +/* Toast 消息样式 */ +#toast-container { + position: fixed; + top: 20px; + right: 20px; + z-index: 1000; + display: flex; + flex-direction: column; + gap: 10px; +} + +.toast { + background: rgba(51, 65, 85, 0.9); + color: var(--text-light); + padding: 15px 20px; + border-radius: var(--border-radius-md); + box-shadow: var(--shadow-lg); + opacity: 0; + transform: translateY(-20px); + animation: fadeInOut 3s forwards; + min-width: 300px; + font-size: 15px; + display: flex; + align-items: center; + gap: 12px; + border-left: 4px solid var(--primary-color); + backdrop-filter: blur(8px); +} + +.toast i { + font-size: 20px; +} + +.toast.success { + border-left-color: var(--accent-color); +} + +.toast.success i { + color: var(--accent-color); +} + +.toast.error { + border-left-color: var(--danger-color); +} + +.toast.error i { + color: var(--danger-color); +} + +.toast.info { + border-left-color: var(--info-color); +} + +.toast.info i { + color: var(--info-color); +} + +.toast.warning { + border-left-color: var(--warning-color); +} + +.toast.warning i { + color: var(--warning-color); +} + +@keyframes fadeInOut { + 0% { + opacity: 0; + transform: translateY(-20px); + } + + 10% { + opacity: 1; + transform: translateY(0); + } + + 90% { + opacity: 1; + transform: translateY(0); + } + + 100% { + opacity: 0; + transform: translateY(-20px); + } +} + +@keyframes pulse { + 0% { + opacity: 0.5; + transform: scale(0.8); + } + + 50% { + opacity: 1; + transform: scale(1.2); + } + + 100% { + opacity: 0.5; + transform: scale(0.8); + } +} + +/* 自适应布局优化 */ +.section-header { + display: flex; + justify-content: space-between; + align-items: center; + flex-wrap: wrap; + gap: 15px; + margin-bottom: 25px; + background: rgba(51, 65, 85, 0.5); + padding: 20px; + border-radius: var(--border-radius-lg); + border: 1px solid rgba(255, 255, 255, 0.15); + box-shadow: var(--shadow-md); +} + +.section-header h2 { + margin: 0; + font-size: 24px; + display: flex; + align-items: center; + gap: 12px; + color: var(--text-light); +} + +.section-header .header-actions { + display: flex; + gap: 10px; + flex-wrap: wrap; +} + +/* 配置表单优化 - 修复布局问题 */ +.config-form { + background: rgba(51, 65, 85, 0.5); + padding: 30px; + border-radius: var(--border-radius-lg); + border: 1px solid rgba(255, 255, 255, 0.15); + box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1); +} + +.config-form h3 { + color: var(--primary-light); + font-size: 22px; + margin-top: 15px; + margin-bottom: 20px; + padding-bottom: 10px; + border-bottom: 1px solid rgba(255, 255, 255, 0.15); +} + +/* 改用Flexbox布局代替Grid布局 */ +.config-form .form-group { + display: flex; + flex-wrap: wrap; + margin-bottom: 15px; +} + +.config-form .form-group .form-field { + flex: 1 0 45%; + margin: 0 10px 20px 0; +} + +.config-form .form-group label { + display: block; + color: var(--text-light); + font-weight: 500; + margin-bottom: 8px; +} + +.config-form .form-group input, +.config-form .form-group select { + width: 100%; + padding: 12px 15px; + border: 1px solid rgba(255, 255, 255, 0.2); + border-radius: var(--border-radius-md); + background: rgba(51, 65, 85, 0.7); + color: var(--text-light); + font-size: 15px; + transition: all var(--transition-normal); +} + +.config-form .form-group input:focus, +.config-form .form-group select:focus { + border-color: var(--primary-light); + box-shadow: 0 0 0 3px rgba(165, 180, 252, 0.3); + outline: none; +} + +.config-form .password-toggle { + margin-top: 8px; + display: flex; + align-items: center; +} + +.config-form .password-toggle input { + width: auto !important; + margin-right: 8px; +} + +@media (max-width: 768px) { + .config-form .form-group { + flex-direction: column; + } + + .config-form .form-group .form-field { + flex: 1 0 100%; + margin-right: 0; + } + + .section-header { + flex-direction: column; + align-items: flex-start; + } + + .section-header .header-actions { + width: 100%; + justify-content: space-between; + margin-top: 15px; + } +} + +/* 特征和记忆管理优化 */ +.role-management, +.memory-management { + background: rgba(51, 65, 85, 0.5); + padding: 25px; + border-radius: var(--border-radius-lg); + border: 1px solid rgba(255, 255, 255, 0.15); + margin-bottom: 25px; + box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1); +} + +.role-management h3, +.memory-management h3 { + color: var(--primary-light); + font-size: 20px; + margin-top: 0; + margin-bottom: 20px; + padding-bottom: 8px; + border-bottom: 1px solid rgba(255, 255, 255, 0.15); +} + +.role-list, +.memory-list { + display: grid; + grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); + gap: 15px; + margin-bottom: 25px; +} + +.role-item, +.memory-item { + background: rgba(51, 65, 85, 0.7); + padding: 15px; + border-radius: var(--border-radius-md); + display: flex; + justify-content: space-between; + align-items: center; + cursor: pointer; + transition: all var(--transition-normal); + border: 1px solid rgba(255, 255, 255, 0.15); +} + +.role-item:hover, +.memory-item:hover { + background: rgba(99, 102, 241, 0.2); + transform: translateY(-2px); + box-shadow: var(--shadow-md); +} + +.role-item.active-item, +.memory-item.active-item { + background: linear-gradient(135deg, rgba(99, 102, 241, 0.25), rgba(6, 182, 212, 0.15)); + border: 1px solid rgba(99, 102, 241, 0.4); + box-shadow: 0 0 15px rgba(99, 102, 241, 0.2); +} + +.role-item span, +.memory-item span { + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + color: var(--text-light); + font-weight: 500; +} + +.delete-btn { + background: none; + border: none; + color: var(--text-muted); + cursor: pointer; + font-size: 16px; + transition: all var(--transition-normal); + opacity: 0.6; + padding: 4px 8px; + border-radius: 50%; +} + +.delete-btn:hover { + color: var(--danger-color); + opacity: 1; + background: rgba(248, 113, 113, 0.2); +} + +.new-role-form, +.new-memory-form { + display: grid; + grid-template-columns: 1fr 1fr auto; + gap: 15px; + align-items: center; + background: rgba(51, 65, 85, 0.3); + padding: 20px; + border-radius: var(--border-radius-md); + border: 1px solid rgba(255, 255, 255, 0.1); +} + +.new-role-form input, +.new-memory-form input { + padding: 12px 15px; + border: 1px solid rgba(255, 255, 255, 0.2); + border-radius: var(--border-radius-md); + background: rgba(51, 65, 85, 0.7); + color: var(--text-light); + font-size: 15px; +} + +.new-role-form input:focus, +.new-memory-form input:focus { + border-color: var(--primary-color); + box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25); + outline: none; +} + +@media (max-width: 768px) { + + .new-role-form, + .new-memory-form { + grid-template-columns: 1fr; + gap: 10px; + } +} + +.code-editor { + width: 100%; + height: 500px; + padding: 20px; + border-radius: var(--border-radius-md); + border: 1px solid rgba(255, 255, 255, 0.2); + background: rgba(51, 65, 85, 0.5); + color: var(--text-light); + font-family: 'Consolas', 'Monaco', 'Courier New', monospace; + font-size: 14px; + line-height: 1.6; + resize: vertical; + margin-top: 10px; +} + +.code-editor:focus { + border-color: var(--primary-color); + box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25); + outline: none; +} + +/* 日志查看器优化 */ +.log-viewer { + width: 100%; + height: 600px; + padding: 20px; + border-radius: var(--border-radius-md); + border: 1px solid rgba(255, 255, 255, 0.2); + background: rgba(51, 65, 85, 0.5); + color: var(--text-light); + font-family: 'Consolas', 'Monaco', 'Courier New', monospace; + font-size: 14px; + line-height: 1.6; + overflow: auto; + white-space: pre-wrap; + word-break: break-all; + margin-top: 20px; +} + +/* 聊天窗口增强 */ +.chat-window { + flex: 1; + overflow-y: auto; + padding: 20px; + display: flex; + flex-direction: column; + gap: 20px; + border-radius: var(--border-radius-lg); + background: rgba(51, 65, 85, 0.5); + border: 1px solid rgba(255, 255, 255, 0.15); + box-shadow: inset 0 0 15px rgba(0, 0, 0, 0.1); + margin-bottom: 20px; +} + +.chat-header { + display: flex; + justify-content: space-between; + align-items: center; + margin-bottom: 20px; + padding-bottom: 15px; + border-bottom: 1px solid rgba(255, 255, 255, 0.15); +} + +.chat-header h2 { + margin: 0; + font-size: 24px; + display: flex; + align-items: center; + gap: 12px; +} + +.chat-header .header-actions { + display: flex; + gap: 10px; +} + +/* 消息气泡增强 */ +.chat-message { + display: flex; + margin-bottom: 20px; + align-items: flex-start; + position: relative; + opacity: 1; + transition: opacity 0.3s ease; +} + +.chat-message.user { + justify-content: flex-end; +} + +.chat-message.bot { + justify-content: flex-start; +} + +.message-avatar { + width: 42px; + height: 42px; + border-radius: var(--border-radius-full); + display: flex; + align-items: center; + justify-content: center; + font-size: 16px; + color: var(--text-light); + background: rgba(51, 65, 85, 0.5); + border: 1px solid rgba(255, 255, 255, 0.15); + box-shadow: inset 0 0 15px rgba(0, 0, 0, 0.1); + margin-right: 10px; +} \ No newline at end of file diff --git a/static/css/style.css b/static/css/style.css new file mode 100644 index 0000000..57cc27a --- /dev/null +++ b/static/css/style.css @@ -0,0 +1,1531 @@ +/* 通用样式 - 现代科技感设计 */ +@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&family=Space+Grotesk:wght@300;400;500;600;700&family=Noto+Sans+SC:wght@300;400;500;700&display=swap'); + +:root { + --primary-color: #2563eb; + /* 深蓝主色调 */ + --primary-light: #3b82f6; + --primary-dark: #1d4ed8; + --accent-color: #10b981; + /* 绿色强调色 */ + --accent-light: #34d399; + --danger-color: #ef4444; + /* 危险色/错误色 */ + --warning-color: #f59e0b; + /* 警告色 */ + --info-color: #0ea5e9; + /* 信息色 */ + --dark-bg: #0f172a; + /* 深色背景 */ + --darker-bg: #020617; + /* 更深色背景 */ + --light-bg: #f8fafc; + /* 浅色背景 */ + --border-color: #334155; + /* 边框色 */ + --text-light: #f1f5f9; + /* 浅色文本 */ + --text-dark: #1e293b; + /* 深色文本 */ + --text-muted: #94a3b8; + /* 次要文本 */ + --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.1); + --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1), 0 2px 4px rgba(0, 0, 0, 0.06); + --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1), 0 4px 6px rgba(0, 0, 0, 0.05); + --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.1), 0 10px 10px rgba(0, 0, 0, 0.04); + --glow: 0 0 15px rgba(59, 130, 246, 0.5); + --transition-fast: 0.2s ease; + --transition-normal: 0.3s ease; + --transition-slow: 0.5s ease; + --border-radius-sm: 6px; + --border-radius-md: 10px; + --border-radius-lg: 16px; + --border-radius-xl: 24px; + --border-radius-full: 9999px; +} + +* { + box-sizing: border-box; + margin: 0; + padding: 0; +} + +html, +body { + height: 100%; + margin: 0; + padding: 0; + overflow: hidden; +} + +body { + font-family: 'Poppins', 'Noto Sans SC', sans-serif; + background: linear-gradient(to bottom right, var(--darker-bg), var(--dark-bg)); + color: var(--text-light); + display: flex; + flex-direction: column; + min-height: 100vh; + width: 100vw; + overflow-x: hidden; + overflow-y: auto; + line-height: 1.6; + font-weight: 400; +} + +.container { + display: flex; + flex-grow: 1; + width: 100%; + max-width: 1400px; + padding: 24px; + margin: 24px auto; + box-shadow: var(--shadow-xl); + border-radius: var(--border-radius-lg); + overflow: hidden; + background-color: rgba(15, 23, 42, 0.7); + /* 半透明背景 */ + backdrop-filter: blur(10px); + /* 背景模糊效果 */ + border: 1px solid rgba(255, 255, 255, 0.05); + min-height: calc(100vh - 48px); + transition: all var(--transition-normal); +} + +/* 侧边栏样式 */ +.sidebar { + flex-basis: 300px; + flex-shrink: 0; + background: linear-gradient(to bottom, var(--dark-bg), var(--darker-bg)); + color: var(--text-light); + padding: 30px 20px; + display: flex; + flex-direction: column; + border-right: 1px solid rgba(255, 255, 255, 0.05); + box-shadow: var(--shadow-md); + border-radius: var(--border-radius-md) 0 0 var(--border-radius-md); + position: relative; + overflow: hidden; +} + +/* 科技感装饰元素 */ +.sidebar::before { + content: ''; + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + background: + radial-gradient(circle at 20% 30%, rgba(59, 130, 246, 0.1) 0%, transparent 50%), + radial-gradient(circle at 80% 70%, rgba(16, 185, 129, 0.1) 0%, transparent 50%); + z-index: 0; +} + +.sidebar .logo { + font-size: 32px; + font-weight: 600; + text-align: center; + margin-bottom: 40px; + color: var(--text-light); + display: flex; + align-items: center; + justify-content: center; + gap: 12px; + position: relative; + z-index: 1; + font-family: 'Space Grotesk', sans-serif; + letter-spacing: 1px; +} + +.sidebar .logo i { + color: var(--primary-color); + font-size: 36px; + filter: drop-shadow(0 0 8px rgba(59, 130, 246, 0.6)); + animation: pulse 3s infinite ease-in-out; +} + +@keyframes pulse { + 0% { + opacity: 0.8; + } + + 50% { + opacity: 1; + } + + 100% { + opacity: 0.8; + } +} + +.nav-menu { + flex-grow: 1; + margin-bottom: 30px; + position: relative; + z-index: 1; +} + +.nav-item { + display: flex; + align-items: center; + padding: 15px 20px; + color: var(--text-muted); + text-decoration: none; + font-size: 16px; + font-weight: 500; + border-radius: var(--border-radius-md); + margin-bottom: 12px; + transition: all var(--transition-normal); + position: relative; + overflow: hidden; +} + +.nav-item::before { + content: ''; + position: absolute; + top: 0; + left: 0; + width: 4px; + height: 100%; + background-color: var(--primary-color); + transform: scaleY(0); + transition: transform var(--transition-normal); +} + +.nav-item i { + margin-right: 15px; + font-size: 20px; + transition: all var(--transition-normal); +} + +.nav-item:hover, +.nav-item.active { + background-color: rgba(59, 130, 246, 0.1); + color: var(--text-light); + transform: translateX(4px); +} + +.nav-item:hover::before, +.nav-item.active::before { + transform: scaleY(1); +} + +.nav-item:hover i, +.nav-item.active i { + color: var(--primary-light); + transform: scale(1.1); +} + +.session-info { + background: linear-gradient(145deg, rgba(30, 41, 59, 0.7), rgba(15, 23, 42, 0.7)); + padding: 20px; + border-radius: var(--border-radius-md); + font-size: 14px; + line-height: 1.6; + border: 1px solid rgba(255, 255, 255, 0.05); + box-shadow: var(--shadow-md); + position: relative; + z-index: 1; + backdrop-filter: blur(4px); +} + +.session-info h4 { + margin-top: 0; + color: var(--text-light); + font-size: 18px; + margin-bottom: 15px; + border-bottom: 1px solid rgba(255, 255, 255, 0.1); + padding-bottom: 10px; + font-weight: 600; + letter-spacing: 0.5px; +} + +.session-info p { + margin-bottom: 8px; + color: var(--text-muted); +} + +.session-info p span { + font-weight: 500; + color: var(--text-light); +} + +.status-indicator { + display: flex; + align-items: center; + margin-top: 15px; + padding-top: 10px; + border-top: 1px solid rgba(255, 255, 255, 0.1); +} + +/* 记忆更新状态容器 */ +#memory-update-status { + display: none; + /* 默认隐藏 */ + align-items: center; + margin-top: 10px; + padding: 8px 10px; + background-color: #e0e0e0; + border-radius: 5px; + font-size: 0.9em; + color: #333; +} + +#memory-update-status .memory-status-dot { + width: 8px; + height: 8px; + border-radius: 50%; + margin-right: 5px; + display: inline-block; +} + +#memory-update-status .status-dot { + width: 8px; + height: 8px; + border-radius: 50%; + margin-right: 5px; + display: inline-block; +} + +#memory-update-status .status-dot.updating { + background-color: #f39c12; + /* 黄色,表示更新中 */ +} + +#memory-update-status .status-dot.success { + background-color: #27ae60; + /* 绿色,表示更新成功 */ +} + +#memory-update-status .status-dot.error { + background-color: #e74c3c; + /* 红色,表示更新失败 */ +} + +#memory-update-status .status-text { + color: #555; + font-size: 0.9em; +} + +/* 通用状态点样式,如果其他地方需要,可以保留 */ +.status-dot { + width: 12px; + height: 12px; + border-radius: 50%; + margin-right: 10px; + display: inline-block; + /* 默认颜色,如果需要 */ + background-color: #ccc; +} + +.status-text { + color: #bdc3c7; + font-size: 15px; +} + +/* 主内容区样式 */ +.main-content { + flex-grow: 1; + padding: 25px; + display: flex; + flex-direction: column; + background: linear-gradient(145deg, rgba(15, 23, 42, 0.7), rgba(30, 41, 59, 0.7)); + overflow-y: auto; + min-height: 0; + border-radius: 0 var(--border-radius-md) var(--border-radius-md) 0; + transition: all var(--transition-normal); + box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.2); + backdrop-filter: blur(4px); + position: relative; + color: var(--text-light); +} + +/* 科技感背景元素 */ +.main-content::before { + content: ''; + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + background: + radial-gradient(circle at 70% 20%, rgba(16, 185, 129, 0.05) 0%, transparent 40%), + radial-gradient(circle at 30% 80%, rgba(59, 130, 246, 0.05) 0%, transparent 40%); + z-index: 0; + pointer-events: none; +} + +/* 全屏与窄屏切换 */ +.main-content.full-width { + max-width: 100%; + padding: 35px; +} + +.container.full-width { + max-width: 100%; + margin: 0; + border-radius: 0; + padding: 15px; +} + +.content-section { + display: none; + flex-direction: column; + flex-grow: 1; + /* 允许内容部分占据可用空间 */ +} + +.content-section.active { + display: flex; +} + +.section-header { + display: flex; + justify-content: space-between; + align-items: center; + margin-bottom: 25px; + padding-bottom: 15px; + border-bottom: 1px solid #eee; +} + +.section-header h2 { + margin: 0; + font-size: 28px; + color: #2c3e50; + display: flex; + align-items: center; + gap: 10px; +} + +.section-header h2 i { + color: #3498db; +} + +.header-actions { + display: flex; + gap: 10px; +} + +/* 按钮样式 */ +.action-button { + padding: 12px 25px; + border: none; + border-radius: 8px; + cursor: pointer; + font-size: 16px; + font-weight: 600; + transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease; + display: inline-flex; + align-items: center; + gap: 8px; +} + +.action-button i { + font-size: 18px; +} + +.action-button.primary { + background-color: #3498db; + color: #fff; + box-shadow: 0 4px 10px rgba(52, 152, 219, 0.3); +} + +.action-button.primary:hover { + background-color: #2980b9; + transform: translateY(-2px); + box-shadow: 0 6px 15px rgba(52, 152, 219, 0.4); +} + +.action-button.secondary { + background-color: #95a5a6; + color: #fff; + box-shadow: 0 4px 10px rgba(149, 165, 166, 0.3); +} + +.action-button.secondary:hover { + background-color: #7f8c8d; + transform: translateY(-2px); + box-shadow: 0 6px 15px rgba(149, 165, 166, 0.4); +} + +.action-button:active { + transform: translateY(0); + box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2); +} + +/* 聊天区特定样式 */ +.chat-header { + display: flex; + justify-content: space-between; + align-items: center; + margin-bottom: 25px; + padding-bottom: 15px; + border-bottom: 1px solid rgba(255, 255, 255, 0.1); + position: relative; + z-index: 1; +} + +.chat-header h2 { + margin: 0; + font-size: 28px; + color: var(--text-light); + display: flex; + align-items: center; + gap: 12px; + font-weight: 600; + letter-spacing: 0.5px; + font-family: 'Space Grotesk', sans-serif; +} + +.chat-header h2 i { + color: var(--accent-color); + filter: drop-shadow(0 0 5px rgba(16, 185, 129, 0.5)); +} + +.chat-window { + flex-grow: 1; + background: rgba(10, 15, 30, 0.4); + border: 1px solid rgba(255, 255, 255, 0.05); + border-radius: var(--border-radius-lg); + padding: 25px; + overflow-y: auto; + margin-bottom: 25px; + display: flex; + flex-direction: column; + gap: 20px; + box-shadow: var(--shadow-md); + height: auto; + min-height: 350px; + position: relative; + backdrop-filter: blur(5px); + scrollbar-width: thin; + scrollbar-color: var(--primary-color) rgba(15, 23, 42, 0.3); +} + +.chat-window::-webkit-scrollbar { + width: 6px; +} + +.chat-window::-webkit-scrollbar-track { + background: rgba(15, 23, 42, 0.3); + border-radius: var(--border-radius-full); +} + +.chat-window::-webkit-scrollbar-thumb { + background-color: var(--primary-color); + border-radius: var(--border-radius-full); +} + +.chat-message { + display: flex; + margin-bottom: 20px; + align-items: flex-start; + position: relative; + opacity: 1; + transition: opacity 0.3s ease; +} + +.chat-message.user { + justify-content: flex-end; +} + +.chat-message.bot { + justify-content: flex-start; +} + +.message-avatar { + width: 42px; + height: 42px; + border-radius: var(--border-radius-full); + display: flex; + align-items: center; + justify-content: center; + font-size: 16px; + color: #fff; + flex-shrink: 0; + position: relative; + z-index: 2; + box-shadow: var(--shadow-md); +} + +.chat-message.user .message-avatar { + background: linear-gradient(145deg, var(--primary-color), var(--primary-dark)); + order: 2; + margin-left: 15px; +} + +.chat-message.bot .message-avatar { + background: linear-gradient(145deg, var(--accent-color), #0d9669); + order: 0; + margin-right: 15px; +} + +/* 添加头像内的图标 */ +.message-avatar::after { + font-family: "Font Awesome 5 Free"; + font-weight: 900; +} + +.chat-message.user .message-avatar::after { + content: "\f007"; + /* 用户图标 */ +} + +.chat-message.bot .message-avatar::after { + content: "\f544"; + /* 机器人图标 */ +} + +.message-content-wrapper { + display: flex; + flex-direction: column; + max-width: 75%; + position: relative; + z-index: 1; +} + +.chat-message.user .message-content-wrapper { + align-items: flex-end; +} + +.chat-message.bot .message-content-wrapper { + align-items: flex-start; +} + +.message-bubble { + padding: 15px 20px; + border-radius: var(--border-radius-lg); + font-size: 16px; + line-height: 1.6; + word-wrap: break-word; + position: relative; + backdrop-filter: blur(10px); + transition: transform 0.3s ease, box-shadow 0.3s ease; + overflow: hidden; +} + +.chat-message.user .message-bubble { + background: linear-gradient(145deg, rgba(37, 99, 235, 0.2), rgba(59, 130, 246, 0.15)); + color: var(--text-light); + border: 1px solid rgba(59, 130, 246, 0.2); + border-bottom-right-radius: 4px; + box-shadow: 0 3px 15px rgba(37, 99, 235, 0.1); +} + +.chat-message.bot .message-bubble { + background: linear-gradient(145deg, rgba(16, 185, 129, 0.15), rgba(52, 211, 153, 0.1)); + color: var(--text-light); + border: 1px solid rgba(16, 185, 129, 0.2); + border-bottom-left-radius: 4px; + box-shadow: 0 3px 15px rgba(16, 185, 129, 0.1); +} + +/* 添加科技感装饰元素 */ +.message-bubble::before { + content: ''; + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + background: linear-gradient(90deg, + transparent 0%, + rgba(255, 255, 255, 0.05) 25%, + transparent 50%); + transform: translateX(-100%); + animation: shimmer 3s infinite; + pointer-events: none; +} + +@keyframes shimmer { + 0% { + transform: translateX(-100%); + } + + 100% { + transform: translateX(100%); + } +} + +/* 消息气泡尖角 */ +.chat-message.user .message-bubble::after { + content: ''; + position: absolute; + right: -10px; + bottom: 0; + width: 0; + height: 0; + border-left: 10px solid rgba(59, 130, 246, 0.2); + border-top: 10px solid transparent; +} + +.chat-message.bot .message-bubble::after { + content: ''; + position: absolute; + left: -10px; + bottom: 0; + width: 0; + height: 0; + border-right: 10px solid rgba(16, 185, 129, 0.2); + border-top: 10px solid transparent; +} + +.message-content p { + margin: 0 0 5px 0; +} + +.message-content pre { + background-color: #eef; + border: 1px solid #ddd; + padding: 10px; + border-radius: 5px; + overflow-x: auto; + font-family: 'Consolas', 'Monaco', 'Courier New', monospace; + font-size: 14px; + white-space: pre-wrap; + word-break: break-all; +} + +.message-content code { + background-color: #eef; + padding: 2px 4px; + border-radius: 3px; + font-family: 'Consolas', 'Monaco', 'Courier New', monospace; + font-size: 14px; +} + +.message-timestamp { + font-size: 12px; + color: #999; + margin-top: 5px; + /* 时间戳与气泡的间距 */ +} + +.chat-message.user .message-timestamp { + text-align: right; +} + +.chat-message.bot .message-timestamp { + text-align: left; +} + +.chat-input-area { + display: flex; + gap: 15px; + padding-top: 20px; + border-top: 1px solid #eee; +} + +#user-input { + flex-grow: 1; + padding: 15px; + border: 1px solid #ccc; + border-radius: 8px; + font-size: 16px; + resize: vertical; + min-height: 60px; + max-height: 150px; + box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05); + transition: border-color 0.3s ease, box-shadow 0.3s ease; +} + +#user-input:focus { + border-color: #3498db; + box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2); + outline: none; +} + +#send-btn { + padding: 15px 30px; + font-size: 18px; +} + +/* 配置区特定样式 */ +.config-form { + background-color: #fdfdfd; + border: 1px solid #e0e0e0; + border-radius: 10px; + padding: 30px; + display: flex; + flex-direction: column; + gap: 20px; + box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05); + max-width: 800px; + /* 设置最大宽度 */ + margin: 0 auto; + /* 居中 */ +} + +.config-form h3 { + margin-top: 0; + margin-bottom: 15px; + color: #2c3e50; + font-size: 22px; + border-bottom: 1px solid #eee; + padding-bottom: 10px; +} + +.config-form label { + font-weight: 600; + color: #555; + margin-bottom: 5px; + display: block; +} + +.config-form input[type="text"], +.config-form input[type="password"], +.config-form input[type="number"], +.config-form select { + width: calc(100% - 22px); + /* Adjust for padding and border */ + padding: 12px; + border: 1px solid #ccc; + border-radius: 6px; + font-size: 16px; + margin-bottom: 15px; + box-sizing: border-box; + /* Include padding and border in the element's total width and height */ + transition: border-color 0.3s ease, box-shadow 0.3s ease; +} + +.config-form input:focus, +.config-form select:focus { + border-color: #3498db; + box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2); + outline: none; +} + +.password-toggle { + display: flex; + align-items: center; + margin-top: -10px; + margin-bottom: 15px; +} + +.password-toggle input[type="checkbox"] { + margin-right: 8px; + width: auto; +} + +/* 特征和记忆管理通用样式 */ +.role-management, +.memory-management { + background-color: #fdfdfd; + border: 1px solid #e0e0e0; + border-radius: 10px; + padding: 25px; + margin-bottom: 25px; + box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05); + max-width: 800px; + /* 设置最大宽度 */ + margin: 0 auto 25px auto; + /* 居中并保持底部外边距 */ +} + +.role-management h3, +.memory-management h3 { + margin-top: 0; + margin-bottom: 20px; + color: #2c3e50; + font-size: 22px; + border-bottom: 1px solid #eee; + padding-bottom: 10px; +} + +.role-list, +.memory-list { + display: flex; + flex-wrap: wrap; + gap: 10px; + margin-bottom: 20px; + max-height: 200px; + /* 限制高度,允许滚动 */ + overflow-y: auto; + padding-right: 10px; + /* 为滚动条留出空间 */ +} + +.role-item, +.memory-item { + background-color: #e8f4fd; + border: 1px solid #d0eafc; + padding: 10px 15px; + border-radius: 20px; + cursor: pointer; + transition: background-color 0.3s ease, transform 0.2s ease; + font-size: 15px; + color: #3498db; + font-weight: 500; + display: flex; + align-items: center; + gap: 8px; +} + +.role-item.active, +.memory-item.active { + background-color: #3498db; + color: #fff; + border-color: #2980b9; +} + +.role-item:hover, +.memory-item:hover { + transform: translateY(-2px); + box-shadow: 0 2px 8px rgba(52, 152, 219, 0.2); +} + +.new-role-form, +.new-memory-form { + display: flex; + gap: 10px; + margin-top: 20px; + padding-top: 15px; + border-top: 1px solid #eee; +} + +.new-role-form input, +.new-memory-form input { + flex-grow: 1; + padding: 10px 15px; + border: 1px solid #ccc; + border-radius: 6px; + font-size: 16px; +} + +.new-role-form button, +.new-memory-form button { + padding: 10px 20px; + font-size: 16px; +} + +.code-editor { + width: 100%; + padding: 15px; + border: 1px solid #e0e0e0; + border-radius: 10px; + background-color: #fdfdfd; + font-family: 'Consolas', 'Monaco', 'Courier New', monospace; + font-size: 14px; + line-height: 1.5; + resize: vertical; + min-height: 200px; + box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05); + transition: border-color 0.3s ease, box-shadow 0.3s ease; +} + +.code-editor:focus { + border-color: #3498db; + box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2); + outline: none; +} + +/* 日志区特定样式 */ +.log-viewer { + flex-grow: 1; + background-color: #2d2d2d; + color: #f8f8f2; + border: 1px solid #3a3a3a; + border-radius: 10px; + padding: 20px; + overflow: auto; + font-family: 'Consolas', 'Monaco', 'Courier New', monospace; + font-size: 14px; + line-height: 1.4; + white-space: pre-wrap; + word-break: break-all; + box-shadow: inset 0 1px 5px rgba(0, 0, 0, 0.2); + height: auto; + /* 调整为自适应高度 */ + min-height: 400px; + /* 设置最小高度 */ +} + +/* Toast 消息样式 */ +#toast-container { + position: fixed; + top: 20px; + right: 20px; + z-index: 1000; + display: flex; + flex-direction: column; + gap: 10px; +} + +.toast { + background-color: #333; + color: #fff; + padding: 12px 20px; + border-radius: 8px; + box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2); + opacity: 0; + transform: translateY(-20px); + animation: fadeInOut 3s forwards; + min-width: 250px; + font-size: 15px; + display: flex; + /* 使内容水平居中 */ + align-items: center; + justify-content: center; + /* 文本和图标居中 */ + gap: 10px; + /* 图标和文本之间的间距 */ +} + +.toast i { + font-size: 18px; +} + +.toast.success { + background-color: #28a745; +} + +.toast.error { + background-color: #dc3545; +} + +.toast.info { + background-color: #17a2b8; +} + +.toast.warning { + background-color: #f39c12; + /* 警告色 */ +} + +@keyframes fadeInOut { + 0% { + opacity: 0; + transform: translateY(-20px); + } + + 10% { + opacity: 1; + transform: translateY(0); + } + + 90% { + opacity: 1; + transform: translateY(0); + } + + 100% { + opacity: 0; + transform: translateY(-20px); + } +} + +/* Toast 消息图标样式 */ +.toast.success i::before { + content: "\f058"; + /* Font Awesome check-circle icon */ +} + +.toast.error i::before { + content: "\f06a"; + /* Font Awesome exclamation-circle icon */ +} + +.toast.warning i::before { + content: "\f071"; + /* Font Awesome exclamation-triangle icon */ +} + +.toast.info i::before { + content: "\f05a"; + /* Font Awesome info-circle icon */ +} + +/* 模态框样式 */ +.modal-overlay { + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100%; + background-color: rgba(0, 0, 0, 0.6); + display: flex; + justify-content: center; + align-items: center; + z-index: 1000; + opacity: 0; + visibility: hidden; + transition: opacity 0.3s ease, visibility 0.3s ease; +} + +.modal-overlay.active { + opacity: 1; + visibility: visible; +} + +.modal-content { + background-color: #fff; + padding: 30px; + border-radius: 12px; + box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2); + text-align: center; + max-width: 450px; + width: 90%; + transform: translateY(-50px); + transition: transform 0.3s ease; +} + +.modal-overlay.active .modal-content { + transform: translateY(0); +} + +.modal-content h3 { + margin-top: 0; + color: #2c3e50; + font-size: 24px; + margin-bottom: 15px; +} + +.modal-content p { + color: #555; + font-size: 17px; + line-height: 1.6; + margin-bottom: 30px; +} + +.modal-buttons { + display: flex; + justify-content: center; + gap: 15px; +} + +.modal-buttons .action-button { + min-width: 120px; +} + +/* Markdown 渲染样式 */ +.message-bubble h1, +.message-bubble h2, +.message-bubble h3, +.message-bubble h4, +.message-bubble h5, +.message-bubble h6 { + color: #2c3e50; + margin-top: 1em; + margin-bottom: 0.5em; + font-weight: bold; + line-height: 1.2; +} + +.message-bubble h1 { + font-size: 2em; + border-bottom: 1px solid #eee; + padding-bottom: 0.3em; +} + +.message-bubble h2 { + font-size: 1.75em; + border-bottom: 1px solid #eee; + padding-bottom: 0.3em; +} + +.message-bubble h3 { + font-size: 1.5em; +} + +.message-bubble h4 { + font-size: 1.25em; +} + +.message-bubble h5 { + font-size: 1em; +} + +.message-bubble h6 { + font-size: 0.875em; + color: #777; +} + +.message-bubble p { + margin: 0.5em 0; +} + +.message-bubble ul, +.message-bubble ol { + margin: 0.5em 0 0.5em 20px; + padding: 0; +} + +.message-bubble li { + margin-bottom: 0.25em; +} + +.message-bubble blockquote { + border-left: 4px solid #ccc; + padding: 0 15px; + color: #777; + margin: 0.5em 0; +} + +.message-bubble pre { + background-color: #eef; + border: 1px solid #ddd; + padding: 10px; + border-radius: 5px; + overflow-x: auto; + font-family: 'Consolas', 'Monaco', 'Courier New', monospace; + font-size: 0.9em; + white-space: pre-wrap; + word-break: break-all; + margin: 0.5em 0; +} + +.message-bubble code { + background-color: #eef; + padding: 2px 4px; + border-radius: 3px; + font-family: 'Consolas', 'Monaco', 'Courier New', monospace; + font-size: 0.9em; +} + +.message-bubble pre code { + background-color: transparent; + padding: 0; + border-radius: 0; +} + +.message-bubble table { + width: 100%; + border-collapse: collapse; + margin: 1em 0; +} + +.message-bubble th, +.message-bubble td { + border: 1px solid #ddd; + padding: 8px; + text-align: left; +} + +.message-bubble th { + background-color: #f2f2f2; + font-weight: bold; +} + +.message-bubble a { + color: #3498db; + text-decoration: none; +} + +.message-bubble a:hover { + text-decoration: underline; +} + +.message-bubble strong, +.message-bubble b { + font-weight: bold; +} + +.message-bubble em, +.message-bubble i { + font-style: italic; +} + +/* 响应式设计 */ +@media (max-width: 1024px) { + .sidebar { + flex-basis: 220px; + /* 中等屏幕下侧边栏宽度略小 */ + padding: 20px 15px; + } + + .sidebar .logo { + font-size: 24px; + margin-bottom: 30px; + } + + .nav-item { + font-size: 16px; + padding: 12px 15px; + } + + .nav-item i { + font-size: 18px; + } + + .main-content { + padding: 20px; + } + + .section-header h2, + .chat-header h2 { + font-size: 24px; + } + + .action-button { + padding: 10px 20px; + font-size: 15px; + } + + .chat-message .message-avatar { + width: 35px; + height: 35px; + font-size: 16px; + } + + .message-bubble { + padding: 10px 15px; + font-size: 15px; + } + + #user-input { + padding: 12px; + font-size: 15px; + } + + #send-btn { + padding: 12px 25px; + font-size: 16px; + } + + .config-form h3 { + font-size: 20px; + } + + .config-form input, + .config-form select { + padding: 10px; + font-size: 15px; + } + + .role-item, + .memory-item { + padding: 8px 12px; + font-size: 14px; + } + + .new-role-form input, + .new-memory-form input { + padding: 8px 12px; + font-size: 15px; + } + + .new-role-form button, + .new-memory-form button { + padding: 8px 15px; + font-size: 15px; + } + + .code-editor { + padding: 12px; + font-size: 13px; + } + + .log-viewer { + padding: 15px; + font-size: 13px; + } +} + +@media (max-width: 768px) { + body { + overflow-y: auto; + /* 允许在小屏幕上垂直滚动 */ + min-height: auto; + /* 在小屏幕上允许body高度自应内容 */ + } + + .container { + flex-direction: column; + /* 垂直堆叠 */ + border-radius: 0; + /* 小屏幕下移除圆角 */ + box-shadow: none; + /* 移除阴影 */ + margin: 0; + /* 移除外边距 */ + padding: 0; + /* 移除内边距 */ + width: 100%; + /* 确保容器在小屏幕下占据全部宽度 */ + min-height: 100vh; + /* 确保容器在小屏幕下占据整个视口高度 */ + } + + .sidebar { + flex-basis: auto; + /* 允许侧边栏根据内容调整高度 */ + width: 100%; + /* 侧边栏全宽 */ + border-right: none; + border-bottom: 1px solid #34495e; + /* 底部边框 */ + padding: 20px; + box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1); + } + + .sidebar .logo { + margin-bottom: 20px; + } + + .nav-menu { + display: flex; + flex-wrap: wrap; + justify-content: center; + gap: 10px; + margin-bottom: 20px; + } + + .nav-item { + flex-grow: 1; + justify-content: center; + text-align: center; + padding: 10px; + font-size: 16px; + margin-bottom: 0; + } + + .nav-item i { + margin-right: 0; + margin-bottom: 5px; + /* 图标和文字垂直排列 */ + } + + .session-info { + display: none; + /* 小屏幕下隐藏会话信息 */ + } + + .main-content { + padding: 15px; + flex-grow: 1; + /* 允许主内容区占据剩余空间 */ + overflow-y: auto; + /* 允许主内容区滚动 */ + min-height: calc(100vh - 100px); + /* 确保主内容区在小屏幕下有足够高度 */ + } + + .chat-window { + padding: 15px; + margin-bottom: 15px; + } + + .chat-message .message-content-wrapper { + max-width: 85%; + /* 小屏幕下消息宽度更大 */ + } + + .chat-input-area { + flex-direction: column; + gap: 10px; + padding-top: 15px; + } + + #user-input { + min-height: 50px; + } + + #send-btn { + width: 100%; + padding: 12px; + } + + .modal-content { + width: 95%; + padding: 20px; + } + + .modal-content h3 { + font-size: 20px; + } + + .modal-content p { + font-size: 15px; + } + + .modal-buttons { + flex-direction: column; + gap: 10px; + } + + .modal-buttons .action-button { + width: 100%; + min-width: auto; + } +} + +@media (max-width: 480px) { + .sidebar { + padding: 15px; + } + + .sidebar .logo { + font-size: 22px; + } + + .nav-item { + font-size: 14px; + padding: 8px; + } + + .main-content { + padding: 10px; + } + + .section-header h2, + .chat-header h2 { + font-size: 20px; + } + + .action-button { + padding: 8px 15px; + font-size: 14px; + } + + .chat-message .message-avatar { + width: 30px; + height: 30px; + font-size: 14px; + } + + .message-bubble { + padding: 8px 12px; + font-size: 14px; + } + + #user-input { + padding: 10px; + font-size: 14px; + } + + #send-btn { + font-size: 15px; + } + + .config-form h3 { + font-size: 18px; + } + + .config-form input, + .config-form select { + font-size: 14px; + } + + .role-item, + .memory-item { + font-size: 13px; + } + + .new-role-form input, + .new-memory-form input { + font-size: 14px; + } + + .new-role-form button, + .new-memory-form button { + font-size: 14px; + } + + .code-editor { + font-size: 12px; + } + + .log-viewer { + font-size: 12px; + } +} \ No newline at end of file