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

body {
  font-family: sans-serif;
  background: #1a1a2e;
  color: #eee;
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

h1 {
  margin-bottom: 16px;
  font-size: 1.4rem;
  color: #a29bfe;
}

#chat {
  width: 100%;
  max-width: 720px;
  height: 80vh;
  display: flex;
  flex-direction: column;
  background: #16213e;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}

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

.message {
  max-width: 75%;
  padding: 10px 14px;
  border-radius: 16px;
  line-height: 1.5;
  white-space: pre-wrap;
}

.user {
  align-self: flex-end;
  background: #6c63ff;
  color: white;
  border-bottom-right-radius: 4px;
}

.assistant {
  align-self: flex-start;
  background: #0f3460;
  color: #ddd;
  border-bottom-left-radius: 4px;
}

.thinking {
  align-self: flex-start;
  color: #888;
  font-style: italic;
  font-size: 0.9rem;
}

#input-area {
  display: flex;
  padding: 16px;
  gap: 10px;
  border-top: 1px solid #0f3460;
}

#message-input {
  flex: 1;
  padding: 10px 14px;
  border-radius: 8px;
  border: none;
  background: #0f3460;
  color: white;
  font-size: 1rem;
  outline: none;
}

#message-input::placeholder { color: #555; }

button {
  padding: 10px 20px;
  background: #6c63ff;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1rem;
}

button:hover { background: #574fd6; }
button:disabled { background: #333; cursor: default; }
