body { font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; transition: background-color 0.3s, color 0.3s; }
.theme-light { background: #f8f9fa; color: #212529; }
.theme-dark { background: #212529; color: #f8f9fa; }
.card { border-radius: 15px; box-shadow: 0 4px 20px rgba(0,0,0,0.1); animation: fadeIn 0.5s; padding: 20px; max-width: 400px; margin: 50px auto; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
.topbar { display: flex; justify-content: space-between; padding: 10px; background: #007bff; color: white; border-radius: 10px 10px 0 0; }
.container { display: flex; height: calc(100vh - 50px); }
.sidebar { width: 250px; padding: 10px; background: #e9ecef; border-right: 1px solid #dee2e6; overflow-y: auto; }
.sidebar li { padding: 10px; border-bottom: 1px solid #dee2e6; cursor: pointer; transition: background 0.3s; }
.sidebar li:hover { background: #ced4da; }
.chat { flex: 1; display: flex; flex-direction: column; }
#chatHeader { padding: 10px; background: #007bff; color: white; }
.messages { flex: 1; overflow-y: auto; padding: 10px; }
.msg { margin: 10px 0; padding: 10px; border-radius: 15px; max-width: 70%; animation: slideIn 0.3s; transition: opacity 0.3s ease-in-out; } /* جدید: transition برای smooth */
.sent { background: #dcf8c6; align-self: flex-end; }
.recv { background: #ffffff; align-self: flex-start; }
.theme-dark .msg.sent { background: #343a40; color: #000; }
.theme-dark .msg.recv { background: #495057; color: #000; }
.theme-dark .msg .txt { color: #000; }
.theme-light .msg .txt { color: #212529; }
@keyframes slideIn { from { opacity: 0; transform: translateX(50px); } to { opacity: 1; transform: translateX(0); } }
#sendForm { display: flex; padding: 10px; background: #f8f9fa; border-top: 1px solid #dee2e6; }
#messageText { flex: 1; border-radius: 20px; padding: 10px; border: 1px solid #ced4da; }
.controls { display: flex; gap: 10px; }
button { transition: background 0.3s; }
button:hover { background: #0056b3; color: white; }
.error { color: red; background: #f8d7da; padding: 10px; border-radius: 5px; }
.success { color: green; background: #d4edda; padding: 10px; border-radius: 5px; }