@font-face {
  font-family: "ColfaxAI";
  src:
    url(https://cdn.openai.com/API/fonts/ColfaxAIRegular.woff2) format("woff2"),
    url(https://cdn.openai.com/API/fonts/ColfaxAIRegular.woff) format("woff");
  font-weight: normal;
  font-style: normal;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "ColfaxAI", Helvetica, Arial, sans-serif;
  background: #f0f9f7;
  color: #2f2f2f;
  line-height: 1.5;
}

.header {
  width: 100%;
  padding: 16px 20px;
  background: #10a37f;
  border-bottom: 1px solid #0d8a6a;
  text-align: center;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: #ffffff;
}

.main {
  max-width: 960px;
  margin: 0 auto;
  padding: 20px;
}

.controls {
  margin-bottom: 16px;
}

select {
  padding: 10px 16px;
  border: 1px solid #10a37f;
  background: #ffffff;
  color: #2f2f2f;
  font-family: inherit;
  font-weight: 600;
  cursor: pointer;
  min-width: 150px;
}

select:hover {
  background: #f0f9f7;
  border-color: #0d8a6a;
}

.messages {
  background: #ffffff;
  border: 1px solid #10a37f;
  padding: 16px;
  min-height: 360px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
  margin-bottom: 16px;
}

.message {
  padding: 12px;
  border: 1px solid #d0f0ed;
  background: #f0f9f7;
}

.message.user {
  background: #e8f6f3;
}

.message.assistant {
  background: #f0f9f7;
}

.message .role {
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 6px;
  color: #0d8a6a;
}

.form {
  display: flex;
  gap: 8px;
}

textarea {
  flex: 1;
  min-height: 80px;
  max-height: 200px;
  padding: 12px;
  border: 1px solid #10a37f;
  background: #ffffff;
  resize: vertical;
  font: inherit;
  color: inherit;
}

button {
  width: 120px;
  border: 1px solid #10a37f;
  background: #10a37f;
  color: #ffffff;
  font-weight: 600;
  cursor: pointer;
  padding: 12px;
}

button:hover:not(:disabled) {
  background: #0d8a6a;
  border-color: #0d8a6a;
}

button:disabled {
  background: #a8d9cf;
  border-color: #a8d9cf;
  cursor: not-allowed;
}

.status {
  margin-top: 8px;
  font-size: 13px;
  color: #0d8a6a;
}

@media (max-width: 640px) {
  .form {
    flex-direction: column;
  }

  button {
    width: 100%;
  }
}

.messages {
  max-height: min(70vh, 640px);
}
