body {
  padding: 76px 134px;
  display: flex;
  justify-content: center;
  flex-direction: column;
  align-items: center;
}

main {
  max-width: 80rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 108px;
  padding-top: 70px;
}

header {
  color: var(--content-primary);
  display: flex;
  align-items: center;
  gap: 13px;

  & img {
    width: 34px;
  }

  & h2 {
    font-size: 24px;
    font-family: var(--font-display);
    text-transform: uppercase;
  }
}

#logo {
  cursor: pointer;
}

#section-title {
  gap: 108px;
  grid-column: 1;
  grid-row: 1;

  & p {
    background-image: linear-gradient(to right, var(--gradient-content));
    color: transparent;
    background-clip: text;
  }

  & h1 {
    color: var(--content-primary);
  }
}

.info-about {
  width: 386px;

  & article {
    padding-top: 38px;
  }
  & img {
    width: 20px;
  }
  & h4 {
    color: var(--content-brand);
  }
  & p {
    color: var(--content-secondary);
    padding-left: 32.5px;
  }
}

#section-form {
  width: 100%;
  padding-top: 34px;

  grid-column: 2;
  grid-row: 1 / span 2;

  & .content {
    gap: 40px;
    display: flex;
    flex-direction: column;
  }

  & header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0;

    & h3 {
      color: var(--content-primary);
      text-transform: uppercase;
    }
    & p {
      color: var(--content-secondary);
    }
  }

  & .label-form {
    flex-direction: column;
    display: flex;
    color: var(--content-secondary);
    text-transform: uppercase;
    text-align: center;

    width: 86px;
  }

  & .input-form {
    height: 56px;
    border: 1px solid transparent;
    padding: 4px 8px;
    text-align: center;
    outline: none;
    background-color: var(--background-secondary);

    &:hover {
      cursor: text;
    }

    &:focus {
      border: 2px solid transparent !important;
    }
  }

  & #section-inputs {
    display: flex;
    gap: 12px;
  }
}

input[type='number']::-webkit-inner-spin-button,
input[type='number']::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

input[type='number'] {
  -moz-appearance: textfield;
  appearance: textfield;
}

#div-radio {
  color: var(--content-primary);
  display: flex;
  gap: 8px;
  padding: 20px 0 41px 0;
}

.switch {
  position: relative;
  display: inline-block;
  width: 30px;
  height: 20px;

  & input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    margin: 0;

    &:checked + .slider {
      background: linear-gradient(var(--gradient-background));
    }

    &:focus-visible + .slider {
      outline: 2px solid var(--content-brand);
      outline-offset: 2px;
    }

    &:checked + .slider:before {
      -webkit-transform: translateX(10px);
      -ms-transform: translateX(10px);
      transform: translateX(10px);
    }
  }
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--content-tertiary);
  -webkit-transition: 0.4s;
  transition: 0.4s;

  &:before {
    position: absolute;
    content: '';
    height: 14px;
    width: 14px;
    left: 3px;
    bottom: 3px;
    background-color: var(--content-primary);
    -webkit-transition: 0.4s;
    transition: 0.4s;
  }
}

.slider.round {
  border-radius: 34px;

  &:before {
    border-radius: 50%;
  }
}

.button-form {
  position: relative;
  width: 100%;
  padding: 16px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: none;
  background:
    linear-gradient(var(--background-tertiary), var(--background-tertiary)) padding-box,
    linear-gradient(270deg, var(--gradient-border)) border-box;

  & img {
    width: 24px;
    background-color: transparent;
    z-index: 1;
  }

  &:hover {
    & #arrow-img {
      animation: moveSide 2s linear infinite;
    }
  }
}

.gradient-border {
  color: var(--content-primary);
  border: none;
  border: 2px solid transparent;

  border-radius: 8px;

  background: var(--background-tertiary);
  transition:
    background 0.3s ease,
    background-position 0.3s ease;

  &:hover,
  &:focus {
    cursor: pointer;
    background:
      linear-gradient(var(--background-secondary), var(--background-secondary)) padding-box,
      linear-gradient(270deg, var(--gradient-border)) border-box;

    background-size:
      100% 100%,
      400% 400%;
    animation: borderMove 3s linear infinite;
  }
}

.toastify-avatar {
  width: 20px !important;
  height: 20px !important;
  object-fit: cover !important;
  background: transparent !important;
}

.card {
  min-width: 80px;
  min-height: 80px;
  width: fit-content;
  padding: 2px;
  border-radius: 20px;
  display: flex;
  justify-content: center;
  align-items: center;

  position: relative;

  animation: appear 0.6s ease-out forwards;

  &::before {
    width: 100%;
    border-radius: inherit;
    content: '';
    position: absolute;
    inset: 0;

    background: var(--content-brand);
    animation:
      spin 4s 0.6s forwards,
      disappear 0.6s 4s forwards;
  }

  & .number {
    font-size: 48px;
    font-family: var(--font-body);
    font-weight: bold;
    opacity: 0;
    background: transparent;
    color: var(--background-primary);
    animation:
      fade 1s 1.5s forwards,
      color-text 1s 4s forwards;
  }
}

#results {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 40px;
}

#content-result header {
  display: flex;
  align-items: center;

  #result-count {
    text-align: center;
  }
}

.hidden {
  display: none !important;
}

#draw-again {
  animation: fade 2s ease-out forwards;

  &:disabled {
    cursor: not-allowed;
  }
}

@keyframes moveLeft {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-120px);
  }
}

@keyframes borderMove {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

@keyframes moveSide {
  0% {
    transform: translateX(0);
  }
  50% {
    transform: translateX(15px);
  }
  100% {
    transform: translateX(0);
  }
}

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

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

@keyframes appear {
  0% {
    transform: scale(0);
  }

  80% {
    transform: scale(1.1);
  }

  100% {
    transform: scale(1);
  }
}

@keyframes fade {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes disappear {
  from {
    opacity: 1;
  }

  to {
    opacity: 0;
  }
}

@keyframes color-text {
  from {
    color: var(--background-primary);
  }

  to {
    color: var(--content-brand);
  }
}
