html {
  height: 90%;
}
body {
  height: 100%;
  font-family: Arial, sans-serif;
  background-color: #f4f4f4;
  margin: 0;
  padding: 0;
}
#main-container {
  height: 100%;
  display: flex;
  justify-content: space-around;
  margin: 50px;
}
#chat-image-input-container {
  display: flex;
  padding: 10px;
  justify-content: space-between;
  align-items: center;
}
.placeholder {
  margin-left: 10px;
  max-height: 50px;
  max-width: 80px;
  cursor: pointer;
}
.chat-container,
.image-generator-container {
  width: 48%;
  background: #fff;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  overflow: hidden;
}
.chat-box,
.image-box {
  padding: 20px;
  height: calc(100% - 100px);
  overflow-y: auto;
  border-bottom: 1px solid #ddd;
}
.message {
  margin: 10px auto;
  padding: 10px;
  border-radius: 5px;
  line-height: 1.5;
  max-width: max-content;
  position: relative;
}
.user-message {
  background-color: #dcf8c6;
  align-self: flex-end;
  margin-right: 0;
}
.llama-message,
.image-message {
  background-color: #f1f0f0;
  align-self: flex-start;
  margin-left: 0;
}
#input-container,
#generate-form {
  display: flex;
  padding: 10px;
}
#img2img-container {
  padding: 10px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
}
#img2img-generate-container {
  display: flex;
  align-items: center;
}
#prompt-input,
#image-prompt {
  flex: 1;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 5px;
  margin-right: 10px;
}
#send-button,
#generate-button,
#upload-button,
#img2img-upload-button,
#reset-button {
  padding: 10px 20px;
  background-color: #5cb85c;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  height: 37.5px;
}
#send-button:hover,
#generate-button:hover,
#upload-button:hover,
#img2img-upload-button:hover,
#reset-button:hover {
  background-color: #4cae4c;
}
#display,
#display:focus,
#display:active {
  border: 0;
  outline: 0;
}
.button {
  padding: 10px 20px;
  background-color: #5cb85c;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  /*height: 37.5px;*/
}
.message-button {
  margin-right: 10px;
  margin-top: 10px;
}

#generate-meme-button {
  position: absolute;
  top: 32px;
  right: calc(50% - 68px);
}

.llama-message input,
.image-message input {
  position: absolute;
  left: -20px;
  top: 42%;
}

.modal {
  display: none; /* Hidden by default */
  position: fixed;
  z-index: 1; /* Sit on top */
  left: 0;
  top: 0;
  width: 100%; /* Full width */
  height: 100%; /* Full height */
  overflow: auto; /* Enable scroll if needed */
  background-color: rgba(0, 0, 0, 0.5); /* Black with opacity */
  justify-content: center;
  align-items: center;
}

.modal-content {
  display: flex;
  background-color: #fefefe;
  padding: 20px;
  border: 1px solid #888;
  width: 80%;
  height: 80%;
  max-width: 500px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  border-radius: 8px;
  flex-direction: column;
  align-items: center;
}

#modal-content-nav {
  width: 100%;
}

#image-final {
  width: 100%;
}

#caption-final {
  width: 90%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 5px;
  margin-top: 10px;
}

#generate-new-caption,
#generate-new-image {
  margin-top: 10px;
  padding: 10px 20px;
  background-color: #5cb85c;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  height: 37.5px;
}

.close-button {
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
}

.close-button:hover,
.close-button:focus {
  color: black;
  text-decoration: none;
  cursor: pointer;
}

/* Spinner container */
#loadingAnimation {
  display: none;
  width: 100%;
  text-align: center;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  margin-top: 20px;
  position: fixed;
  top: 50%;
}

/* The spinner */
.spinner {
  border: 8px solid #f3f3f3; /* Light grey */
  border-top: 8px solid #3498db; /* Blue */
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 2s linear infinite;
}

/* Animation keyframes */
@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Simple loading spinner */
@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.spinner {
  display: inline-block;
  width: 1em;
  height: 1em;
  border: 2px solid currentColor;
  border-radius: 50%;
  border-top-color: transparent;
  animation: spin 1s linear infinite;
  vertical-align: middle;
  margin-left: 8px;
}

/* Style for loading message */
.loading-message p:last-child {
  color: #888;
  font-style: italic;
}

/* Style for error message */
.error-message {
  color: #d32f2f; /* Red for errors */
  font-weight: bold;
}
