/* 聊天界面样式 */ .chat-messages { max-height: 400px; overflow-y: auto; padding: 10px; background-color: #f8f9fa; border-radius: 5px; margin-bottom: 15px; } .message { margin-bottom: 15px; padding: 10px 15px; border-radius: 10px; max-width: 80%; position: relative; } .message-user { background-color: #dcf8c6; margin-left: auto; text-align: right; border-bottom-right-radius: 0; } .message-assistant { background-color: #ffffff; margin-right: auto; border-bottom-left-radius: 0; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1); } .message-content { word-wrap: break-word; } .message-time { font-size: 0.7rem; color: #888; margin-top: 5px; } .preview-container { max-width: 300px; margin: 0 auto; } #previewImage { max-height: 300px; object-fit: contain; } .typing-indicator { display: inline-block; padding: 10px 15px; background-color: #f0f0f0; border-radius: 10px; margin-bottom: 15px; } .typing-indicator span { display: inline-block; width: 8px; height: 8px; background-color: #888; border-radius: 50%; margin-right: 3px; animation: typing 1s infinite ease-in-out; } .typing-indicator span:nth-child(2) { animation-delay: 0.2s; } .typing-indicator span:nth-child(3) { animation-delay: 0.4s; margin-right: 0; } @keyframes typing { 0% { transform: translateY(0); } 50% { transform: translateY(-5px); } 100% { transform: translateY(0); } } .chat-input-container { position: relative; bottom: 0; width: 100%; } /* 响应式调整 */ @media (max-width: 768px) { .message { max-width: 90%; } .chat-messages { max-height: 350px; } }