html, body {
  height: 100%;
  margin: 0;
  font-family: system-ui, -apple-system, sans-serif;
  background: #f9fafb;
  display: flex;
  flex-direction: column;
}

header {
  background: #1e293b;
  color: white;
  padding: 1rem 1.5rem;
  font-size: 1.25rem;
  font-weight: 600;
}

#chat-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  max-width: 800px;
  width: 100%;
  margin: 0 auto;
  border: 1px solid #e2e8f0;
  background: white;
}

#messages {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.message {
  max-width: 80%;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  white-space: pre-wrap;
  line-height: 1.4;
}

.message img {
  max-width: 80%
}

.user {
  align-self: flex-end;
  background: #2563eb;
  color: white;
}

.assistant {
  align-self: flex-start;
  background: #e2e8f0;
  color: #1e293b;
}

#input-bar {
  display: flex;
  border-top: 1px solid #e2e8f0;
  padding: 0.5rem;
}

#user-input {
  flex: 1;
  padding: 0.5rem 0.75rem;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 1rem;
}

button {
  margin-left: 0.5rem;
  background: #2563eb;
  color: white;
  border: none;
  border-radius: 8px;
  padding: 0.5rem 1rem;
  font-size: 1rem;
  cursor: pointer;
}

button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}