* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: Cambria, Cochin, Georgia, Times, "Times New Roman", serif;
}
body {
  background: linear-gradient(#18181868, #20201e56),
    url("./img/curr-image.webp");
  background-size: cover;
  background-position: center;
}
.container {
  margin: 10vh auto;
  background-color: #ffffe0;
  padding: 2rem;
  border-radius: 1rem;
  height: auto;
  width: 45vw;
  box-shadow: 0 1rem 2rem rgba(0, 0, 0, 0.25);
}
h1 {
  text-decoration: underline;
  font-size: 2.2rem;
  text-align: center;
  color: #242124;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
}
form {
  margin: 1.5rem 0rem 2rem 0rem;
}
form input,
select,
button {
  width: 100%;
  border: none;
  outline: none;
}
.amount p {
  font-size: 1.3rem;
}
form input {
  border: 1px solid gray;
  border-radius: 0.25rem;
  font-size: 1rem;
  height: 2rem;
  margin-top: 0.5rem;
  padding-left: 0.5rem;
}
.dropdown {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 2rem;
}

.select-container img {
  max-width: 2rem;
}
.select-container {
  display: flex;
  justify-content: center;
  align-items: center;
  border: 1px solid gray;
  border-radius: 0.25rem;
  background-color: #ffffff;
  margin-top: 0.5rem;
  padding: 0 0.5rem;
}
.select-container select {
  font-size: 1rem;
  width: auto;
  cursor: pointer;
}
#swap {
  outline: none;
  border: none;
  background-color: transparent;
  width: auto;
  background-color: inherit;
}
#swap i {
  font-size: 1.5rem;
  margin-top: 1.75rem;
  color: #242124;
  cursor: pointer;
  transition: transform 0.25s ease, opacity 0.25s ease;
}
#swap i:active {
  transform: rotate(180deg);
  opacity: 0.6;
}
.msg {
  margin-top: 2rem;
  text-align: center;
  font-size: 1.7rem;
  font-weight: bold;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
  color: #242124;
}
#getRateBtn {
  margin-top: 1.7rem;
  padding: 1rem;
  background: linear-gradient(#3e5622, #263415e8);
  color: #ffffff;
  border-radius: 0.5rem;
  font-size: 1.3rem;
  cursor: pointer;
}
#getRateBtn:active {
  background: linear-gradient(#3e5622e8, #263415);
}
#getRateBtn:disabled {
  opacity: 0.9;
  transition: opacity 0.2s ease;
}

@keyframes shake {
  0% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-10px);
  }
  50% {
    transform: translateX(10px);
  }
  75% {
    transform: translateX(-10px);
  }
  100% {
    transform: translateX(0);
  }
}

.shake {
  animation: shake 0.2s;
}

/* ----------Responsive-------- */

@media (max-width: 1024px) {
  .container {
    width: 60vw;
    height: auto;
    padding: 2rem;
  }

  h1 {
    font-size: 2.1rem;
  }

  .amount p {
    font-size: 1.25rem;
  }

  .msg {
    font-size: 1.6rem;
  }

  #getRateBtn {
    font-size: 1.2rem;
    padding: 1rem;
  }
}

@media (max-width: 768px) {
  .container {
    width: 80vw;
    height: auto;
    padding: 1.8rem;
  }

  h1 {
    font-size: 2rem;
  }

  .msg {
    font-size: 1.5rem;
  }
}

@media (max-width: 480px) {
  body {
    background-position: center;
  }

  .container {
    width: 90vw;
    height: auto;
    margin: 8vh auto;
    padding: 1.5rem;
    border-radius: 0.8rem;
  }

  h1 {
    font-size: 1.7rem;
  }

  .amount p {
    font-size: 1.1rem;
  }

  form input {
    height: 2.4rem;
    font-size: 1rem;
  }

  .dropdown {
    gap: 0.6rem;
  }

  .select-container img {
    max-width: 1.6rem;
  }

  .select-container select {
    font-size: 0.95rem;
  }

  #swap i {
    font-size: 1.3rem;
    margin-top: 2rem;
  }

  .msg {
    font-size: 1.3rem;
  }

  #getRateBtn {
    font-size: 1.1rem;
    padding: 0.9rem;
  }
}

@media (max-width: 360px) {
  h1 {
    font-size: 1.5rem;
  }

  #swap i {
    font-size: 1.1rem;
  }

  .msg {
    font-size: 1.2rem;
  }

  #getRateBtn {
    font-size: 1rem;
  }
}
