style.css: " * { margin: 0; padding: 0; box-sizing: border-box; } body { font-family:…
- User
style.css: "
- { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: Arial, sans-serif; background-color: #f4f4f4; display: flex; justify-content: center; align-items: center; height: 100vh; }
/* کانتینر اصلی چت */ .chat-container { width: 70vw; height: 80vh; display: flex; flex-direction: column; background-color: white; border: 1px solid #ccc; border-radius: 10px; box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); overflow: hidden; }
/* باکس پیامها */ .chat-box { flex: 1; overflow-y: auto; padding: 20px; background-color: #f9f9f9; }
.message { display: flex; margin-bottom: 10px; align-items: flex-end; }
.message p { margin: 0; padding: 10px; border-radius: 15px; max-width: 70%; word-wrap: break-word; position: relative; background-color: #d1e7fd; }
.message .time { font-size: 10px; margin-left: 10px; margin-right: 10px; }
.user-message { justify-content: flex-start; flex-direction: row-reverse; }
.user-message p { background-color: #e0ffe0; margin-right: 10px; /* پیامهای کاربر به سمت راست میروند */ white-space: pre-wrap; }
.bot-message { justify-content: flex-start; flex-direction: row; }
.bot-message p { background-color: #d1e7fd; margin-left: 10px; /* پیامهای ربات به سمت چپ میروند */ white-space: pre-wrap; }
.message img.avatar { width: 40px; height: 40px; border-radius: 50%; }
/* بخش ورود پیام */ .message-input-section { display: flex; padding: 10px; border-top: 1px solid #ccc; }
.message-input-section input { flex: 1; padding: 10px; border: 1px solid #ccc; border-radius: 5px; margin-right: 10px; font-size: 16px; }
.message-input-section textarea { flex: 1; padding: 10px; border: 1px solid #ccc; border-radius: 5px; margin-right: 10px; font-size: 16px; }
.message-input-section button { padding: 10px 15px; background-color: #4CAF50; color: white; border: none; border-radius: 5px; cursor: pointer; }
.message-input-section button:hover { background-color: #45a049; }
/* ریسپانسیو برای موبایل */ @media (max-width: 768px) { .chat-container { width: 100%; height: 90vh; border-radius: 0; } } "
- Assistant