page { background: linear-gradient(180deg, #E3F2FD 0%, #E8F5E9 50%, #FFF3E0 100%); height: 100%; } .chat-container { display: flex; flex-direction: column; height: calc(100vh - 88px); // margin-top: 88px; box-sizing: border-box; } .chat-scroll { flex: 1; overflow-y: auto; } .message-list { padding: 16px; } .message-row { display: flex; margin-bottom: 16px; align-items: flex-start; } .ai-row { justify-content: flex-start; } .user-row { justify-content: flex-end; } /* AI头像 - 蓝色机器人 */ .avatar { width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0; display: flex; align-items: center; justify-content: center; overflow: hidden; } .ai-avatar { margin-right: 10px; background: linear-gradient(135deg, #42A5F5 0%, #64B5F6 100%); border: 2px solid #fff; box-shadow: 0 2px 8px rgba(66, 165, 245, 0.3); } .ai-avatar-image { width: 70%; height: 70%; object-fit: contain; } .user-avatar { margin-left: 10px; background: linear-gradient(135deg, #66BB6A 0%, #81C784 100%); border: 2px solid #fff; box-shadow: 0 2px 8px rgba(102, 187, 106, 0.3); } .avatar-text { color: #fff; font-size: 12px; font-weight: 600; } .avatar-fallback { color: #fff; font-size: 12px; font-weight: 600; } .message-content { max-width: 75%; } /* AI消息气泡 - 白色 */ .bubble { padding: 12px 16px; border-radius: 18px; word-wrap: break-word; box-shadow: 0 2px 8px rgba(0,0,0,0.08); } .ai-bubble { background-color: #FFFFFF; border-bottom-left-radius: 4px; } /* 用户消息气泡 - 蓝色 */ .user-bubble { background: linear-gradient(135deg, #2196F3 0%, #42A5F5 100%); color: #FFFFFF; border-bottom-right-radius: 4px; } .message-text { font-size: 15px; line-height: 1.5; color: inherit; } /* FAQ卡片 - 白色圆角 */ .faq-card { background: rgba(255, 255, 255, 0.9); border-radius: 16px; padding: 14px 12px; margin-top: 8px; width: 280px; backdrop-filter: blur(10px); border: 1px solid rgba(255, 255, 255, 0.8); box-shadow: 0 4px 16px rgba(33, 150, 243, 0.1); } .faq-header { margin-bottom: 10px; padding-left: 2px; } .faq-title { font-size: 15px; font-weight: 700; color: #2196F3; letter-spacing: 0.5px; } .faq-list { display: flex; flex-direction: column; gap: 8px; } .faq-item { display: flex; align-items: center; padding: 10px 12px; background-color: #FFFFFF; border-radius: 10px; box-shadow: 0 1px 3px rgba(0,0,0,0.04); cursor: pointer; transition: all 0.2s ease; } .faq-item:active { transform: scale(0.98); background-color: #F5F9FC; } .faq-icon { width: 18px; height: 18px; background: linear-gradient(135deg, #2196F3 0%, #42A5F5 100%); border-radius: 4px; display: flex; align-items: center; justify-content: center; margin-right: 10px; flex-shrink: 0; } .faq-icon-text { color: #fff; font-size: 10px; font-weight: 700; } .faq-text { flex: 1; font-size: 13px; color: #333; font-weight: 500; } .faq-arrow { font-size: 14px; color: #CCC; margin-left: 4px; } /* 用户图片 */ .user-image { max-width: 180px; border-radius: 12px; overflow: hidden; box-shadow: 0 2px 8px rgba(0,0,0,0.1); } .user-image image { width: 100%; max-height: 180px; display: block; } /* 输入区域 - 圆角灰色 */ .input-area { background-color: #FFFFFF; border-top: 1px solid rgba(0,0,0,0.04); padding: 10px 16px; padding-bottom: calc(10px + env(safe-area-inset-bottom)); } .input-container { display: flex; align-items: center; background-color: #F5F7FA; border-radius: 24px; padding: 6px 10px; } .input-wrapper { flex: 1; display: flex; align-items: center; padding: 0 4px; } .voice-btn { width: 30px; height: 30px; display: flex; align-items: center; justify-content: center; margin-right: 4px; } .voice-icon { font-size: 16px; color: #666; } .chat-input { flex: 1; height: 34px; font-size: 15px; color: #333; background: transparent; } .placeholder { color: #AAA; font-size: 15px; } .image-btn { width: 34px; height: 34px; display: flex; align-items: center; justify-content: center; background-color: #FFFFFF; border-radius: 50%; box-shadow: 0 1px 3px rgba(0,0,0,0.08); margin-left: 4px; } .image-icon { font-size: 18px; color: #666; } /* 加载中状态 */ .loading-row { align-items: center; } .loading-bubble { background-color: #FFFFFF; border-radius: 16px; padding: 12px 18px; border-bottom-left-radius: 4px; box-shadow: 0 2px 8px rgba(0,0,0,0.06); } .loading-dots { display: flex; align-items: center; gap: 5px; } .dot { width: 7px; height: 7px; 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; } }