/** * 数字人直播系统 - 专用样式表 * 完整的中控台布局样式 */ /* ==================== CSS 变量 ==================== */ :root { --dh-primary: #667eea; --dh-primary-dark: #5a6fd6; --dh-success: #2ed573; --dh-danger: #ff4757; --dh-warning: #ffa502; --dh-info: #1e90ff; --dh-bg: #f0f2f5; --dh-card-bg: #ffffff; --dh-text: #2c3e50; --dh-text-muted: #7f8c8d; --dh-border: #e8ecf1; --dh-shadow: 0 2px 12px rgba(0,0,0,0.08); --dh-radius: 10px; --dh-transition: 0.25s ease; } /* ==================== 基础布局 ==================== */ * { box-sizing: border-box; margin: 0; padding: 0; } body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif; background: var(--dh-bg); color: var(--dh-text); line-height: 1.6; min-height: 100vh; } .dh-container { max-width: 1440px; margin: 0 auto; padding: 20px; } /* ==================== 头部 ==================== */ .dh-header { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; padding: 20px 30px; border-radius: var(--dh-radius); margin-bottom: 24px; box-shadow: var(--dh-shadow); } .dh-header-top { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; } .dh-header h1 { font-size: 24px; font-weight: 700; display: flex; align-items: center; gap: 10px; } .dh-header h1 .icon { font-size: 28px; } .dh-header-actions { display: flex; gap: 10px; flex-wrap: wrap; } .dh-status-badge { display: inline-flex; align-items: center; gap: 8px; padding: 6px 16px; border-radius: 20px; font-size: 13px; font-weight: 500; } .dh-status-badge.online { background: rgba(46, 213, 115, 0.2); color: #2ed573; } .dh-status-badge.offline { background: rgba(255, 71, 87, 0.2); color: #ff4757; } .dh-status-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; } .dh-status-dot.online { background: #2ed573; box-shadow: 0 0 8px #2ed573; animation: dhPulse 2s infinite; } .dh-status-dot.offline { background: #ff4757; } @keyframes dhPulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } } /* ==================== 统计卡片网格 ==================== */ .dh-stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin-bottom: 24px; } .dh-stat-card { background: var(--dh-card-bg); border-radius: var(--dh-radius); padding: 18px 20px; box-shadow: var(--dh-shadow); border-left: 4px solid var(--dh-primary); transition: transform var(--dh-transition); } .dh-stat-card:hover { transform: translateY(-2px); } .dh-stat-card.warning { border-left-color: var(--dh-warning); } .dh-stat-card.success { border-left-color: var(--dh-success); } .dh-stat-card.danger { border-left-color: var(--dh-danger); } .dh-stat-value { font-size: 28px; font-weight: 700; color: var(--dh-text); } .dh-stat-label { font-size: 13px; color: var(--dh-text-muted); margin-top: 4px; } /* ==================== 主内容区 ==================== */ .dh-main-grid { display: grid; grid-template-columns: 1fr 360px; gap: 24px; margin-bottom: 24px; } @media (max-width: 1100px) { .dh-main-grid { grid-template-columns: 1fr; } } /* ==================== 卡片容器 ==================== */ .dh-card { background: var(--dh-card-bg); border-radius: var(--dh-radius); box-shadow: var(--dh-shadow); overflow: hidden; } .dh-card-header { padding: 16px 20px; border-bottom: 1px solid var(--dh-border); display: flex; justify-content: space-between; align-items: center; } .dh-card-header h3 { font-size: 16px; font-weight: 600; display: flex; align-items: center; gap: 8px; } .dh-card-body { padding: 20px; } /* ==================== 直播预览区域 ==================== */ .dh-live-preview { background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%); border-radius: var(--dh-radius); height: 280px; display: flex; align-items: center; justify-content: center; color: white; position: relative; overflow: hidden; margin-bottom: 16px; } .dh-live-preview::before { content: 'LIVE'; position: absolute; top: 12px; left: 16px; background: var(--dh-danger); color: white; padding: 3px 10px; border-radius: 4px; font-size: 11px; font-weight: 700; letter-spacing: 1px; z-index: 2; } .dh-live-preview .preview-content { text-align: center; z-index: 1; } .dh-live-preview .preview-content .avatar-icon { font-size: 64px; margin-bottom: 12px; opacity: 0.9; } .dh-live-preview .preview-content .preview-brand { font-size: 20px; font-weight: 600; margin-bottom: 4px; } .dh-live-preview .preview-content .preview-title { font-size: 14px; opacity: 0.8; } .dh-live-preview .preview-stats { position: absolute; bottom: 12px; left: 16px; right: 16px; display: flex; justify-content: space-around; font-size: 13px; opacity: 0.85; } /* ==================== 直播控制按钮 ==================== */ .dh-control-buttons { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; } .dh-btn { padding: 11px 22px; border: none; border-radius: 8px; font-size: 14px; font-weight: 600; cursor: pointer; transition: all var(--dh-transition); display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; } .dh-btn:disabled { opacity: 0.5; cursor: not-allowed; } .dh-btn:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,0,0,0.15); } .dh-btn-primary { background: linear-gradient(135deg, #667eea, #764ba2); color: white; } .dh-btn-success { background: linear-gradient(135deg, #2ed573, #26a65b); color: white; } .dh-btn-danger { background: linear-gradient(135deg, #ff4757, #c0392b); color: white; } .dh-btn-warning { background: linear-gradient(135deg, #ffa502, #e67e22); color: white; } .dh-btn-info { background: linear-gradient(135deg, #1e90ff, #0066cc); color: white; } .dh-btn-outline { background: white; border: 1px solid var(--dh-border); color: var(--dh-text); } .dh-btn-outline:hover { border-color: var(--dh-primary); color: var(--dh-primary); } .dh-btn-sm { padding: 7px 14px; font-size: 12px; } .dh-btn-block { width: 100%; } /* ==================== 平台管理 ==================== */ .dh-platform-list { display: flex; flex-direction: column; gap: 8px; } .dh-platform-item { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-radius: 8px; border: 1px solid var(--dh-border); cursor: pointer; transition: all var(--dh-transition); } .dh-platform-item:hover { border-color: var(--dh-primary); background: rgba(102, 126, 234, 0.04); } .dh-platform-item.active { border-color: var(--dh-primary); background: rgba(102, 126, 234, 0.08); } .dh-platform-item .platform-info { display: flex; align-items: center; gap: 10px; } .dh-platform-item .platform-icon { font-size: 20px; width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; border-radius: 8px; background: var(--dh-bg); } .dh-platform-status { font-size: 12px; padding: 3px 10px; border-radius: 12px; font-weight: 500; } .dh-platform-status.connected { background: rgba(46, 213, 115, 0.15); color: #2ed573; } .dh-platform-status.disconnected { background: rgba(255, 71, 87, 0.15); color: #ff4757; } .dh-platform-status.standby { background: rgba(255, 165, 2, 0.15); color: #ffa502; } /* ==================== 实时数据 ==================== */ .dh-realtime-row { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--dh-border); } .dh-realtime-row:last-child { border-bottom: none; } .dh-realtime-label { color: var(--dh-text-muted); font-size: 13px; } .dh-realtime-value { font-weight: 600; font-size: 14px; } /* ==================== 评论处理区(核心) ==================== */ .dh-comment-section { margin-top: 20px; } .dh-comment-input-area { display: flex; gap: 10px; margin-bottom: 12px; } .dh-comment-input { flex: 1; padding: 12px 16px; border: 1px solid var(--dh-border); border-radius: 8px; font-size: 14px; outline: none; transition: border-color var(--dh-transition); background: var(--dh-bg); } .dh-comment-input:focus { border-color: var(--dh-primary); box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15); } /* 评论列表 */ .dh-comment-list { max-height: 360px; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; } .dh-comment-item { padding: 14px; border-radius: 8px; border: 1px solid var(--dh-border); transition: background var(--dh-transition); } .dh-comment-item.user-comment { border-left: 3px solid var(--dh-info); background: rgba(30, 144, 255, 0.03); } .dh-comment-item.ai-reply { border-left: 3px solid var(--dh-success); background: rgba(46, 213, 115, 0.03); margin-left: 20px; } .dh-comment-meta { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; font-size: 12px; } .dh-comment-user { font-weight: 600; color: var(--dh-text); } .dh-comment-time { color: var(--dh-text-muted); } .dh-comment-text { font-size: 14px; line-height: 1.5; color: var(--dh-text); } .dh-comment-agent-chain { margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--dh-border); display: flex; flex-wrap: wrap; gap: 6px; align-items: center; } .dh-agent-badge { font-size: 11px; padding: 3px 8px; border-radius: 12px; background: rgba(102, 126, 234, 0.1); color: var(--dh-primary); white-space: nowrap; } .dh-agent-arrow { color: var(--dh-text-muted); font-size: 11px; } /* 空状态 */ .dh-empty-state { text-align: center; padding: 40px 20px; color: var(--dh-text-muted); } .dh-empty-state .icon { font-size: 48px; margin-bottom: 12px; opacity: 0.5; } /* ==================== 场景模板网格 ==================== */ .dh-scene-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; } .dh-scene-card { border: 2px solid var(--dh-border); border-radius: var(--dh-radius); padding: 14px; cursor: pointer; transition: all var(--dh-transition); } .dh-scene-card:hover { border-color: var(--dh-primary); transform: translateY(-2px); box-shadow: var(--dh-shadow); } .dh-scene-card.selected { border-color: var(--dh-primary); background: rgba(102, 126, 234, 0.04); } .dh-scene-card .scene-name { font-weight: 600; margin-bottom: 4px; } .dh-scene-card .scene-desc { font-size: 12px; color: var(--dh-text-muted); margin-bottom: 6px; } .dh-scene-card .scene-type { font-size: 11px; padding: 2px 8px; border-radius: 10px; background: var(--dh-bg); display: inline-block; } /* ==================== 话术管理 ==================== */ .dh-script-selects { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; margin-bottom: 14px; } .dh-form-group { display: flex; flex-direction: column; gap: 6px; } .dh-form-group label { font-size: 13px; font-weight: 600; color: var(--dh-text); } .dh-form-select, .dh-form-input { padding: 10px 14px; border: 1px solid var(--dh-border); border-radius: 8px; font-size: 14px; outline: none; transition: border-color var(--dh-transition); background: white; } .dh-form-select:focus, .dh-form-input:focus { border-color: var(--dh-primary); box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15); } /* ==================== 场景自定义配置 ==================== */ .dh-config-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; } @media (max-width: 768px) { .dh-config-grid { grid-template-columns: 1fr; } } .dh-config-grid .dh-form-group.full-width { grid-column: 1 / -1; } .dh-color-input { width: 60px; height: 38px; border: 2px solid var(--dh-border); border-radius: 6px; cursor: pointer; padding: 2px; } /* ==================== 快捷操作 ==================== */ .dh-quick-actions { display: flex; flex-direction: column; gap: 10px; } /* ==================== 模态框 ==================== */ .dh-modal-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.5); display: flex; align-items: center; justify-content: center; z-index: 99980; animation: dhFadeIn 0.2s ease; } .dh-modal { background: white; border-radius: 12px; width: 90%; max-width: 800px; max-height: 85vh; box-shadow: 0 16px 48px rgba(0,0,0,0.25); animation: dhScaleIn 0.25s ease; overflow: hidden; } .dh-modal-header { padding: 18px 24px; border-bottom: 1px solid var(--dh-border); display: flex; justify-content: space-between; align-items: center; } .dh-modal-header h3 { font-size: 18px; font-weight: 600; } .dh-modal-close { width: 32px; height: 32px; border: none; background: var(--dh-bg); border-radius: 50%; font-size: 18px; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background var(--dh-transition); } .dh-modal-close:hover { background: #ddd; } .dh-modal-body { padding: 24px; max-height: calc(85vh - 70px); overflow-y: auto; } .dh-modal-footer { padding: 16px 24px; border-top: 1px solid var(--dh-border); display: flex; justify-content: flex-end; gap: 10px; } /* ==================== 智能体处理链路可视化 ==================== */ .dh-agent-chain-visual { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 10px 14px; background: var(--dh-bg); border-radius: 8px; margin-top: 10px; font-size: 12px; } .dh-process-result { margin-top: 16px; padding: 14px; border-radius: 8px; border: 1px solid var(--dh-border); } .dh-result-header { display: flex; justify-content: space-between; margin-bottom: 8px; font-size: 13px; } .dh-result-emotion { font-weight: 600; } .dh-result-intent { color: var(--dh-primary); } .dh-result-reply { font-size: 14px; padding: 10px 14px; background: rgba(46, 213, 115, 0.06); border-radius: 6px; border-left: 3px solid var(--dh-success); line-height: 1.6; } /* ==================== 滚动条美化 ==================== */ .dh-comment-list::-webkit-scrollbar { width: 6px; } .dh-comment-list::-webkit-scrollbar-track { background: transparent; } .dh-comment-list::-webkit-scrollbar-thumb { background: #d0d5dd; border-radius: 3px; } .dh-comment-list::-webkit-scrollbar-thumb:hover { background: #b0b5bd; } /* ==================== 动画 ==================== */ @keyframes dhFadeIn { from { opacity: 0; } to { opacity: 1; } } @keyframes dhScaleIn { from { transform: scale(0.95); opacity: 0; } to { transform: scale(1); opacity: 1; } } @keyframes dhSlideUp { from { transform: translateY(10px); opacity: 0; } to { transform: translateY(0); opacity: 1; } } .dh-animate-in { animation: dhSlideUp 0.3s ease; } /* ==================== 响应式 ==================== */ @media (max-width: 768px) { .dh-container { padding: 10px; } .dh-header { padding: 14px 18px; } .dh-header h1 { font-size: 18px; } .dh-stats-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; } .dh-control-buttons { flex-direction: column; } .dh-btn { justify-content: center; } .dh-script-selects { grid-template-columns: 1fr; } }