@charset "UTF-8";
:root { --bg-main: #0f172a; --bg-side: #020617; --bg-card: #1e293b; --text: #f8fafc; --text-muted: #94a3b8; --accent: linear-gradient(135deg, #2563eb, #38bdf8); --accent-solid: #38bdf8; --border: #1e293b; --scroll-thumb: #334155; --scroll-hover: #475569; }
.light-theme { --bg-main: #f1f5f9; --bg-side: #ffffff; --bg-card: #ffffff; --text: #0f172a; --text-muted: #64748b; --border: #e2e8f0; --scroll-thumb: #cbd5e1; --scroll-hover: #94a3b8; }
* { box-sizing: border-box; }
::-webkit-scrollbar { width: 8px; height: 8px; } 
::-webkit-scrollbar-track { background: var(--bg-main); } 
::-webkit-scrollbar-thumb { background: var(--scroll-thumb); border-radius: 10px; border: 2px solid var(--bg-main); } 
::-webkit-scrollbar-thumb:hover { background: var(--scroll-hover); }

body, html { margin: 0; padding: 0; height: 100dvh; width: 100vw; font-family: 'Inter', sans-serif; background-color: var(--bg-main); color: var(--text); overflow: hidden; }
a { text-decoration: none; color: inherit; } 
.app { display: flex; height: 100dvh; width: 100vw; overflow: hidden; }

/* Left Sidebar */
.sidebar { width: 280px; height: 100dvh; background-color: var(--bg-side); border-right: 1px solid var(--border); display: flex; flex-direction: column; padding: 0 20px 20px 20px; flex-shrink: 0; position: relative; z-index: 100; }
.sidebar-overlay { display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.6); z-index: 90; backdrop-filter: blur(5px); opacity: 0; transition: 0.3s; }
.sidebar-overlay.active { display: block; opacity: 1; }

.logo-side { height: 70px; display: flex; align-items: center; justify-content: flex-start; padding-left: 5px; transition: 0.2s; cursor: pointer; margin: 0; }
.logo-side:hover { opacity: 0.8; transform: scale(1.02); }
.brand-img-sidebar { height: 55px; width: auto; object-fit: contain; background: transparent; }
.new-chat-btn { width: 100%; background: var(--accent); color: white; border: none; padding: 14px; border-radius: 12px; font-weight: bold; cursor: pointer; margin: 15px 0 10px 0; transition: transform 0.2s; display: flex; justify-content: center; align-items: center; gap: 8px; flex-shrink: 0;}
.new-chat-btn:hover { transform: translateY(-2px); }
.dashboard-link-btn { width: 100%; background: var(--bg-card); color: var(--text); border: 1px solid var(--border); padding: 12px; border-radius: 12px; font-weight: 600; font-size: 0.9rem; cursor: pointer; margin-bottom: 25px; transition: 0.2s; display: flex; justify-content: center; align-items: center; gap: 8px; }
.dashboard-link-btn:hover { border-color: #8b5cf6; color: #8b5cf6; transform: translateY(-2px); }

.history-container { flex: 1; display: flex; flex-direction: column; overflow: hidden; margin-bottom: 10px; }
.history-title { font-size: 0.75rem; color: var(--text-muted); letter-spacing: 1px; margin-bottom: 15px; margin-left: 5px; flex-shrink: 0; }
#history { list-style: none; padding: 0; margin: 0; overflow-y: auto; flex: 1; padding-right: 5px; }
#history li { padding: 12px 16px; margin-bottom: 12px; background: var(--bg-card); border-radius: 10px; font-size: 0.95rem; cursor: pointer; border: 1px solid transparent; transition: 0.2s; display: flex; align-items: center; gap: 10px; }
#history li:hover { border-color: var(--accent-solid); }
#history li.active { background: rgba(56, 189, 248, 0.15); border-color: var(--accent-solid); box-shadow: inset 4px 0 0 var(--accent-solid); }
.history-text { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.delete-chat-btn { color: var(--text-muted); font-size: 0.85rem; padding: 5px; transition: 0.2s; cursor: pointer; border-radius: 5px; }
.delete-chat-btn:hover { color: #ef4444; background: rgba(239, 68, 68, 0.1); }
.user-profile { margin-top: auto; flex-shrink: 0; display: flex; align-items: center; gap: 12px; padding: 12px 15px; border-radius: 12px; background: var(--bg-card); cursor: pointer; transition: 0.2s; border: 1px solid transparent; }
.user-profile:hover { border-color: var(--accent-solid); box-shadow: 0 4px 15px rgba(0,0,0,0.1); }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--accent); display: flex; align-items: center; justify-content: center; color: white; }
.user-info { display: flex; flex-direction: column; }
.user-name { font-size: 0.9rem; font-weight: bold; color: var(--text); }
.user-action { font-size: 0.75rem; color: var(--text-muted); }

/* Main Area & Topbar */
.main { flex: 1; display: flex; flex-direction: column; position: relative; height: 100dvh; overflow: hidden; }
.topbar { height: 70px; display: flex; justify-content: flex-end; align-items: center; padding: 0 40px; background-color: var(--bg-side); border-bottom: 1px solid var(--border); position: relative; flex-shrink: 0; z-index: 10; }
.absolute-center { position: absolute; left: calc(50% - 140px); transform: translateX(-50%); display: flex; align-items: center; }
.brand-text-topbar { font-size: 2.2rem; font-weight: 900; color: var(--text); letter-spacing: -1px; }
.theme-accent { color: var(--accent-solid); }
.top-actions { display: flex; gap: 12px; align-items: center; }
.icon-action { background-color: var(--bg-card); color: var(--text); border: 1px solid var(--border); width: 40px; height: 40px; border-radius: 10px; cursor: pointer; display: flex; justify-content: center; align-items: center; transition: 0.2s; }
.icon-action:hover { border-color: var(--accent-solid); color: var(--accent-solid); }
.premium-btn { background: var(--accent); color: white; border: none; padding: 10px 20px; border-radius: 50px; font-weight: bold; cursor: pointer; transition: 0.2s; }
.premium-btn:hover { box-shadow: 0 4px 15px rgba(56, 189, 248, 0.4); transform: translateY(-1px); }

/* Content Body (Chat + Right Sidebar) */
.content-body { display: flex; flex: 1; overflow: hidden; position: relative; }

/* Right Sidebar */
.right-sidebar { width: 280px; background-color: var(--bg-side); border-left: 1px solid var(--border); padding: 25px 20px; display: flex; flex-direction: column; overflow-y: auto; flex-shrink: 0; position: relative; z-index: 10; }
.right-sidebar h4 { font-size: 0.8rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 20px; margin-top: 0; }
.suggestion-chip { background: var(--bg-card); padding: 14px; border-radius: 12px; margin-bottom: 12px; font-size: 0.9rem; cursor: pointer; border: 1px solid transparent; transition: 0.2s; display: flex; align-items: flex-start; gap: 10px; line-height: 1.4; color: var(--text); }
.suggestion-chip:hover { border-color: var(--accent-solid); transform: translateY(-2px); }

/* Chat Column */
.chat-column { flex: 1; display: flex; flex-direction: column; position: relative; background: radial-gradient(circle at top left, rgba(59, 130, 246, 0.05), transparent 50%), radial-gradient(circle at bottom right, rgba(168, 85, 247, 0.05), transparent 50%); height: 100%; overflow: hidden; }
.chat-column::before { content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0; background-image: linear-gradient(var(--border) 1px, transparent 1px), linear-gradient(90deg, var(--border) 1px, transparent 1px); background-size: 40px 40px; opacity: 0.3; z-index: 0; pointer-events: none; }

/* Chat Area & Gemini Centering */
.chat-area { flex: 1; overflow-y: auto; padding: 40px 20px; scroll-behavior: smooth; position: relative; z-index: 1; padding-bottom: 20px; }
.chat-inner-wrapper { width: 100%; max-width: 900px; margin: 0 auto; position: relative; }
.intro-screen { text-align: center; margin-top: 8vh; margin-bottom: 40px; display: flex; flex-direction: column; align-items: center;}
.brand-img-intro { height: 160px; width: auto; object-fit: contain; background: transparent; margin-bottom: -35px; position: relative; z-index: 2; }
.brand-text-intro { font-size: 3.8rem; font-weight: 900; color: var(--text); letter-spacing: -1.5px; position: relative; z-index: 1; margin: 0 0 5px 0; }
.intro-tagline { font-size: 1.2rem; color: var(--text-muted); font-weight: 500; margin-bottom: 10px; }
.intro-subtext { font-size: 1.05rem; color: var(--text-muted); font-weight: 400; opacity: 0.8; margin: 0; }

/* Chat Bubbles */
.message-wrapper { display: flex; flex-direction: column; margin-bottom: 25px; max-width: 85%; animation: fadeIn 0.3s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.message-wrapper.user { margin-left: auto; margin-right: 0; align-items: flex-end; }
.message-wrapper.bot { margin-right: auto; margin-left: 0; align-items: flex-start; }
.message { padding: 14px 20px; border-radius: 16px; line-height: 1.6; word-wrap: break-word; box-shadow: 0 4px 15px rgba(0,0,0,0.1); width: fit-content; text-align: left; position: relative; padding-bottom: 24px; min-width: 90px; }
.message-wrapper.bot .message { max-width: 90%; overflow-wrap: break-word; box-sizing: border-box; }
.user .message { background: var(--accent); color: white; border-bottom-right-radius: 4px; }
.bot .message { background-color: var(--bg-card); color: var(--text); border-bottom-left-radius: 4px; border: 1px solid rgba(255,255,255,0.05); }

.bot-header { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; margin-left: 5px; }
.bot-avatar { width: 44px; height: 44px; object-fit: contain; }
.thinking-text { font-size: 0.9rem; font-weight: 600; color: var(--text-muted); }
.pulse-text { animation: textPulse 1.5s infinite ease-in-out; color: var(--accent-solid); }

/* Code Blocks */
.message pre { background-color: #282a36 !important; border-radius: 12px; padding: 0 !important; margin: 15px 0; overflow: hidden; border: 1px solid rgba(255,255,255,0.1); width: 100%; overflow-x: auto; box-sizing: border-box; }
.code-header { display: flex; justify-content: space-between; align-items: center; background: rgba(0,0,0,0.3); padding: 8px 15px; border-bottom: 1px solid rgba(255,255,255,0.05); }
.code-lang { font-size: 0.75rem; color: #94a3b8; text-transform: uppercase; font-weight: 700; letter-spacing: 1px; }
.message pre code { display: block; padding: 15px !important; overflow-x: auto; font-family: 'Consolas', 'Monaco', monospace; font-size: 0.95rem; background: transparent !important; color: #f8fafc !important; }
.copy-code-btn { background: transparent; color: #94a3b8; border: none; padding: 4px 8px; border-radius: 6px; cursor: pointer; font-size: 0.75rem; font-weight: 600; display: flex; align-items: center; gap: 6px; transition: 0.2s; }
.copy-code-btn:hover { background: rgba(255,255,255,0.1); color: #fff; }

.msg-time { position: absolute; bottom: 5px; right: 12px; font-size: 0.65rem; margin: 0; background: transparent; border: none; box-shadow: none; }
.user-time { color: rgba(255, 255, 255, 0.8); }
.bot-time { color: var(--text-muted); }

/* Input Section & Typebox */
.input-section { width: 100%; box-sizing: border-box; padding: 15px; background: var(--bg-main); z-index: 5; flex-shrink: 0; }
.input-pill { display: flex; flex-direction: row; align-items: center; flex-wrap: nowrap; width: 100%; max-width: 850px; margin: 0 auto; box-sizing: border-box; padding: 8px 15px; background: rgba(0, 0, 0, 0.3); border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 24px; }
#user-input { flex: 1; min-height: 24px; max-height: 150px; margin: 0 10px; padding: 0; font-size: 16px; line-height: 24px; background: transparent; border: none; color: #fff; resize: none; overflow-y: auto; box-sizing: border-box; outline: none; align-self: center; }
#user-input:focus { outline: none; border: none; box-shadow: none; }
#user-input:disabled { background: rgba(239, 68, 68, 0.1); color: #ef4444; cursor: not-allowed; }

.attach-wrapper, .right-input-actions { display: flex; align-items: center; justify-content: center; flex-shrink: 0; height: 44px; }
.input-tool { width: 40px; height: 40px; font-size: 1.35rem; display: flex; align-items: center; justify-content: center; background: transparent; color: var(--text-muted); border: none; cursor: pointer; transition: 0.2s; }
.input-tool:hover { color: var(--text); transform: scale(1.1); }
.send { color: var(--accent-solid); }
.right-input-actions { gap: 8px; }

/* Modals & Tools */
.attach-menu { position: absolute; bottom: 55px; left: 0; background: var(--bg-card); border: 1px solid var(--border); border-radius: 16px; padding: 8px; width: 220px; box-shadow: 0 10px 30px rgba(0,0,0,0.4); display: flex; flex-direction: column; gap: 4px; opacity: 0; visibility: hidden; transform: translateY(10px); transition: all 0.3s; z-index: 100; }
.attach-menu.show { opacity: 1; visibility: visible; transform: translateY(0); }
.attach-item { display: flex; align-items: center; gap: 12px; padding: 12px 15px; border-radius: 10px; cursor: pointer; font-size: 0.9rem; font-weight: 600; color: var(--text); transition: 0.2s; }
.attach-item:hover { background: rgba(255, 255, 255, 0.05); }
#image-preview-container { display: inline-block; position: relative; margin-bottom: 15px; background: var(--bg-card); padding: 6px; border-radius: 12px; border: 1px solid var(--border); box-shadow: 0 8px 20px rgba(0,0,0,0.3); }
#image-preview { max-height: 80px; max-width: 150px; border-radius: 8px; object-fit: cover; display: block; }
#remove-image-btn { position: absolute; top: -10px; right: -10px; background: #ef4444; color: white; border: none; border-radius: 50%; width: 24px; height: 24px; cursor: pointer; font-size: 0.75rem; display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 10px rgba(239, 68, 68, 0.4); transition: 0.2s; }
.message img.chat-uploaded-img { max-width: 100%; max-height: 300px; border-radius: 8px; margin-bottom: 12px; border: 1px solid rgba(255,255,255,0.1); display: block; }
#toast { visibility: hidden; min-width: 280px; background-color: var(--bg-card); color: var(--text); border: 1px solid var(--border); text-align: center; border-radius: 50px; padding: 14px 24px; position: fixed; z-index: 1000; left: 50%; bottom: -50px; transform: translateX(-50%); font-size: 0.95rem; font-weight: 600; box-shadow: 0 10px 40px rgba(0,0,0,0.4); opacity: 0; transition: 0.3s; display: flex; align-items: center; gap: 12px; justify-content: center; }
#toast.show { visibility: visible; opacity: 1; bottom: 90px; }
.scroll-bottom-btn { position: absolute; bottom: 120px; left: 50%; transform: translateX(-50%); width: 36px; height: 36px; border-radius: 50%; background-color: var(--bg-card); color: var(--text); border: 1px solid var(--border); box-shadow: 0 4px 15px rgba(0,0,0,0.4); cursor: pointer; display: flex; justify-content: center; align-items: center; z-index: 50; transition: 0.2s; font-size: 0.9rem; }
.mobile-toggle { display: none; background: transparent; border: none; color: var(--text); font-size: 1.5rem; cursor: pointer; }
.sidebar-overlay { display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.6); z-index: 1040; backdrop-filter: blur(5px); opacity: 0; transition: 0.3s; }
.sidebar-overlay.active { display: block; opacity: 1; }

/* Light Theme Variables */
.light-theme .chat-column { background: linear-gradient(-45deg, #f8fafc, #f1f5f9, #ffffff, #e2e8f0); background-size: 400% 400%; }
.light-theme .chat-column::before { background-image: linear-gradient(rgba(0, 0, 0, 0.12) 1px, transparent 1px), linear-gradient(90deg, rgba(0, 0, 0, 0.12) 1px, transparent 1px) !important; }
.light-theme .brand-text-intro { color: #0f172a; }
.light-theme .intro-tagline { color: #334155; }
.light-theme .intro-subtext { color: #64748b; }
.light-theme .bot .message { border-color: rgba(0,0,0,0.05); }
.light-theme .message pre { border: 1px solid rgba(0,0,0,0.8); }
.light-theme .code-header { background: rgba(0,0,0,0.05); border-bottom: 1px solid rgba(0,0,0,0.1); }

/* Syntax Highlighting */
.hljs { background: transparent !important; }
.hljs-keyword, .hljs-selector-tag, .hljs-built_in, .hljs-name, .hljs-tag { color: #ff79c6 !important; }
.hljs-string, .hljs-title, .hljs-section, .hljs-attribute, .hljs-literal, .hljs-template-tag, .hljs-template-variable, .hljs-type, .hljs-addition { color: #f1fa8c !important; }
.hljs-comment, .hljs-quote, .hljs-deletion, .hljs-meta { color: #6272a4 !important; font-style: italic !important; }
.hljs-number, .hljs-regexp, .hljs-link { color: #bd93f9 !important; }
.hljs-variable, .hljs-template-variable { color: #50fa7b !important; }

/* =========================================================
   UI/UX POLISH: Voice Visualizer, Disclaimer & Buttons
   ========================================================= */
.voice-visualizer { display: none; flex: 1; align-items: center; justify-content: center; gap: 4px; height: 40px; margin: 0 10px; width: 100% !important; max-width: 600px !important; }
.voice-visualizer .bar { width: 4px; background-color: var(--accent-solid); border-radius: 4px; animation: voicePulse 1s ease-in-out infinite alternate; }
@keyframes voicePulse { 0% { height: 6px; opacity: 0.6; } 100% { height: 24px; opacity: 1; } }
.voice-visualizer .bar:nth-child(odd) { animation-duration: 0.7s; }
.voice-visualizer .bar:nth-child(even) { animation-duration: 0.9s; }
.voice-visualizer .bar:nth-child(3n) { animation-duration: 1.1s; }
.voice-visualizer .bar:nth-child(1) { animation-delay: 0.1s; }
.voice-visualizer .bar:nth-child(2) { animation-delay: 0.4s; }
.voice-visualizer .bar:nth-child(3) { animation-delay: 0.2s; }
.voice-visualizer .bar:nth-child(4) { animation-delay: 0.6s; }
.voice-visualizer .bar:nth-child(5) { animation-delay: 0.3s; }

.disclaimer-text { display: block; width: 100%; text-align: center; font-size: 0.85rem !important; color: var(--text-muted); margin: 12px auto 0 auto; opacity: 0.8; font-weight: 500; }

.msg-actions { display: flex; gap: 4px !important; margin-top: 12px; font-size: 0.9rem; color: var(--text-muted); width: 100%; align-items: center; }
.message-wrapper.bot .msg-actions { justify-content: flex-start; gap: 4px !important; }
.message-wrapper.user .msg-actions { justify-content: flex-end; gap: 4px !important; }
.msg-actions i { display: inline-flex; justify-content: center; align-items: center; width: 32px; height: 32px; border-radius: 8px; background: transparent; cursor: pointer; transition: all 0.2s; border: 1px solid transparent; color: var(--text-muted); }
.msg-actions i:hover { transform: translateY(-2px); box-shadow: 0 4px 10px rgba(0,0,0,0.15); }
.msg-actions i.fa-copy:hover { color: #38bdf8; background: rgba(56, 189, 248, 0.15); border-color: rgba(56, 189, 248, 0.3); }

/* PC ONLY: Modern Inline Edit Box & Hover Effects */
.inline-edit-box { width: 100% !important; min-width: 100% !important; background: rgba(0, 0, 0, 0.4) !important; border: 1px solid var(--accent-solid) !important; color: var(--text) !important; border-radius: 12px !important; padding: 12px !important; font-family: 'Inter', sans-serif !important; box-sizing: border-box !important; outline: none !important; }
.light-theme .inline-edit-box { background: #ffffff !important; color: #0f172a !important; }
.inline-edit-actions { margin-top: 10px !important; display: flex !important; justify-content: flex-end !important; gap: 8px !important; }
.btn-save { background: var(--accent) !important; color: white !important; border-radius: 8px !important; border: none !important; padding: 8px 16px !important; cursor: pointer !important; font-weight: 600 !important; }
.btn-cancel { background: transparent !important; color: var(--text-muted) !important; border: 1px solid var(--border) !important; border-radius: 8px !important; padding: 8px 16px !important; cursor: pointer !important; font-weight: 600 !important; }
.btn-cancel:hover { background: rgba(255,255,255,0.05) !important; }

@media screen and (min-width: 901px) {
    .msg-actions i.fa-volume-up:hover { color: #10b981 !important; background: rgba(16, 185, 129, 0.15) !important; border-color: rgba(16, 185, 129, 0.3) !important; }
    .msg-actions i.fa-stop-circle:hover { color: #ef4444 !important; background: rgba(239, 68, 68, 0.15) !important; border-color: rgba(239, 68, 68, 0.3) !important; }
}

/* =========================================================
   GEMINI-STYLE ATTACH MENU & IMAGE UPLOAD PREVIEW
   ========================================================= */
.attach-wrapper { position: relative !important; }
.attach-menu { position: absolute !important; bottom: calc(100% + 15px) !important; left: 0 !important; transform: translateY(10px) scale(0.95); transform-origin: bottom left; }
.attach-menu.show { transform: translateY(0) scale(1); }
.input-section { display: flex !important; flex-direction: column !important; }
#image-preview-container { position: relative !important; margin: 0 auto 10px auto !important; width: 100% !important; max-width: 850px !important; background: transparent !important; border: none !important; box-shadow: none !important; padding: 0 15px !important; text-align: left !important; }
#image-preview { height: 70px !important; width: 70px !important; object-fit: cover !important; border-radius: 12px !important; border: 2px solid var(--border) !important; background: var(--bg-card) !important; display: inline-block !important; }
#remove-image-btn { top: -8px !important; right: auto !important; left: 70px !important; }

/* =========================================================
   HIGH VISIBILITY CANCEL BUTTON FIX
   ========================================================= */
.btn-cancel, .message-wrapper.user .btn-cancel { background: rgba(255, 255, 255, 0.15) !important; color: #f8fafc !important; border: 1px solid rgba(255, 255, 255, 0.4) !important; }
.btn-cancel:hover, .message-wrapper.user .btn-cancel:hover { background: rgba(255, 255, 255, 0.25) !important; }
.light-theme .btn-cancel, .light-theme .message-wrapper.user .btn-cancel { background: #cbd5e1 !important; color: #0f172a !important; border: 1px solid #94a3b8 !important; }
.light-theme .btn-cancel:hover, .light-theme .message-wrapper.user .btn-cancel:hover { background: #94a3b8 !important; }

/* =========================================================
   LIGHT THEME CHAT UI FIXES (CLEAN, NO BORDERS)
   ========================================================= */
.light-theme .input-pill { 
    background: #ffffff !important; 
    border: none !important; 
    box-shadow: 0 4px 20px rgba(0,0,0,0.08) !important; 
}
.light-theme #user-input { color: #0f172a !important; background: transparent !important; }
.light-theme #user-input::placeholder { color: #64748b !important; }
.light-theme .input-tool { color: #64748b !important; }
.light-theme .input-tool:hover { color: #0f172a !important; }
.light-theme .sidebar { 
    border-right: 1px solid #e2e8f0 !important; 
    background-color: #f8fafc !important; 
}
.light-theme #history li { 
    background: #ffffff !important; 
    border: 1px solid transparent !important;
    color: #0f172a !important; 
}
.light-theme #history li:hover { border-color: #3b82f6 !important; }
.light-theme .history-title { color: #64748b !important; }

/* =========================================================
   PERFECT VERTICAL ALIGNMENT & GLITCH FIXES (DESKTOP & MOBILE)
   ========================================================= */
#user-input {
    text-decoration: none !important;
    outline: none !important;
    border: none !important;
    box-shadow: none !important;
    -webkit-text-fill-color: currentcolor; /* Prevents input background bleeding into text */
    box-sizing: border-box !important;
    padding: 14px 0 !important; /* Mathematically centers the text vertically */
    line-height: 24px !important; /* Locks text height to match icons */
    min-height: 52px !important; 
    margin: 0 10px !important; /* Preserves horizontal spacing from icons */
    align-self: center !important;
}

.input-pill {
    display: flex !important;
    align-items: center !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    min-height: 52px !important; 
    padding: 0 15px !important; /* Removes vertical padding to let min-height center items */
}

/* Force buttons to the right, never shrink */
.right-input-actions {
    display: flex !important;
    align-items: center !important;
    flex-shrink: 0 !important;
    margin-left: auto !important; 
}

/* Ensure visualizer fills the middle but doesn't push buttons */
.voice-visualizer {
    display: none; 
    flex: 1 !important; 
    justify-content: center !important;
    min-width: 50px !important; 
}
/* =========================================================
   INLINE MODEL SELECTOR (GEMINI STYLE) - DESKTOP
   ========================================================= */
.model-selector-wrapper.inline-selector {
    position: relative;
    margin-right: 5px;
    display: flex;
    align-items: center;
    z-index: 105;
}

.inline-selector .model-selector {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 700;
    height: 36px; /* Locks height to prevent pill stretching */
    user-select: none;
}

.inline-selector .model-selector:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text);
}
.light-theme .inline-selector .model-selector { background: rgba(0, 0, 0, 0.05); }
.light-theme .inline-selector .model-selector:hover { background: rgba(0, 0, 0, 0.1); }

.dropdown-arrow {
    font-size: 0.7rem;
    margin-left: 2px;
    opacity: 0.7;
}

/* The Dropdown Box */
.inline-selector .model-dropdown {
    position: absolute;
    bottom: calc(100% + 12px);
    right: 0; /* Anchors safely to the right edge to prevent clipping */
    width: 250px; /* Slimmer width */
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
    padding: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px) scale(0.95);
    transform-origin: bottom right;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.inline-selector .model-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

/* Menu Items */
.model-option {
    display: flex;
    align-items: center;
    padding: 12px 14px;
    border-radius: 12px;
    cursor: pointer;
    transition: 0.2s;
    border: 1px solid transparent;
    margin-bottom: 2px;
}
.model-option:hover { background: rgba(255, 255, 255, 0.05); }
.light-theme .model-option:hover { background: rgba(0, 0, 0, 0.05); }

.model-option.active {
    background: rgba(56, 189, 248, 0.1);
    border-color: rgba(56, 189, 248, 0.2);
}

.model-icon { font-size: 1.1rem; width: 24px; text-align: center; margin-right: 12px; }
.fast-icon { color: #10b981; }
.pro-icon { color: #8b5cf6; }

.model-details { flex: 1; display: flex; flex-direction: column; text-align: left; }
.model-title { font-weight: 700; font-size: 0.9rem; color: var(--text); display: flex; align-items: center; gap: 8px; }
.model-subtitle { font-size: 0.75rem; color: var(--text-muted); margin-top: 2px; }

.pro-badge {
    background: linear-gradient(135deg, #8b5cf6, #d946ef);
    color: white;
    font-size: 0.55rem;
    padding: 2px 6px;
    border-radius: 6px;
    font-weight: 900;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.check-icon { color: #38bdf8; font-size: 0.9rem; }