pre {
  white-space: pre-wrap;       /* Since CSS 2.1 */
  white-space: -moz-pre-wrap;  /* Mozilla, since 1999 */
  white-space: -pre-wrap;      /* Opera 4-6 */
  white-space: -o-pre-wrap;    /* Opera 7 */
  word-wrap: break-word;       /* Internet Explorer 5.5+ */
  overflow-wrap: break-word;   /* CSS3 */
  overflow-x: auto;            /* Horizontal scrollbar if needed */
  font-family: 'Patrick Hand', cursive;
  max-width: 800px;
  width: 90vw;
  margin: 0 auto;
  padding-left: 20px;
  padding-right: 20px;
}




body {
  background-image: url("images/BG.png");
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
color: white;
/* font-family: 'Dancing Script', cursive; */
font-family: 'Patrick Hand', cursive;
font-size: 15px;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
height: 100vh;
width: 100vw;
margin: 0;
padding: 20px;
box-sizing: border-box;
position: fixed;
}


h1 {
text-align: center;
margin-top: 0;
margin-bottom: 5px;
font-weight: bolder;
top: 10px;
position: fixed;
font-family: 'Patrick Hand', cursive;
}

h3 {
margin-bottom: 20px;
color: lime;
font-family: 'Patrick Hand', cursive;
}

#api-key-status {
text-align: center;
margin-top: 40px;
margin-bottom: 5px;
font-weight: lighter;
color: lime;
top: 10px;
position: fixed;
font-size: 15px;
}

#waiting-gif {
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
position: fixed;
width: 250px;
height: 250px;
z-index: 600;
}

#active-bro,
#idle-bro {
width: 30%;
max-width: 500px;
height: auto;
transition: all 0.5s ease;
cursor: pointer;
position: fixed;
top: 70px;
}

@media (max-width: 768px) {
  #active-bro,
  #idle-bro {
    width: 60%;
    max-width: 300px;
  }
}

@media (max-width: 468px) {
  #active-bro,
  #idle-bro {
    width: 60%;
    max-width: 300px;
  }
}

.avatar {
margin-top: 0;
margin-bottom: 0;
top: 10%;
font-family: 'Patrick Hand', cursive;

}

#input-code {
width: 70%;
height: 100px;
padding: 10px;
margin: 20px 0;
border: 1px solid #ddd;
border-radius: 5px;
font-size: 16px;
background-color: black;
color: white;
padding-left: 20px;
padding-right: 20px;
}



#output {
width: 90vw;
min-height: 100px;
padding: 10px;
border: none;
border-radius: 5px;
font-size: 20px;
background-color: none;
color: white;
margin-top: 16px;
padding-left: 30px;
padding-right: 30px;
text-align: left;
z-index: 1;
overflow-y: auto;
font-family: 'Patrick Hand', cursive;
 margin-bottom: 100px; 
}

/* Image preview styles */

#output img {
background-color: white;
color: black;
   border-radius: 5px;
  box-shadow: 0 0 10px rgb(255, 255, 255, 0.8);
  cursor: pointer;
}

.image-actions {
z-index: 999999999999999999999999999;
}

.user-text {
color: #04ff00;
margin-bottom: 30px;
font-size: 16px;
font-weight: bolder;
text-align: left;
font-family: 'Patrick Hand', cursive;
background-color: rgba(0, 0, 0, 0.4);
padding-left: 20px;
padding-right: 20px;
padding-top: 20px;
padding-bottom: 20px;
  border-radius: 10px;
  box-shadow: 0 0 10px rgb(255, 255, 255, 0.5);
}

.chatgpt-text {
color: white;
margin-bottom: 20px;
margin-top: 10px;
font-size: 16px;
font-weight: bolder;
font-family: 'Patrick Hand', cursive;
text-align: left;
background-color: rgba(0, 0, 0, 0.6);
padding-left: 20px;
padding-right: 20px;
padding-top: 20px;
  border-radius: 10px;
padding-bottom: 20px;
  box-shadow: 0 0 10px rgb(255, 255, 255, 0.5);
}

.conversation {
margin-bottom: 50px;
color: #04ff00;
font-family: 'Patrick Hand', cursive;
font-weight: bolder;
}



#toggleIcon {
position: fixed;
bottom: 60px;
right: 20px;
font-size: 24px;
color: #888;
cursor: pointer;
z-index: 999999;
}

#search_voice {
width: 300px;
text-align: center;
height: 40px;
margin-top: 20px;
margin-bottom: 20px;
font-family: 'Patrick Hand', cursive;
}




#select_language {
width: 300px;
text-align: center;
height: 40px;
margin-top: 20px;
margin-bottom: 20px;
font-family: 'Patrick Hand', cursive;
}

#select_voice {
width: 300px;
z-index: 999;
font-size: 16px;
text-align: center;
height: 40px;
background-color: black;
color: #c59655;
border: 1px solid #c59655;
border-radius: 2px;
}



