/* WhatsApp-like chat bubble styles */
.user-message {
  background-color: #dcf8c6;
  color: #222;
  border-radius: 1.2em 1.2em 0.2em 1.2em;
  align-self: flex-end;
  box-shadow: 0 1px 1.5px rgba(0,0,0,0.07);
}
.assistant-message {
  background-color: #fff;
  color: #222;
  border-radius: 1.2em 1.2em 1.2em 0.2em;
  align-self: flex-start;
  box-shadow: 0 1px 1.5px rgba(0,0,0,0.07);
}

/* Markdown styles */
.assistant-message h1, .assistant-message h2, .assistant-message h3, 
.assistant-message h4, .assistant-message h5, .assistant-message h6 {
  font-weight: bold;
  margin: 0.5em 0 0.25em 0;
  color: #1a202c;
}

.assistant-message h1 { font-size: 1.5em; }
.assistant-message h2 { font-size: 1.3em; }
.assistant-message h3 { font-size: 1.1em; }

.assistant-message p {
  margin: 0.5em 0;
  line-height: 1.5;
}

.assistant-message ul, .assistant-message ol {
  margin: 0.5em 0;
  padding-left: 1.5em;
}

.assistant-message li {
  margin: 0.25em 0;
}

.assistant-message code {
  background-color: #f7fafc;
  padding: 0.125em 0.25em;
  border-radius: 0.25em;
  font-family: 'Courier New', monospace;
  font-size: 0.9em;
  color: #e53e3e;
}

.assistant-message pre {
  background-color: #f7fafc;
  padding: 0.75em;
  border-radius: 0.5em;
  overflow-x: auto;
  margin: 0.5em 0;
  border: 1px solid #e2e8f0;
}

.assistant-message pre code {
  background: none;
  padding: 0;
  color: #2d3748;
}

.assistant-message blockquote {
  border-left: 4px solid #e2e8f0;
  padding-left: 1em;
  margin: 0.5em 0;
  color: #4a5568;
  font-style: italic;
}

.assistant-message a {
  color: #3182ce;
  text-decoration: underline;
}

.assistant-message a:hover {
  color: #2c5282;
}

.assistant-message strong {
  font-weight: bold;
}

.assistant-message em {
  font-style: italic;
}

#chat-window > div {
  margin-bottom: 0.25rem;
}

#chat-window {
  background: #ece5dd;
}

/* Sidebar hover effect */
#session-list button:hover {
  background-color: #e0e7ff;
  transition: background 0.2s;
}

/* Responsive tweaks */
@media (max-width: 768px) {
  .sidebar {
    width: 100px;
    min-width: 80px;
  }
  .header span:last-child {
    display: none;
  }
  #chat-window {
    padding: 0.5rem;
  }
}

@media (max-width: 500px) {
  .sidebar {
    display: none;
  }
  main {
    width: 100vw;
  }
} 