* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Times New Roman", serif;
}

:root {
  --text-color: #ffffff;
  --icon-color: #acacbe;
  --icon-hover-bg: #5b5e71;
  --placeholder-color: #dcdcdc;
  --outgoing-chat-bg: #000000;
  --incoming-chat-bg: #444654;
  --outgoing-chat-border: #343541;
  --incoming-chat-border: #444654;
}

.light-mode {
  --text-color: #343541;
  --icon-color: #a9a9bc;
  --icon-hover-bg: #f1f1f3;
  --placeholder-color: #6c6c6c;
  --outgoing-chat-bg: #ffffff;
  --incoming-chat-bg: #f7f7f8;
  --outgoing-chat-border: #ffffff;
  --incoming-chat-border: #d9d9e3;
}

body {
  background: var(--outgoing-chat-bg);
  width: 100vw; /* Full screen width */
}

.chat-container {
  overflow-y: auto;
  max-height: 100vh;
  padding-bottom: 150px;
  width: 100vw; /* Full width */
  display: flex;
  flex-direction: column;
  align-items: center;
}

:where(.chat-container, textarea)::-webkit-scrollbar {
  width: 6px;
}

:where(.chat-container, textarea)::-webkit-scrollbar-track {
  background: var(--incoming-chat-bg);
  border-radius: 25px;
}

:where(.chat-container, textarea)::-webkit-scrollbar-thumb {
  background: var(--icon-color);
  border-radius: 25px;
}

.default-text {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  height: 70vh;
  padding: 0 10px;
  text-align: center;
  color: var(--text-color);
}

.default-text h1 {
  font-family: "Times New Roman", serif;
  font-size: 0.5rem;
}

@font-face {
  font-family: "Bangla";
  src: url("./bangla.ttf");
}

.default-text p {
  font-family: Georgia, Bangla;
  margin-top: 10px;
  font-size: 1rem;
}

.chat-container .chat {
  width: 95%;
  max-width: 1200px;
  padding: 25px 10px;
  display: flex;
  justify-content: center;
  color: var(--text-color);
  border-radius: 8px;
  margin: 5px 0;
}

.chat-container .chat.outgoing {
  background: var(--outgoing-chat-bg);
  border: 1px solid var(--outgoing-chat-border);
  align-self: flex-end;
}

.chat-container .chat.incoming {
  background: var(--incoming-chat-bg);
  border: 1px solid var(--incoming-chat-border);
  align-self: flex-start;
}

.chat .chat-content {
  display: flex;
  width: 100%;
  align-items: flex-start;
  justify-content: space-between;
}

span.material-symbols-rounded {
  user-select: none;
  cursor: pointer;
}

.chat .chat-content span {
  cursor: pointer;
  font-size: 1.3rem;
  color: var(--icon-color);
  visibility: hidden;
}

.chat:hover .chat-content:not(:has(.typing-animation), :has(.error)) span {
  visibility: visible;
}

.chat .chat-details {
  display: flex;
  align-items: center;
}

.chat .chat-details img {
  width: 40px;
  height: 40px;
  align-self: flex-start;
  object-fit: cover;
  border-radius: 2px;
}

.chat .chat-details p {
  white-space: pre-wrap;
  font-size: 1.05rem;
  padding: 0 50px 0 25px;
  color: var(--text-color);
  word-break: break-word;
  width: 100%;
}

.chat .chat-details p a {
  color: white;
  text-decoration: none;
}

.chat .chat-details p.error {
  color: #e55865;
}

.chat .typing-animation {
  padding-left: 25px;
  display: inline-flex;
}

.typing-animation .typing-dot {
  height: 7px;
  width: 7px;
  border-radius: 50%;
  margin: 0 3px;
  opacity: 0.7;
  background: var(--text-color);
  animation: animateDots 1.5s var(--delay) ease-in-out infinite;
}

.typing-animation .typing-dot:first-child {
  margin-left: 0;
}

@keyframes animateDots {
  0%, 44% {
    transform: translateY(0px);
  }
  28% {
    opacity: 0.4;
    transform: translateY(-6px);
  }
  44% {
    opacity: 0.2;
  }
}

.typing-container {
  position: fixed;
  bottom: 0;
  width: 100vw;
  display: flex;
  padding: 20px 10px;
  justify-content: center;
  background: var(--outgoing-chat-bg);
  border-top: 1px solid var(--incoming-chat-border);
}

.typing-container .typing-content {
  display: flex;
  max-width: 950px;
  width: 100%;
  align-items: flex-end;
}

