* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
html,
body {
  height: 100dvh;
}
body {
  font-family: Arial, Helvetica, sans-serif;
  background-color: #f8f9fa;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  align-items: center;
  justify-content: space-between;
  scroll-behavior: smooth;
}

.container {
  background-color: white;
  padding: 0 0 30px 0;
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  max-width: 600px;
  width: 100%;
  margin-top: 24px;
  flex: 1;
}

.header {
  background-color: #2c3e50;
  color: white;
  padding: 20px 0 0 0;
  border-radius: 10px 10px 0 0;
  display: block;
  position: relative;
  margin-bottom: 20px;
}

.header h1 {
  font-size: 20px;
  margin-bottom: 15px;
  text-align: center;
  width: 100%;
  display: block;
}

.header > .escolha-ia:nth-child(2) {
  display: inline-block;
  vertical-align: top;
  width: 65%;
  box-sizing: border-box;
  margin-bottom: 10px;
}

.header > .escolha-ia:nth-child(3) {
  display: inline-block;
  vertical-align: top;
  width: 34%;
  box-sizing: border-box;
  margin-bottom: 10px;
}

.header > .escolha-ia:nth-child(3) {
  margin-right: 0;
}

.escolha-ia {
  display: flex;
  flex-direction: column;
  padding: 8px 15px;
}

.escolha-ia h2 {
  font-size: 14px;
  margin-bottom: 5px;
  text-align: center;
  width: 100%;
}

.escolha-ia input,
.escolha-ia select {
  background-color: #435464;
  color: white;
  width: 100%;
  padding: 8px;
  border-radius: 5px;
  border: 2px solid #526574;
  box-sizing: border-box;
}

.interaction {
  background-color: white;
  padding: 20px;
}

.interaction label {
  display: block;
  font-weight: bold;
  margin-bottom: 10px;
  color: #2c3e50;
}

#input-box {
  display: flex;
  gap: 10px;
}

textarea {
  flex: 1;
  resize: none;
  padding: 10px;
  border-radius: 5px;
  border: 1px solid #ccc;
}

button {
  background-color: #009dff;
  color: white;
  border: none;
  padding: 9px 15px;
  border-radius: 5px;
  cursor: pointer;
  font-weight: bold;
  height: 75%;
  align-self: flex-end;
  margin-top: auto;
  line-height: normal;
  transition: all ease-in-out 0.2s;
}

button.button_primary:hover {
  background-color: #007acc;
}
.open_history {
  background-color: #4caf50;
}
button.open_history:hover {
  background-color: #429945;
}
.close_history {
  background-color: #f84c4cff;
}
button.close_history:hover {
  background-color: rgb(224, 61, 61);
}

.response {
  background-color: #ffffff;
  padding: 20px;
  border-left: 5px solid #3399ff;
  border-top-left-radius: 5px;
  border-bottom-left-radius: 5px;
  display: none;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  color: #333333;
  font-size: 15px;
  line-height: 1.4;
  min-height: 80px;
  max-width: 100%;
}
.group_button {
  display: flex;
  gap: 12px;
  padding: 16px;
  align-items: center;
  justify-content: center;
}

#history {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 16px;
  line-height: 1.5;
}
#history-list {
  display: none;
  flex-direction: column;
  margin-top: 16px;
  gap: 16px;
}
#history-list li {
  list-style: none;
  line-height: 1.6;
  padding-bottom: 16px;
  border-bottom: 1px solid #81818130;
}

footer {
  background-color: #2c3e50;
  color: #ccc;
  width: 100%;
  padding: 16px;
  text-align: center;
}

@media screen and (max-width: 670px) {
  .header > .escolha-ia:nth-child(2),
  .header > .escolha-ia:nth-child(3) {
    width: 100%;
  }
}

.loader {
  width: 50px;
  height: 50px;
  border: 5px solid #cdcdcd;
  border-bottom-color: #009dff;
  border-radius: 50%;
  display: inline-block;
  box-sizing: border-box;
  animation: rotation 1s linear infinite;
}

@keyframes rotation {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}
