:root { --primary-color: #0F766E; --secondary-color: #14B8A6; --bg-light: #FFFFFF; --bg-dark: #1a1a1a; --text-light: #000000; --text-dark: #FFFFFF; --border-light: #E5E7EB; --border-dark: #404040; --message-user-light: #DBEAFE; --message-user-dark: #1E40AF; --message-assistant-light: #F3F4F6; --message-assistant-dark: #2D2D2D; } * { margin: 0; padding: 0; box-sizing: border-box; } body { font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; background-color: var(--bg-light); color: var(--text-light); transition: background-color 0.3s, color 0.3s; } body.dark-mode { background-color: var(--bg-dark); color: var(--text-dark); } .container { display: flex; height: 100vh; } /* Sidebar */ .sidebar { width: 280px; background-color: var(--bg-light); border-right: 1px solid var(--border-light); display: flex; flex-direction: column; padding: 20px; overflow-y: auto; transition: background-color 0.3s, border-color 0.3s; } body.dark-mode .sidebar { background-color: #0a0a0a; border-right-color: var(--border-dark); } .logo-section { text-align: center; margin-bottom: 30px; padding-bottom: 20px; border-bottom: 1px solid var(--border-light); } body.dark-mode .logo-section { border-bottom-color: var(--border-dark); } .logo { width: 60px; height: 60px; border-radius: 50%; margin-bottom: 10px; } .logo-section h1 { font-size: 24px; color: var(--primary-color); } .new-chat-btn { width: 100%; padding: 12px; background-color: var(--primary-color); color: white; border: none; border-radius: 8px; cursor: pointer; font-size: 14px; font-weight: 600; margin-bottom: 20px; transition: background-color 0.3s; } .new-chat-btn:hover { background-color: var(--secondary-color); } .conversations-list { flex: 1; margin-bottom: 20px; } .conversations-list h3 { font-size: 12px; text-transform: uppercase; color: #999; margin-bottom: 10px; } #conversations-container { display: flex; flex-direction: column; gap: 5px; } .conversation-item { padding: 10px; background-color: var(--message-assistant-light); border-radius: 8px; cursor: pointer; transition: background-color 0.3s; font-size: 13px; word-break: break-word; } body.dark-mode .conversation-item { background-color: var(--message-assistant-dark); } .conversation-item:hover { background-color: var(--border-light); } body.dark-mode .conversation-item:hover { background-color: #404040; } .sidebar-footer { padding-top: 20px; border-top: 1px solid var(--border-light); } body.dark-mode .sidebar-footer { border-top-color: var(--border-dark); } .settings-btn { width: 100%; padding: 10px; background-color: transparent; border: 1px solid var(--border-light); border-radius: 8px; cursor: pointer; font-size: 14px; transition: all 0.3s; } body.dark-mode .settings-btn { border-color: var(--border-dark); } .settings-btn:hover { background-color: var(--primary-color); color: white; border-color: var(--primary-color); } /* Chat Area */ .chat-area { flex: 1; display: flex; flex-direction: column; background-color: var(--bg-light); transition: background-color 0.3s; } body.dark-mode .chat-area { background-color: var(--bg-dark); } .chat-header { padding: 20px; border-bottom: 1px solid var(--border-light); display: flex; justify-content: space-between; align-items: center; transition: border-color 0.3s; } body.dark-mode .chat-header { border-bottom-color: var(--border-dark); } .header-controls { display: flex; gap: 10px; align-items: center; } #language-select, .theme-toggle { padding: 8px 12px; border: 1px solid var(--border-light); border-radius: 6px; background-color: var(--bg-light); color: var(--text-light); cursor: pointer; transition: all 0.3s; } body.dark-mode #language-select, body.dark-mode .theme-toggle { background-color: #2D2D2D; border-color: var(--border-dark); color: var(--text-dark); } #language-select:hover, .theme-toggle:hover { border-color: var(--primary-color); } .messages-container { flex: 1; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 15px; } .welcome-message { text-align: center; padding: 40px; color: #999; } .welcome-message img { width: 80px; height: 80px; margin-bottom: 20px; border-radius: 50%; } .welcome-message h2 { margin-bottom: 15px; color: var(--primary-color); } .message { display: flex; gap: 10px; animation: slideIn 0.3s ease-in; } @keyframes slideIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } } .message.user { justify-content: flex-end; } .message-content { max-width: 70%; padding: 12px 16px; border-radius: 12px; word-wrap: break-word; line-height: 1.5; } .user .message-content { background-color: var(--message-user-light); color: #000; border-bottom-right-radius: 4px; } body.dark-mode .user .message-content { background-color: var(--message-user-dark); color: white; } .assistant .message-content { background-color: var(--message-assistant-light); color: #000; border-bottom-left-radius: 4px; position: relative; } body.dark-mode .assistant .message-content { background-color: var(--message-assistant-dark); color: #fff; } /* Code Block Styling */ .message-content pre { background-color: #1e1e1e; color: #d4d4d4; padding: 15px; border-radius: 8px; overflow-x: auto; margin: 10px 0; position: relative; } .message-content code { font-family: 'Courier New', monospace; font-size: 13px; line-height: 1.5; } .copy-code-btn { position: absolute; top: 8px; right: 8px; padding: 6px 12px; background-color: var(--primary-color); color: white; border: none; border-radius: 4px; cursor: pointer; font-size: 12px; transition: background-color 0.3s; } .copy-code-btn:hover { background-color: var(--secondary-color); } /* Tables */ .message-content table { width: 100%; border-collapse: collapse; margin: 10px 0; border: 1px solid #ddd; } body.dark-mode .message-content table { border-color: #444; } .message-content th, .message-content td { padding: 10px; text-align: left; border: 1px solid #ddd; } body.dark-mode .message-content th, body.dark-mode .message-content td { border-color: #444; } .message-content th { background-color: #f0f0f0; font-weight: 600; } body.dark-mode .message-content th { background-color: #333; } /* Input Area */ .input-area { display: flex; gap: 10px; padding: 20px; border-top: 1px solid var(--border-light); background-color: var(--bg-light); transition: background-color 0.3s, border-color 0.3s; } body.dark-mode .input-area { background-color: #0a0a0a; border-top-color: var(--border-dark); } #message-input { flex: 1; padding: 12px; border: 1px solid var(--border-light); border-radius: 8px; font-size: 14px; font-family: inherit; resize: none; max-height: 100px; background-color: var(--bg-light); color: var(--text-light); transition: all 0.3s; } body.dark-mode #message-input { background-color: #2D2D2D; border-color: var(--border-dark); color: var(--text-dark); } #message-input:focus { outline: none; border-color: var(--primary-color); box-shadow: 0 0 0 2px rgba(15, 118, 110, 0.1); } .send-btn { padding: 12px 20px; background-color: var(--primary-color); color: white; border: none; border-radius: 8px; cursor: pointer; font-size: 16px; transition: background-color 0.3s; } .send-btn:hover:not(:disabled) { background-color: var(--secondary-color); } .send-btn:disabled { opacity: 0.5; cursor: not-allowed; } /* Modal */ .modal { display: none; position: fixed; z-index: 1000; left: 0; top: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.5); animation: fadeIn 0.3s; } @keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } } .modal.show { display: flex; justify-content: center; align-items: center; } .modal-content { background-color: var(--bg-light); padding: 0; border-radius: 12px; width: 90%; max-width: 500px; box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2); transition: background-color 0.3s; } body.dark-mode .modal-content { background-color: #1a1a1a; } .modal-header { padding: 20px; border-bottom: 1px solid var(--border-light); display: flex; justify-content: space-between; align-items: center; transition: border-color 0.3s; } body.dark-mode .modal-header { border-bottom-color: var(--border-dark); } .close-btn { background: none; border: none; font-size: 28px; cursor: pointer; color: #999; } .modal-body { padding: 20px; display: flex; flex-direction: column; gap: 20px; } .setting-item { display: flex; flex-direction: column; gap: 8px; } .setting-item label { font-weight: 600; font-size: 14px; } .setting-item select, .setting-item input { padding: 10px; border: 1px solid var(--border-light); border-radius: 6px; background-color: var(--bg-light); color: var(--text-light); transition: all 0.3s; } body.dark-mode .setting-item select, body.dark-mode .setting-item input { background-color: #2D2D2D; border-color: var(--border-dark); color: var(--text-dark); } .setting-item input[type="range"] { cursor: pointer; } .clear-history-btn { padding: 10px; background-color: #EF4444; color: white; border: none; border-radius: 6px; cursor: pointer; transition: background-color 0.3s; } .clear-history-btn:hover { background-color: #DC2626; } /* Loading Indicator */ .loading { position: fixed; bottom: 100px; right: 30px; z-index: 999; } .loading.hidden { display: none; } .spinner { width: 40px; height: 40px; border: 4px solid var(--border-light); border-top: 4px solid var(--primary-color); border-radius: 50%; animation: spin 0.8s linear infinite; } body.dark-mode .spinner { border-color: var(--border-dark); } @keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } } /* Scrollbar */ ::-webkit-scrollbar { width: 8px; } ::-webkit-scrollbar-track { background: transparent; } ::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 4px; } ::-webkit-scrollbar-thumb:hover { background: var(--primary-color); } body.dark-mode ::-webkit-scrollbar-thumb { background: var(--border-dark); } body.dark-mode ::-webkit-scrollbar-thumb:hover { background: var(--secondary-color); } /* Responsive */ @media (max-width: 768px) { .container { flex-direction: column; } .sidebar { width: 100%; max-height: 200px; overflow-x: auto; flex-direction: row; } .conversations-list { display: none; } .message-content { max-width: 90%; } }