
:root {
  --primary: #3b82f6;
  --primary-dark: #2563eb;
  --user-bubble: #3b82f6;
  --assistant-bubble: #f3f4f6;
  --sidebar-bg: #1f2937;
  --text-primary: #111827;
  --text-secondary: #6b7280;
}

.dark {
  --primary: #6366f1;
  --primary-dark: #4f46e5;
  --user-bubble: #4f46e5;
  --assistant-bubble: #374151;
  --sidebar-bg: #111827;
  --text-primary: #f9fafb;
  --text-secondary: #9ca3af;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: #f9fafb;
  color: var(--text-primary);
  overflow-x: hidden;
  transition: background-color 0.3s ease;
}

body.dark {
  background-color: #111827;
}
/* Chat container */
.chat-container {
  height: 100vh;
  display: grid;
  grid-template-columns: 280px 1fr;
  background-color: #f9fafb;
}

/* Sidebar */
.sidebar {
  background-color: #111827;
  color: #f9fafb;
  overflow-y: auto;
  scrollbar-width: thin;
}

.model-item {
  cursor: pointer;
  transition: all 0.2s ease;
}

.model-item:hover {
  background-color: rgba(255,255,255,0.05);
}

.model-item.active {
  background-color: rgba(255,255,255,0.08);
}

.model-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Chat area */
.chat-area {
  display: flex;
  flex-direction: column;
  height: 100vh;
  position: relative;
}

.messages-container {
  flex: 1;
  padding: 1.5rem;
  padding-bottom: 120px; /* Space for input bar */
  overflow-y: auto;
  scroll-behavior: smooth;
}

.message-group {
  margin-bottom: 2rem;
}

.message {
  max-width: 85%;
  margin: 0 auto 1rem;
  display: flex;
}

.message-user {
  justify-content: flex-end;
}

.message-bubble {
  padding: 1rem 1.25rem;
  line-height: 1.5;
  position: relative;
}

.user-bubble {
  background: linear-gradient(135deg, #4A90FF 0%, #2563EB 100%);
  color: white;
  border-radius: 22px 22px 4px 22px;
  box-shadow: 0 2px 8px rgba(74, 144, 255, 0.2);
}

.assistant-bubble {
  background-color: #F5F5F7;
  color: #111827;
  border-radius: 22px 22px 22px 4px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.dark .assistant-bubble {
  background-color: #1f2937;
  color: #f9fafb;
}

/* Input area */
.input-area {
  background-color: white;
  border-top: 1px solid #e5e7eb;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1rem;
  z-index: 10;
}

.dark .input-area {
  background-color: #111827;
  border-color: #374151;
}

.input-container {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background-color: #F7F7F8;
  border-radius: 9999px;
  padding: 0.5rem 1rem;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  transition: all 0.2s ease;
}

.dark .input-container {
  background-color: #374151;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.message-input {
  flex: 1;
  border: none;
  background: transparent;
  resize: none;
  max-height: 150px;
  color: #111827;
  font-family: 'Inter', sans-serif;
  outline: none;
  padding: 0.5rem;
  line-height: 1.5;
}

.dark .message-input {
  color: #f9fafb;
}

.message-input::placeholder {
  color: #9CA3AF;
}

.action-btn {
  background: none;
  border: none;
  color: #9CA3AF;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 50%;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.action-btn:hover {
  background-color: rgba(0,0,0,0.05);
  color: #4B5563;
}

.dark .action-btn:hover {
  background-color: rgba(255,255,255,0.1);
  color: #D1D5DB;
}

.send-btn {
  background: linear-gradient(135deg, #4A90FF 0%, #2563EB 100%);
  color: white;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  border: none;
}

.send-btn:hover:not(:disabled) {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(74, 144, 255, 0.3);
}

.send-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from { 
    opacity: 0;
    transform: translateY(10px);
  }
  to { 
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in {
  animation: fadeIn 0.3s ease-out forwards;
}

.animate-slide-up {
  animation: slideUp 0.3s ease-out forwards;
}

/* Typing indicator */
.typing-indicator {
  display: inline-flex;
  align-items: center;
  background-color: #F5F5F7;
  border-radius: 18px;
  padding: 8px 12px;
}

.dark .typing-indicator {
  background-color: #1f2937;
}

.typing-dot {
  width: 6px;
  height: 6px;
  background-color: #6B7280;
  border-radius: 50%;
  margin: 0 2px;
  animation: typingAnimation 1.4s infinite ease-in-out;
}

.dark .typing-dot {
  background-color: #9CA3AF;
}

@keyframes typingAnimation {
  0%, 60%, 100% {
    transform: translateY(0);
  }
  30% {
    transform: translateY(-4px);
  }
}

/* Responsive */
@media (max-width: 768px) {
  .chat-container {
    grid-template-columns: 1fr;
  }
  
  .sidebar {
    position: fixed;
    z-index: 50;
    height: 100%;
    width: 280px;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
  }
  
  .sidebar.open {
    transform: translateX(0);
  }
  
  .messages-container {
    padding-bottom: 140px;
  }
  
  .message {
    max-width: 90%;
  }
}
/* Typing indicator */
.typing-indicator {
  display: inline-flex;
  align-items: center;
}

.typing-dot {
  width: 0.5rem;
  height: 0.5rem;
  background-color: var(--text-secondary);
  border-radius: 50%;
  margin: 0 0.125rem;
  animation: typingAnimation 1.4s infinite ease-in-out;
}

.typing-dot:nth-child(1) {
  animation-delay: 0s;
}

.typing-dot:nth-child(2) {
  animation-delay: 0.2s;
}

.typing-dot:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes typingAnimation {
  0%, 60%, 100% {
    transform: translateY(0);
  }
  30% {
    transform: translateY(-0.25rem);
  }
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: #d1d5db;
  border-radius: 4px;
}

.dark ::-webkit-scrollbar-thumb {
  background: #4b5563;
}

/* Mobile responsive */
@media (max-width: 768px) {
  .chat-container {
    grid-template-columns: 1fr;
  }
  
  .sidebar {
    display: none;
  }
  
  .sidebar.open {
    display: block;
    position: fixed;
    z-index: 50;
    height: 100%;
    width: 280px;
  }
  
  .messages-container {
    padding: 1rem;
  }
  
  .message-bubble {
    padding: 0.75rem 1rem;
  }
}
h1 {
	font-size: 16px;
	margin-top: 0;
}

p {
	color: rgb(107, 114, 128);
	font-size: 15px;
	margin-bottom: 10px;
	margin-top: 5px;
}

.card {
	max-width: 620px;
	margin: 0 auto;
	padding: 16px;
	border: 1px solid lightgray;
	border-radius: 16px;
}

.card p:last-child {
	margin-bottom: 0;
}
