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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial,
    sans-serif;
  background: #0d1117;
  height: 100vh;
  overflow: hidden;
}

.chat-container {
  display: flex;
  flex-direction: column;
  height: 100vh;
  background: #0d1117;
}

.chat-header {
  background: #161b22;
  color: #c9d1d9;
  padding: 12px 16px;
  font-size: 1em;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #21262d;
}

.chat-header-b {
  background: #161b22;
}

.tag {
  display: inline-block;
  padding: 2px 8px;
  background: #1f6feb;
  color: white;
  border-radius: 12px;
  font-size: 0.8em;
  font-weight: 500;
  margin-left: 8px;
}

.clear-btn {
  padding: 4px 12px;
  background: #21262d;
  color: #8b949e;
  border: 1px solid #30363d;
  border-radius: 6px;
  font-size: 0.85em;
  cursor: pointer;
  transition: all 0.2s;
}

.clear-btn:hover {
  background: #30363d;
  color: #c9d1d9;
  border-color: #1f6feb;
}

.chat-box {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
  background: #0d1117;
}

.message {
  margin-bottom: 10px;
  padding: 8px 12px;
  border-radius: 6px;
  max-width: 75%;
  word-wrap: break-word;
  animation: slideIn 0.2s ease;
}

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

.message.sent {
  background: #1f6feb;
  color: white;
  margin-left: auto;
  text-align: right;
}

.message.received {
  background: #161b22;
  color: #c9d1d9;
  margin-right: auto;
  border: 1px solid #30363d;
}

.message.error {
  background: #da3633;
  color: white;
  margin-left: auto;
  text-align: right;
}

.message.system {
  background: transparent;
  color: #8b949e;
  border: none;
  margin: 16px auto;
  text-align: center;
  max-width: 85%;
  font-size: 0.85em;
  padding: 4px 12px;
}

.message-meta {
  font-size: 0.75em;
  opacity: 0.7;
  margin-top: 4px;
}

.input-area {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  background: #161b22;
  border-top: 1px solid #21262d;
}

.message-input {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid #30363d;
  border-radius: 6px;
  font-size: 0.9em;
  transition: all 0.2s;
  background: #0d1117;
  color: #c9d1d9;
}

.message-input::placeholder {
  color: #8b949e;
}

.message-input:focus {
  outline: none;
  border-color: #1f6feb;
  background: #0d1117;
}

.send-btn {
  padding: 8px 20px;
  background: #1f6feb;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 0.9em;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.send-btn:hover {
  background: #388bfd;
}

.send-btn:active {
  background: #1158c7;
}

.send-btn-b {
  background: #1f6feb;
}

.send-btn-b:hover {
  background: #388bfd;
}
