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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: #0a0a0a;
  color: #e5e5e5;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
}

.chat-container {
  width: 100%;
  max-width: 720px;
  height: 100vh;
  display: flex;
  flex-direction: column;
  background: #111;
}

.chat-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 24px;
  border-bottom: 1px solid #222;
}

.header-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #22c55e;
}

.chat-header h1 {
  font-size: 16px;
  font-weight: 600;
  color: #fff;
}

/* Messages area */
.messages {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.message {
  max-width: 85%;
  animation: fadeIn 0.2s ease;
}

.message.user {
  align-self: flex-end;
}

.message.assistant {
  align-self: flex-start;
}

.message-content {
  padding: 12px 16px;
  border-radius: 16px;
  font-size: 14px;
  line-height: 1.6;
  white-space: pre-wrap;
  word-wrap: break-word;
}

.message.user .message-content {
  background: #2563eb;
  color: #fff;
  border-bottom-right-radius: 4px;
}

.message.assistant .message-content {
  background: #1e1e1e;
  color: #e5e5e5;
  border-bottom-left-radius: 4px;
}

/* Streaming indicator */
.message.assistant .message-content.streaming::after {
  content: "▌";
  animation: blink 0.8s infinite;
  color: #888;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Input area */
.chat-input {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 16px 24px;
  border-top: 1px solid #222;
  background: #111;
}

.chat-input textarea {
  flex: 1;
  background: #1e1e1e;
  border: 1px solid #333;
  border-radius: 12px;
  padding: 12px 16px;
  color: #e5e5e5;
  font-size: 14px;
  font-family: inherit;
  resize: none;
  outline: none;
  max-height: 150px;
  transition: border-color 0.2s;
}

.chat-input textarea:focus {
  border-color: #2563eb;
}

.chat-input textarea::placeholder {
  color: #555;
}

.chat-input button {
  background: #2563eb;
  border: none;
  border-radius: 10px;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #fff;
  flex-shrink: 0;
  transition: background 0.2s;
}

.chat-input button:hover {
  background: #1d4ed8;
}

.chat-input button:disabled {
  background: #333;
  color: #555;
  cursor: not-allowed;
}

/* Scrollbar */
.messages::-webkit-scrollbar {
  width: 6px;
}

.messages::-webkit-scrollbar-track {
  background: transparent;
}

.messages::-webkit-scrollbar-thumb {
  background: #333;
  border-radius: 3px;
}
