* { margin: 0; padding: 0; box-sizing: border-box; } body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif; background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%); color: #e0e0e0; min-height: 100vh; } .container { max-width: 1800px; margin: 0 auto; padding: 20px; } header { text-align: center; margin-bottom: 30px; padding-bottom: 20px; border-bottom: 1px solid rgba(255,255,255,0.1); } header h1 { font-size: 2.5rem; background: linear-gradient(90deg, #00d4ff, #7b2cbf); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; } header .subtitle { color: #888; margin-top: 8px; } main { display: grid; grid-template-columns: 250px 350px 1fr; gap: 20px; height: calc(100vh - 150px); } /* 面板通用样式 */ .agents-panel, .sessions-panel, .messages-panel { background: rgba(255,255,255,0.05); border-radius: 12px; padding: 20px; overflow: hidden; display: flex; flex-direction: column; } .agents-panel h2, .sessions-panel h2, .messages-panel h2 { font-size: 1.1rem; margin-bottom: 15px; padding-bottom: 10px; border-bottom: 1px solid rgba(255,255,255,0.1); } .agents-panel h2 span, .sessions-panel h2 span, .messages-panel h2 span { font-size: 0.85rem; color: #888; margin-left: 10px; } /* 智能体列表 */ .agents-list, .sessions-list, .messages-list { flex: 1; overflow-y: auto; } .agent-item, .session-item { padding: 12px 15px; border-radius: 8px; cursor: pointer; transition: all 0.2s ease; margin-bottom: 8px; background: rgba(255,255,255,0.03); border: 1px solid transparent; } .agent-item:hover, .session-item:hover { background: rgba(255,255,255,0.08); border-color: rgba(0,212,255,0.3); } .agent-item.active, .session-item.active { background: rgba(0,212,255,0.15); border-color: rgba(0,212,255,0.5); } .agent-item .name { font-weight: 600; color: #fff; margin-bottom: 5px; } .agent-item .meta, .session-item .meta { font-size: 0.8rem; color: #888; display: flex; gap: 10px; } .session-item .channel { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 0.75rem; margin-bottom: 5px; } .session-item .channel.matrix { background: #0dbd8b; color: #fff; } .session-item .channel.discord { background: #5865F2; color: #fff; } .session-item .channel.telegram { background: #0088cc; color: #fff; } .session-item .channel.cli { background: #4a4a4a; color: #fff; } .session-item .channel.main { background: #7b2cbf; color: #fff; } .session-item .model { color: #00d4ff; } .session-item .target { font-size: 0.75rem; color: #aaa; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } /* 消息列表 */ .message-item { padding: 15px; border-radius: 8px; margin-bottom: 12px; background: rgba(255,255,255,0.03); border-left: 3px solid #666; } .message-item.user { border-left-color: #00d4ff; } .message-item.assistant { border-left-color: #7b2cbf; } .message-item .header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; } .message-item .role { font-weight: 600; text-transform: uppercase; font-size: 0.8rem; } .message-item .role.user { color: #00d4ff; } .message-item .role.assistant { color: #7b2cbf; } .message-item .time { font-size: 0.75rem; color: #666; } .message-item .content { font-size: 0.9rem; line-height: 1.5; color: #ccc; white-space: pre-wrap; word-break: break-word; } .message-item .content.truncated { max-height: 200px; overflow: hidden; position: relative; } .message-item .content.truncated::after { content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 50px; background: linear-gradient(transparent, rgba(26,26,46,0.9)); } .message-item .expand-btn { margin-top: 10px; padding: 5px 15px; font-size: 0.8rem; background: rgba(0,212,255,0.2); border: none; border-radius: 4px; color: #00d4ff; cursor: pointer; transition: background 0.2s; } .message-item .expand-btn:hover { background: rgba(0,212,255,0.3); } /* 加载和占位 */ .loading, .placeholder { text-align: center; padding: 40px 20px; color: #666; } .loading::after { content: ''; display: inline-block; width: 20px; height: 20px; border: 2px solid #333; border-top-color: #00d4ff; border-radius: 50%; animation: spin 1s linear infinite; margin-left: 10px; vertical-align: middle; } @keyframes spin { to { transform: rotate(360deg); } } /* 模态框 */ .modal { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.8); display: flex; align-items: center; justify-content: center; z-index: 1000; } .modal.hidden { display: none; } .modal-content { background: #1a1a2e; border-radius: 12px; width: 90%; max-width: 900px; max-height: 80vh; display: flex; flex-direction: column; border: 1px solid rgba(255,255,255,0.1); } .modal-header { display: flex; justify-content: space-between; align-items: center; padding: 20px; border-bottom: 1px solid rgba(255,255,255,0.1); } .modal-header h3 { color: #fff; } .close-btn { background: none; border: none; color: #888; font-size: 1.5rem; cursor: pointer; transition: color 0.2s; } .close-btn:hover { color: #fff; } .modal-body { padding: 20px; overflow-y: auto; flex: 1; } .modal-body pre { white-space: pre-wrap; word-break: break-word; font-family: 'Fira Code', 'Consolas', monospace; font-size: 0.9rem; line-height: 1.6; color: #ccc; } /* 状态标签 */ .status { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 0.7rem; text-transform: uppercase; } .status.done { background: #2e7d32; color: #fff; } .status.running { background: #ed6c02; color: #fff; } .status.error { background: #c62828; color: #fff; } /* Token 统计 */ .tokens { font-size: 0.75rem; color: #666; margin-top: 5px; } /* 滚动条样式 */ .agents-list::-webkit-scrollbar, .sessions-list::-webkit-scrollbar, .messages-list::-webkit-scrollbar, .modal-body::-webkit-scrollbar { width: 6px; } .agents-list::-webkit-scrollbar-track, .sessions-list::-webkit-scrollbar-track, .messages-list::-webkit-scrollbar-track, .modal-body::-webkit-scrollbar-track { background: transparent; } .agents-list::-webkit-scrollbar-thumb, .sessions-list::-webkit-scrollbar-thumb, .messages-list::-webkit-scrollbar-thumb, .modal-body::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); border-radius: 3px; } .agents-list::-webkit-scrollbar-thumb:hover, .sessions-list::-webkit-scrollbar-thumb:hover, .messages-list::-webkit-scrollbar-thumb:hover, .modal-body::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.3); } /* 响应式 */ @media (max-width: 1200px) { main { grid-template-columns: 200px 300px 1fr; } } @media (max-width: 900px) { main { grid-template-columns: 1fr; grid-template-rows: auto auto 1fr; } .agents-panel, .sessions-panel { max-height: 300px; } }