/* 背景图 - 使用image组件实现 */ .bg-image { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: -1; } page { background: linear-gradient(180deg, #E8F4FC 0%, #F5F9FC 100%); height: 100%; overflow: hidden; } .chat-nav { position: fixed; top: 0; left: 0; right: 0; z-index: 200; } .chat-container { position: fixed; top: 0; left: 0; right: 0; bottom: 0; display: flex; flex-direction: column; box-sizing: border-box; padding-top: 88px; } /* 聊天滚动区域 - 固定定位,不随键盘变化 */ .chat-scroll { position: fixed; top: 88px; left: 0; right: 0; bottom: 120rpx; padding-bottom: env(safe-area-inset-bottom); overflow-y: auto; } .message-list { padding: 24rpx 24rpx; } .message-row { display: flex; margin-bottom: 32rpx; align-items: flex-start; } .ai-row { justify-content: flex-start; } .user-row { justify-content: flex-end; } /* AI头像 */ .avatar { width: 80rpx; height: 80rpx; border-radius: 50%; flex-shrink: 0; display: flex; align-items: center; justify-content: center; overflow: hidden; } .ai-avatar { margin-right: 24rpx; background: linear-gradient(135deg, #42A5F5 0%, #64B5F6 100%); border: 4rpx solid #fff; box-shadow: 0 4rpx 16rpx rgba(66, 165, 245, 0.3); } .ai-avatar-image { width: 100%; height: 100%; object-fit: contain; } .avatar-fallback { color: #fff; font-size: 24rpx; font-weight: 600; } .user-avatar { margin-left: 24rpx; background: linear-gradient(135deg, #66BB6A 0%, #81C784 100%); border: 4rpx solid #fff; box-shadow: 0 4rpx 16rpx rgba(102, 187, 106, 0.3); } .avatar-text { color: #fff; font-size: 24rpx; font-weight: 600; } .message-content { max-width: 75%; } /* AI消息气泡 - 白色 */ .bubble { padding: 20rpx 24rpx; border-radius: 24rpx; word-wrap: break-word; box-shadow: 0 2rpx 12rpx rgba(0,0,0,0.08); } .ai-bubble { background-color: #FFFFFF; } /* 用户消息气泡 - 微信蓝 */ .user-bubble { background-color: #0F85FF; color: #FFFFFF; } .message-text { font-size: 30rpx; line-height: 44rpx; color: rgba(19, 20, 21, 1); } .user-bubble .message-text { color: #FFFFFF; } /* FAQ卡片单独显示时的样式(不带头像) */ .faq-row { justify-content: center; } .faq-content-full { max-width: 100%; width: 100%; } /* FAQ卡片 - 参考蓝湖 block_2 */ .faq-card { background-color: rgba(255, 255, 255, 0.5); border-radius: 32rpx; padding: 26rpx 24rpx; border: 2rpx solid rgba(255, 255, 255, 1); box-shadow: 0 8rpx 40rpx rgba(118, 167, 206, 0.1); } .faq-header { display: flex; align-items: center; margin-bottom: 26rpx; } .faq-header-img { width: 138rpx; height: 32rpx; margin-right: 16rpx; } .faq-header-icon { width: 44rpx; height: 44rpx; background: linear-gradient(135deg, #2196F3 0%, #42A5F5 100%); border-radius: 8rpx; display: flex; align-items: center; justify-content: center; margin-right: 16rpx; flex-shrink: 0; } .faq-header-icon-text { color: #fff; font-size: 22rpx; font-weight: 700; } .faq-title { font-size: 30rpx; font-weight: 500; color: rgba(19, 20, 21, 1); } /* FAQ问题列表 */ .faq-list { display: flex; flex-direction: column; } /* FAQ问题项 - 参考蓝湖 list-items 药丸形状 */ .faq-item { display: flex; align-items: center; padding: 22rpx 24rpx; background-color: #FFFFFF; border-radius: 132rpx; margin-bottom: 16rpx; } .faq-item:last-child { margin-bottom: 0; } .faq-item:active { transform: scale(0.98); background-color: #F5F9FC; } /* 问题图标图片 */ .faq-icon-img { width: 32rpx; height: 32rpx; margin-right: 24rpx; flex-shrink: 0; } /* 问题图标 */ .faq-icon { width: 32rpx; height: 32rpx; background: linear-gradient(135deg, #2196F3 0%, #42A5F5 100%); border-radius: 8rpx; display: flex; align-items: center; justify-content: center; margin-right: 24rpx; flex-shrink: 0; } .faq-icon-text { color: #fff; font-size: 18rpx; font-weight: 700; } .faq-text { flex: 1; font-size: 28rpx; color: rgba(19, 20, 21, 1); font-weight: 400; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } /* 箭头图片 */ .faq-arrow-img { width: 24rpx; height: 16rpx; margin-left: 8rpx; flex-shrink: 0; } .faq-arrow { font-size: 24rpx; color: rgba(19, 20, 21, 0.3); margin-left: 8rpx; } /* 用户图片 */ .user-image { width: 360rpx; border-radius: 24rpx; overflow: hidden; box-shadow: 0 4rpx 16rpx rgba(0,0,0,0.1); } .user-image image { width: 100%; height: 360rpx; display: block; } /* 输入区域 - 固定在底部,跟随键盘移动 */ .input-area { position: fixed; bottom: 0; left: 0; right: 0; padding: 20rpx 24rpx; padding-bottom: 32rpx; // calc(20rpx + env(safe-area-inset-bottom)); background: linear-gradient(180deg, rgba(245, 249, 252, 0.9) 0%, rgba(232, 244, 252, 0.95) 100%); z-index: 100; } .input-container { display: flex; align-items: center; } .input-wrapper { flex: 1; display: flex; align-items: center; background-color: #FFFFFF; border-radius: 86rpx; padding: 0 24rpx; height: 80rpx; border: 2rpx solid rgba(255, 255, 255, 1); box-sizing: border-box; } .voice-btn { width: 48rpx; height: 48rpx; display: flex; align-items: center; justify-content: center; margin-right: 12rpx; } .voice-icon { font-size: 32rpx; color: #666; } .voice-icon-img { width: 48rpx; height: 48rpx; margin-right: 12rpx; } .chat-input { flex: 1; height: 80rpx; line-height: 80rpx; font-size: 30rpx; color: rgba(19, 20, 21, 1); background: transparent; } .placeholder { color: rgba(19, 20, 21, 0.3); font-size: 30rpx; } /* 发送按钮 */ .send-btn { width: 120rpx; height: 80rpx; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #42A5F5 0%, #2196F3 100%); border-radius: 86rpx; margin-left: 12rpx; } .send-btn-text { color: #FFFFFF; font-size: 30rpx; font-weight: 500; } /* 加载中状态 */ .loading-row { align-items: center; } .loading-bubble { background-color: #FFFFFF; border-radius: 24rpx; padding: 20rpx 36rpx; box-shadow: 0 2rpx 12rpx rgba(0,0,0,0.06); } .loading-dots { display: flex; align-items: center; gap: 10rpx; } .dot { width: 14rpx; height: 14rpx; background: linear-gradient(135deg, #2196F3 0%, #42A5F5 100%); border-radius: 50%; animation: bounce 1.4s ease-in-out infinite both; } .dot:nth-child(1) { animation-delay: -0.32s; } .dot:nth-child(2) { animation-delay: -0.16s; } @keyframes bounce { 0%, 80%, 100% { transform: scale(0.6); opacity: 0.5; } 40% { transform: scale(1); opacity: 1; } }