* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, system-ui, sans-serif;
  background: #0f1115;
  color: #e6e6e6;
  display: flex;
  flex-direction: column;
  height: 100vh;
}
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid #22252b;
}
header h1 { font-size: 16px; margin: 0; }
header button { background: none; border: none; color: #e6e6e6; cursor: pointer; font-size: 16px; }

#settingsPanel {
  padding: 12px 16px;
  border-bottom: 1px solid #22252b;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
#settingsPanel.hidden { display: none; }
#settingsPanel label { display: flex; flex-direction: column; font-size: 12px; gap: 4px; flex: 1; min-width: 200px; }
#settingsPanel input { padding: 6px; border-radius: 6px; border: 1px solid #333; background: #1a1d24; color: #eee; }
#settingsPanel button { align-self: flex-end; padding: 6px 12px; border-radius: 6px; border: none; background: #5865f2; color: white; cursor: pointer; }

#chat {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.msg { max-width: 80%; padding: 8px 12px; border-radius: 10px; line-height: 1.4; white-space: pre-wrap; }
.msg.user { align-self: flex-end; background: #5865f2; color: white; }
.msg.assistant { align-self: flex-start; background: #1a1d24; }
.msg.tool { align-self: flex-start; background: #14161b; color: #9aa0a6; font-size: 12px; }

#chatForm { display: flex; gap: 8px; padding: 12px 16px; border-top: 1px solid #22252b; }
#input { flex: 1; resize: none; padding: 10px; border-radius: 8px; border: 1px solid #333; background: #1a1d24; color: #eee; }
#chatForm button { padding: 0 18px; border-radius: 8px; border: none; background: #5865f2; color: white; cursor: pointer; }
