/* Simple, clean chat UI */
body {
  margin: 0;
  font-family: system-ui, sans-serif;
  background: #f5f5f5;
  color: #222;
  display: flex;
  height: 100vh;
  align-items: center;
  justify-content: center;
}
#app {
  width: 90%;
  max-width: 480px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,.1);
  display: flex;
  flex-direction: column;
  height: 85vh;
}
h1 {
  text-align: center;
  margin: 0;
  padding: 1rem;
  background: #4a90e2;
  color: #fff;
  font-size: 1.25rem;
}
.chat-log {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: .75rem;
}
.message {
  max-width: 80%;
  word-break: break-word;
  padding: .75rem 1rem;
  border-radius: 12px;
}
.message.user {
  align-self: flex-end;
  background: #dcf8c6;
}
.message.bot {
  align-self: flex-start;
  background: #eaeaea;
}
.chat-form {
  display: flex;
  flex-wrap: wrap;               /* allow wrapping on narrow screens */
  gap: .5rem;
  padding: 1rem;
  background: #fafafa;
  border-top: 1px solid #eee;
}
#model-select {
  min-width: 150px;
}
#user-input {
  /* Make the textarea grow to fill the remaining horizontal space */
  flex: 1 1 250px;               /* grow, shrink, basis */
  min-width: 200px;
  resize: vertical;              /* allow user to drag‑resize vertically if they want */
  border: 1px solid #ccc;
  border-radius: 6px;
  padding: .5rem;
  font: inherit;
  font-size: 1rem;
  line-height: 1.4;
}
button {
  min-width: 80px;
  padding: .5rem 1rem;
  border: none;
  border-radius: 6px;
  background: #4a90e2;
  color: #fff;
  cursor: pointer;
}
button:disabled {
  opacity: .5;
  cursor: not-allowed;
}

/* Small‑screen tweaks */
@media (max-width: 420px) {
  #model-select,
  #user-input {
    width: 100%;
  }
}
