html {
  min-height: 100%;
  position: relative;
}
body {
  min-height: 100%;
  margin: 0;
  background: #121212;
  color: rgba(240, 244, 248, 0.9);
  font-family: "Helvetica", "Arial", sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
}

#start-screen {
  display: none;
  position: fixed;
  left: max(2.5%, calc(50% - 300px));
  top: 5%;
  width: 95%;
  max-width: 600px;
  height: 90%;
  padding: 1%;
  text-align: center;
  z-index: 1;
  overflow: auto;
}

.start_page {
  width: 100%;
  height: 100%;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 5%;
}

#language_page {
  display: none;
  gap: 0;
  justify-content: space-evenly;
}

#checkbox_wrapper {
  width: 100%;
  display: flex;
  gap: 10px;
  align-items: center;
  height: 16px;
  margin: auto auto 4% 10%;
  font-size: larger;
}

#start-screen_checkbox {
  height: 16px;
  width: 16px;
  margin: 0;
}

#start-screen h1 {
  text-align: center;
  width: 100%;
  line-height: normal;
  color: white;
}

#start-screen h2 {
  text-align: center;
  width: 100%;
  color: rgba(240, 244, 248, 0.9);
}

#avatar_page h2 {
  margin-top: -3%;
}

#language_page h1 {
  margin-bottom: 0;
}

.avatar_option {
  width: 40%;
  padding: 2.5%;
}

.flag {
  height: 100%;
}

#earth_icon {
  height: calc(100% - 4px);
  border-radius: 50%;
  border: solid 2px #ddd;
}

.language_option {
  display: flex;
  margin-left: 5%;
  padding: 1%;
  align-items: center;
  gap: 5%;
  width: 35%;
  height: 8%;
  font-size: 20px;
}

.avatar-name {
  font-size: 22px;
  margin: 0 auto;
}

.avatar-image {
  display: block;
  width: 100%;
  height: auto;
}

.avatar_option:hover, .language_option:hover {
  background: rgba(74, 165, 221, 0.6);
  color: rgba(240, 244, 248, 0.9);
}

#brands {
  display: flex;
  margin: 0 auto;
  padding: 10px 0;
  width: 60%;
  height: fit-content;
  max-width: 300px;
  align-items: flex-end;
  justify-content: center;
}

#logo_inoyad {
  width: 70%;
}

#logo_lif {
  display: none;
  width: 45%;
}

#settings-container {
  position: absolute;
  left: 10px;
  top: 10px;
  width: 10%;
  max-width: 60px;
  height: fit-content;
}

#record_btn-container {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  padding: 10px;
  margin: 5px auto 30px;
  border: 3px solid black;
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
}

#record_btn-container:hover {
  opacity: 0.9;
}

#record-button {
  display: block;
  height: 100%;
  margin: 0 auto;
}

.active {
  background: rgb(74, 165, 221);
}

.inactive {
  background: rgba(240, 244, 248, 0.9);
}

#settings-btn {
  display: block;
  max-width: 100%;
  height: auto;
  opacity: 0.9;
}

.logo:hover, #settings-btn:hover, #send_button:hover, #cancel-button:hover {
  opacity: 0.7;
}

.logo {
  width: 100%;
  opacity: 0.9;
}

#menu {
  display: none;
  position: absolute;
  width: 180px;
  background: #393a3f;
  z-index: 1;
}

.sub_menu {
  height: 280px;
  display: none;
  flex-direction: column;
}

#start_menu {
  height: 440px;
}

.sub_options {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  max-height: 100%;
  overflow-y: auto;
}

.option {
  display: flex;
  align-items: center;
  gap: 20px;
  min-height: 40px;
  max-height: 40px;
  width: 150px;
  padding: 0 15px;
}

.start {
  gap: 0;
  justify-content: space-between;
  height: 100%;
}

.selected {
  background: rgb(74,165,221);
  color: #121212;
}

.option:hover {
  background: rgba(74, 165, 221, 0.6);
}

.option:hover p {
  color: white;
}

.selected:hover {
  background: rgb(74, 165, 221);
}

.arrow {
  color: rgb(74, 165, 221);
  font-weight: 900;
}

