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

body, html {
  height: 100%;
  overflow: hidden;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: #1e1e2f;
  color: #fff;
}

.container {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* Sidebar */
.sidebar {
  width: 260px;
  background: #151526;
  padding: 20px;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.profile-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 20px;
}

#profile-pic {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  cursor: pointer;
  object-fit: cover;
  border: 2px solid #fff;
}

#username {
  margin-top: 10px;
  font-size: 18px;
  color: #ddd;
  text-align: center;
  cursor: text;
}

#new-chat {
  margin: 20px 0;
  padding: 10px;
  background-color: #28a0ff;
  color: #fff;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

.chat-history {
  flex-grow: 1;
  overflow-y: auto;
}

.chat-title {
  padding: 8px 12px;
  background-color: #29293d;
  color: #eee;
  margin-bottom: 8px;
  border-radius: 5px;
  cursor: pointer;
}

.toggle-btn {
  position: absolute;
  left: 10px;
  top: 10px;
  font-size: 22px;
  background: #28a0ff;
  color: white;
  border: none;
  padding: 6px 12px;
  border-radius: 5px;
  cursor: pointer;
  z-index: 10;
}

/* Chat Area */
.chat-area {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  background: linear-gradient(to bottom right, #2a2a40, #1e1e30);
  padding: 20px;
  overflow: hidden;
}

.chat-messages {
  flex-grow: 1;
  overflow-y: auto;
  padding-right: 10px;
  display: flex;
  flex-direction: column;
  gap: 15px;
  scrollbar-width: thin;
}

/* Message bubbles */
.message {
  max-width: 70%;
  padding: 12px 18px;
  border-radius: 12px;
  font-size: 16px;
  line-height: 1.5;
  position: relative;
  word-wrap: break-word;
}

.message.user {
  align-self: flex-end;
  background: linear-gradient(135deg, #ffa600, #ffd900);
  border-top-left-radius: 0;
  color: #000;
  border-bottom: 2px solid #cc9e00;
}

.message.bot {
  align-self: flex-start;
  background: linear-gradient(135deg, #c2f0ff, #e6f9ff);
  color: #000;
  border-bottom-right-radius: 0;
  border-top: 2px solid #b3e5ff;
}

/* Typing effect */
.typing {
  font-style: italic;
  opacity: 0.8;
  animation: blink 1s steps(1) infinite;
}

@keyframes blink {
  50% {
    opacity: 0.3;
  }
}

/* Input */
#chat-form {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}

#user-input {
  flex-grow: 1;
  padding: 12px;
  border-radius: 8px;
  border: none;
  font-size: 16px;
  outline: none;
}

#chat-form button {
  padding: 12px 18px;
  font-size: 16px;
  border: none;
  background-color: #28a0ff;
  color: #fff;
  border-radius: 8px;
  cursor: pointer;
}
