* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html,
body {
  max-width: 100%;
  overflow-x: hidden;
}
body {
  height: 100vh;
  background: linear-gradient(
      180deg,
      rgb(16 41 79 / 95%) 20%,
      rgba(7, 39, 87, 0.84) 40.48%,
      rgba(3, 38, 90, 0.75) 65.02%,
      rgba(8, 58, 131, 0.6) 87.29%,
      rgba(0, 69, 172, 0.4) 100%
    ),
    url(290f1e2e529b3d035705.jpg);
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
  color: #f4f4f2;
  font-size: 62.5%;
  font-family: "Poppins", sans-serif;
}
.show {
  display: none;
}
.container {
  width: 90%;
  margin-left: auto;
  margin-right: auto;
  padding: 1rem;
  display: flex;
  align-items: center;
}
header {
  margin-bottom: 2rem;
}
header h1 {
  text-align: center;
  font-size: 2.4rem;
  font-weight: bold;
  text-transform: uppercase;
}
@media (max-width: 991px) {
  header h1 {
    font-size: 1.8rem;
  }
}
.content {
  display: flex;
  justify-content: space-around;
  align-items: center;
  font-size: 2rem;
  width: 100%;
}
.unit {
  width: 49%;
  margin-bottom: 2rem;
}
@media (max-width: 991px) {
  .content {
    flex-direction: column;
  }
  .unit {
    width: 100%;
    text-align: center;
    margin-bottom: 0.3rem;
  }
}
h3 {
  margin-bottom: 1rem;
  text-align: center;
}
.select {
  position: relative;
}
.select,
.amount {
  display: flex;
  justify-content: space-around;
  margin-bottom: 2rem;
}
.select > p:first-child,
.amount > p:first-child,
.amount > label:first-child {
  white-space: nowrap;
}
@media (max-width: 991px) {
  .select,
  .amount {
    flex-direction: column;
  }
}
.base-currency,
.converted-currency {
  display: inline-block;
  padding: 1rem 1.2rem;
  border: none;
  outline: none;
  border-radius: 0.6rem;
  background-color: rgba(3, 38, 90, 0.75);
  color: #f4f4f2;
  flex: 1;
  text-align: right;
  font-size: 1.4rem;
  cursor: pointer;
}
.base-currency img,
.converted-currency img {
  vertical-align: middle;
}
.base-currency *,
.converted-currency * {
  margin-left: 1rem;
}
.base-code,
.convert-code {
  display: inline-block;
  margin-right: 1rem;
}
#amount-from,
.amount-to {
  border: none;
  outline: none;
  padding: 1rem 1.5rem;
  color: #f4f4f2;
  border-radius: 0.6rem;
  background-color: rgba(3, 38, 90, 0.75);
  width: 60%;
  height: 4rem;
  font-size: 2rem;
}
@media (max-width: 991px) {
  #amount-from,
  .amount-to {
    width: 100%;
  }
}
.base-list,
.converted-list {
  height: 20rem;
  max-height: 20rem;
  overflow-y: auto;
  position: absolute;
  top: 100%;
  right: 0;
  z-index: 1;
  background-color: rgba(3, 38, 90, 0.9);
}
.base-list li,
.converted-list li {
  font-size: 1.4rem;
  padding: 1rem;
  border-top: 1px solid #d4d4d2;
  cursor: pointer;
}
@media (max-width: 991px) {
  .base-list,
  .converted-list {
    height: 20rem;
    max-height: 20rem;
  }
  .base-list li,
  .converted-list li {
    padding: 0;
  }
}
.base-list li:hover,
.converted-list li:hover {
  background-color: rgb(3, 55, 90);
}
.base-list li *,
.converted-list li * {
  margin-right: 1rem;
}
.convert {
  background-color: rgba(3, 38, 90, 0.75);
  color: #f4f4f2;
  padding: 1.5rem 2.5rem;
  font-weight: bold;
  border: none;
  border-radius: 0.4rem;
  cursor: pointer;
}
@media (max-width: 991px) {
  .convert {
    order: 3;
  }
}
.icon {
  max-width: 5%;
  width: 5%;
}
.error {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 80%;
  height: 80%;
  margin: auto;
  padding: 1rem;
  background: linear-gradient(
      180deg,
      rgb(16 41 79 / 95%) 20%,
      rgba(7, 39, 87, 0.84) 40.48%,
      rgba(3, 38, 90, 0.75) 65.02%,
      rgba(8, 58, 131, 0.6) 87.29%,
      rgba(0, 69, 172, 0.4) 100%
    ),
    url(290f1e2e529b3d035705.jpg);
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
  color: #f4f4f2;
  position: absolute;
  top: 10%;
}
.error button {
  display: flex;
  justify-content: center;
  align-items: center;
  border: none;
  outline: none;
  background-color: red;
  color: #f4f4f2;
  font-size: 2.8rem;
  padding: 1rem;
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  width: 4rem;
  height: 4rem;
  border-radius: 50%;
  cursor: pointer;
}

