/* Chat Interface - Messages and Input */

#main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
  min-width: 0;
}

#chat-container {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  scrollbar-width: thin;
  scrollbar-color: var(--accent) transparent;
}

#chat-container::-webkit-scrollbar {
  width: 8px;
}

#chat-container::-webkit-scrollbar-thumb {
  background: var(--accent);
  border-radius: 10px;
}

#messages {
  max-width: 900px;
  width: 100%;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.message-wrapper {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  animation: slideIn 0.3s ease-out;
  align-items: flex-start;
}

.message-wrapper.user-wrapper {
  align-items: flex-end;
}

.message {
  padding: 1rem 1.25rem;
  border-radius: var(--radius-lg);
  line-height: 1.65;
  word-wrap: break-word;
  max-width: 85%;
  font-size: 0.95rem;
  position: relative;
}

.message.user {
  background: linear-gradient(135deg, var(--accent), var(--accent-hover));
  color: white;
  border-radius: var(--radius-lg) var(--radius-lg) 4px var(--radius-lg);
  box-shadow: 0 2px 8px rgba(124, 58, 237, 0.3);
}

.message.bot {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg) var(--radius-lg) var(--radius-lg) 4px;
  color: var(--text-primary);
  align-self: flex-start;
}

.copy-btn {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 0.5rem 0.75rem;
  font-size: 0.8rem;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition);
  margin-top: 0.5rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  line-height: 1;
  white-space: nowrap;
}

.copy-btn i {
  font-size: 0.875rem;
}

.copy-btn:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
  border-color: var(--border-light);
}

.typing-indicator {
  display: flex;
  gap: 6px;
  padding: 1rem 1.25rem;
  align-items: center;
}

.typing-indicator span {
  width: 8px;
  height: 8px;
  background: var(--accent-light);
  border-radius: 50%;
  animation: bounce 1.4s infinite ease-in-out;
}

.typing-indicator span:nth-child(1) { animation-delay: -0.32s; }
.typing-indicator span:nth-child(2) { animation-delay: -0.16s; }
