/* 现代文案撰写系统界面 - 毛玻璃效果版 */ @import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap'); /* 导入组件样式 */ @import 'components/copy-button.css'; @import 'components/tables.css'; @import 'components/markdown.css'; /* * Z-Index 层级说明: * 1000: 用户下拉菜单、通知消息 * 1001: 移动端智能体菜单遮罩层 * 1002: 智能体菜单、智能体下拉按钮 * 1003+: 其他高级UI元素 */ :root { /* 主色调更新为现代风格 */ --primary-indigo: #6366f1; --primary-purple: #8b5cf6; --primary-blue: #3b82f6; --primary-teal: #14b8a6; /* 渐变色 */ --indigo-purple-gradient: linear-gradient(135deg, var(--primary-indigo), var(--primary-purple)); --blue-teal-gradient: linear-gradient(135deg, var(--primary-blue), var(--primary-teal)); /* 状态颜色 */ --success-color: #10b981; --warning-color: #f59e0b; --danger-color: #ef4444; --info-color: #3b82f6; /* 创意等级颜色 */ --creative-high-color: #10b981; --creative-medium-color: #f59e0b; --creative-low-color: #ef4444; /* 中性色调 */ --gray-50: #f9fafb; --gray-100: #f3f4f6; --gray-200: #e5e7eb; --gray-300: #d1d5db; --gray-400: #9ca3af; --gray-500: #6b7280; --gray-600: #4b5563; --gray-700: #374151; --gray-800: #1f2937; --gray-900: #111827; /* 阴影效果 */ --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05); --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06); --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05); --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04); --shadow-inner: inset 0 2px 4px 0 rgba(0, 0, 0, 0.06); --shadow-glow-indigo: 0 0 15px 2px rgba(99, 102, 241, 0.25); --shadow-glow-purple: 0 0 15px 2px rgba(139, 92, 246, 0.25); /* 圆角设置 */ --radius-sm: 0.25rem; --radius: 0.5rem; --radius-md: 0.75rem; --radius-lg: 1rem; --radius-xl: 1.5rem; --radius-full: 9999px; /* 过渡和动效 */ --transition: all 0.3s ease; --transition-slow: all 0.5s ease; --transition-bounce: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1); /* 毛玻璃效果 */ --blur-sm: 4px; --blur-md: 8px; --blur-lg: 12px; --glass-opacity: 0.7; --glass-border: 1px solid rgba(255, 255, 255, 0.2); --glass-background: rgba(255, 255, 255, 0.15); --glass-background-dark: rgba(23, 25, 35, 0.6); } /* 水波纹效果 */ .ripple { position: absolute; border-radius: 50%; background-color: rgba(255, 255, 255, 0.4); transform: scale(0); animation: ripple 0.6s linear; pointer-events: none; } @keyframes ripple { to { transform: scale(4); opacity: 0; } } .btn, #reset-btn, #toggle-streaming-btn, #send-btn { position: relative; overflow: hidden; } /* 发送按钮动画效果 */ #send-btn.sending { animation: sending-pulse 0.6s ease-in-out; } /* 停止按钮样式 */ #send-btn.stopping { background-color: var(--danger-color); transition: background-color 0.3s ease; position: relative; } #send-btn.stopping:hover { background-color: #f43636; transform: translateY(-2px); } #send-btn.stopping svg { width: 12px; height: 12px; color: white; background-color: white; border-radius: 2px; } @keyframes sending-pulse { 0% { transform: scale(1); } 50% { transform: scale(0.92); background: var(--primary-indigo); } 100% { transform: scale(1); } } * { box-sizing: border-box; margin: 0; padding: 0; } /* 全局过渡效果 - 确保主题切换平滑 */ * { transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease; } /* 排除不需要过渡的元素 */ .typing-indicator span, .loading-spinner, .ripple, .message { transition: none !important; } html { height: 100%; scroll-behavior: smooth; } body { font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif; background: linear-gradient(135deg, #f5f3ff, #ede9fe, #dbeafe, #e0f2fe); background-attachment: fixed; color: var(--gray-800); line-height: 1.6; min-height: 100vh; display: flex; justify-content: center; align-items: center; padding: 20px; position: relative; overflow-x: hidden; transition: background 0.3s ease, color 0.3s ease; } /* 背景动画元素 */ .glass-particles { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: -1; overflow: hidden; } .glass-particles::before, .glass-particles::after { content: ''; position: absolute; border-radius: 50%; filter: blur(var(--blur-lg)); opacity: 0.4; animation: float 20s infinite alternate ease-in-out; } .glass-particles::before { width: 300px; height: 300px; background: var(--primary-indigo); top: 10%; left: 15%; animation-delay: 0s; } .glass-particles::after { width: 250px; height: 250px; background: var(--primary-purple); bottom: 15%; right: 10%; animation-delay: -10s; } @keyframes float { 0% { transform: translate(0, 0) scale(1); } 50% { transform: translate(5%, 5%) scale(1.1); } 100% { transform: translate(-5%, -5%) scale(0.9); } } body::before { content: ''; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%236366f1' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E"); opacity: 0.5; z-index: -1; } /* 通用毛玻璃效果 */ .glass-panel { background-color: rgb(255, 255, 255); backdrop-filter: blur(var(--blur-sm)); -webkit-backdrop-filter: blur(var(--blur-sm)); box-shadow: var(--shadow); border: var(--glass-border); transition: var(--transition); } .glass-panel:hover { box-shadow: var(--shadow-md); } .glass-header { backdrop-filter: blur(var(--blur-md)); -webkit-backdrop-filter: blur(var(--blur-md)); border-radius: var(--radius-lg) var(--radius-lg) 0 0; z-index: 100; position: relative; } .chat-container { width: 100%; max-width: 1600px; height: calc(100vh - 40px); max-height: 900px; display: flex; flex-direction: row; margin: 0 auto; box-shadow: var(--shadow-lg); position: relative; background-color: rgba(255, 255, 255, 0.1); backdrop-filter: blur(var(--blur-sm)); -webkit-backdrop-filter: blur(var(--blur-sm)); border: var(--glass-border); border-radius: var(--radius-lg); transition: var(--transition); overflow: hidden; /* 防止内容溢出 */ z-index: 1; } .chat-container:hover { box-shadow: var(--shadow-glow-indigo); } /* 历史记录侧边栏样式 */ .history-sidebar { width: 280px; min-width: 280px; height: 100%; background: rgba(255, 255, 255, 0.15); backdrop-filter: blur(var(--blur-md)); -webkit-backdrop-filter: blur(var(--blur-md)); border-right: var(--glass-border); display: flex; flex-direction: column; position: relative; z-index: 2; } .sidebar-header { padding: 20px 16px 16px 16px; border-bottom: var(--glass-border); background: rgba(255, 255, 255, 0.1); } .logo-container { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; } .sidebar-logo { width: 32px; height: 32px; border-radius: var(--radius); object-fit: contain; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1)); } .sidebar-title { font-size: 1.1rem; font-weight: 600; color: var(--gray-800); } .new-chat-btn { width: 100%; padding: 12px 16px; background: rgba(255, 255, 255, 0.8); border: 1px solid rgba(255, 255, 255, 0.3); border-radius: var(--radius); color: var(--gray-700); font-size: 0.9rem; font-weight: 500; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); box-shadow: var(--shadow-sm); position: relative; overflow: hidden; } .new-chat-btn::before { content: ''; position: absolute; top: 0; left: -100%; width: 100%; height: 100%; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent); transition: left 0.5s ease; } .new-chat-btn:hover { background: rgba(255, 255, 255, 0.95); color: var(--gray-900); transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: rgba(99, 102, 241, 0.3); } .new-chat-btn:hover::before { left: 100%; } .new-chat-btn:active { transform: translateY(-1px); box-shadow: var(--shadow-sm); } .new-chat-btn svg { transition: transform 0.3s ease; } .new-chat-btn:hover svg { transform: scale(1.1) rotate(90deg); } .history-content { flex: 1; overflow-y: auto; padding: 8px 0; scrollbar-width: thin; scrollbar-color: rgba(100, 116, 139, 0.3) transparent; } .history-content::-webkit-scrollbar { width: 6px; } .history-content::-webkit-scrollbar-track { background: transparent; } .history-content::-webkit-scrollbar-thumb { background-color: rgba(100, 116, 139, 0.3); border-radius: 3px; } .history-content::-webkit-scrollbar-thumb:hover { background-color: rgba(100, 116, 139, 0.5); } .history-group { margin-bottom: 24px; } .group-header { padding: 8px 16px 8px 16px; font-size: 0.8rem; font-weight: 600; color: var(--gray-500); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 8px; position: relative; transition: all 0.3s ease; } .group-header::before { content: ''; position: absolute; left: 0; top: 50%; width: 3px; height: 12px; background: linear-gradient(to bottom, var(--primary-indigo), var(--primary-purple)); border-radius: 2px; transform: translateY(-50%); opacity: 0.6; transition: all 0.3s ease; } .group-header:hover { color: var(--gray-700); transform: translateX(4px); } .group-header:hover::before { opacity: 1; height: 16px; } .conversation-list { padding: 0 8px; } .conversation-item { display: flex; align-items: center; padding: 12px 16px; margin-bottom: 4px; border-radius: var(--radius); cursor: pointer; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); position: relative; background: transparent; border: 1px solid transparent; overflow: hidden; } .conversation-item::before { content: ''; position: absolute; top: 0; left: -100%; width: 100%; height: 100%; background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.1), transparent); transition: left 0.6s ease; opacity: 0; } .conversation-item:hover { background: rgba(255, 255, 255, 0.15); border-color: rgba(255, 255, 255, 0.25); transform: translateX(4px); box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); } .conversation-item:hover::before { left: 100%; opacity: 1; } .conversation-item.active { background: rgba(99, 102, 241, 0.2); border-color: rgba(99, 102, 241, 0.4); box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3); transform: translateX(6px); } .conversation-item.active::before { background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.2), transparent); opacity: 1; } .conversation-content { flex: 1; min-width: 0; margin-right: 8px; } .conversation-title { font-size: 0.9rem; color: var(--gray-700); font-weight: 500; line-height: 1.4; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .conversation-item.active .conversation-title { color: var(--primary-indigo); font-weight: 600; } .conversation-menu { width: 24px; height: 24px; background: transparent; border: none; border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center; opacity: 0; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); color: var(--gray-500); position: relative; overflow: hidden; } .conversation-menu::before { content: ''; position: absolute; top: 50%; left: 50%; width: 0; height: 0; background: rgba(99, 102, 241, 0.1); border-radius: 50%; transition: all 0.3s ease; transform: translate(-50%, -50%); } .conversation-item:hover .conversation-menu { opacity: 1; background: rgba(255, 255, 255, 0.1); transform: scale(1.1); } .conversation-item:hover .conversation-menu::before { width: 100%; height: 100%; } .conversation-menu:hover { background: rgba(255, 255, 255, 0.2); color: var(--gray-700); transform: scale(1.2); } .conversation-menu:hover::before { background: rgba(99, 102, 241, 0.2); } .sidebar-footer { padding: 16px; border-top: var(--glass-border); background: rgba(255, 255, 255, 0.05); } .user-profile { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: var(--radius); background: rgba(255, 255, 255, 0.1); border: 1px solid rgba(255, 255, 255, 0.2); cursor: pointer; transition: var(--transition); } .user-profile:hover { background: rgba(255, 255, 255, 0.15); border-color: rgba(255, 255, 255, 0.3); } .user-avatar-sidebar { width: 32px; height: 32px; border-radius: 50%; overflow: hidden; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); border: 2px solid rgba(255, 255, 255, 0.3); flex-shrink: 0; } .user-avatar-sidebar img { width: 100%; height: 100%; object-fit: cover; } .avatar-fallback-sidebar { width: 100%; height: 100%; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); display: flex; align-items: center; justify-content: center; color: white; font-weight: 600; font-size: 14px; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3); } .user-info-sidebar { flex: 1; min-width: 0; } .user-name-sidebar { font-size: 0.9rem; font-weight: 600; color: var(--gray-800); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .user-menu-btn { width: 24px; height: 24px; background: transparent; border: none; border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center; opacity: 0.6; transition: var(--transition); color: var(--gray-500); } .user-profile:hover .user-menu-btn { opacity: 1; background: rgba(255, 255, 255, 0.1); } .user-menu-btn:hover { background: rgba(255, 255, 255, 0.2); color: var(--gray-700); } /* 对话上下文菜单样式 */ .conversation-context-menu { position: absolute; background: rgba(255, 255, 255, 0.95); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border: 1px solid rgba(255, 255, 255, 0.3); border-radius: 8px; box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15); padding: 8px 0; min-width: 120px; z-index: 1000; opacity: 0; transform: scale(0.9); transition: all 0.2s ease; } .conversation-context-menu.show { opacity: 1; transform: scale(1); } .menu-item { display: flex; align-items: center; gap: 8px; padding: 8px 16px; cursor: pointer; transition: background-color 0.2s ease; color: var(--gray-700); font-size: 0.9rem; } .menu-item:hover { background: rgba(99, 102, 241, 0.1); color: var(--primary-indigo); } .menu-item svg { width: 16px; height: 16px; flex-shrink: 0; } /* 主聊天区域样式 */ .main-chat-area { flex: 1; display: flex; flex-direction: column; min-width: 0; height: 100%; } /* 智能体切换菜单栏样式 */ .agent-switcher-container { position: absolute; left: -280px; top: 80px; width: 260px; z-index: 20; } .agent-switcher { width: 100%; background: rgba(255, 255, 255, 0.15); backdrop-filter: blur(var(--blur-md)); -webkit-backdrop-filter: blur(var(--blur-md)); border: var(--glass-border); border-radius: var(--radius-lg); padding: 20px; box-shadow: var(--shadow-lg); transition: var(--transition); } .agent-switcher:hover { box-shadow: var(--shadow-glow-indigo); transform: translateX(5px); } /* 状态指示器样式 */ .agent-status-indicator { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; padding: 12px 16px; background: rgba(255, 255, 255, 0.1); border-radius: var(--radius); border: 1px solid rgba(255, 255, 255, 0.2); } .status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--success-color); animation: pulse 2s infinite; } .status-dot.active { background: var(--primary-indigo); } .status-text { font-size: 0.9rem; color: var(--gray-700); font-weight: 500; } #current-platform-name { color: var(--primary-indigo); font-weight: 600; } @keyframes pulse { 0% { opacity: 1; } 50% { opacity: 0.5; } 100% { opacity: 1; } } .agent-switcher-header { margin-bottom: 20px; padding-bottom: 15px; border-bottom: 1px solid rgba(255, 255, 255, 0.2); } .agent-switcher-header h3 { margin: 0 0 10px 0; font-size: 1.1rem; font-weight: 600; color: var(--gray-800); text-align: center; } .current-agent { display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 0.9rem; } .agent-label { color: var(--gray-600); } .agent-name { color: var(--primary-indigo); font-weight: 600; } .agent-list { display: flex; flex-direction: column; gap: 12px; } .agent-item { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-radius: var(--radius); background: rgba(255, 255, 255, 0.1); border: 1px solid transparent; cursor: pointer; transition: var(--transition); position: relative; overflow: hidden; user-select: none; /* 防止文本被选中 */ } .agent-item:active { transform: scale(0.98); transition: transform 0.1s ease; } .agent-item.active { background: rgba(99, 102, 241, 0.1) !important; border-color: rgba(99, 102, 241, 0.4) !important; box-shadow: var(--shadow-glow-indigo) !important; transform: translateX(5px); cursor: default; /* 激活状态下显示默认光标 */ } .agent-item.active::before { opacity: 1; } .agent-item.active .agent-title { color: var(--primary-indigo) !important; font-weight: 700; } .agent-item.active:hover { transform: translateX(5px); /* 保持激活状态的偏移 */ } .agent-item::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(139, 92, 246, 0.1)); opacity: 0; transition: var(--transition); } .agent-item:hover { background: rgba(255, 255, 255, 0.2); border-color: rgba(99, 102, 241, 0.3); transform: translateX(3px); } .agent-item:hover::before { opacity: 1; } .agent-item.active .agent-title { color: var(--primary-indigo) !important; font-weight: 700; } .agent-icon { width: 50px; height: 50px; display: flex; align-items: center; justify-content: center; border-radius: var(--radius); flex-shrink: 0; transition: var(--transition); overflow: hidden; } .platform-icon { width: 32px; height: 32px; object-fit: contain; transition: var(--transition); filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1)); } .icon-fallback { font-size: 1.8rem; color: var(--gray-600); display: none; } /* 图标悬停效果 */ .agent-item:hover .platform-icon { filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.15)); } /* 激活状态下的图标效果 */ .agent-item.active .platform-icon { filter: drop-shadow(0 4px 12px rgba(99, 102, 241, 0.3)); } .agent-item:hover .agent-icon .platform-icon { transform: scale(1.1); } .agent-info { flex: 1; min-width: 0; } .agent-title { font-weight: 600; color: var(--gray-800); font-size: 1.1rem; } /* 聊天主内容区域 */ .chat-main-content { flex: 1; display: flex; flex-direction: column; position: relative; min-height: 0; /* 确保flex子元素能够正确收缩 */ } /* 移动端菜单切换按钮 - 默认隐藏 */ .mobile-menu-toggle { display: none; position: fixed; left: 20px; top: 100px; z-index: 999; width: 50px; height: 50px; background: var(--primary-indigo); border: none; border-radius: 50%; color: white; font-size: 1.2rem; box-shadow: var(--shadow-lg); cursor: pointer; transition: var(--transition); } .mobile-menu-toggle:hover { transform: scale(1.1); box-shadow: var(--shadow-glow-indigo); } .logo-title-container { display: flex; align-items: center; gap: 12px; } .logo-title-link{ color: red; text-decoration: none; } .header-logo { width: 40px; height: 40px; border-radius: var(--radius); object-fit: contain; transition: var(--transition); filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1)); } .header-logo:hover { transform: scale(1.05); filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.15)); } .version-tag { font-size: 0.7rem; font-weight: 500; color: var(--gray-50); background: linear-gradient(135deg, var(--primary-indigo), var(--primary-purple)); padding: 2px 8px; border-radius: var(--radius-full); margin-left: 8px; box-shadow: var(--shadow-sm); vertical-align: middle; display: inline-flex; align-items: center; justify-content: center; } header { display: flex; justify-content: space-between; align-items: center; padding: 12px 20px; background-color: rgba(255, 255, 255, 0.25); border-bottom: var(--glass-border); position: relative; z-index: 2; backdrop-filter: blur(var(--blur-md)); -webkit-backdrop-filter: blur(var(--blur-md)); border-radius: var(--radius-lg) var(--radius-lg) 0 0; } header::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(to right, rgba(99, 102, 241, 0.15), rgba(139, 92, 246, 0.15)); opacity: 0.5; z-index: -1; border-radius: var(--radius-lg) var(--radius-lg) 0 0; } header h1 { font-size: 1.25rem; font-weight: 600; color: var(--gray-800); display: flex; align-items: center; margin: 0; } header h1 svg { margin-right: 8px; } .buttons-container { display: flex; gap: 10px; align-items: center; } /* 用户信息样式 */ .user-info { position: relative; display: flex; align-items: center; gap: 12px; padding: 10px 16px; background: rgba(255, 255, 255, 0.15); border-radius: 12px; border: 1px solid rgba(255, 255, 255, 0.25); backdrop-filter: blur(15px); transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); cursor: pointer; } .user-info:hover { background: rgba(255, 255, 255, 0.2); border-color: rgba(255, 255, 255, 0.35); transform: translateY(-1px); box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1); } .user-details { display: flex; align-items: center; gap: 10px; } .user-avatar { position: relative; width: 36px; height: 36px; border-radius: 50%; overflow: hidden; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); border: 2px solid rgba(255, 255, 255, 0.3); transition: all 0.3s ease; } .user-info:hover .user-avatar { border-color: rgba(255, 255, 255, 0.5); transform: scale(1.05); } .user-avatar img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s ease; } .user-info:hover .user-avatar img { transform: scale(1.1); } .avatar-fallback { width: 100%; height: 100%; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); display: flex; align-items: center; justify-content: center; color: white; font-weight: 600; font-size: 16px; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3); } .user-text { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; } .user-info-row { display: flex; align-items: center; gap: 8px; width: 100%; } .user-name { font-size: 14px; font-weight: 600; color: #1a1a1a; white-space: nowrap; text-shadow: 0 1px 2px rgba(255, 255, 255, 0.5); } .user-type { font-size: 11px; color: #666; opacity: 0.8; padding: 2px 6px; background: rgba(255, 255, 255, 0.3); border-radius: 10px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.5px; } .user-title { font-size: 10px; color: #888; opacity: 0.7; font-style: italic; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .user-dropdown { position: absolute; top: calc(100% + 8px); right: 0; background: rgba(255, 255, 255, 0.98); border-radius: 12px; box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15); backdrop-filter: blur(20px); border: 1px solid rgba(255, 255, 255, 0.3); min-width: 220px; z-index: 1000; opacity: 0; visibility: hidden; transform: translateY(-15px) scale(0.95); transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); overflow: hidden; } .user-info:hover .user-dropdown { opacity: 1; visibility: visible; transform: translateY(0) scale(1); } .user-dropdown::before { content: ''; position: absolute; top: -6px; right: 20px; width: 12px; height: 12px; background: rgba(255, 255, 255, 0.98); border: 1px solid rgba(255, 255, 255, 0.3); border-bottom: none; border-right: none; transform: rotate(45deg); } .user-dropdown-content { padding: 16px; } .user-info-item { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-bottom: 1px solid rgba(0, 0, 0, 0.08); transition: background-color 0.2s ease; } .user-info-item:hover { background-color: rgba(0, 0, 0, 0.02); padding-left: 8px; padding-right: 8px; margin-left: -8px; margin-right: -8px; border-radius: 6px; } .user-info-item:last-child { border-bottom: none; } .info-label { font-size: 12px; color: #666; font-weight: 500; } .info-value { font-size: 12px; color: #333; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; } /* 成功和错误消息样式 */ .success-message, .error-message { position: fixed; top: 20px; left: 50%; transform: translateX(-50%); padding: 12px 24px; border-radius: 8px; font-weight: 500; z-index: 1000; animation: slideDown 0.3s ease-out; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); } .success-message { background: linear-gradient(135deg, #4caf50, #45a049); color: white; } .error-message { background: linear-gradient(135deg, #f44336, #d32f2f); color: white; } @keyframes slideDown { from { opacity: 0; transform: translateX(-50%) translateY(-20px); } to { opacity: 1; transform: translateX(-50%) translateY(0); } } .logout-btn { width: 100%; padding: 10px 16px; background: linear-gradient(135deg, #ff4757 0%, #ff3742 100%); color: white; border: none; border-radius: 8px; font-size: 14px; font-weight: 500; cursor: pointer; transition: all 0.3s ease; display: flex; align-items: center; justify-content: center; gap: 8px; } .logout-btn:hover { background: linear-gradient(135deg, #ff3742 0%, #ff2f3a 100%); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(255, 71, 87, 0.3); } .logout-btn svg { transition: transform 0.3s ease; } .logout-btn:hover svg { transform: translateX(2px); } .btn { padding: 8px 16px; background-color: transparent; border: none; border-radius: var(--radius); font-weight: 500; font-size: 0.875rem; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 6px; transition: var(--transition); /* color: var(--gray-700); */ background-color: rgba(255, 255, 255, 0.5); backdrop-filter: blur(var(--blur-sm)); -webkit-backdrop-filter: blur(var(--blur-sm)); box-shadow: var(--shadow-sm); } .btn:hover { background-color: rgba(255, 255, 255, 0.7); color: var(--gray-900); box-shadow: var(--shadow); transform: translateY(-1px); } .btn:active { transform: translateY(0); box-shadow: var(--shadow-sm); } .glass-btn { padding: 8px 16px; background-color: rgba(255, 255, 255, 0.3); border: var(--glass-border); color: var(--gray-700); box-shadow: var(--shadow-sm); transition: var(--transition); } .glass-btn:hover { background-color: rgba(255, 255, 255, 0.4); box-shadow: var(--shadow); color: var(--gray-900); } .glass-btn-primary { padding: 10px; background-color: var(--primary-indigo); border: none; color: white; border-radius: var(--radius-full); width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow); transition: var(--transition); cursor: pointer; opacity: 1; position: relative; overflow: hidden; } .glass-btn-primary:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); } .glass-btn-primary:active { transform: translateY(0); } .glass-btn svg, .glass-btn-primary svg { width: 16px; height: 16px; } .glass-btn:hover svg { transform: scale(1.05); } .glass-btn-primary:hover svg { transform: scale(1.1); } #reset-btn { color: var(--gray-700); display: flex; align-items: center; gap: 6px; font-size: 0.875rem; font-weight: 500; background-color: rgba(255, 255, 255, 0.4); box-shadow: var(--shadow-sm); } #reset-btn:hover { background-color: rgba(255, 255, 255, 0.6); color: var(--gray-900); box-shadow: var(--shadow); } #reset-btn.confirming { background-color: var(--danger-color); color: white; animation: pulse 2s infinite; } @keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); } 70% { box-shadow: 0 0 0 5px rgba(239, 68, 68, 0); } 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); } } /* 智能体选择按钮样式 - 与重置按钮保持一致 */ #agent-dropdown { color: var(--gray-700); display: flex; align-items: center; gap: 6px; font-size: 0.875rem; font-weight: 500; background-color: rgba(255, 255, 255, 0.4); box-shadow: var(--shadow-sm); cursor: pointer; border-radius: var(--radius); transition: var(--transition); position: relative; z-index: 1002; } #agent-dropdown:hover { background-color: rgba(255, 255, 255, 0.6); color: var(--gray-900); box-shadow: var(--shadow); } #agent-dropdown svg { transition: var(--transition); } #agent-dropdown:hover svg { transform: scale(1.05); } /* 智能体菜单样式 */ #agent-menu { z-index: 1001 !important; position: absolute !important; top: calc(100% + 6px) !important; left: 0 !important; min-width: 220px !important; background: rgba(255, 255, 255, 0.95) !important; backdrop-filter: blur(20px) !important; -webkit-backdrop-filter: blur(20px) !important; border: 1px solid rgba(255, 255, 255, 0.3) !important; border-radius: 12px !important; box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15) !important; overflow: hidden !important; } #agent-menu ul { list-style: none !important; margin: 0 !important; padding: 8px !important; } .agent-option { display: flex !important; align-items: center !important; gap: 8px !important; padding: 12px !important; border-radius: 8px !important; cursor: pointer !important; transition: all 0.2s ease !important; background: transparent !important; border: 1px solid transparent !important; } .agent-option:hover { background: rgba(99, 102, 241, 0.1) !important; border-color: rgba(99, 102, 241, 0.2) !important; transform: translateY(-1px) !important; } .agent-option[data-active="true"] { background: rgba(99, 102, 241, 0.15) !important; border-color: rgba(99, 102, 241, 0.3) !important; box-shadow: 0 2px 8px rgba(99, 102, 241, 0.2) !important; } .chat-messages { flex: 1; min-height: 0; /* 确保能够收缩 */ overflow-y: auto; padding: 30px; position: relative; display: flex; flex-direction: column; gap: 30px; background: rgba(255, 255, 255, 0.1); backdrop-filter: blur(var(--blur-sm)); -webkit-backdrop-filter: blur(var(--blur-sm)); scrollbar-width: thin; scrollbar-color: rgba(100, 116, 139, 0.5) transparent; } .chat-messages::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(to bottom, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.02)); opacity: 0.3; z-index: -1; pointer-events: none; } .chat-messages::-webkit-scrollbar { width: 8px; height: 8px; } .chat-messages::-webkit-scrollbar-track { background: transparent; } .chat-messages::-webkit-scrollbar-thumb { background-color: rgba(100, 116, 139, 0.5); border-radius: 20px; } .chat-messages::-webkit-scrollbar-thumb:hover { background-color: rgba(100, 116, 139, 0.7); } .message { padding: 15px 20px; border-radius: var(--radius); animation: fadeIn 0.3s ease-out forwards; word-break: break-word; position: relative; opacity: 0; transform: translateY(10px); transition: transform 0.3s ease, opacity 0.3s ease; } @keyframes fadeIn { to { opacity: 1; transform: translateY(0); } } .message.user { align-self: flex-end; background-color: rgba(59, 130, 246, 0.1); } .message.bot { align-self: flex-start; background-color: rgba(255, 255, 255, 0.15); width: 90%; max-width: 1200px; } .message-content { font-size: 1rem; line-height: 1.6; background: rgba(255, 255, 255, 0.8); padding: 20px 30px; border-radius: var(--radius); box-shadow: var(--shadow-sm); backdrop-filter: blur(var(--blur-sm)); -webkit-backdrop-filter: blur(var(--blur-sm)); } .message.bot .message-content { width: 100%; display: flex; flex-direction: column; padding: 24px; line-height: 1.7; font-size: 1.05rem; } .thought-container { width: 100%; margin: 10px 0 20px 0; background-color: rgba(121, 82, 179, 0.08); border-left: 3px solid #7952b3; padding: 14px 18px; border-radius: 0 8px 8px 0; font-style: italic; color: #6c757d; position: relative; box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05); transition: all 0.3s ease; } .thought-container[data-collapsed="true"] { padding-bottom: 10px; } .thought-container::before { content: "思考中..."; display: inline-block; font-size: 0.9rem; color: #7952b3; font-weight: 600; margin-bottom: 8px; font-style: normal; letter-spacing: 0.03em; } .thought-container p { margin: 0 0 8px 0; padding: 0; line-height: 1.6; font-size: 0.95rem; white-space: normal; word-break: normal; word-wrap: break-word; overflow-wrap: break-word; text-align: left; width: 100%; transition: all 0.2s ease; display: block; } /* 最后一个段落不需要底部间距 */ .thought-container p:last-child { margin-bottom: 0; } /* 确保段落内容按段落显示,不连续 */ .thought-container p:not(:last-child) { margin-bottom: 8px; } /* 思考过程第一段的特殊样式 */ .thought-container p:first-of-type { font-weight: normal; margin-top: 0; } /* 折叠/展开思考过程功能 */ .thought-toggle { position: absolute; top: 12px; right: 12px; background: transparent; border: none; color: #7952b3; cursor: pointer; font-size: 1.2rem; opacity: 0.7; transition: opacity 0.2s; display: flex; align-items: center; justify-content: center; width: 24px; height: 24px; padding: 0; border-radius: 50%; } .thought-toggle:hover { opacity: 1; background-color: rgba(121, 82, 179, 0.1); } .chat-input-container { padding: 20px; display: flex; gap: 10px; align-items: flex-start; /* 改为顶部对齐,适应多行输入 */ border-top: var(--glass-border); position: relative; z-index: 1; background: rgba(255, 255, 255, 0.15); backdrop-filter: blur(var(--blur-md)); -webkit-backdrop-filter: blur(var(--blur-md)); flex-shrink: 0; /* 防止输入框被压缩 */ } .chat-input-container::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(to right, rgba(99, 102, 241, 0.05), rgba(139, 92, 246, 0.05)); opacity: 0.7; z-index: -1; border-radius: 0 0 var(--radius-lg) var(--radius-lg); } #user-input { flex: 1; padding: 12px 20px; border: var(--glass-border); border-radius: var(--radius); background-color: rgba(255, 255, 255, 0.8); font-size: 1rem; resize: none; min-height: 44px; /* 设置最小高度 */ max-height: 200px; overflow-y: auto; line-height: 1.5; box-shadow: var(--shadow-inner); transition: var(--transition); font-family: inherit; } #user-input:focus { outline: none; border-color: rgba(99, 102, 241, 0.5); box-shadow: var(--shadow-glow-indigo); } .chat-input-container::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(to right, rgba(99, 102, 241, 0.05), rgba(139, 92, 246, 0.05)); opacity: 0.7; z-index: -1; border-radius: 0 0 var(--radius-lg) var(--radius-lg); } #send-btn { width: 40px; height: 40px; background-color: var(--primary-indigo); border: none; border-radius: var(--radius-full); display: flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: var(--shadow); transition: var(--transition); color: white; padding: 0; overflow: hidden; } #send-btn:hover { transform: translateY(-2px) scale(1.03); box-shadow: var(--shadow-md); } #send-btn:active { transform: translateY(0) scale(0.98); } .typing-indicator { display: inline-flex; align-items: center; background-color: rgba(255, 255, 255, 0.5); padding: 8px 16px; border-radius: var(--radius-full); box-shadow: var(--shadow-sm); backdrop-filter: blur(var(--blur-sm)); -webkit-backdrop-filter: blur(var(--blur-sm)); margin: 0 auto; } .typing-indicator span { display: inline-block; width: 8px; height: 8px; background-color: var(--primary-indigo); border-radius: 50%; margin: 0 2px; animation: typing 1.4s infinite ease-in-out; } .typing-indicator span:nth-child(1) { animation-delay: 0s; } .typing-indicator span:nth-child(2) { animation-delay: 0.2s; } .typing-indicator span:nth-child(3) { animation-delay: 0.4s; } @keyframes typing { 0%, 80%, 100% { transform: scale(0.6); opacity: 0.6; } 40% { transform: scale(1); opacity: 1; } } /* 深色模式适配 - 自动跟随浏览器主题 */ @media (prefers-color-scheme: dark) { :root { /* 深色模式下的颜色变量 */ --glass-border: 1px solid rgba(255, 255, 255, 0.1); --glass-background: rgba(23, 25, 35, 0.3); --glass-background-dark: rgba(15, 23, 42, 0.6); --shadow-glow-indigo: 0 0 15px 2px rgba(99, 102, 241, 0.35); --shadow-glow-purple: 0 0 15px 2px rgba(139, 92, 246, 0.35); /* 深色模式下的文本颜色 */ --text-primary: #e2e8f0; --text-secondary: #cbd5e1; --text-muted: #94a3b8; --text-inverse: #1e293b; /* 深色模式下的背景颜色 */ --bg-primary: #0f172a; --bg-secondary: #1e293b; --bg-tertiary: #334155; --bg-glass: rgba(15, 23, 42, 0.8); } body { background: linear-gradient(135deg, #0f172a, #1e293b, #334155, #475569); color: var(--text-primary); transition: background 0.3s ease, color 0.3s ease; } body::before { opacity: 0.1; background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%236366f1' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E"); } /* 主容器深色模式 */ .chat-container { background-color: var(--bg-glass); border: var(--glass-border); backdrop-filter: blur(var(--blur-md)); -webkit-backdrop-filter: blur(var(--blur-md)); } /* 头部深色模式 */ header { background-color: rgba(15, 23, 42, 0.8); border-bottom: var(--glass-border); backdrop-filter: blur(var(--blur-md)); -webkit-backdrop-filter: blur(var(--blur-md)); } header::before { background: linear-gradient(to right, rgba(99, 102, 241, 0.1), rgba(139, 92, 246, 0.1)); opacity: 0.3; } header h1 { color: var(--text-primary); } /* 侧边栏深色模式 */ .history-sidebar { background: rgba(15, 23, 42, 0.6); border-right: var(--glass-border); } .sidebar-header { background: rgba(15, 23, 42, 0.8); border-bottom: var(--glass-border); } .sidebar-title { color: var(--text-primary); } .new-chat-btn { background: rgba(30, 41, 59, 0.8); border: 1px solid rgba(255, 255, 255, 0.1); color: var(--text-secondary); box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2); } .new-chat-btn::before { background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.3), transparent); } .new-chat-btn:hover { background: rgba(51, 65, 85, 0.95); color: var(--text-primary); border-color: rgba(99, 102, 241, 0.4); box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(99, 102, 241, 0.2); } .new-chat-btn:hover svg { transform: scale(1.1) rotate(90deg); filter: drop-shadow(0 0 4px rgba(99, 102, 241, 0.5)); } .conversation-item { background: transparent; border: 1px solid transparent; } .conversation-item::before { background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.15), transparent); } .conversation-item:hover { background: rgba(30, 41, 59, 0.6); border-color: rgba(255, 255, 255, 0.15); transform: translateX(4px); box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2); } .conversation-item.active { background: rgba(99, 102, 241, 0.25); border-color: rgba(99, 102, 241, 0.5); box-shadow: 0 6px 16px rgba(99, 102, 241, 0.4); transform: translateX(6px); } .conversation-item.active::before { background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.3), transparent); opacity: 1; } .conversation-title { color: var(--text-secondary); } .conversation-item.active .conversation-title { color: var(--primary-indigo); } .conversation-menu { color: var(--text-muted); } .conversation-menu::before { background: rgba(99, 102, 241, 0.15); } .conversation-item:hover .conversation-menu { background: rgba(30, 41, 59, 0.6); transform: scale(1.1); } .conversation-menu:hover { background: rgba(51, 65, 85, 0.8); color: var(--text-primary); transform: scale(1.2); } .conversation-menu:hover::before { background: rgba(99, 102, 241, 0.3); } .group-header { color: var(--text-muted); } .group-header::before { background: linear-gradient(to bottom, var(--primary-indigo), var(--primary-purple)); opacity: 0.4; } .group-header:hover { color: var(--text-secondary); transform: translateX(4px); } .group-header:hover::before { opacity: 0.8; height: 16px; box-shadow: 0 0 8px rgba(99, 102, 241, 0.3); } .sidebar-footer { background: rgba(15, 23, 42, 0.4); border-top: var(--glass-border); } .user-profile { background: rgba(30, 41, 59, 0.6); border: 1px solid rgba(255, 255, 255, 0.1); } .user-profile:hover { background: rgba(51, 65, 85, 0.8); border-color: rgba(255, 255, 255, 0.2); } .user-name-sidebar { color: var(--text-primary); } /* 聊天消息区域深色模式 */ .chat-messages { background: rgba(15, 23, 42, 0.3); } .chat-messages::before { background: linear-gradient(to bottom, rgba(30, 41, 59, 0.3), rgba(15, 23, 42, 0.5)); opacity: 0.4; } /* 消息样式深色模式 */ .message.user { background-color: rgba(99, 102, 241, 0.2); } .message.bot { background-color: rgba(30, 41, 59, 0.3); } .message-content { background: rgba(30, 41, 59, 0.8); color: var(--text-primary); border: 1px solid rgba(255, 255, 255, 0.1); box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3); } .message.bot .message-content { background: rgba(30, 41, 59, 0.9); color: var(--text-primary); } /* 思考过程深色模式 */ .thought-container { background-color: rgba(121, 82, 179, 0.15); border-left-color: #9370db; color: var(--text-secondary); } .thought-container::before { color: #a98eda; } /* 按钮深色模式 */ .btn, #reset-btn, #toggle-streaming-btn { background-color: rgba(30, 41, 59, 0.8); color: var(--text-secondary); border: 1px solid rgba(255, 255, 255, 0.1); } .btn:hover, #reset-btn:hover, #toggle-streaming-btn:hover { background-color: rgba(51, 65, 85, 0.9); color: var(--text-primary); } .glass-btn { background-color: rgba(30, 41, 59, 0.6); border: var(--glass-border); color: var(--text-secondary); } .glass-btn:hover { background-color: rgba(51, 65, 85, 0.8); color: var(--text-primary); } /* 智能体菜单深色模式 */ .agent-switcher { background: rgba(15, 23, 42, 0.8); border: var(--glass-border); } .agent-switcher-header h3 { color: var(--text-primary); } .agent-label { color: var(--text-muted); } .agent-item { background: rgba(30, 41, 59, 0.6); border: 1px solid transparent; } .agent-item:hover { background: rgba(51, 65, 85, 0.8); border-color: rgba(99, 102, 241, 0.3); } .agent-item.active { background: rgba(99, 102, 241, 0.2) !important; border-color: rgba(99, 102, 241, 0.4) !important; } .agent-title { color: var(--text-primary); } .agent-item.active .agent-title { color: var(--primary-indigo) !important; } /* 输入区域深色模式 */ .chat-input-container { background: rgba(15, 23, 42, 0.8); border-top: var(--glass-border); } .chat-input-container::before { background: linear-gradient(to right, rgba(99, 102, 241, 0.1), rgba(139, 92, 246, 0.1)); opacity: 0.4; } #user-input { background-color: rgba(30, 41, 59, 0.8); color: var(--text-primary); border: 1px solid rgba(255, 255, 255, 0.1); } #user-input:focus { border-color: rgba(99, 102, 241, 0.5); background-color: rgba(30, 41, 59, 0.9); } #user-input::placeholder { color: var(--text-muted); } /* 用户信息深色模式 */ .user-info { background: rgba(30, 41, 59, 0.8); border: 1px solid rgba(255, 255, 255, 0.1); } .user-info:hover { background: rgba(51, 65, 85, 0.9); border-color: rgba(255, 255, 255, 0.2); } .user-name { color: var(--text-primary); } .user-type { color: var(--text-muted); background: rgba(51, 65, 85, 0.6); } .user-title { color: var(--text-muted); } .user-dropdown { background: rgba(15, 23, 42, 0.95); border: 1px solid rgba(255, 255, 255, 0.1); } .user-dropdown::before { background: rgba(15, 23, 42, 0.95); border: 1px solid rgba(255, 255, 255, 0.1); } .info-label { color: var(--text-muted); } .info-value { color: var(--text-secondary); } /* 通知消息深色模式 */ .typing-indicator, .loading-animation { background-color: rgba(30, 41, 59, 0.8); border: 1px solid rgba(255, 255, 255, 0.1); } .loading-text { color: var(--text-secondary); } .status-badge { background-color: rgba(30, 41, 59, 0.9); } .ripple { background-color: rgba(255, 255, 255, 0.1); } /* 智能体切换通知深色模式 */ .agent-switch-notification .notification-content { background: rgba(15, 23, 42, 0.95); border: 1px solid rgba(99, 102, 241, 0.3); } .notification-text { color: var(--text-primary); } /* 上下文菜单深色模式 */ .conversation-context-menu { background: rgba(15, 23, 42, 0.95); border: 1px solid rgba(255, 255, 255, 0.1); } .menu-item { color: var(--text-secondary); } .menu-item:hover { background: rgba(99, 102, 241, 0.2); color: var(--primary-indigo); } /* 智能体菜单深色模式 */ #agent-menu { background: rgba(15, 23, 42, 0.95) !important; border: 1px solid rgba(255, 255, 255, 0.1) !important; } .agent-option { background: rgba(30, 41, 59, 0.6) !important; border: 1px solid rgba(255, 255, 255, 0.1) !important; color: var(--text-secondary) !important; } .agent-option:hover { background: rgba(99, 102, 241, 0.2) !important; border-color: rgba(99, 102, 241, 0.3) !important; color: var(--primary-indigo) !important; } .agent-option[data-active="true"] { background: rgba(99, 102, 241, 0.3) !important; border-color: rgba(99, 102, 241, 0.5) !important; color: var(--primary-indigo) !important; } /* Markdown内容深色模式 */ .bot .message-content blockquote { border-left-color: rgba(99, 102, 241, 0.5); background-color: rgba(30, 58, 138, 0.3); color: var(--text-secondary); } .bot .message-content code { background-color: rgba(30, 58, 138, 0.3); color: var(--text-secondary); } .bot .message-content pre { background-color: rgba(15, 23, 42, 0.8); border: 1px solid rgba(255, 255, 255, 0.1); } .bot .message-content h1, .bot .message-content h2, .bot .message-content h3, .bot .message-content h4, .bot .message-content h5, .bot .message-content h6 { color: var(--text-primary); } .bot .message-content table { background-color: rgba(30, 41, 59, 0.5); } .bot .message-content table th, .bot .message-content table td { border-color: rgba(255, 255, 255, 0.1); } .bot .message-content table th { background-color: rgba(51, 65, 85, 0.7); color: var(--text-primary); } .bot .message-content table td { color: var(--text-secondary); } /* 滚动条深色模式 */ .chat-messages::-webkit-scrollbar-thumb { background-color: rgba(100, 116, 139, 0.6); } .chat-messages::-webkit-scrollbar-thumb:hover { background-color: rgba(100, 116, 139, 0.8); } .history-content::-webkit-scrollbar-thumb { background-color: rgba(100, 116, 139, 0.4); } .history-content::-webkit-scrollbar-thumb:hover { background-color: rgba(100, 116, 139, 0.6); } /* 移动端侧边栏切换按钮深色模式 */ .sidebar-toggle { background: var(--primary-indigo); box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3); } .sidebar-toggle::before { background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent); } .sidebar-toggle:hover { box-shadow: 0 12px 35px rgba(99, 102, 241, 0.4); } } /* 响应式布局 */ @media (max-width: 768px) { .chat-container { height: calc(100vh - 20px); max-height: none; border-radius: var(--radius); margin: 10px; flex-direction: column; } /* 移动端侧边栏样式 */ .history-sidebar { position: fixed; left: -280px; top: 0; width: 280px; height: 100vh; z-index: 1000; transition: transform 0.3s ease; border-right: none; border-radius: 0; } .history-sidebar.show { transform: translateX(280px); } /* 移动端主聊天区域 */ .main-chat-area { width: 100%; height: 100%; } /* 移动端侧边栏切换按钮 */ .sidebar-toggle { position: fixed; left: 20px; top: 20px; z-index: 1001; width: 44px; height: 44px; background: var(--primary-indigo); border: none; border-radius: 50%; color: white; font-size: 1.2rem; box-shadow: var(--shadow-lg); cursor: pointer; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); display: flex; align-items: center; justify-content: center; position: relative; overflow: hidden; } .sidebar-toggle::before { content: ''; position: absolute; top: 0; left: -100%; width: 100%; height: 100%; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent); transition: left 0.5s ease; } .sidebar-toggle:hover { transform: scale(1.1); box-shadow: var(--shadow-glow-indigo); } .sidebar-toggle:hover::before { left: 100%; } .sidebar-toggle:active { transform: scale(0.95); } /* 移动端侧边栏遮罩层 */ .sidebar-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.5); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); z-index: 999; opacity: 0; visibility: hidden; transition: all 0.3s ease; } .sidebar-overlay.show { opacity: 1; visibility: visible; } header, .glass-header, header::before { border-radius: var(--radius) var(--radius) 0 0; padding: 12px 16px; flex-direction: column; gap: 12px; align-items: stretch; } /* 头部第一行:图标、应用文案和版本号 */ .logo-title-container { display: flex; align-items: center; justify-content: center; gap: 8px; order: 1; } .logo-title-link{ display: none; } .header-logo { width: 32px; height: 32px; } header h1 { font-size: 1.1rem; margin: 0; text-align: center; } .version-tag { font-size: 0.65rem; padding: 1px 6px; } /* 头部第二行:智能体切换和重置按钮 */ .buttons-container { display: flex; gap: 8px; align-items: center; justify-content: center; order: 2; flex-wrap: wrap; } /* 智能体下拉菜单移动端优化 */ #agent-dropdown { flex: 1; min-width: 120px; justify-content: center; padding: 8px 12px; font-size: 0.8rem; } #agent-dropdown span { font-size: 0.8rem; } /* 重置按钮移动端优化 */ #reset-btn { flex: 1; min-width: 120px; justify-content: center; padding: 8px 12px; font-size: 0.8rem; } #reset-btn svg { width: 14px; height: 14px; } /* 用户信息移动端优化 - 保持左右布局,上下排版 */ .user-info { order: 3; flex-direction: row; align-items: center; gap: 12px; padding: 12px 16px; margin-top: 8px; width: 100%; max-width: 280px; margin-left: auto; margin-right: auto; } .user-details { flex-direction: row; align-items: center; gap: 12px; text-align: left; flex: 1; } .user-avatar { width: 44px; height: 44px; flex-shrink: 0; } .user-text { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; flex: 1; min-width: 0; } .user-info-row { display: flex; align-items: center; gap: 8px; width: 100%; } .user-name { font-size: 0.9rem; font-weight: 600; white-space: nowrap; } .user-type { font-size: 0.75rem; padding: 1px 5px; white-space: nowrap; } .user-title { font-size: 0.8rem; max-width: none; width: 100%; } /* 移动端用户下拉菜单优化 */ .user-dropdown { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%) scale(0.95); right: auto; width: 90%; max-width: 300px; opacity: 0; visibility: hidden; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); } .user-info:hover .user-dropdown { opacity: 1; visibility: visible; transform: translate(-50%, -50%) scale(1); } .user-dropdown::before { display: none; } .user-type { font-size: 0.75rem; padding: 2px 8px; } .user-title { font-size: 0.75rem; opacity: 0.8; } /* 智能体菜单移动端优化 */ #agent-menu { position: fixed !important; top: 50% !important; left: 50% !important; transform: translate(-50%, -50%) !important; width: 280px !important; max-width: 90vw !important; z-index: 1002 !important; background: rgba(255, 255, 255, 0.95) !important; backdrop-filter: blur(20px) !important; border: 1px solid rgba(255, 255, 255, 0.3) !important; box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2) !important; } #agent-menu ul { padding: 16px !important; } .agent-option { padding: 16px !important; margin-bottom: 8px !important; border-radius: 12px !important; background: rgba(255, 255, 255, 0.8) !important; border: 1px solid rgba(255, 255, 255, 0.3) !important; transition: all 0.2s ease !important; } .agent-option:hover { background: rgba(99, 102, 241, 0.1) !important; border-color: rgba(99, 102, 241, 0.3) !important; transform: translateY(-2px) !important; } .agent-option[data-active="true"] { background: rgba(99, 102, 241, 0.15) !important; border-color: rgba(99, 102, 241, 0.4) !important; box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2) !important; } /* 聊天内容区域移动端优化 */ .chat-main-content { flex: 1; display: flex; flex-direction: column; min-height: 0; background: rgba(255, 255, 255, 0.02); } .chat-messages { padding: 16px; gap: 20px; flex: 1; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; } .chat-messages::-webkit-scrollbar { width: 6px; } .chat-messages::-webkit-scrollbar-track { background: transparent; } .chat-messages::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.2); border-radius: 3px; } .chat-messages::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.3); } .message { border-radius: 16px; margin-bottom: 16px; box-shadow: var(--shadow-sm); transition: all 0.2s ease; } .message:hover { transform: translateY(-1px); box-shadow: var(--shadow); } .message-content { padding: 16px; font-size: 0.9rem; line-height: 1.6; border-radius: 16px; } .message.bot { width: 100%; max-width: 100%; margin-right: 0; } .message.bot .message-content { padding: 16px; background: rgba(255, 255, 255, 0.15); border: 1px solid rgba(255, 255, 255, 0.1); } .message.user { align-self: flex-end; margin-left: 20px; } .message.user .message-content { background: rgba(99, 102, 241, 0.15); border: 1px solid rgba(99, 102, 241, 0.2); color: var(--gray-800); } .thought-container { margin: 12px 0 20px 0; padding: 12px 16px; border-radius: 12px; background: rgba(99, 102, 241, 0.08); border-left: 3px solid var(--primary-indigo); } /* 输入区域移动端优化 */ .chat-input-container { padding: 16px; border-top: 1px solid rgba(255, 255, 255, 0.1); background: rgba(255, 255, 255, 0.05); position: relative; } .chat-input-container::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(to bottom, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.02)); opacity: 0.3; z-index: -1; pointer-events: none; border-radius: 0 0 var(--radius) var(--radius); } #user-input { padding: 12px 16px; font-size: 0.9rem; min-height: 44px; max-height: 120px; resize: none; border-radius: 12px; border: 1px solid rgba(255, 255, 255, 0.2); background: rgba(255, 255, 255, 0.1); color: var(--gray-800); transition: all 0.2s ease; } #user-input:focus { outline: none; border-color: var(--primary-indigo); background: rgba(255, 255, 255, 0.15); box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1); } #send-btn { width: 44px; height: 44px; min-width: 44px; border-radius: 12px; background: var(--primary-indigo); border: none; color: white; transition: all 0.2s ease; box-shadow: var(--shadow-sm); } #send-btn:hover { background: var(--primary-purple); transform: translateY(-1px); box-shadow: var(--shadow); } #send-btn:active { transform: translateY(0); box-shadow: var(--shadow-sm); } #send-btn svg { width: 18px; height: 18px; } /* 移动端智能体切换菜单栏适配 */ .agent-switcher-container { position: fixed; left: 0; top: 0; width: 100%; height: 100%; z-index: 1000; background: rgba(0, 0, 0, 0.5); opacity: 0; visibility: hidden; transition: all 0.3s ease; } .agent-switcher-container.show { opacity: 1; visibility: visible; } .agent-switcher { position: absolute; left: 0; top: 0; width: 280px; height: 100%; border-radius: 0; transform: translateX(-100%); transition: transform 0.3s ease; overflow-y: auto; } .agent-switcher-container.show .agent-switcher { transform: translateX(0); } /* 移动端平台项样式优化 */ .agent-item { padding: 20px 24px; margin: 0 16px 16px 16px; border-radius: var(--radius-lg); } .agent-icon { width: 60px; height: 60px; } .platform-icon { width: 40px; height: 40px; filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.1)); } .agent-title { font-size: 1.2rem; } /* 添加移动端菜单切换按钮 */ .mobile-menu-toggle { display: block; position: fixed; left: 20px; top: 100px; z-index: 999; width: 50px; height: 50px; background: var(--primary-indigo); border: none; border-radius: 50%; color: white; font-size: 1.2rem; box-shadow: var(--shadow-lg); cursor: pointer; transition: var(--transition); } .mobile-menu-toggle:hover { transform: scale(1.1); box-shadow: var(--shadow-glow-indigo); } /* 移动端智能体切换通知优化 */ .agent-switch-notification { top: 20px; right: 20px; left: 20px; transform: translateY(-100px); } .agent-switch-notification.show { transform: translateY(0); } .notification-content { padding: 12px 16px; min-width: auto; width: 100%; } .notification-text { font-size: 0.85rem; } } /* 改进markdown内容的渲染样式 */ .markdown-content { width: 100%; } .markdown-content p { margin-bottom: 1em; } .markdown-content h1, .markdown-content h2, .markdown-content h3, .markdown-content h4 { margin-top: 1.2em; margin-bottom: 0.8em; font-weight: 600; line-height: 1.3; } .markdown-content h1 { font-size: 1.7em; } .markdown-content h2 { font-size: 1.5em; } .markdown-content h3 { font-size: 1.3em; } .markdown-content ul, .markdown-content ol { margin-bottom: 1em; padding-left: 1.5em; } .markdown-content li { margin-bottom: 0.5em; } .markdown-content pre { margin-bottom: 1.2em; border-radius: 6px; } /* 智能体切换通知样式 */ .agent-switch-notification { position: fixed; top: 100px; right: 30px; z-index: 1003; transform: translateX(400px); transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1); } .agent-switch-notification.show { transform: translateX(0); } .notification-content { display: flex; align-items: center; gap: 12px; padding: 16px 20px; background: rgba(255, 255, 255, 0.95); backdrop-filter: blur(var(--blur-md)); -webkit-backdrop-filter: blur(var(--blur-md)); border: 1px solid rgba(99, 102, 241, 0.2); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); min-width: 200px; } .notification-icon { font-size: 1.2rem; animation: bounce 0.6s ease-in-out; } .notification-text { font-weight: 500; color: var(--gray-800); font-size: 0.95rem; } /* 平台特定通知样式 */ .agent-switch-notification[data-platform="kuaishou"] .notification-content { border-color: rgba(255, 69, 0, 0.3); background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(255, 69, 0, 0.05)); } .agent-switch-notification[data-platform="toutiao"] .notification-content { border-color: rgba(0, 123, 255, 0.3); background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(0, 123, 255, 0.05)); } .agent-switch-notification[data-platform="videoaccount"] .notification-content { border-color: rgba(40, 167, 69, 0.3); background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(40, 167, 69, 0.05)); } @keyframes bounce { 0%, 20%, 50%, 80%, 100% { transform: translateY(0); } 40% { transform: translateY(-8px); } 60% { transform: translateY(-4px); } } /* 移动端智能体菜单遮罩层样式 */ .mobile-agent-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.5); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); z-index: 1001; opacity: 0; transition: opacity 0.3s ease; } .mobile-agent-overlay.show { opacity: 1; } /* 移动端智能体菜单动画 */ @media (max-width: 768px) { #agent-menu { opacity: 0; transform: translate(-50%, -50%) scale(0.9) !important; transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) !important; } #agent-menu.show { opacity: 1; transform: translate(-50%, -50%) scale(1) !important; } } /* 移动端触摸优化 */ .glass-btn, #agent-dropdown, #reset-btn, #send-btn { -webkit-tap-highlight-color: transparent; touch-action: manipulation; user-select: none; } .glass-btn:active, #agent-dropdown:active, #reset-btn:active, #send-btn:active { transform: scale(0.95); transition: transform 0.1s ease; } /* 移动端智能体选项触摸优化 */ .agent-option { -webkit-tap-highlight-color: transparent; touch-action: manipulation; user-select: none; } .agent-option:active { transform: scale(0.98); transition: transform 0.1s ease; } /* 移动端用户信息触摸优化 */ .user-info { -webkit-tap-highlight-color: transparent; touch-action: manipulation; } .user-info:active { transform: scale(0.98); transition: transform 0.1s ease; } /* 移动端输入框触摸优化 */ #user-input { -webkit-tap-highlight-color: transparent; touch-action: manipulation; } /* 历史记录加载动画和空状态样式 */ .history-loading, .history-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 20px; color: var(--gray-500); font-size: 14px; text-align: center; gap: 10px; height: 100%; } .history-loading .loading-spinner { border: 4px solid rgba(99, 102, 241, 0.2); border-top: 4px solid var(--primary-indigo); border-radius: 50%; width: 30px; height: 30px; animation: spin 1s linear infinite; } @keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } } .history-empty svg { color: var(--gray-400); width: 48px; height: 48px; } .history-empty p { margin: 0; font-weight: 500; } .history-empty .new-chat-btn { margin-top: 15px; }