.blur {
  filter: blur(8px);
  pointer-events: none;
}

.container {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  overflow: hidden;
  font-family: 'Arial', 'Helvetica', sans-serif;
  display: flex;
  justify-content: center;
  align-items: center;
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  opacity: 0; 
  transform: scale(0.95);
  transition: opacity 0.5s ease-out, transform 0.5s ease-out; 
}

.container.visible {
  opacity: 1; 
  transform: scale(1); 
}

.chat-window {
  display: flex;
  flex-direction: column;
  margin-left: 8rem;
  height: 80vh;
  width: 55vw;
  background: linear-gradient(to bottom, #0e0c18, #0e0c18);
  box-shadow: 0px -4px 10px rgba(255, 255, 255, 0.2), 
              0px -6px 20px rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  z-index: 2;
}

.canvas-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

.canvas-container canvas {
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
}

.top-menu {
  background-color: rgb(38, 141, 141);
  padding: 13px 20px; 
  box-shadow: 0 1px 30px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center; 
  position: relative; 
}

.top-menu .title {
  color: white; 
  font-size: 20px; 
  font-weight: bold;
  margin: 0; 
  flex-grow: 1; 
  text-align: center; 
}

.close-btn {
  display: flex; 
  justify-content: center; 
  align-items: center; 
  width: 25px; 
  height: 25px; 
  border-radius: 50%; 
  position: absolute; 
  background-color: rgb(250, 250, 250); 
  right: 20px; 
  top: 15px; 
  cursor: pointer; 
  transition: transform 0.2s ease; 
}

.close-btn:hover {
  transform: scale(1.1);
}

.close-btn i {
  color: red; 
  font-size: 16px; 
}

.messages {
  flex-grow: 1;
  overflow-y: auto;
  padding: 10px;
  margin: 0;
  list-style: none;
}

.messages .message {
  clear: both;
  overflow: hidden;
  margin-bottom: 20px;
  transition: all 0.5s linear;
  opacity: 0;
}

.messages .message .avatar {
  height: 40px;
  width: 40px;
  background-size: cover !important;
  border-radius: 50%;
  display: inline-block;
}

.messages .message .timestamp {
  font-size: 10px;
  font-weight: 300;
  text-align: right;
  margin-top: 5px;
  margin-right: 7px;
}

.messages .message.appeared {
  opacity: 1;
}

.messages .message.left .avatar {
  float: left;
  background: url('../images/wotteo.jpg');
}

.messages .message.left .text_wrapper {
  float: left; 
  display: flex;
  flex-direction: column;
  word-wrap: break-word; 
  overflow-wrap: break-word;
  background-color: #f3eeca;
  margin-left: 1rem;
  border-radius: 10px; 
  max-width: 60%;
  min-width: 15%;
  background-color: rgb(50, 55, 89);
  color: white;
  padding-top: 4px;
  padding-left: 4px;
  padding-left: 0.5rem;
  padding-right: 1rem;
}

.messages .message.right .avatar {
  float: right;
  background: url('../images/person.jpg');
}

.messages .message.right .text_wrapper {
  display: flex;
  flex-direction: column;
  word-wrap: break-word; 
  overflow-wrap: break-word;
  background-color: rgb(37, 150, 150);
  color: white;
  margin-right: 8px;
  float: right;
  border-radius: 10px; 
  max-width: 60%;
  min-width: 15%;
  padding-top: 4px;
  padding-left: 0.5rem;
  padding-right: 1rem;
}

.bottom-wrapper {
  display: flex;
  align-items: center;
  padding: 10px;
  background-color: rgb(99, 99, 99); 
  position: relative;
}

#msg_input {
  width: 100%;
  padding: 12px 70px 12px 12px; 
  border: 1px solid #00ffff; 
  border-radius: 10px;
  outline: none;
  background-color: rgb(230, 228, 228);
  color: rgba(34, 5, 5, 1);
  font-size: 16px;
}

#msg_input::placeholder {
  color: rgba(34, 5, 5, 0.6); 
}

#send_button {
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  right: 20px; 
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  background-color: rgb(38, 141, 141);
  width: 45px;
  height: 33px;
  font-size: 10px;
  border-radius: 10%;
  transition: color 0.3s;
}

#send_button:hover {
  background-color: rgb(73, 157, 157);
}

#send_button i {
  color: white; 
  font-size: 14px; 
}

.default-questions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-left: 3rem;
  padding-bottom: 12px;
  background-color: transparent; 
}

.default-question {
  cursor: pointer;
  padding: 8px 12px;
  border-radius: 12px;
  background-color: rgb(38, 141, 141);
  color: white;
  font-size: 14px;
  transition: background-color 0.3s;
}

.default-question:hover {
  background-color: rgb(73, 157, 157);
}

.no-scroll {
  overflow: hidden;
}



@media only screen and (max-width: 480px) {
  .chat-window {
    width: 100vw; 
    margin-left: 0; 
    height: 100vh;
  }
  .top-menu {
    padding: 10px; 
  }
  .close-btn {
    width: 20px; 
    height: 20px;
    right: 10px; 
  }

  .messages .message.left .text_wrapper {
    margin-left: 1rem;
  }
  .messages .message.right .text_wrapper {
    margin-right: 2px;
  }
  .default-questions {
    margin-left: 2rem; 
    margin-right: 2rem;
    padding-bottom: 8px; 
    flex-direction: column; 
  }

  .default-question {
    font-size: 15px; 
    border-radius: 10px; 
    text-align: center; 
  }

}
@media only screen and (min-width: 481px) and (max-width: 768px) {
  .chat-window {
    width: 75vw; 
    margin-left: 5rem; 
  }
}

@media only screen and (min-width: 768px) and (max-width: 1025px) {
  .container {
    justify-content: center; 
    align-items: center; 
  }
  
  .chat-window {
    width: 70vw; 
    margin-right: auto; 
  }
}

@media only screen and (min-width: 1025px) and (max-width: 1200px) {
  .chat-window {
    width: 55vw; 
  }
}

@media only screen and (min-width: 1201px) {
  .chat-window {
    width: 50vw; 
  }
}

@media only screen and (max-width: 480px) {
  .chat-window {
    width: 100vw;
    height: 100vh;
    margin: 0;
    position: fixed;
    top: 0;
    left: 0;
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
  }

  .messages {
    flex: 1;
    height: calc(100vh - 60px - 140px); 
    padding-bottom: 0;
    margin-bottom: 140px; 
    overflow-y: auto;
    -webkit-overflow-scrolling: touch; 
  }
  .bottom-wrapper {
    position: fixed;
    bottom: 50px;
    left: 0;
    width: 100%;
    background-color: rgb(99, 99, 99);
    padding: 10px;
    box-sizing: border-box;
    z-index: 1000;
    padding-bottom: calc(10px + env(safe-area-inset-bottom));
  }

  #msg_input {
    width: calc(100% - 70px);
  }

  .default-questions {
    position: fixed;
    bottom: 150px;
    left: 0;
    width: 100%;
    margin: 0;
    padding: 10px;
    box-sizing: border-box;
    z-index: 9;
  }
  .messages .message.right .text_wrapper {
    margin-right: 4px;
  }
  .messages .message.left .text_wrapper {
    margin-left: 4px;
  }
  
}
