:root {
  --bg: #1e1e2f;
  --panel: #2a2a40;
  --text: #e0e0e0;
  --primary: #4e8cff;
  --user-bg: #4e8cff;
  --bot-bg: #383858;
}

body {
  margin: 0;
  font-family: 'Segoe UI', sans-serif;
  background-color: var(--bg);
  color: var(--text);
  height: 100vh;
  display: flex;
  overflow: hidden;
}

.sidebar {
  width: 250px;
  background-color: var(--panel);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  border-right: 1px solid #444;
  position: relative;
}

.chat-list {
  flex: 1;
  overflow-y: auto;
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.chat-list::-webkit-scrollbar {
  display: none;
}

.chat-list button {
  background: none;
  border: none;
  color: var(--text);
  padding: 0.75rem;
  width: 100%;
  text-align: left;
  border-radius: 8px;
  cursor: pointer;
}
.chat-list button:hover {
  background-color: #3a3a56;
}

.new-session-btn {
  margin-bottom: 1rem;
  padding: 0.5rem;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}

.credit {
  position: absolute;
  bottom: 0;
  color: #bfb6d2;
}

.chat-area {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.chat-container {
  flex: 1;
  padding: 1rem;
  overflow-y: auto;
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.chat-container::-webkit-scrollbar {
  display: none;
}

.input-area {
  display: flex;
  padding: 1rem;
  background-color: var(--panel);
  border-top: 1px solid #333;
}
.input-area input {
  flex: 1;
  padding: 0.75rem;
  border-radius: 20px;
  border: none;
  outline: none;
  background-color: #1a1a2d;
  color: white;
}
.input-area button {
  margin-left: 0.5rem;
  padding: 0.75rem 1rem;
  border-radius: 20px;
  background-color: var(--primary);
  color: white;
  border: none;
  cursor: pointer;
}

.message {
  max-width: 75%;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  margin-bottom: 0.75rem;
  white-space: pre-wrap;
}
.message.human {
  align-self: flex-end;
  background-color: var(--user-bg);
  color: white;
}
.message.ai {
  align-self: flex-start;
  background-color: var(--bot-bg);
  color: var(--text);
}
.message.ai a {
  color: white;
  text-decoration: underline;
}
.message.ai a:visited {
  color: white;
}
.message.ai a:hover {
  color: #ccc;
}
