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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #212121;
  color: #e0e0e0;
  height: 100dvh;
  display: flex;
  flex-direction: column;
}

#app {
  max-width: 720px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  flex-direction: column;
  height: 100dvh;
}

header {
  padding: 16px;
  border-bottom: 1px solid #333;
  text-align: center;
}

header h1 {
  font-size: 18px;
  font-weight: 600;
  color: #fff;
}

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

.message {
  max-width: 80%;
  padding: 10px 14px;
  border-radius: 12px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-wrap: break-word;
}

.message.user {
  align-self: flex-end;
  background: #1e88e5;
  color: #fff;
  border-bottom-right-radius: 4px;
}

.message.assistant {
  align-self: flex-start;
  background: #333;
  color: #e0e0e0;
  border-bottom-left-radius: 4px;
}

.thinking {
  align-self: flex-start;
  color: #888;
  font-style: italic;
  padding: 10px 14px;
}

footer {
  padding: 16px;
  border-top: 1px solid #333;
}

#chat-form {
  display: flex;
  gap: 8px;
}

#chat-input {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid #444;
  border-radius: 8px;
  background: #2a2a2a;
  color: #e0e0e0;
  font-size: 14px;
  outline: none;
}

#chat-input:focus {
  border-color: #1e88e5;
}

button {
  padding: 10px 20px;
  border: none;
  border-radius: 8px;
  background: #1e88e5;
  color: #fff;
  font-size: 14px;
  cursor: pointer;
}

button:hover {
  background: #1565c0;
}

button:disabled {
  background: #555;
  cursor: not-allowed;
}