#playHtLanguages {
width: 300px;
z-index: 999;
font-size: 16px;
text-align: center;
height: 40px;
background-color: black;
color: #c59655;
border: 1px solid #c59655;
border-radius: 2px;
}

#emotion {
width: 300px;
z-index: 999;
font-size: 16px;
text-align: center;
height: 40px;
background-color: black;
color: #c59655;
border: 1px solid #c59655;
border-radius: 2px;
}





#continousOff, #continousOn,  {
  position: fixed;
  left: 30px;
  z-index: 50;
  cursor: pointer;
}

#upload-images {
  position: fixed;
  bottom: 20px;
  font-size: 25px;
  left: 2%;
  color: white;
  cursor: pointer; 
  z-index: 999999999999;
}

/* Modal Styles */

/* Modal Styles */

.modal-content {
position: fixed;
overflow: visible;
top: 0;
background-color: #000;
width: auto;
height: 90vh;
max-width: 90vw;
border-radius: 4px;
padding: 30px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
z-index: 9999;
text-align: center;
border: 2px solid #c59655;
overflow-y: auto;
font-family: 'Patrick Hand', cursive;
/* Adds scroll when the content is more than the view height */
}

.close-button {
position: absolute;
top: 10px;
right: 20px;
font-size: 24px;
font-weight: bold;
color: #c59655;
cursor: pointer;
}

.close-button:hover {
color: white;
}

input[type="text"] {
display: block;
padding: 10px;
border: none;
border-radius: 4px;
margin-bottom: 10px;
}

button[type="submit"] {
background-color: #008cba;
color: #fff;
border: none;
padding: 10px 20px;
border-radius: 4px;
cursor: pointer;
font-family: 'Patrick Hand', cursive;

}

.modal-content input[type="text"] {
border: 2px solid #c59655;
background-color: #212121;
color: white;
width: 250px;
box-sizing: border-box;
font-size: 16px;
display: block;
margin: 0 auto;
margin-bottom: 10px;
font-family: 'Patrick Hand', cursive;
}

button {
background-color: black;
color: #c59655;
border: 1px solid #c59655;
padding: 5px;
cursor: pointer;
justify-content: center;
text-align: center;
padding-left: 20px;
padding-right: 20px;
font-family: 'Patrick Hand', cursive;
}

#video-selector {
background-color: black;
width: 300px;
height: 40px;
border: 2px solid #c59655;
color: #c59655;
text-align: center;
padding: 10px 20px;
border-radius: 4px;
margin-top: 20px;
font-family: 'Patrick Hand', cursive;
}

#video-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Webview CSS */

#webview {
position: fixed;
top: 30px;
right: -100%;
width: 100vw;
height: 100vh;
border: none;
overflow: auto;
-webkit-overflow-scrolling: touch;
z-index: 50;
transition: right 0.3s;
max-width: 800px;

}



.toggle-2-container {
position: fixed;
top: 10px;
left: 10px;
z-index: 50;
}

.toggle-2-icon {
position: fixed;
/* Change from 'fixed' to 'absolute' */
top: 10px;
left: 10px;
background-color: transparent;
color: #c59655;
border: none;
outline: none;
font-size: 24px;
cursor: pointer;
z-index: 50;
}

/* Media query for small screens */
@media screen and (max-width: 480px) {
.modal-content input[type="text"] {
  width: 250px;
}
}

/* Fix for the input width issue */
.modal-content input[type="text"] {
width: 80vw;
max-width: 300px;
}


@media (max-width: 768px) {
/* Styles for small screens */
}

@media (min-width: 769px) and (max-width: 1024px) {
/* Styles for medium screens */
}

@media (min-width: 1025px) {
/* Styles for large screens */
}


#listening-status {
position: fixed;
bottom: 30%;
left: 50%;
transform: translateX(-50%);
text-align: center;
width: 100%;
color: lime;
font-size: 35px;
}

#language-status {
position: fixed;
bottom: 20%;
left: 50%;
transform: translateX(-50%);
text-align: center;
width: 100%;
color: white;
font-size: 50px;
}

footer {
position: fixed;
bottom: 80px;
left: 50%;
transform: translateX(-50%);
text-align: center;
width: 100%;
cursor: pointer;
font-family: 'Patrick Hand', cursive;
}

footer p {
font-size: 14px;
color: white;
font-family: 'Patrick Hand', cursive;
}


.model-selector-container select {
width: auto;
background-color: rgba(0, 0, 0, 0.6);
color: white;
text-align: center;
border: none;
height: 40px;
font-size: 14px;
outline: none;
margin-bottom: 20px;
}


/* Fix for the input width issue */
.modal-content input[type="text"] {
width: 80vw;
max-width: 300px;
}


#api-key-status {
text-align: center;
margin-top: 40px;
margin-bottom: 5px;
font-weight: lighter;
color: lime;
top: 10px;
position: fixed;
font-size: 15px;
}




