body {
  margin: 0;
  font-family: sans-serif;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background-color: #f0f0f0;
  box-sizing: border-box; /* Added box-sizing */
}

.container {
position: relative;
width: 80%;
max-width: 800px;
min-height: 80vh; /* Changed height to min-height */
display: flex;
flex-direction: column;
overflow: hidden;
border-radius: 10px;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
background-color: white;
}


#bg-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
}


.chat-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 10px; /* Padding top and bottom */
  max-height: 100%;
}

#chat-log {
  flex: 1;
  overflow-y: auto;
  padding: 10px 10px; /* Keep padding consistent vertical*/
  border-bottom: 1px solid #ddd;
  white-space: pre-line;
}

.input-area {
  display: flex;
  padding: 10px;
  border-radius: 5px;
  background-color: #f0f0f0;
}


.input-area input {
  flex: 1;
  padding: 8px;
  margin-right: 5px;
  border: 1px solid #ddd;
  border-radius: 3px;
}
/* Input focus style*/
.input-area input:focus{
  border-color: #007bff;
  outline: none;
  box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.input-area button {
  padding: 8px 15px;
  border: none;
  background-color: #007bff;
  color: white;
  cursor: pointer;
  border-radius: 3px;
  outline: none; /* Remove outline from button*/
}

.input-area button:focus{
   outline: none; /* Remove outline from button*/
   box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.input-area button:hover{
  background-color: #0056b3
}

.message {
  margin: 5px 0px;
  padding: 10px;
  border-radius: 5px;
}
.message.user-message {
  text-align: right;
  background-color: #e0f7fa; /* Light blue */
  color: #000;

}


.message.ai-message {
  text-align: left;
  background-color: #f0f0f0; /* Light grey */
  color: #666;

}


.message.error {
color: red;
}

@media screen and (max-width: 600px) {
  .container {
      width: 95%;
  }
}