* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: #0f172a;
  color: #e2e8f0;
}

.app {
  max-width: 900px;
  margin: 0 auto;
  padding: 20px;
}

.header {
  text-align: center;
  margin-bottom: 16px;
}

.header h1 {
  margin: 0;
  font-size: 28px;
}

.header p {
  margin: 6px 0 0;
  color: #94a3b8;
}

.chat-shell {
  background: #111827;
  border: 1px solid #334155;
  border-radius: 14px;
  padding: 16px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.25);
}

.chat-box {
  height: 520px;
  overflow-y: auto;
  padding: 12px;
  background: #0b1220;
  border: 1px solid #1f2937;
  border-radius: 12px;
}

.msg {
  margin: 10px 0;
  display: flex;
}

.msg.user {
  justify-content: flex-end;
}

.msg.bot {
  justify-content: flex-start;
}

.bubble {
  max-width: 75%;
  padding: 10px 14px;
  border-radius: 14px;
  line-height: 1.4;
  white-space: pre-wrap;
  word-wrap: break-word;
}

.user .bubble {
  background: #2563eb;
  color: #fff;
  border-bottom-right-radius: 4px;
}

.bot .bubble {
  background: #1f2937;
  color: #e5e7eb;
  border-bottom-left-radius: 4px;
}

.controls,
.training {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}

.controls input,
.training input {
  flex: 1;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid #334155;
  background: #0b1220;
  color: #e2e8f0;
  outline: none;
}

.controls button,
.training button {
  padding: 12px 18px;
  border: 0;
  border-radius: 10px;
  cursor: pointer;
  background: #22c55e;
  color: #052e16;
  font-weight: bold;
}

.controls button:hover,
.training button:hover {
  filter: brightness(1.05);
}

.status {
  margin-top: 12px;
  color: #94a3b8;
  font-size: 14px;
}
.msg-actions {
  margin-left: 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.rate-btn {
  background: transparent;
  border: 1px solid #334155;
  color: #94a3b8;
  border-radius: 6px;
  cursor: pointer;
  font-size: 16px;
}

.rate-btn:hover {
  background: #1f2937;
  color: #e5e7eb;
}