.typing-container .typing-textarea {
  width: 100%;
  display: flex;
  position: relative;
}

.typing-textarea textarea {
  resize: none;
  height: 55px;
  width: 100%;
  border: none;
  padding: 15px 45px 15px 20px;
  color: var(--text-color);
  font-size: 1rem;
  border-radius: 4px;
  max-height: 250px;
  overflow-y: auto;
  background: var(--incoming-chat-bg);
  outline: 1px solid var(--incoming-chat-border);
}

.typing-textarea textarea::placeholder {
  color: var(--placeholder-color);
}

.typing-content span {
  width: 55px;
  height: 55px;
  display: flex;
  border-radius: 4px;
  font-size: 1.35rem;
  align-items: center;
  justify-content: center;
  color: var(--icon-color);
}

.typing-textarea span {
  position: absolute;
  right: 0;
  bottom: 0;
  visibility: hidden;
}

.typing-textarea textarea:valid ~ span {
  visibility: visible;
}

.typing-controls {
  display: flex;
}

.typing-controls span {
  margin-left: 7px;
  font-size: 1.4rem;
  background: var(--incoming-chat-bg);
  outline: 1px solid var(--incoming-chat-border);
}

.typing-controls span:hover {
  background: var(--icon-hover-bg);
}

.suggestions-container {
  position: absolute;
  bottom: 70px;
  left: 0;
  right: 0;
  width: 100vw;
  max-height: 250px;
  overflow-y: auto;
  background: var(--incoming-chat-bg);
  border: 1px solid var(--incoming-chat-border);
  border-radius: 4px;
  z-index: 1000;
  padding: 5px 0;
}

.suggestion {
  padding: 10px;
  cursor: pointer;
  color: var(--text-color);
  transition: background 0.2s ease;
  white-space: normal;
  word-break: break-word;
}

.suggestion:hover {
  background: var(--icon-hover-bg);
}

.typing-controls #translate-btn {
  font-size: 1.4rem;
  background: var(--incoming-chat-bg);
  outline: 1px solid var(--incoming-chat-border);
}

.typing-controls #translate-btn:hover {
  background: var(--icon-hover-bg);
}

@media screen and (max-width: 600px) {
  .default-text h1 {
    font-size: 2.3rem;
  }
  :where(.default-text p, textarea, .chat p) {
    font-size: 0.95rem !important;
  }
  .chat-container .chat {
    padding: 20px 10px;
  }
  .chat-container .chat img {
    height: 32px;
    width: 32px;
  }
  .chat-container .chat p {
    padding: 0 20px;
  }
  .chat .chat-content:not(:has(.typing-animation), :has(.error)) span {
    visibility: visible;
  }
  .typing-container {
    padding: 15px 10px;
  }
  .typing-textarea textarea {
    height: 45px;
    padding: 10px 40px 10px 10px;
  }
  .typing-content span {
    height: 45px;
    width: 45px;
    margin-left: 5px;
  }
  span.material-symbols-rounded {
    font-size: 1.25rem !important;
  }
}

.animatedText {
  font-family: "Times New Roman", Times, serif;
  font-size: 5px;
  background-image: linear-gradient(-90deg, #ff0000, #a6f656, #55f6f6, #a655f6, #f65555);
  background-size: 100%;
  -webkit-text-fill-color: transparent;
  -webkit-background-clip: text;
  animation: animate 2s linear infinite reverse;
  display: inline-block;
  font-weight: 300;
}

.bubble-container {
  position: relative;
  height: 100vh;
  overflow: hidden;
  width: 100vw;
}

.bubbles {
  position: relative;
  display: flex;
}

.bubbles span {
  position: relative;
  width: 30px;
  height: 30px;
  background-color: #4fc3dc;
  margin: 0 4px;
  border-radius: 50%;
  box-shadow: 0 0 0 10px #4fc3dc44, 0 0 50px #4fc3dc, 0 0 100px #4fc3dc;
  animation: animate 15s linear infinite;
}

/* Full-screen topics overlay for ★ */
.show-all-topics {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  max-height: 80vh;
  overflow-y: auto;
  background: var(--incoming-chat-bg);
  border-bottom: 1px solid var(--incoming-chat-border);
  z-index: 2000;
  display: none;
  padding: 10px;
}

.show-all-topics .topic-item {
  padding: 10px;
  margin: 5px 0;
  cursor: pointer;
  border-radius: 4px;
  color: var(--text-color);
}

.show-all-topics .topic-item:hover {
  background: var(--icon-hover-bg);
}
