* { margin: 0; padding: 0; box-sizing: border-box; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; }
html, body { width: 100%; height: 100%; background: #f5f7fa; overflow: hidden; }
body { opacity: 0; animation: fadeIn 0.4s ease-in forwards; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.app { max-width: 480px; margin: 0 auto; height: 100vh; height: 100dvh; display: flex; flex-direction: column; }

.chat-header { display: flex; align-items: center; gap: 12px; padding: 16px; background: white; border-bottom: 1px solid #eee; flex-shrink: 0; }
.back-btn { background: none; border: none; font-size: 20px; cursor: pointer; color: #333; }
.ai-info { display: flex; align-items: center; gap: 10px; }
.ai-avatar { width: 40px; height: 40px; background: linear-gradient(135deg, #16a34a, #22c55e); border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.ai-info h3 { font-size: 15px; color: #111; }
.status { font-size: 11px; color: #22c55e; margin-top: 1px; }

.chat-messages { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 12px; }

.msg-row { display: flex; gap: 8px; max-width: 85%; }
.msg-row.ai { align-self: flex-start; }
.msg-row.user { align-self: flex-end; flex-direction: row-reverse; }

.msg-bubble { padding: 11px 15px; border-radius: 16px; font-size: 13.5px; line-height: 1.5; }
.msg-row.ai .msg-bubble { background: white; color: #222; border-bottom-left-radius: 4px; box-shadow: 0 1px 4px rgba(0,0,0,0.05); }
.msg-row.user .msg-bubble { background: #22c55e; color: white; border-bottom-right-radius: 4px; }

.msg-time { font-size: 10px; color: #bbb; margin-top: 4px; }

.typing-indicator { display: flex; gap: 4px; padding: 12px 15px; background: white; border-radius: 16px; border-bottom-left-radius: 4px; width: fit-content; box-shadow: 0 1px 4px rgba(0,0,0,0.05); }
.typing-dot { width: 6px; height: 6px; background: #bbb; border-radius: 50%; animation: typingBounce 1.2s infinite; }
.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes typingBounce { 0%, 60%, 100% { transform: translateY(0); } 30% { transform: translateY(-6px); } }

.quick-actions { display: flex; gap: 8px; padding: 0 16px 12px; overflow-x: auto; flex-shrink: 0; }
.quick-actions::-webkit-scrollbar { display: none; }
.quick-chip { flex-shrink: 0; padding: 8px 14px; background: white; border: 1.5px solid #e5e5e5; border-radius: 20px; font-size: 12px; color: #444; cursor: pointer; white-space: nowrap; }
.quick-chip:active { background: #f0fdf4; border-color: #22c55e; }

.chat-input-bar { display: flex; align-items: center; gap: 10px; padding: 12px 16px; background: white; border-top: 1px solid #eee; flex-shrink: 0; }
.chat-input-bar input { flex: 1; padding: 12px 16px; border: 1.5px solid #e5e5e5; border-radius: 24px; font-size: 13.5px; outline: none; }
.chat-input-bar input:focus { border-color: #22c55e; }
.send-btn { width: 42px; height: 42px; background: #22c55e; border: none; border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0; }
.send-btn:active { transform: scale(0.9); }