* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Segoe UI", Tahoma, sans-serif;
}

body {
  background: #000814;
  color: #fff;
  height: 100vh;
  display: flex;
}

.app-container {
  display: flex;
  width: 100%;
  height: 100vh;
}

/* ===== Sidebar ===== */
aside {
  width: 0;                     /* initial hidden/narrow */
  background: #001d3d;
  border-right: 1px solid #003566;
  overflow-x: hidden;           /* hide horizontal scroll */
  transition: width 0.3s ease; /* smooth open/close */
  display: flex;
  flex-direction: column;
}

aside.active {
  width: 300px;                 /* pana wakati imefunguka */
}

.sidebar-header {
  padding: 10px;
  border-bottom: 1px solid #003566;
}

#search-input {
  width: 100%;
  padding: 8px;
  border: none;
  border-radius: 6px;
  outline: none;
}

#history-list {
  list-style: none;
  flex: 1;
  overflow-y: auto;
  padding: 0 5px;
}

#history-list li {
  padding: 10px;
  border-bottom: 1px solid #003566;
  cursor: pointer;
}

#history-list li:hover {
  background: #003566;
}

/* Sidebar New Chat Button */
.sidebar-new-chat {
  width: 95%;
  margin: 10px auto;
  padding: 10px;
  background: #00f2fe;
  color: #000;
  border: none;
  border-radius: 8px;
  font-weight: bold;
  cursor: pointer;
  display: block;
  transition: 0.3s;
}

.sidebar-new-chat:hover {
  background: #0077b6;
  color: #fff;
}

/* ===== Chat Section ===== */
.chat-container {
  flex: 1;
  display: flex;
  flex-direction: column;
}

header {
  padding: 10px;
  background: #003566;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

header h1 {
  font-size: 18px;
  color: #00f2fe;
}

header button {
  background: #00f2fe;
  border: none;
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: bold;
}

header button:hover {
  background: #0077b6;
  color: #fff;
}

/* ===== Messages ===== */
main {
  flex: 1;
  padding: 15px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.message {
  margin: 8px 0;
  padding: 10px 15px;
  border-radius: 12px;
  max-width: 70%;
  word-wrap: break-word;
}

.user {
  background: #0077b6;
  align-self: flex-end;
  text-align: right;
  border-bottom-right-radius: 2px;
  color: #fff;
}

.bot {
  background: #001d3d;
  align-self: flex-start;
  text-align: left;
  border-bottom-left-radius: 2px;
  color: #f1f1f1;
}

/* ===== Chat Input Section (Centered, Wide, Short) ===== */
.chat-input {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 15px;
  background: rgba(0, 50, 100, 0.95);
  border-radius: 12px;
  
  width: 70%;               /* inachukua 70% ya width ya chat-container */
  max-width: 800px;         /* max width */
  
  height: 45px;             /* urefu mdogo */
  margin: 20px auto;        /* katikati ya screen horizontally na juu kidogo */
}

.chat-input input {
  flex: 1;
  height: 30px;             /* urefu mdogo zaidi ndani ya box */
  padding: 5px 10px;
  border: none;
  border-radius: 8px;
  outline: none;
  font-size: 15px;
  background: #001d3d;
  color: #fff;
}

.chat-input input::placeholder {
  color: #aaa;
}

.chat-input button {
  padding: 8px 16px;
  border: none;
  border-radius: 8px;
  background: #00f2fe;
  color: #000;
  font-weight: bold;
  cursor: pointer;
  transition: 0.3s;
}

.chat-input button:hover {
  background: #0077b6;
  color: #fff;
}
