/* ChatGPT-style CSS for AI Chat Application */ /* Import Inter font for better typography */ @import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap'); /* Root variables for consistent theming */ :root { --chat-gray: #f7f7f8; --chat-dark: #343541; --sidebar-light: #ffffff; --sidebar-dark: #202123; --user-msg: #f7f7f8; --assistant-msg: #ffffff; --border-light: #e5e7eb; --border-dark: #4b5563; } /* Base styles */ * { box-sizing: border-box; } body { font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; margin: 0; padding: 0; height: 100vh; overflow: hidden; } /* Smooth transitions */ .transition-all { transition: all 0.2s ease-in-out; } /* Custom scrollbar styling */ .custom-scrollbar { scrollbar-width: thin; scrollbar-color: #cbd5e1 transparent; } .custom-scrollbar::-webkit-scrollbar { width: 6px; } .custom-scrollbar::-webkit-scrollbar-track { background: transparent; } .custom-scrollbar::-webkit-scrollbar-thumb { background-color: #cbd5e1; border-radius: 3px; } .custom-scrollbar::-webkit-scrollbar-thumb:hover { background-color: #94a3b8; } /* Dark mode scrollbar */ .dark .custom-scrollbar { scrollbar-color: #4b5563 transparent; } .dark .custom-scrollbar::-webkit-scrollbar-thumb { background-color: #4b5563; } .dark .custom-scrollbar::-webkit-scrollbar-thumb:hover { background-color: #6b7280; } /* Sidebar styling */ #sidebar { z-index: 50; } /* Mobile sidebar overlay */ @media (max-width: 768px) { #sidebar { position: fixed; left: 0; top: 0; height: 100vh; transform: translateX(-100%); z-index: 50; } #sidebar.open { transform: translateX(0); } } /* Message styling */ .message { display: flex; padding: 1.5rem 1rem; gap: 1rem; border-bottom: 1px solid var(--border-light); transition: background-color 0.1s ease; } .dark .message { border-bottom-color: var(--border-dark); } .message.user { background-color: var(--user-msg); } .dark .message.user { background-color: #40414f; } .message.assistant { background-color: var(--assistant-msg); } .dark .message.assistant { background-color: var(--chat-dark); } /* Avatar styling */ .avatar { width: 2rem; height: 2rem; border-radius: 0.125rem; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 0.875rem; } .avatar.user { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; } .avatar.assistant { background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%); color: white; } /* Message content */ .message-content { flex: 1; min-width: 0; line-height: 1.6; } .message-content pre { background-color: #f3f4f6; border-radius: 0.375rem; padding: 0.75rem; overflow-x: auto; margin: 0.5rem 0; } .dark .message-content pre { background-color: #374151; } .message-content code { background-color: #f3f4f6; padding: 0.125rem 0.25rem; border-radius: 0.25rem; font-size: 0.875rem; } .dark .message-content code { background-color: #374151; } /* Auto-resize textarea */ #user-input { resize: none; transition: border-color 0.2s ease; } #user-input:focus { border-color: #3b82f6 !important; box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1); } /* Send button states */ #send-button:disabled { opacity: 0.5; cursor: not-allowed; } #send-button:not(:disabled):hover { background-color: #2563eb; transform: translateY(-1px); } /* Loading animation */ .typing-indicator { display: flex; align-items: center; gap: 0.25rem; color: #6b7280; } .typing-dot { width: 0.5rem; height: 0.5rem; background-color: currentColor; border-radius: 50%; animation: typing 1.4s infinite ease-in-out; } .typing-dot:nth-child(1) { animation-delay: -0.32s; } .typing-dot:nth-child(2) { animation-delay: -0.16s; } @keyframes typing { 0%, 80%, 100% { transform: scale(0.8); opacity: 0.5; } 40% { transform: scale(1); opacity: 1; } } /* Chat history items */ .chat-history-item { padding: 0.75rem; border-radius: 0.5rem; cursor: pointer; transition: background-color 0.1s ease; font-size: 0.875rem; color: #374151; border: 1px solid transparent; } .dark .chat-history-item { color: #d1d5db; } .chat-history-item:hover { background-color: #f3f4f6; } .dark .chat-history-item:hover { background-color: #374151; } .chat-history-item.active { background-color: #e5e7eb; border-color: #d1d5db; } .dark .chat-history-item.active { background-color: #4b5563; border-color: #6b7280; } /* Welcome screen */ .welcome-screen { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; padding: 2rem; text-align: center; } .welcome-title { font-size: 2rem; font-weight: 600; margin-bottom: 1rem; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; } .welcome-subtitle { color: #6b7280; margin-bottom: 2rem; max-width: 32rem; } .dark .welcome-subtitle { color: #9ca3af; } /* Responsive design */ @media (max-width: 768px) { .message { padding: 1rem 0.75rem; } .avatar { width: 1.75rem; height: 1.75rem; } .welcome-title { font-size: 1.5rem; } } /* Focus ring removal for better custom styling */ .focus\:outline-none:focus { outline: none; } /* Custom button hover effects */ .hover-lift:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); } /* Dark mode toggle improvements */ .dark-mode-transition { transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease; } .scrollbar-thin{scrollbar-width:thin} .scrollbar-thin::-webkit-scrollbar{height:8px;width:8px} .scrollbar-thin::-webkit-scrollbar-thumb{border-radius:9999px;background-color:#c7c7d0} .scrollbar-thin::-webkit-scrollbar-track{background-color:transparent} /* Code block styles */ .code-block { font-family: 'Fira Code', 'Monaco', 'Cascadia Code', 'Roboto Mono', monospace; } .code-content { line-height: 1.5; font-size: 0.875rem; } .code-content code { font-family: inherit; background: none !important; padding: 0 !important; border-radius: 0 !important; } /* Copy button hover effect */ .copy-code-btn { transition: all 0.2s ease; } .copy-code-btn:hover { transform: scale(1.1); }