:root {
  --bg-color: #1b3b5f;
  --card-color: #3e6fa6;
  --txt-color: #e5e5e5;
  --btn-color: #4caf50;
  --extra-color: #ffc107;
}

body {
  height: 100vh;
  background-color: var(--bg-color);
  margin-bottom: 80px;
}

header {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
  color: var(--txt-color);
}

main {
  display: flex;
  align-items: center;
  justify-content: center;
}

h2 > i {
  margin-left: 0.2rem;
  font-size: 25px;
}

.card {
  background: var(--card-color);
  width: 50%;
  height: auto;
  border-radius: 14px;
  box-shadow: 6px 6px 12px #00000077;
  padding-bottom: 1.5rem;
}

.card-title {
  margin: 2rem;
  font-size: 13px;
  color: var(--txt-color);
}

.card-title > h2 {
  font-weight: 700;
}

.money-input {
  margin: 2rem;
  display: flex;
  flex-direction: column;
}

.money-label {
  margin: 0 0 0.2rem 0.75rem;
  font-weight: 700;
  color: var(--txt-color);
  font-size: 17px;
}

.money-input > input {
  width: 80%;
  height: 50px;
  padding: 1rem;
  border-radius: 24px;
  border: 2px solid #000;
  font-size: 16px;
  font-weight: 500;
  transition: all 0.3s ease-in;
}

#moneyInput:focus {
  outline: none;
  border: 2px solid #00aad4;
}

.select-container {
  display: flex;
  align-items: center;
  justify-content: space-around;
  margin-top: 3rem;
}

.countries-select {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.countries-select > label {
  margin-left: 0.5rem;
  font-weight: 600;
  text-transform: uppercase;
}

.countries-select select {
  width: 100%;
  border-radius: 18px;
  background-color: #c0c5cf;
  color: #383333;
  border: 1px solid #ffffff;
  cursor: pointer;
  padding: 0.5rem;
  font-weight: 600;
  transition: all 0.3s ease;
  height: 60px;
}

.countries-select select option {
  background: #c0c5cf;
  color: #383333;
}

.countries-select select:focus {
  outline: none;
  border: 1px solid #00aad4;
}

.arrows {
  font-size: 30px;
}

.arrows-container {
  margin-top: 1rem;
}

#exchangeBtn {
  background: none;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease-in;
}

#exchangeBtn:hover {
  filter: invert(1);
}

.btn-container {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 2rem 2rem 1rem;
}

#convertBtn {
  background: linear-gradient(
    to right,
    var(--btn-color) 25%,
    #019e23 50%,
    #027e1d 75%,
    #194201 100%
  );
  color: var(--txt-color);
  width: 175px;
  height: 60px;
  border: 2px solid #000;
  border-radius: 24px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease-in;
}

#convertBtn:hover {
  transform: scale(1.05);
  filter: brightness(1.12);
  box-shadow: 4px 4px 14px #000;
}

#convertBtn:active {
  opacity: 0.7;
}

#resultContainer {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-weight: 600;
}

#resultContainer p {
  background: var(--extra-color);
  padding: 1rem 1rem 1rem 1rem;
  border: 1px solid #000000;
  border-radius: 16px;
  font-size: 14px;
  box-shadow: 6px 6px 12px #00000077;
}

#result div {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.65rem;
}

#result div p:nth-child(1) {
  background: linear-gradient(
    to right,
    #00aad4 25%,
    #038eb1 50%,
    #026983 75%,
    #1b3b5f 100%
  );

  color: var(--txt-color);

  width: 65%;
}

#result div p:nth-child(2) {
  background: linear-gradient(
    to right,
    #ff91008f 25%,
    #ffc400ab 50%,
    #ffd900b2 75%,
    var(--extra-color) 100%
  );

  width: 65%;

  color: var(--txt-color);
}

.loading-container {
  display: none;
}

.spinner {
  border: 2px solid #e5e5e5;
  border-top: 2px solid #00aad4;
  height: 30px;
  width: 30px;
  margin: 0.65rem auto;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  padding: 0;
}

.blinking {
  overflow: hidden;
  white-space: nowrap;
  border: 2px solid #000000;
  animation: blink 1s ease-in infinite;
}

@keyframes blink {
  50% {
    border-color: transparent;
  }
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

@media (min-width: 280px) and (max-width: 420px) {
  .card {
    width: 90%;
    padding: 0 1rem 1rem;
  }

  .select-container {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .countries-select select {
    width: 80%;
  }

  #result div p:nth-child(1),
  #result div p:nth-child(2) {
    width: 180px;
  }
}

@media (min-width: 420px) and (max-width: 768px) {
  .card {
    width: 85%;
    padding: 0 2rem 2rem;
  }

  .countries-select select {
    width: 80%;
  }
}

@media (min-width: 768px) and (max-width: 1100px) {
  .countries-select select {
    width: 80%;
  }

  .card {
    padding: 0 2rem 2rem;
  }
}
