
:root {
  --bg: #343541;
  --card: #202123;
  --accent: #19c37d;
  --accent-hover: #17b36d;
  --muted: #6b6b6b;
  --bot-bubble: #444654;
  --user-bubble: #10a37f;
  --user-text: #ffffff;
  --font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: var(--font-family);
}

html, body {
  height: 100%;
  width: 100%;
  background: var(--bg);
  color: var(--user-text);
  overflow: hidden;
}

.app {
  display: flex;
  height: 100vh;
  width: 100%;
  overflow: hidden;
}

/* Sidebar */
.sidebar {
  width: 260px;
  background: var(--card);
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  color: #e6e6e6;
  border-right: 1px solid #343541;
  user-select: none;
}

.sidebar header h2 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--user-text);
}

.sidebar .sub {
  font-size: 14px;
  color: #8a8a8a;
  margin-bottom: 16px;
}

.sidebar .meta-top {
  font-size: 14px;
  color: #e6e6e6;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sidebar .credits {
  margin-top: auto;
  font-size: 14px;
  color: #8a8a8a;
  text-align: center;
}

/* Buttons */
.btn {
  background: var(--accent);
  color: var(--user-text);
  border: none;
  padding: 10px 16px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  font-size: 15px;
  transition: background 0.2s ease;
}

.btn:hover { background: var(--accent-hover); }

.btn.small {
  padding: 6px 12px;
  font-size: 13px;
  background: #2a2a37;
  color: var(--muted);
}

.btn.small:hover {
  background: #3a3a4a;
  color: var(--user-text);
}

/* Chat Area */
.chat-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: var(--card);
  color: var(--user-text);
}

/* Chat Header */
.chat-area .chat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 24px;
  border-bottom: 1px solid #444654;
}

.chat-area .chat-header .title {
  font-weight: 700;
  font-size: 20px;
}

.chat-area .chat-header .status {
  font-size: 13px;
  color: var(--muted);
}

/* Messages */
.chat-area .messages {
  flex: 1;
  padding: 20px 24px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  scroll-behavior: smooth;
  background: var(--card);
}

/* Message Bubbles */
.msg {
  display: flex;
  max-width: 100%;
}

.msg.in { justify-content: flex-start; }
.msg.out { justify-content: flex-end; }

.bubble {
  max-width: 60%;
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 15px;
  line-height: 1.4;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  white-space: pre-wrap;
  word-wrap: break-word;
  position: relative;
}

.msg.in .bubble { background: var(--bot-bubble); border-radius: 16px 16px 16px 4px; }
.msg.out .bubble { background: var(--user-bubble); color: var(--user-text); border-radius: 16px 16px 4px 16px; }

.bubble .meta {
  display: flex;
  gap: 8px;
  font-size: 11px;
  color: var(--muted);
  margin-top: 6px;
}

.bubble .meta .who { font-weight: 700; }

/* Composer (Input Bar) */
.composer {
  display: flex;
  gap: 10px;
  padding: 14px 24px;
  border-top: 1px solid #444654;
  background: var(--card);
}

.composer input {
  flex: 1;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid #444654;
  font-size: 15px;
  background: #2a2a37;
  color: var(--user-text);
}

.composer input::placeholder { color: var(--muted); }

.composer input:focus {
  outline: none;
  border-color: var(--accent);
  background: #3a3a4a;
}

/* Responsive */
@media (max-width: 800px) {
  .app { flex-direction: column; height: 100%; }
  .sidebar { width: 100%; flex-direction: row; justify-content: space-between; padding: 12px 16px; }
  .chat-area { height: calc(100% - 60px); }
}
