/* 聊天页面样式 */ .chat-container { display: flex; flex-direction: column; height: 100vh; background-color: #f5f5f5; } .message-list { flex: 1; padding: 20rpx; overflow-y: auto; padding-bottom: 120rpx; /* 为输入区域预留空间 */ } .message-item { display: flex; margin: 20rpx 0; align-items: flex-start; } .message-left { flex-direction: row; } .message-right { flex-direction: row-reverse; } .message-avatar { width: 80rpx; height: 80rpx; margin: 0 20rpx; flex-shrink: 0; } .message-avatar image { width: 100%; height: 100%; border-radius: 50%; } .message-content { max-width: 70%; display: flex; flex-direction: column; } .message-header { display: flex; align-items: center; margin-bottom: 10rpx; } .message-nickname { font-size: 24rpx; color: #999; margin-right: 10rpx; } .message-time { font-size: 20rpx; color: #ccc; } .message-body { background-color: #f0f0f0; border-radius: 10rpx; padding: 20rpx; word-wrap: break-word; } .message-right .message-body { background-color: #95ec69; } .message-text { font-size: 28rpx; color: #333; line-height: 1.5; } .message-right .message-text { color: #000; } .message-image { max-width: 300rpx; max-height: 300rpx; border-radius: 10rpx; } .input-container { position: fixed; bottom: 0; left: 0; right: 0; background: white; border-top: 1rpx solid #e0e0e0; padding: 20rpx; z-index: 1000; } .input-wrapper { display: flex; align-items: center; margin-bottom: 20rpx; } .message-input { flex: 1; border: 1rpx solid #e0e0e0; border-radius: 50rpx; padding: 20rpx 30rpx; font-size: 28rpx; background-color: #f8f8f8; margin-right: 20rpx; } .message-input:focus { border-color: #07c160; background-color: white; } .send-btn { background: linear-gradient(135deg, #07c160 0%, #06a050 100%); color: white; border: none; border-radius: 50rpx; padding: 20rpx 40rpx; font-size: 28rpx; font-weight: 500; transition: all 0.3s ease; min-width: 120rpx; } .send-btn:active { transform: scale(0.95); } .send-btn:disabled { background: #ccc; color: #999; transform: none; } .action-buttons { display: flex; justify-content: space-around; } .action-btn { background: none; border: none; padding: 20rpx; border-radius: 10rpx; transition: background-color 0.3s; } .action-btn:active { background-color: #f0f0f0; } .action-btn image { width: 60rpx; height: 60rpx; }