Chatbot Neo - MeggiTools
Run
Toggle Theme
Share Link
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>ChatBot Neo</title> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.1.1/css/all.min.css"> <style> body { font-family: 'Arial', sans-serif; margin: 0; padding: 0; background: linear-gradient(135deg, #ff9a9e 0%, #fad0c4 100%); display: flex; justify-content: center; align-items: center; height: 100vh; } .chatbot-container { background: rgba(255, 255, 255, 0.3); border-radius: 20px; box-shadow: 0 8px 32px rgba(31, 38, 135, 0.37); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border: 1px solid rgba(255, 255, 255, 0.18); width: 400px; height: 550px; display: flex; flex-direction: column; overflow: hidden; animation: fadeInUp 1s ease-in-out; } @keyframes fadeInUp { from { transform: translateY(50px); opacity: 0; } to { transform: translateY(0); opacity: 1; } } .chat-header { background: linear-gradient(45deg, #6a11cb 0%, #2575fc 100%); padding: 20px; color: white; text-align: center; font-size: 1.5em; font-weight: bold; position: relative; } .chat-header .fa-robot { position: absolute; top: 50%; right: 20px; transform: translateY(-50%); font-size: 1.5em; } .chat-body { flex: 1; padding: 20px; overflow-y: auto; display: flex; flex-direction: column; } .message { background: linear-gradient(135deg, #f3e7e9 0%, #e3eeff 100%); padding: 12px; border-radius: 12px; margin-bottom: 15px; max-width: 70%; box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1); animation: slideIn 0.5s ease-out; } .message.user { background: linear-gradient(135deg, #c3cfe2 0%, #c3cfe2 100%); align-self: flex-end; } @keyframes slideIn { from { transform: translateY(30px); opacity: 0; } to { transform: translateY(0); opacity: 1; } } .chat-footer { display: flex; align-items: center; padding: 15px; background: rgba(255, 255, 255, 0.3); border-top: 1px solid rgba(255, 255, 255, 0.2); } .chat-footer input { flex: 1; padding: 12px; border: none; border-radius: 30px; background: rgba(255, 255, 255, 0.9); margin-right: 15px; box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1); } .chat-footer button { background: linear-gradient(45deg, #6a11cb 0%, #2575fc 100%); border: none; border-radius: 50%; color: white; padding: 12px; cursor: pointer; box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1); } .chat-footer button .fa-paper-plane { font-size: 1.2em; } </style> </head> <body> <div class="chatbot-container"> <div class="chat-header"> ChatBot Neo <i class="fas fa-robot"></i> </div> <div class="chat-body" id="chatBodyNeo"> <div class="message">Hello! How can I assist you today?</div> </div> <div class="chat-footer"> <input type="text" id="chatInputNeo" placeholder="Type your message..."> <button onclick="sendMessageNeo()"> <i class="fas fa-paper-plane"></i> </button> </div> </div> <script> function sendMessageNeo() { const chatBody = document.getElementById('chatBodyNeo'); const chatInput = document.getElementById('chatInputNeo'); if (chatInput.value.trim() !== '') { const userMessage = document.createElement('div'); userMessage.className = 'message user'; userMessage.textContent = chatInput.value; chatBody.appendChild(userMessage); chatInput.value = ''; chatBody.scrollTop = chatBody.scrollHeight; setTimeout(() => { const botMessage = document.createElement('div'); botMessage.className = 'message'; botMessage.textContent = 'This is a response from the chatbot.'; chatBody.appendChild(botMessage); chatBody.scrollTop = chatBody.scrollHeight; }, 1000); } } </script> </body> </html>