@charset "UTF-8"; 
.ai-chat-wrapper { max-width: 800px; margin: 0 auto; background: #fff; border-radius: 12px; box-shadow: 0 4px 12px rgba(0,0,0,0.08); overflow: hidden; display: flex; flex-direction: column; height: 75vh; }
.ai-chat-header { padding: 16px 20px; background: #f8fafc; border-bottom: 1px solid #e2e8f0; }
.ai-chat-header .ai-badge { background: #0072ff; color: #fff; font-size: 11px; padding: 2px 8px; border-radius: 10px; font-weight: bold; }
.ai-chat-header h2 { margin: 6px 0 2px 0; font-size: 18px; color: #1e293b; }
.ai-chat-header .ai-desc { margin: 0; font-size: 12px; color: #64748b; }

.ai-chat-body { flex: 1; padding: 20px; overflow-y: auto; background: #f1f5f9; display: flex; flex-direction: column; gap: 12px; }
.chat-bubble { max-width: 75%; display: flex; flex-direction: column; }
.chat-bubble .bubble-content { padding: 12px 16px; border-radius: 12px; font-size: 14px; line-height: 1.5; white-space: pre-wrap; word-break: break-all; }
.chat-bubble .chat-time { font-size: 10px; color: #94a3b8; margin-top: 4px; }

.ai-bubble { align-self: flex-start; }
.ai-bubble .bubble-content { background: #ffffff; color: #1e293b; border: 1px solid #e2e8f0; border-top-left-radius: 2px; }
.ai-bubble .chat-time { text-align: left; }

.user-bubble { align-self: flex-end; }
.user-bubble .bubble-content { background: #0072ff; color: #ffffff; border-top-right-radius: 2px; }
.user-bubble .chat-time { text-align: right; }

.ai-file-preview { display: flex; align-items: center; justify-content: space-between; padding: 6px 16px; background: #e0f2fe; border-top: 1px solid #bae6fd; font-size: 12px; color: #0369a1; }
.btn-file-remove { background: none; border: none; cursor: pointer; color: #0369a1; font-weight: bold; }

.ai-chat-input-box { display: flex; align-items: center; padding: 12px; background: #fff; border-top: 1px solid #e2e8f0; gap: 8px; }
.ai-chat-input-box .btn-icon { background: #f1f5f9; border: 1px solid #cbd5e1; border-radius: 8px; width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; cursor: pointer; font-size: 18px; transition: all 0.2s; }
.ai-chat-input-box .btn-icon:hover { background: #e2e8f0; }
.ai-chat-input-box .btn-file input[type="file"] { display: none; }
.ai-chat-input-box .btn-mic.recording { background: #fee2e2; border-color: #ef4444; animation: pulse 1s infinite; }

.ai-input-text { flex: 1; height: 40px; border: 1px solid #cbd5e1; border-radius: 8px; padding: 0 12px; font-size: 14px; outline: none; }
.ai-input-text:focus { border-color: #0072ff; }

.btn-submit { background: #0072ff; color: #fff; border: none; border-radius: 8px; padding: 0 16px; height: 40px; font-weight: bold; cursor: pointer; transition: background 0.2s; }
.btn-submit:hover { background: #005bb5; }

@keyframes pulse { 0% { opacity: 1; } 50% { opacity: 0.5; } 100% { opacity: 1; } }