@media (max-width: 768px) {
/* Styles for small screens */
}

@media (min-width: 769px) and (max-width: 1024px) {
/* Styles for medium screens */
}

@media (min-width: 1025px) {
/* Styles for large screens */
}

#ContinuousSpeech {
width: 300px;
height: 50px;
background-color: red;
text-align: center;
line-height: 50px;
cursor: pointer;
margin-top: 20px;
margin-bottom: 30px;
margin-left: auto;
margin-right: auto;
border-radius: 5px;
}

#continousOff,#continousOn {
width: 15px;
height: 15px;
position: fixed;
top: 70px;
left: 30px;
z-index: 50;
cursor: pointer;
} 


.circle {
margin-top: 85vh;
right: 40px;
position: fixed;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background-color: red;
  transition: background-color 0.3s;
  cursor: pointer;
z-index: 9999999;
}


#upload-images {
position: fixed;
bottom: 30px;
font-size: 25px;
left: 45px;
color: white; /* Adjust the icon color if needed */
cursor: pointer; 
 z-index: 999999999999;
}

#userInput {
position: fixed;
bottom: 0;
height: 60px;
width: 100vw;
left: 0;
right: 0;
padding-left: 90px; /* Adjust the padding to make space for the icon */
padding-right: 90px; /* Adjust the padding on the right */
box-sizing: border-box;
border-top: 1px solid white;
font-size: 16px; /* Adjust font size if needed */
border: none; /* Remove border */
border-radius: 4px; /* Adjust border radius if needed */
background-color: transparent; /* Match the background color */
color: white; /* Adjust text color */
font-family: 'Patrick Hand', cursive;
outline: none;
z-index: 999999999;
}

#image-input {
display: none; /* Hide the actual file input */
}

#image-preview {
z-index: 99999999999999999999999999999;
}

#search-confirmation-container {
display: flex;          /* Enable Flexbox */
justify-content: space-between; /* Distribute space evenly between child elements */
align-items: center;    /* Vertically center align items in the container */
width: 100%;            /* Make the container full width */
max-width: 600px;       /* Optional: Set a maximum width for the container */
margin: 0 auto;         /* Center the container horizontally */
padding: 1em;           /* Add some padding inside the container */
z-index: 9999;
margin-top: 60%;
position: fixed;
top: 60vh;
}


.search-confirmation-button {
flex: 1;                /* Each button will take equal space */
margin: 0 0.5em;        /* Add margin between buttons */
padding: 0.5em 1em;     /* Padding inside each button */
z-index: 999;
height: 40px;
}


.search-confirmation-button:not(:last-child) {
margin-right: 1em; 
z-index: 99999999999999999;
position: fixed;
top: 60vh;
}




.modal-content.status {
  font-size: 16px;
  display: flex;
  align-items: center;
  width: 100%;
  text-align: center;
}
.status i {
  margin-right: 10px;
  color: white;
}
.status.green i {
  color: green;
}
.status.red i {
  color: red;
}





.toggle-icon {
  position: fixed;
  right: 20px;
  top: 10px;
  font-size: 20px;
  padding: 10px;
  border-radius: 50%;
  background-color: #ff4d4d; /* Red when off */
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.toggle-icon.active {
  background-color: #4CAF50; /* Green when on */
}

.toggle-icon i {
  color: white;
  font-size: 20px;
}

/* Highlight streaming assistant messages */
.assistant-streaming {
    background-color: #f0f0f0;
    /* Add additional styles as needed */
}

.icon-button {
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  font-size: 16px;
  margin-left: 10px;
}

.icon-button:hover {
  text-decoration: underline;
}

/* Tavily search result styles */
.image-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 20px;
}

.search-result-image {
  max-width: 200px;
  max-height: 200px;
  object-fit: cover;
  border-radius: 5px;
  box-shadow: 0 0 5px rgba(255, 255, 255, 0.3);
  transition: transform 0.3s ease;
}

.search-result-image:hover {
  transform: scale(1.05);
}

/* Tavily search result text styles */
.tavily-result {
  background-color: rgba(0, 0, 0, 0.6);
  border-radius: 10px;
  padding: 15px;
  margin-bottom: 15px;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
}

.tavily-result h3 {
  color: #04ff00;
  margin-top: 0;
  margin-bottom: 10px;
}

.tavily-result p {
  color: #ffffff;
  margin-bottom: 10px;
}

.tavily-result a {
  color: #c59655;
  text-decoration: none;
}

.tavily-result a:hover {
  text-decoration: underline;
}

/* Tavily answer styles */
.tavily-answer {
  background-color: rgba(4, 255, 0, 0.1);
  border-left: 3px solid #04ff00;
  padding: 10px;
  margin-bottom: 20px;
  color: #ffffff;
  font-style: italic;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .image-container {
    justify-content: flex-start;
  }

  .search-result-image {
    max-width: 150px;
    max-height: 150px;
  }
}