# HTML and CSS styling for the chat application css = ''' <style> @import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600&display=swap'); body { background-color: #f4f6f9; font-family: 'Inter', sans-serif; } .chat-container { max-width: 800px; margin: 0 auto; padding: 20px; } .chat-message { display: flex; margin-bottom: 1.5rem; border-radius: 12px; box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); overflow: hidden; transition: all 0.3s ease; } .chat-message:hover { transform: translateY(-5px); box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15); } .chat-message.user { background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%); color: white; } .chat-message.bot { background: linear-gradient(135deg, #38ef7d 0%, #11998e 100%); color: white; } .chat-message .avatar { width: 15%; display: flex; align-items: center; justify-content: center; padding: 10px; background-color: rgba(255, 255, 255, 0.1); } .chat-message .avatar img { width: 50px; height: 50px; border-radius: 50%; object-fit: cover; border: 2px solid rgba(255, 255, 255, 0.3); } .chat-message .message { width: 85%; padding: 15px; font-size: 1rem; line-height: 1.6; } .chat-message.user .message { text-align: left; } </style> ''' # Bot message template bot_template = ''' <div class="chat-message bot"> <div class="avatar"> <img src="https://i.imgur.com/7zxqQ3y.png" alt="Bot Avatar"> </div> <div class="message">{{MSG}}</div> </div> ''' # User message template user_template = ''' <div class="chat-message user"> <div class="avatar"> <img src="https://i.imgur.com/3JbqQAZ.png" alt="User Avatar"> </div> <div class="message">{{MSG}}</div> </div> '''