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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: #1a1a2e;
  color: #e0e0e0;
  height: 100dvh;
  overflow: hidden;
}

#app {
  display: flex;
  flex-direction: column;
  height: 100dvh;
}

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

.msg {
  max-width: 85%;
  padding: 10px 14px;
  border-radius: 12px;
  line-height: 1.4;
  font-size: 15px;
  word-wrap: break-word;
  white-space: pre-wrap;
}

.msg.user {
  align-self: flex-end;
  background: #3a86ff;
  color: #fff;
  border-bottom-right-radius: 4px;
}

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

.msg .time {
  font-size: 11px;
  opacity: 0.6;
  margin-top: 4px;
}

.msg.loading {
  opacity: 0.6;
  font-style: italic;
}

#input-form {
  display: flex;
  padding: 12px;
  gap: 8px;
  background: #16213e;
  border-top: 1px solid #2a2a4a;
}

#input {
  flex: 1;
  padding: 12px;
  border: none;
  border-radius: 8px;
  background: #2a2a4a;
  color: #e0e0e0;
  font-size: 16px;
  outline: none;
}

#input::placeholder {
  color: #888;
}

#send {
  padding: 12px 20px;
  border: none;
  border-radius: 8px;
  background: #3a86ff;
  color: #fff;
  font-size: 16px;
  cursor: pointer;
}

#send:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
