* { margin: 0; padding: 0; box-sizing: border-box; } :root { --primary: #667eea; --primary-dark: #5a67d8; --bg-color: #f7fafc; --card-bg: #ffffff; --text-color: #2d3748; --text-light: #718096; --border-color: #e2e8f0; --user-msg: #667eea; --ai-msg: #f7fafc; --shadow: 0 2px 8px rgba(0,0,0,0.1); } body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif; background: var(--bg-color); color: var(--text-color); line-height: 1.6; } #app { min-height: 100vh; min-height: 100dvh; } /* ==================== 主页布局 ==================== */ .main-page { display: flex; flex-direction: column; height: 100vh; height: 100dvh; background: #f5f5f5; } .main-content { flex: 1; overflow-y: auto; } /* 底部导航栏 */ .bottom-nav { display: flex; justify-content: space-around; align-items: center; padding: 8px 0; background: white; border-top: 1px solid var(--border-color); position: sticky; bottom: 0; } .nav-item { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 16px; color: var(--text-light); cursor: pointer; transition: all 0.2s; } .nav-item svg { flex-shrink: 0; } .nav-item span { font-size: 12px; } .nav-item:hover { color: var(--primary); } .nav-item.active { color: var(--primary); } /* ==================== 页面通用头部(紫色渐变) ==================== */ .page-header { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; background: linear-gradient(135deg, var(--primary) 0%, #764ba2 100%); color: white; } .page-header h1 { font-size: 18px; font-weight: 600; } /* ==================== 对话页面 ==================== */ .chats-page { display: flex; flex-direction: column; height: 100%; } .chats-header { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; background: linear-gradient(135deg, var(--primary) 0%, #764ba2 100%); color: white; } .chats-header h1 { font-size: 18px; font-weight: 600; } .chats-header-actions { display: flex; align-items: center; gap: 8px; } .chats-header-btn { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; background: rgba(255,255,255,0.95); border: none; border-radius: 50%; color: var(--primary); cursor: pointer; transition: all 0.25s ease; box-shadow: 0 2px 8px rgba(0,0,0,0.15); } .chats-header-btn:hover { transform: scale(1.08); box-shadow: 0 4px 16px rgba(102,126,234,0.4); color: #5a67d8; } .chats-header-btn:active { transform: scale(0.95); } .chats-content { flex: 1; padding: 16px; overflow-y: auto; background: #f5f5f5; } /* ==================== 智能体页面 ==================== */ .agents-page { display: flex; flex-direction: column; height: 100%; } .agents-header { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; background: linear-gradient(135deg, var(--primary) 0%, #764ba2 100%); color: white; } .agents-header h1 { font-size: 18px; font-weight: 600; } .agents-header-actions { display: flex; align-items: center; gap: 8px; } .agents-header-btn { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; background: rgba(255,255,255,0.95); border: none; border-radius: 50%; color: var(--primary); cursor: pointer; transition: all 0.25s ease; box-shadow: 0 2px 8px rgba(0,0,0,0.15); font-size: 18px; } .agents-header-btn:hover { transform: scale(1.08); box-shadow: 0 4px 16px rgba(102,126,234,0.4); color: #5a67d8; } .agents-header-btn.favorite-btn { font-size: 20px; font-weight: bold; } .agents-header-btn.favorite-btn.has-favorites { color: #f59e0b; } .agents-content { flex: 1; padding: 16px; overflow-y: auto; background: #f5f5f5; } .agents-section { margin-bottom: 24px; } .section-title { font-size: 16px; font-weight: 600; color: var(--text-color); margin-bottom: 12px; } .section-title-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; } .section-title-row .section-title { margin-bottom: 0; } .section-more { font-size: 14px; color: var(--primary); cursor: pointer; transition: color 0.2s; } .section-more:hover { color: #5a67d8; } .agents-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; } .agent-card { display: flex; flex-direction: column; align-items: center; padding: 16px; background: white; border: 1px solid var(--border-color); border-radius: 12px; cursor: pointer; transition: all 0.2s; position: relative; } .agent-card:hover { border-color: var(--primary); background: rgba(102, 126, 234, 0.05); transform: translateY(-2px); } .agent-card.pinned { border-color: var(--primary); background: rgba(102, 126, 234, 0.08); box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2); } .agent-card.favorite { border-color: #f59e0b; box-shadow: 0 2px 8px rgba(245, 158, 11, 0.2); } .agent-pin-icon { position: absolute; top: 8px; left: 8px; font-size: 14px; } .agent-fav-icon { position: absolute; top: 8px; right: 8px; font-size: 14px; } .agent-avatar { font-size: 32px; margin-bottom: 8px; } .agent-name { font-size: 14px; font-weight: 600; color: var(--text-color); margin-bottom: 4px; } .agent-desc { font-size: 12px; color: var(--text-light); text-align: center; } /* 智能体操作菜单 */ .agent-action-menu { position: fixed; bottom: 0; left: 0; right: 0; background: transparent; display: none; z-index: 1000; } .agent-action-menu.show { display: block; } .agent-action-menu-content { background: white; border-radius: 16px 16px 0 0; padding: 16px; box-shadow: 0 -4px 20px rgba(0,0,0,0.15); animation: slideUp 0.2s ease; } .agent-action-item { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 10px; cursor: pointer; transition: all 0.2s; } .agent-action-item:hover { background: rgba(102, 126, 234, 0.1); } .agent-action-item svg { color: var(--primary); } .agent-action-item span { font-size: 16px; color: var(--text-color); } .agent-action-item.delete-action svg, .agent-action-item.delete-action span { color: #e53e3e; } .agent-action-item.delete-action:hover { background: rgba(229, 62, 62, 0.1); } /* ==================== 智能体发现页面 ==================== */ .agent-discover-page { display: flex; flex-direction: column; height: 100vh; height: 100dvh; background: #f5f5f5; } .discover-header { display: flex; align-items: center; padding: 12px 16px; background: linear-gradient(135deg, var(--primary) 0%, #764ba2 100%); color: white; } .discover-header h1 { font-size: 18px; font-weight: 600; margin-left: 12px; } .back-btn-white { background: transparent; border: none; color: white; padding: 8px; cursor: pointer; display: flex; align-items: center; } .discover-content { flex: 1; padding: 16px; overflow-y: auto; } .discover-search { display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: white; border: 1px solid var(--border-color); border-radius: 12px; margin-bottom: 16px; } .discover-search svg { color: var(--text-light); } .discover-search input { flex: 1; font-size: 16px; border: none; outline: none; background: transparent; } .discover-section { margin-bottom: 24px; } .discover-section-title { font-size: 16px; font-weight: 600; color: var(--text-color); margin-bottom: 12px; } .discover-grid { display: flex; flex-direction: column; gap: 12px; } .discover-card { display: flex; flex-direction: column; padding: 16px; background: white; border: 1px solid var(--border-color); border-radius: 12px; transition: all 0.2s; } .discover-card:hover { border-color: var(--primary); background: rgba(102, 126, 234, 0.05); } .discover-card-header { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; } .discover-avatar { font-size: 32px; } .discover-card-info { flex: 1; } .discover-name { font-size: 16px; font-weight: 600; color: var(--text-color); } .discover-meta { display: flex; align-items: center; gap: 8px; margin-top: 4px; } .discover-category { font-size: 12px; color: var(--primary); background: rgba(102, 126, 234, 0.1); padding: 2px 8px; border-radius: 4px; } .discover-heat { font-size: 12px; color: #f59e0b; } .discover-desc { font-size: 14px; color: var(--text-light); margin-bottom: 12px; } .discover-actions { display: flex; gap: 8px; } .discover-action-btn { flex: 1; padding: 8px 12px; border: 1px solid var(--border-color); border-radius: 8px; font-size: 14px; color: var(--text-light); background: white; cursor: pointer; transition: all 0.2s; } .discover-action-btn:hover { border-color: var(--primary); color: var(--primary); } .discover-action-btn.add-btn { border-color: var(--primary); color: var(--primary); } .discover-action-btn.add-btn:hover { background: var(--primary); color: white; } .discover-action-btn.add-btn.added { background: rgba(102, 126, 234, 0.1); color: var(--primary); border-color: var(--primary); } .discover-action-btn.favorite-btn { border-color: #f59e0b; color: #f59e0b; } .discover-action-btn.favorite-btn:hover { background: #f59e0b; color: white; } .discover-action-btn.favorite-btn.favorited { background: #f59e0b; color: white; } /* ==================== 智能体收藏夹页面 ==================== */ .agent-favorite-page { display: flex; flex-direction: column; height: 100vh; height: 100dvh; background: #f5f5f5; } .favorite-header { display: flex; align-items: center; padding: 12px 16px; background: linear-gradient(135deg, var(--primary) 0%, #764ba2 100%); color: white; } .favorite-header h1 { font-size: 18px; font-weight: 600; margin-left: 12px; } .favorite-content { flex: 1; padding: 16px; overflow-y: auto; } .empty-favorites { text-align: center; padding: 60px 20px; } .empty-icon { font-size: 48px; margin-bottom: 16px; color: #f59e0b; } .empty-favorites p { color: var(--text-light); margin: 8px 0; } .empty-favorites .empty-tip { font-size: 14px; color: var(--primary); } .favorite-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; } .favorite-agent-card { display: flex; flex-direction: column; align-items: center; padding: 16px; background: white; border: 1px solid #f59e0b; border-radius: 12px; cursor: pointer; transition: all 0.2s; position: relative; box-shadow: 0 2px 8px rgba(245, 158, 11, 0.15); } .favorite-agent-card:hover { transform: translateY(-2px); box-shadow: 0 4px 16px rgba(245, 158, 11, 0.25); } .favorite-agent-avatar { font-size: 32px; margin-bottom: 8px; } .favorite-agent-name { font-size: 14px; font-weight: 600; color: var(--text-color); margin-bottom: 4px; } .favorite-agent-desc { font-size: 12px; color: var(--text-light); text-align: center; } .favorite-agent-unfav { position: absolute; top: 8px; right: 8px; width: 24px; height: 24px; background: transparent; border: none; color: #f59e0b; font-size: 16px; cursor: pointer; opacity: 0.6; transition: opacity 0.2s; } .favorite-agent-unfav:hover { opacity: 1; } /* 最近使用的智能体列表 */ .recent-agents-list { display: flex; flex-direction: column; gap: 8px; } .recent-agent-item { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; background: white; border: 1px solid var(--border-color); border-radius: 10px; cursor: pointer; transition: all 0.2s; } .recent-agent-item:hover { border-color: var(--primary); background: rgba(102, 126, 234, 0.05); } .recent-agent-left { display: flex; align-items: center; gap: 12px; } .recent-agent-avatar { font-size: 20px; } .recent-agent-name { font-size: 14px; font-weight: 500; color: var(--text-color); } .recent-agent-right { display: flex; align-items: center; gap: 12px; font-size: 12px; color: var(--text-light); } .recent-agent-usage { color: var(--primary); } .recent-agent-agent-name { font-size: 12px; color: var(--primary); background: rgba(102, 126, 234, 0.1); padding: 2px 8px; border-radius: 4px; } /* 智能体历史页面 */ .agent-history-page { display: flex; flex-direction: column; height: 100vh; height: 100dvh; } .back-btn-white { background: transparent; border: none; color: white; padding: 8px; cursor: pointer; } .agent-history-content { flex: 1; padding: 16px; overflow-y: auto; background: #f5f5f5; } .agent-history-item { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; background: white; border: 1px solid var(--border-color); border-radius: 10px; margin-bottom: 8px; cursor: pointer; transition: all 0.2s; } .agent-history-item:hover { border-color: var(--primary); background: rgba(102, 126, 234, 0.05); } .agent-history-left { display: flex; align-items: center; gap: 12px; } .agent-history-avatar { font-size: 24px; } .agent-history-name { font-size: 15px; font-weight: 500; color: var(--text-color); } .agent-history-right { display: flex; align-items: center; gap: 12px; font-size: 13px; color: var(--text-light); } .agent-history-usage { color: var(--primary); } .agent-history-agent { font-size: 12px; color: var(--primary); background: rgba(102, 126, 234, 0.1); padding: 2px 8px; border-radius: 4px; } /* ==================== 我的页面 ==================== */ .profile-page { display: flex; flex-direction: column; height: 100%; } .profile-content { flex: 1; padding: 16px; background: #f5f5f5; } .profile-card { display: flex; flex-direction: column; align-items: center; padding: 32px; background: white; border-radius: 12px; margin-bottom: 16px; } .profile-avatar { font-size: 48px; margin-bottom: 12px; } .profile-name { font-size: 18px; font-weight: 600; color: var(--text-color); } .profile-section { background: white; border-radius: 12px; overflow: hidden; } .profile-item { display: flex; align-items: center; gap: 12px; padding: 16px; border-bottom: 1px solid var(--border-color); cursor: pointer; transition: all 0.2s; } .profile-item:last-child { border-bottom: none; } .profile-item:hover { background: rgba(102, 126, 234, 0.05); } .profile-item svg { color: var(--primary); } .profile-item span { font-size: 16px; color: var(--text-color); } .profile-footer { margin-top: 32px; text-align: center; color: var(--text-light); font-size: 14px; } .profile-footer p { margin: 4px 0; } /* ==================== 智能体对话界面 ==================== */ .chat-page { display: flex; flex-direction: column; height: 100vh; height: 100dvh; } .chat-header { display: flex; align-items: center; padding: 12px 16px; background: linear-gradient(135deg, var(--primary) 0%, #764ba2 100%); color: white; } .back-btn { background: transparent; border: none; color: white; padding: 8px; cursor: pointer; } .header-info { display: flex; align-items: center; gap: 12px; flex: 1; } .agent-avatar-header { font-size: 28px; } .header-text h1 { font-size: 16px; font-weight: 600; margin: 0; } .agent-desc-header { font-size: 12px; opacity: 0.8; margin: 0; } /* ==================== 对话列表页面 ==================== */ .conversation-list-page { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; background: var(--card-bg); } .list-header { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; background: linear-gradient(135deg, var(--primary) 0%, #764ba2 100%); color: white; position: sticky; top: 0; z-index: 100; } .list-header .header-title { display: flex; align-items: center; gap: 10px; } .list-header .logo { font-size: 24px; } .list-header h1 { font-size: 18px; font-weight: 600; } .header-actions { display: flex; align-items: center; gap: 8px; } .header-btn { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; background: rgba(255,255,255,0.95); border: none; border-radius: 50%; color: var(--primary); cursor: pointer; transition: all 0.25s ease; box-shadow: 0 2px 8px rgba(0,0,0,0.15), inset 0 1px 0 rgba(255,255,255,0.5); position: relative; overflow: hidden; } .header-btn::before { content: ''; position: absolute; inset: 0; background: linear-gradient(135deg, rgba(255,255,255,1) 0%, rgba(255,255,255,0.7) 100%); opacity: 0; transition: opacity 0.25s; } .header-btn:hover { transform: scale(1.08); box-shadow: 0 4px 16px rgba(102,126,234,0.4), 0 2px 8px rgba(0,0,0,0.2); color: #5a67d8; } .header-btn:hover::before { opacity: 1; } .header-btn:active { transform: scale(0.95); box-shadow: 0 1px 4px rgba(0,0,0,0.2); } .header-btn svg { filter: drop-shadow(0 1px 2px rgba(102,126,234,0.3)); } .list-content { flex: 1; padding: 16px; overflow-y: auto; } /* 原样式保留(备用) */ .new-chat-btn { display: flex; align-items: center; gap: 8px; padding: 12px 20px; background: linear-gradient(135deg, var(--primary) 0%, #764ba2 100%); color: white; border: none; border-radius: 12px; font-size: 16px; cursor: pointer; margin-bottom: 16px; transition: transform 0.2s; } .new-chat-btn:active { transform: scale(0.98); } .conversation-list { display: flex; flex-direction: column; gap: 12px; } .empty-list { text-align: center; padding: 40px; color: var(--text-light); } .conversation-item { display: flex; align-items: center; padding: 12px 16px; background: white; border: 1px solid var(--border-color); border-radius: 12px; cursor: pointer; transition: all 0.2s; position: relative; gap: 8px; } .conversation-item.pinned { border-color: var(--primary); background: rgba(102, 126, 234, 0.08); } .conversation-item:hover { border-color: var(--primary); background: rgba(102, 126, 234, 0.05); } .conversation-item:active { background: rgba(102, 126, 234, 0.1); } .pin-icon { font-size: 14px; } .conv-title { font-size: 16px; font-weight: 500; color: var(--text-color); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; } .conv-meta { font-size: 12px; color: var(--text-light); white-space: nowrap; } /* 操作菜单 */ .action-menu { position: fixed; bottom: 0; left: 0; right: 0; background: transparent; display: none; z-index: 1000; } .action-menu.show { display: block; } .action-menu-content { background: white; border-radius: 16px 16px 0 0; padding: 16px; box-shadow: 0 -4px 20px rgba(0,0,0,0.15); animation: slideUp 0.2s ease; } @keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } } .action-menu-item { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 10px; cursor: pointer; transition: all 0.2s; } .action-menu-item:hover { background: rgba(102, 126, 234, 0.1); } .action-menu-item:active { background: rgba(102, 126, 234, 0.2); } .action-menu-item svg { color: var(--primary); } .action-menu-item span { font-size: 16px; color: var(--text-color); } .action-menu-item.delete-action svg, .action-menu-item.delete-action span { color: #e53e3e; } .action-menu-item.delete-action:hover { background: rgba(229, 62, 62, 0.1); } /* 搜索栏 */ .search-bar { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.5); display: none; z-index: 1100; } .search-bar.show { display: flex; flex-direction: column; } .search-input-wrapper { display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: white; border-bottom: 1px solid var(--border-color); } .search-input-wrapper svg { color: var(--text-light); } .search-input-wrapper input { flex: 1; font-size: 16px; border: none; outline: none; background: transparent; } .search-close-btn { padding: 8px; background: transparent; border: none; color: var(--text-light); cursor: pointer; } .search-close-btn:hover { color: var(--text-color); } .search-results { flex: 1; background: white; overflow-y: auto; padding: 8px 16px; } .search-empty { padding: 40px 20px; text-align: center; color: var(--text-light); } .search-result-item { display: flex; flex-direction: column; gap: 4px; padding: 12px 16px; background: white; border: 1px solid var(--border-color); border-radius: 12px; margin-bottom: 8px; cursor: pointer; transition: all 0.2s; } .search-result-item:hover { border-color: var(--primary); background: rgba(102, 126, 234, 0.05); } .search-result-item.pinned { border-color: var(--primary); background: rgba(102, 126, 234, 0.08); } .search-result-title { font-size: 16px; font-weight: 500; color: var(--text-color); } .search-result-snippet { font-size: 14px; color: var(--text-light); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .search-result-meta { font-size: 12px; color: var(--text-light); } /* 底部工具栏 */ .list-footer { display: flex; justify-content: center; padding: 12px 16px; background: white; border-top: 1px solid var(--border-color); } .footer-btn { display: flex; align-items: center; gap: 6px; padding: 10px 20px; background: white; border: 1px solid var(--border-color); border-radius: 20px; font-size: 14px; color: var(--text-light); cursor: pointer; transition: all 0.2s; } .footer-btn:hover { border-color: var(--primary); color: var(--primary); } .footer-btn:active { background: rgba(102, 126, 234, 0.1); } /* ==================== 对话页面 ==================== */ #chatPage { display: flex; flex-direction: column; height: 100vh; height: 100dvh; max-width: 800px; margin: 0 auto; background: var(--card-bg); box-shadow: var(--shadow); } .header { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; background: linear-gradient(135deg, var(--primary) 0%, #764ba2 100%); color: white; position: sticky; top: 0; z-index: 100; } .back-btn { background: transparent; border: none; color: white; padding: 8px; cursor: pointer; display: flex; align-items: center; } .back-btn:active { opacity: 0.8; } .header-title { display: flex; align-items: center; gap: 10px; flex: 1; margin-left: 8px; } .header-title h1 { font-size: 16px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .logo { font-size: 20px; } .clear-btn { background: rgba(255,255,255,0.2); border: none; border-radius: 8px; padding: 8px; color: white; cursor: pointer; } .clear-btn:active { background: rgba(255,255,255,0.3); } .messages-container { flex: 1; overflow-y: auto; padding: 16px; -webkit-overflow-scrolling: touch; } .welcome { text-align: center; padding: 40px 20px; } .welcome-icon { font-size: 48px; margin-bottom: 16px; } .welcome h2 { font-size: 20px; margin-bottom: 8px; } .welcome p { color: var(--text-light); margin-bottom: 24px; } .quick-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; } .quick-actions button { padding: 8px 16px; border: 1px solid var(--primary); background: white; color: var(--primary); border-radius: 20px; font-size: 14px; cursor: pointer; } .quick-actions button:active { background: var(--primary); color: white; } .messages { display: flex; flex-direction: column; gap: 16px; } .message { display: flex; gap: 12px; animation: fadeIn 0.3s ease; } @keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } } .message.user { flex-direction: row-reverse; } .message-avatar { width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 18px; flex-shrink: 0; } .message.user .message-avatar { background: var(--user-msg); color: white; } .message.assistant .message-avatar { background: var(--primary); color: white; } .message-content { padding: 12px 16px; border-radius: 18px; word-wrap: break-word; } .message.user .message-content { background: var(--user-msg); color: white; border-bottom-right-radius: 4px; } .message.assistant .message-content { background: var(--ai-msg); color: var(--text-color); border-bottom-left-radius: 4px; border: 1px solid var(--border-color); } .message-content code { background: rgba(0,0,0,0.1); padding: 2px 6px; border-radius: 4px; font-family: 'Monaco', 'Menlo', monospace; font-size: 0.9em; } .message-content pre { background: #1a1a2e; color: #eee; padding: 12px; border-radius: 8px; overflow-x: auto; margin: 8px 0; } .message-content pre code { background: transparent; padding: 0; } .message.user .message-content pre { background: rgba(0,0,0,0.2); } /* 流式输出光标 */ .streaming-cursor { animation: blink 1s infinite; color: var(--primary); font-weight: bold; } @keyframes blink { 0%, 50% { opacity: 1; } 51%, 100% { opacity: 0; } } /* 消息结构 */ .message-body { display: flex; flex-direction: column; gap: 8px; } .message.user .message-body { max-width: 85%; } .message.assistant .message-body { max-width: 80%; } /* 消息操作按钮 */ .message-actions { display: flex; gap: 6px; opacity: 0; transition: opacity 0.2s; } .message:hover .message-actions { opacity: 1; } .action-btn { background: transparent; border: 1px solid var(--border-color); border-radius: 6px; padding: 4px 6px; color: var(--text-light); cursor: pointer; display: flex; align-items: center; justify-content: center; } .action-btn:hover { background: var(--border-color); color: var(--text-color); } .action-btn.copy-btn:hover { background: #dbeafe; border-color: var(--primary); color: var(--primary); } .action-btn.delete-btn:hover { background: #fee2e2; border-color: #e53e3e; color: #e53e3e; } .action-btn.regenerate-btn:hover { background: #dbeafe; border-color: var(--primary); color: var(--primary); } /* Markdown 内容样式 */ .message-content h1, .message-content h2, .message-content h3 { margin: 12px 0 8px; font-weight: 600; } .message-content h1 { font-size: 1.3em; } .message-content h2 { font-size: 1.2em; } .message-content h3 { font-size: 1.1em; } /* 图片消息样式 */ .message-image { margin-bottom: 8px; } .message-image img { max-width: 100%; max-height: 300px; border-radius: 12px; cursor: pointer; transition: transform 0.2s; } .message-image img:hover { transform: scale(1.02); } /* 图片预览遮罩 */ .image-preview-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.9); z-index: 1000; display: flex; align-items: center; justify-content: center; cursor: pointer; } .image-preview-overlay img { max-width: 90%; max-height: 90%; border-radius: 8px; } .message-content ul, .message-content ol { margin: 8px 0; padding-left: 20px; } .message-content li { margin: 4px 0; } .message-content strong { font-weight: 600; } .message-content em { font-style: italic; } .message-content a { color: var(--primary); text-decoration: underline; } .message-content blockquote { margin: 8px 0; padding: 8px 12px; border-left: 3px solid var(--primary); background: rgba(102, 126, 234, 0.1); border-radius: 4px; } .message-content table { margin: 8px 0; border-collapse: collapse; width: 100%; } .message-content th, .message-content td { border: 1px solid var(--border-color); padding: 6px 10px; text-align: left; } .message-content th { background: var(--bg-color); font-weight: 600; } /* 功能开关栏 */ .feature-bar { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 16px; background: rgba(255,255,255,0.95); border-top: 1px solid var(--border-color); } .feature-left { display: flex; gap: 8px; } .feature-right { display: flex; gap: 4px; } .feature-btn { display: flex; align-items: center; gap: 4px; padding: 6px 12px; background: white; border: 1px solid var(--border-color); border-radius: 20px; font-size: 13px; color: var(--text-light); cursor: pointer; transition: all 0.2s; } .feature-btn:hover { border-color: var(--primary); color: var(--primary); } .feature-btn.active { background: linear-gradient(135deg, var(--primary) 0%, #764ba2 100%); border-color: transparent; color: white; } .feature-btn svg { flex-shrink: 0; } /* 导航按钮样式 */ .nav-btn { padding: 6px 8px; min-width: 32px; } .nav-btn:hover { background: var(--primary); border-color: var(--primary); color: white; } /* 思考内容块 */ .thinking-block { margin-bottom: 12px; background: rgba(102, 126, 234, 0.08); border: 1px solid rgba(102, 126, 234, 0.2); border-radius: 10px; overflow: hidden; cursor: pointer; transition: all 0.2s; } .thinking-block:hover { border-color: rgba(102, 126, 234, 0.4); } .thinking-header { display: flex; align-items: center; gap: 6px; padding: 8px 12px; background: rgba(102, 126, 234, 0.12); font-size: 13px; color: var(--primary); font-weight: 500; } .thinking-header svg:first-child { color: var(--primary); } .thinking-arrow { margin-left: auto; transition: transform 0.2s; } .thinking-block.expanded .thinking-arrow { transform: rotate(180deg); } .thinking-content { padding: 0 12px; max-height: 0; overflow: hidden; transition: max-height 0.3s ease, padding 0.3s ease; color: var(--text-light); font-size: 14px; line-height: 1.6; } .thinking-block.expanded .thinking-content { padding: 12px; max-height: 500px; } .thinking-content p { margin: 8px 0; } /* 搜索结果块 */ .search-results-block { margin-bottom: 12px; background: rgba(102, 126, 234, 0.05); border: 1px solid rgba(102, 126, 234, 0.15); border-radius: 10px; overflow: hidden; cursor: pointer; transition: all 0.2s; } .search-results-block:hover { border-color: rgba(102, 126, 234, 0.3); } .search-results-header { display: flex; align-items: center; gap: 6px; padding: 8px 12px; background: rgba(102, 126, 234, 0.1); font-size: 13px; color: var(--primary); font-weight: 500; } .search-results-header svg:first-child { color: var(--primary); } .search-results-arrow { margin-left: auto; transition: transform 0.2s; } .search-results-block.expanded .search-results-arrow { transform: rotate(180deg); } .search-results-content { padding: 0 12px; max-height: 0; overflow: hidden; transition: max-height 0.3s ease, padding 0.3s ease; } .search-results-block.expanded .search-results-content { padding: 8px 12px; max-height: 300px; } .search-result-link { display: flex; align-items: center; gap: 8px; padding: 6px 0; } .search-result-num { display: flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; background: var(--primary); color: white; border-radius: 50%; font-size: 12px; font-weight: 500; } .search-result-link a { color: var(--text-color); font-size: 14px; text-decoration: none; transition: color 0.2s; } .search-result-link a:hover { color: var(--primary); } /* 输入区域 */ .input-area { display: flex; gap: 10px; padding: 12px 16px; background: white; border-top: 1px solid var(--border-color); position: sticky; bottom: 0; } /* 上传按钮 */ .attach-btn { width: 44px; height: 44px; border-radius: 50%; background: white; border: 2px solid var(--border-color); color: var(--text-light); cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.2s; flex-shrink: 0; } .attach-btn:hover { border-color: var(--primary); color: var(--primary); background: rgba(102, 126, 234, 0.05); } .attach-btn:active { transform: scale(0.95); } /* 上传选项面板 */ .attach-panel { position: fixed; bottom: 70px; left: 16px; background: white; border-radius: 12px; box-shadow: 0 4px 20px rgba(0,0,0,0.15); padding: 16px; display: none; z-index: 200; } .attach-panel.show { display: block; animation: slideUp 0.2s ease; } @keyframes slideUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } } .attach-panel-content { display: flex; gap: 16px; } .attach-item { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 12px 16px; background: rgba(102, 126, 234, 0.05); border-radius: 12px; cursor: pointer; transition: all 0.2s; } .attach-item:hover { background: rgba(102, 126, 234, 0.15); } .attach-icon { font-size: 28px; } .attach-label { font-size: 12px; color: var(--text-color); } #userInput { flex: 1; padding: 12px 16px; border: 2px solid var(--border-color); border-radius: 24px; font-size: 16px; resize: none; outline: none; font-family: inherit; max-height: 120px; transition: border-color 0.2s; } #userInput:focus { border-color: var(--primary); } .send-btn { width: 48px; height: 48px; border-radius: 50%; background: linear-gradient(135deg, var(--primary) 0%, #764ba2 100%); border: none; color: white; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: transform 0.2s, opacity 0.2s; flex-shrink: 0; } .send-btn:active { transform: scale(0.95); } .send-btn:disabled { opacity: 0.5; cursor: not-allowed; } /* Toast 提示 */ .toast { position: fixed; top: 80px; left: 50%; transform: translateX(-50%) translateY(-20px); background: var(--text-color); color: white; padding: 12px 24px; border-radius: 8px; font-size: 14px; opacity: 0; transition: all 0.3s ease; z-index: 1000; box-shadow: 0 4px 12px rgba(0,0,0,0.2); } .toast.show { opacity: 1; transform: translateX(-50%) translateY(0); } /* 安全区域适配(刘海屏) */ @supports (padding: env(safe-area-inset-bottom)) { .input-area { padding-bottom: calc(12px + env(safe-area-inset-bottom)); } } /* 停止生成按钮 */ .stop-generate-btn { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 24px; margin: 16px auto; background: linear-gradient(135deg, #e53e3e 0%, #c53030 100%); color: white; border: none; border-radius: 24px; font-size: 14px; font-weight: 500; cursor: pointer; transition: all 0.2s; box-shadow: 0 2px 8px rgba(229, 62, 62, 0.3); } .stop-generate-btn:hover { transform: scale(1.05); box-shadow: 0 4px 16px rgba(229, 62, 62, 0.4); } .stop-generate-btn:active { transform: scale(0.98); } .stop-generate-btn svg { flex-shrink: 0; }