/* Reset / Base */
* { margin: 0; padding: 0; box-sizing: border-box; font-family: Arial, sans-serif; }
body { background: #000; height: 100vh; display: flex; justify-content: center; align-items: center; }

/* Wrapper */
.chat-wrapper { background: #111; width: 400px; height: 90vh; display: flex; flex-direction: column; border-radius: 10px; overflow: hidden; }
.chat-container { flex: 1; overflow-y: auto; padding: 15px; }

/* Messages */
.message-row { display: flex; align-items: flex-end; margin-bottom: 15px; }
.message-row.ai { flex-direction: row; }
.message-row.user { flex-direction: row-reverse; }
.avatar img { width: 40px; height: 40px; border-radius: 50%; }
.bubble { max-width: 70%; padding: 10px 15px; border-radius: 20px; margin: 0 10px; font-size: 14px; line-height: 1.35; }
.bubble.ai { background: #222; color: #fff; }
.bubble.user { background: #4cafef; color: #fff; }

/* Composer */
.composer { background: #222; padding: 8px; display: flex; align-items: center; gap: 10px; }
.composer input { flex: 1; padding: 10px 12px; border-radius: 20px; border: none; outline: none; font-size: 14px; background: #333; color: #fff; }
.icons { display: flex; align-items: center; gap: 8px; }
.icon-btn { background: transparent; border: none; cursor: pointer; padding: 6px; display: flex; align-items: center; justify-content: center; }
.send-btn { border-radius: 50%; }

/* Typing Indicator */
.bubble.ai.typing { display: flex; align-items: center; gap: 8px; }
.typing-indicator { display: inline-flex; gap: 6px; }
.typing-indicator .dot { width: 6px; height: 6px; border-radius: 50%; background: #9aa0a6; animation: blink 1s infinite ease-in-out; }
.typing-indicator .dot:nth-child(2) { animation-delay: .15s; }
.typing-indicator .dot:nth-child(3) { animation-delay: .3s; }
@keyframes blink { 0%, 80%, 100% { opacity: .2; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }

/* Scrollbar */
.chat-container::-webkit-scrollbar { width: 8px; }
.chat-container::-webkit-scrollbar-thumb { background: #2d2d2d; border-radius: 8px; }
.chat-container::-webkit-scrollbar-track { background: #151515; }

/* Image Messages */
.bubble img { max-width: 200px; border-radius: 10px; margin-top: 5px; }