.textbox {
  padding: 10px;
  width: 100%;
  background: #c6c5cd;
  color: black;
  border-radius: 5px;
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
    box-sizing: border-box;
}

form {
  display: flex;
  flex-direction: column;
}

#prompt_form {
  align-content: center;
  text-align: left;
}

#autostop_form {
  padding: 5px;
}

textarea {
  resize: none;
  font: inherit;
}

.autostop_input {
  padding: 0;
  padding-left: 4px;
  margin-bottom: 12px;
  height: 30px;
  width: 50px;
  line-height: 30px;
  overflow-y: hidden;
}

#prompt_input {
  height: 165px;
  width: 150px;
  margin: 10px;
  font-size: smaller;
  padding: 5px;
}

.save {
  width: 60px;
  padding: 8px;
  margin: 0 auto 10px;
  border-radius: 20px;
  background: #2f3138;
  color: rgba(240, 244, 248, 0.9);
  text-align: center;
}

#main-content {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  width: 90%;
  max-width: 900px;
  flex-direction: row;
  gap: 30px;
  margin: 10px auto 100px;
}

.container {
  display: flex;
  position: relative;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: left;
  width: 100%;
  height: 100%;
  padding: 10px;
  background: #393a3f;
  color: rgba(74, 165, 221, 0.78);
  border-radius: 20px;
  box-shadow: 10px 10px 5px rgba(0, 0, 0, 0.5);
  -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
      box-sizing: border-box;
}

#main_avatar {
  margin-top: -60px;
}

#main-content label {
  font-size: larger;
  margin: 10px auto 5px;
}

#mute_button {
  width: 40px;
  position: absolute;
  right: 15px;
  top: 15px;
}

#mute_button:hover {
  opacity: 0.7;
  width: 42px;
  top: 14px;
  right: 14px;
}

#question_input {
  min-height: 60px;
  display: flex;
  align-items: start;
  padding: 0;
  padding-right: 15px;
}

#question {
  width: 100%;
  height: 100%;
  text-align: start;
  background: transparent;
  padding: 10px;
  border-width: 0;
  overflow-y: hidden;
  -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
      box-sizing: border-box;
}

textarea:focus {
  outline: none;
}

#send_button {
  margin-top: 15px;
  height: 30px;
  z-index: 2;
}

#answer-wrapper {
  padding: 0px;
  min-height: 60px;
}

#answer {
  width: 100%;
  height: 100%;
  padding: 10px;
  -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
      box-sizing: border-box;
}

#cancel-button {
  display: none;
  width: 30px;
  margin: 15px;
  margin-bottom: 5px;
  float: right;
}

footer {
  position: absolute;
  bottom: 0;
  right: 0;
  text-align: right;
  padding: 20px;
  font-size: larger;
  font-weight: bold;
}

@media screen and (orientation:portrait) {
  body {
    font-size: 12px;
  }
  #main-content {
    flex-direction: column;
    align-items: center;
    gap: 5px;
    margin-top: 0;
  }
  #record_btn-container {
    width: 90px;
    height: 90px;
    margin: 0 auto;
  }
  .container {
    padding-top: 5px;
  }
  #question, #answer {
    padding: 5px;
  }
  #question_input, #answer-wrapper {
    min-height: 50px;
  }
  #send_button {
    height: 25px;
  }
}

/* loading animation */
.line {
  display: inline-block;
  width: 15px;
  height: 15px;
  border-radius: 15px;
  margin: 0 2px;
  margin-top: 5px;
  background-color: rgb(74, 165, 221);
}

#question_input .loading {
  position: absolute;
  padding-left: 10px;
  margin-top: 10px;
  height: 40px;
  width: calc(100% - 40px);
  background: inherit;
  z-index: 1;
}

.loading .line:nth-last-child(1) {
  animation: loading 0.6s 0.1s linear infinite;
}
.loading .line:nth-last-child(2) {
  animation: loading 0.6s 0.2s linear infinite;
}
.loading .line:nth-last-child(3) {
  animation: loading 0.6s 0.3s linear infinite;
}

@keyframes loading {
  0% {
    transform: translate(0, 0px);
  }
  50% {
    transform: translate(0, 15px);
  }
  100% {
    transform: translate(0, 0px);
  }
}