#message-container {
  flex-grow: 1;
  overflow-y: auto;
  padding: 2rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  scroll-behavior: smooth;
}

.message-wrapper {
  width: 100%;
  display: flex;
  justify-content: center;
}

.message {
  max-width: 100%;
  padding: 0 1rem;
  line-height: 1.6;
  animation: fadeIn 0.3s ease-out;
}

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

.user-message .content {
  background-color: var(--user-msg-bg);
  padding: 0.75rem 1.25rem;
  border-radius: 1.5rem;
  float: right;
  max-width: 85%;
}

.user-message .message-copy-btn {
  float: right;
  clear: right;
}

.assistant-message .content {
  color: var(--text-color);
  font-family: "Averia Serif Libre"
}

.sender-name {
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-color);
}

.message {
  position: relative;
}

.message-copy-btn {
  background: transparent;
  border: none;
  padding: 0.3rem;
  border-radius: 0.3rem;
  color: var(--muted-text-color);
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s, background 0.2s, color 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 0.25rem;
}

.message-wrapper:hover .message-copy-btn {
  opacity: 0.5;
}

.message-copy-btn:hover {
  opacity: 1 !important;
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-color);
}

.message-copy-btn.copied {
  opacity: 1 !important;
  color: #6ee7b7;
}

#welcome-greeting {
  display: inline-block;
  position: relative;
  animation: fadeInUp 0.6s ease-out forwards;
}

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

.message-row {
  display: flex;
  gap: 1.5rem;
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
}

.message-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.message-citations {
  flex: 1;
  background-color: #111;
  border-left: 1px solid var(--border-color);
  padding: 1rem;
  font-size: 0.85rem;
  display: none;
  max-height: 600px;
  overflow-y: auto;
  border-radius: 8px;
}

.citation-item {
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #333;
}

.citation-status {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: bold;
  margin-bottom: 4px;
}

.status-verified {
  background-color: #064e3b;
  color: #6ee7b7;
}

.status-unverified {
  background-color: #7f1d1d;
  color: #fca5a5;
}

.thinking-box {
  display: none;
  margin-bottom: 1rem;
  border-radius: 4px;
  overflow: hidden;
}

.thinking-box.visible {
  display: block;
}

.thinking-accordion {
  background-color: var(--thinking-bg);
}

.thinking-header {
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  background-color: transparent;
  font-size: 0.9rem;
  color: var(--muted-text-color);
  font-weight: 500;
  user-select: none;
}

.thinking-header:hover {
  color: var(--text-color);
}

.thinking-header svg {
  transition: transform 0.2s ease;
  width: 12px;
  height: 12px;
  margin-left: 4px;
  flex-shrink: 0;
  display: inline-block;
  margin-bottom: 2px;
}

.thinking-accordion.open .thinking-header svg {
  transform: rotate(180deg);
}

.thinking-content {
  display: none;
  font-size: 12px;
  color: var(--muted-text-color);
  line-height: 1.5;
  max-height: 300px;
  overflow-y: auto;
}

.thinking-accordion.open .thinking-content {
  display: block;
}
