/* 智能 UI 组件库样式 */ /* 数据表格 */ .smart-data-table { overflow-x: auto; margin: 20px 0; } .smart-data-table table { width: 100%; border-collapse: collapse; background: white; } .smart-data-table th, .smart-data-table td { padding: 12px 15px; text-align: left; border-bottom: 1px solid #e0e0e0; } .smart-data-table th { background: #f5f6fa; font-weight: 600; color: #2c3e50; } .smart-data-table tr:hover { background: #f8f9fa; } /* 表单组件 */ .smart-form .form-group { margin-bottom: 20px; } .smart-form label { display: block; margin-bottom: 8px; font-weight: 500; color: #555; } .smart-form input[type="text"], .smart-form input[type="number"], .smart-form select, .smart-form textarea { width: 100%; padding: 10px 15px; border: 1px solid #ddd; border-radius: 6px; font-size: 14px; transition: border-color 0.3s; } .smart-form input:focus, .smart-form select:focus, .smart-form textarea:focus { outline: none; border-color: #4361ee; } .smart-form .help-text { display: block; margin-top: 5px; font-size: 12px; color: #888; } .smart-form .form-actions { margin-top: 20px; display: flex; gap: 10px; } /* 操作面板 */ .smart-action-panel { display: flex; gap: 10px; flex-wrap: wrap; } .smart-action-panel.layout-horizontal { flex-direction: row; } .smart-action-panel.layout-vertical { flex-direction: column; } /* 日志控制台 */ .smart-log-console { background: #1e1e1e; color: #d4d4d4; border-radius: 6px; padding: 15px; font-family: 'Courier New', monospace; font-size: 13px; max-height: 400px; overflow-y: auto; } .smart-log-console .log-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; padding-bottom: 10px; border-bottom: 1px solid #333; } .smart-log-console .log-content { line-height: 1.6; } .smart-log-console .log-line { padding: 4px 0; border-bottom: 1px solid #2a2a2a; } .smart-log-console .log-time { color: #858585; margin-right: 10px; } .smart-log-console .log-info { color: #4fc3f7; } .smart-log-console .log-success { color: #81c784; } .smart-log-console .log-warning { color: #ffb74d; } .smart-log-console .log-error { color: #e57373; } /* 卡片网格 */ .smart-card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; padding: 20px 0; } /* 智能体控制面板 */ .agent-control-panel { max-width: 900px; } .agent-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; padding-bottom: 15px; border-bottom: 2px solid #e0e0e0; } .agent-description { color: #666; margin-bottom: 20px; line-height: 1.6; } .agent-actions { display: flex; gap: 15px; margin-bottom: 30px; } .status-badge { padding: 6px 12px; border-radius: 20px; font-size: 13px; font-weight: 500; } .status-offline { background: #ffebee; color: #c62828; } .status-online { background: #e8f5e9; color: #2e7d32; } /* 工具界面 */ .tool-interface { max-width: 1200px; } .tool-actions { display: grid; grid-template-columns: repeat(auto-fill, minmax(350px, 1fr)); gap: 20px; margin-top: 30px; } .tool-action-card { background: white; border-radius: 10px; padding: 20px; box-shadow: 0 2px 8px rgba(0,0,0,0.08); transition: transform 0.3s, box-shadow 0.3s; } .tool-action-card:hover { transform: translateY(-3px); box-shadow: 0 8px 16px rgba(0,0,0,0.12); } .tool-form .form-group { margin-bottom: 15px; } /* 默认界面 */ .default-interface .action-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; margin-top: 30px; } .action-card { background: white; border-radius: 10px; padding: 25px; text-align: center; cursor: pointer; transition: all 0.3s; border: 2px solid transparent; } .action-card:hover { transform: translateY(-5px); border-color: #4361ee; box-shadow: 0 10px 20px rgba(67, 97, 238, 0.15); } .action-icon { font-size: 48px; margin-bottom: 15px; } /* Toast 提示 */ .toast { animation: slideIn 0.3s ease, slideOut 0.3s ease 2.7s; } @keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } } @keyframes slideOut { from { transform: translateX(0); opacity: 1; } to { transform: translateX(100%); opacity: 0; } } /* 按钮样式 */ .btn { padding: 10px 20px; border: none; border-radius: 6px; font-size: 14px; font-weight: 500; cursor: pointer; transition: all 0.3s; } .btn-primary { background: #4361ee; color: white; } .btn-primary:hover { background: #3a56d4; } .btn-success { background: #10b981; color: white; } .btn-success:hover { background: #059669; } .btn-danger { background: #ef4444; color: white; } .btn-danger:hover { background: #dc2626; } .btn-sm { padding: 6px 12px; font-size: 13px; } .btn-lg { padding: 14px 28px; font-size: 16px; } /* 响应式 */ @media (max-width: 768px) { .smart-card-grid, .tool-actions, .default-interface .action-grid { grid-template-columns: 1fr; } .agent-actions { flex-direction: column; } } /* ========== Mobile UI Styles ========== */ /** * 移动端 UI 样式 - 参考通义千问手机端设计 * 简洁、现代、流畅的移动端体验 */ /* ========== 基础重置 ========== */ * { margin: 0; padding: 0; box-sizing: border-box; } body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif; background: #f5f5f5; overflow-x: hidden; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; } /* ========== 滚动条美化 ========== */ ::-webkit-scrollbar { width: 4px; height: 4px; } ::-webkit-scrollbar-track { background: transparent; } ::-webkit-scrollbar-thumb { background: rgba(0, 0, 0, 0.1); border-radius: 2px; } ::-webkit-scrollbar-thumb:hover { background: rgba(0, 0, 0, 0.2); } /* ========== 通用组件 ========== */ /* 卡片容器 */ .mobile-card { background: white; border-radius: 16px; padding: 20px; margin: 15px; box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08); } /* 按钮基础样式 */ .mobile-btn { display: inline-flex; align-items: center; justify-content: center; padding: 12px 24px; border: none; border-radius: 12px; font-size: 15px; font-weight: 600; cursor: pointer; transition: all 0.3s ease; white-space: nowrap; } .mobile-btn:active { transform: scale(0.95); } /* 主按钮 */ .mobile-btn-primary { background: linear-gradient(135deg, #667eea, #764ba2); color: white; } /* 次要按钮 */ .mobile-btn-secondary { background: #f5f5f5; color: #333; border: 1px solid #e0e0e0; } /* 幽灵按钮 */ .mobile-btn-ghost { background: transparent; color: #667eea; border: 1px solid #667eea; } /* ========== AI 对话气泡 ========== */ .chat-bubble { padding: 12px 16px; border-radius: 16px; margin: 10px 0; max-width: 80%; word-wrap: break-word; line-height: 1.6; font-size: 15px; } .chat-bubble.user { background: linear-gradient(135deg, #667eea, #764ba2); color: white; margin-left: auto; border-bottom-right-radius: 4px; } .chat-bubble.ai { background: white; color: #333; margin-right: auto; border-bottom-left-radius: 4px; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08); } /* ========== 输入框样式 ========== */ .mobile-input { width: 100%; padding: 12px 16px; border: 1px solid #e0e0e0; border-radius: 12px; font-size: 15px; outline: none; transition: border-color 0.3s ease; } .mobile-input:focus { border-color: #667eea; } .mobile-input::placeholder { color: #999; } /* ========== 标签页样式 ========== */ .tab-bar { display: flex; gap: 10px; padding: 10px 15px; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; /* Firefox */ } .tab-bar::-webkit-scrollbar { display: none; /* Chrome/Safari */ } .tab-item { min-width: 80px; padding: 10px 20px; background: white; border: 1px solid #e0e0e0; border-radius: 20px; text-align: center; font-size: 14px; color: #666; cursor: pointer; transition: all 0.3s ease; white-space: nowrap; } .tab-item.active { background: linear-gradient(135deg, #667eea, #764ba2); color: white; border-color: transparent; } .tab-item:active { transform: scale(0.95); } /* ========== 加载动画 ========== */ .loading-spinner { display: inline-block; width: 20px; height: 20px; border: 3px solid rgba(102, 126, 234, 0.2); border-top-color: #667eea; border-radius: 50%; animation: spin 0.8s linear infinite; } @keyframes spin { to { transform: rotate(360deg); } } /* ========== 空状态 ========== */ .empty-state { text-align: center; padding: 60px 20px; } .empty-state-icon { font-size: 64px; margin-bottom: 20px; opacity: 0.5; } .empty-state-title { font-size: 18px; color: #666; margin-bottom: 10px; } .empty-state-desc { font-size: 14px; color: #999; line-height: 1.6; } /* ========== 列表项样式 ========== */ .list-item { display: flex; align-items: center; padding: 15px; background: white; border-bottom: 1px solid #f0f0f0; transition: background 0.2s ease; } .list-item:active { background: #f5f5f5; } .list-item-icon { width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 20px; margin-right: 15px; } .list-item-content { flex: 1; } .list-item-title { font-size: 16px; font-weight: 600; color: #333; margin-bottom: 4px; } .list-item-desc { font-size: 13px; color: #999; } .list-item-arrow { font-size: 18px; color: #ccc; } /* ========== 模态框样式 ========== */ .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: 2000; opacity: 0; transition: opacity 0.3s ease; } .modal-overlay.show { opacity: 1; } .modal-content { background: white; border-radius: 20px; padding: 24px; width: 85%; max-width: 400px; max-height: 80vh; overflow-y: auto; transform: translateY(20px); transition: transform 0.3s ease; } .modal-overlay.show .modal-content { transform: translateY(0); } /* ========== 工具类 ========== */ .flex { display: flex; } .flex-col { flex-direction: column; } .items-center { align-items: center; } .justify-between { justify-content: space-between; } .justify-center { justify-content: center; } .gap-10 { gap: 10px; } .gap-20 { gap: 20px; } .text-center { text-align: center; } .text-primary { color: #667eea; } .text-secondary { color: #999; } .mt-10 { margin-top: 10px; } .mt-20 { margin-top: 20px; } .mb-10 { margin-bottom: 10px; } .mb-20 { margin-bottom: 20px; } /* ========== 响应式适配 ========== */ @media (max-width: 375px) { .mobile-header h1 { font-size: 16px; } .chat-bubble { max-width: 85%; font-size: 14px; } .mobile-btn { padding: 10px 20px; font-size: 14px; } } /* ========== 暗黑模式(预留) ========== */ @media (prefers-color-scheme: dark) { /* 未来支持暗黑模式时的样式 */ :root { --bg-primary: #1a1a1a; --bg-secondary: #2a2a2a; --text-primary: #ffffff; --text-secondary: #999999; } }