
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: #080d19;
  color: white;
}

header {
  padding: 22px;
  border-bottom: 1px solid #202b40;
}

header h2 {
  margin: 0;
  font-size: 27px;
}

header span {
  color: #6c8cff;
}

header p {
  color: #9baac3;
  font-size: 13px;
}

main {
  width: 92%;
  max-width: 650px;
  margin: 65px auto;
}

.welcome {
  text-align: center;
  margin-bottom: 35px;
}

.welcome h1 {
  font-size: 29px;
}

.welcome p {
  color: #9baac3;
}

#chat {
  min-height: 150px;
  padding: 15px;
}

.message {
  padding: 14px;
  margin: 12px 0;
  border-radius: 14px;
  line-height: 1.5;
}

.bot {
  background: #19243a;
}

.user {
  background: #294bba;
  margin-left: 35px;
}

form {
  display: flex;
  gap: 8px;
  padding: 10px;
  background: #172238;
  border: 1px solid #33415d;
  border-radius: 15px;
}

input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: none;
  outline: none;
  color: white;
  font-size: 15px;
  padding: 10px;
}

button {
  background: #526fff;
  border: none;
  color
    : white;
  padding: 12px 16px;
  border-radius: 10px;
}

.note {
  color: #8290a8;
  text-align: center;
  font-size: 12px;
  margin-top: 25px;
}

.web-search {
  margin: 25px 0;
  padding: 18px;
  background: #172238;
  border-radius: 15px;
}
.search-history {
  margin-top: 20px;
  padding: 12px;
  border-top: 1px solid #35415c;
}

.search-history h3 {
  font-size: 17px;
}

#searchHistory {
  padding-left: 20px;
  color: #c5cce0;
}

#searchHistory li {
  margin: 10px 0;
  overflow-wrap: anywhere;
}

#clearHistory {
  padding: 9px 14px;
  border: none;
  border-radius: 8px;
  background: #526fff;
  color: white;
}

.message-time {
  display: block;
  font-size: 10px;
  opacity: 0.65;
  margin-top: 5px;
  text-align: right;
}
.typing-indicator {
  font-size: 12px;
  opacity: 0.7;
  padding: 8px 12px;
  font-style: italic;
}

.typing-indicator[hidden] {
  display: none;
}
#clearChatBtn {
  padding: 8px 14px;
  margin: 8px;
  border: none;
  border-radius: 8px;
  background: #333;
  color: white;
  cursor: pointer;
}

/* LIGHT MODE */
body.light-mode {
  background: #f4f4f4;
  color: #222;
}

body.light-mode .message {
  background: #e2e2e2;
  color: #222;
}

body.light-mode input {
  background: white;
  color: #222;
  border: 1px solid #ccc;
}

body.light-mode .web-search,
body.light-mode .search-history {
  background: #fff;
  color: #222;
}

body.light-mode .typing-indicator {
  color: #333;
}

/* NEVO AI CHAT DESIGN */

#chat {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 420px;
  overflow-y: auto;
  scroll-behavior: smooth;
}

.message {
  max-width: 85%;
  padding: 14px 16px;
  margin: 8px 0;
  border-radius: 16px;
  line-height: 1.6;
  overflow-wrap: anywhere;
  animation: messageAppear 0.3s ease;
}

.message.bot {
  align-self: flex-start;
  border-bottom-left-radius: 4px;
  background: #192b49;
}

.message.user {
  align-self: flex-end;
  border-bottom-right-radius: 4px;
  background: #526fff;
  color: white;
}

.message-time {
  font-size: 10px;
  opacity: 0.65;
}

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

/* LIGHT MODE CHAT */
body.light-mode .message.bot {
  background: #e2e8f5;
  color: #222;
}

body.light-mode .message.user {
  background: #526fff;
  color: white;
}
