:root {
  --border-radius: 10px;
  --primary-color: rgb(119 27 207 / 63%);
  --color-text: rgb(120, 27, 207);
  --box-shadow: rgba(0, 0, 0, 0.07) 0px 1px 2px, rgba(0, 0, 0, 0.07) 0px 2px 4px,
    rgba(0, 0, 0, 0.07) 0px 4px 8px, rgba(0, 0, 0, 0.07) 0px 8px 16px,
    rgba(0, 0, 0, 0.07) 0px 16px 32px, rgba(0, 0, 0, 0.07) 0px 32px 64px;
  --transition: all ease-in-out 600ms;
}
body {
  font-family: "Zain", serif;
  background: linear-gradient(rgb(255, 255, 255, 0.3), rgb(255, 255, 255, 0.3)),
    url("../media/bg-img.jpg");
  background-size: cover;
}
.hidden {
  display: none;
}
.container,
form,
h1 {
  border-radius: var(--border-radius);
}
.container,
footer {
  max-width: 700px;
  width: 85%;
  padding: 15px;
}
.container,
h1,
form,
section,
small,
footer p {
  box-shadow: var(--box-shadow);
}
.container {
  margin: 120px auto 30px;
  background-image: url("../media/main-bg-img.jpg");
  background-size: contain;
}
h1 {
  font-family: "Smythe", serif;
  width: fit-content;
  padding: 10px;
  background-color: white;
  margin: 22px auto;
}
form {
  background: linear-gradient(
    rgba(250, 146, 197, 0.75),
    15%,
    rgba(250, 146, 197) 30%,
    90%,
    rgba(250, 146, 197, 0.75)
  );
  padding: 20px;
}
.user-input-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 30px;
  font-size: 19px;
}
fieldset {
  border: 1px solid pink;
  border-radius: var(--border-radius);
  padding: 30px 15px;
}
fieldset legend,
.input-wrapper,
input {
  text-align: center;
}
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
  -webkit-box-shadow: 0 0 0 30px white inset !important;
  -webkit-text-fill-color: var(--primary-color);
}
.radio-buttons-wrapper div,
.input-wrapper label {
  line-height: 1.5;
}
.radio-button {
  accent-color: var(--primary-color);
}
.culture,
.length {
  padding: 8px 15px;
  border-radius: calc(var(--border-radius) - 5px);
  border: none;
  color: var(--color-text);
  width: 200px;
  font-weight: 600;
}
.culture:focus,
.length:focus {
  outline: 2px solid var(--primary-color);
}
.culture::placeholder,
.length::placeholder {
  color: var(--color-text);
  opacity: 0.4;
  font-weight: normal;
}
.submit-button {
  display: block;
  margin: 20px auto;
  padding: 10px 15px;
  border: none;
  border-radius: calc(var(--border-radius) - 2px);
  background-color: var(--primary-color);
  color: white;
  box-shadow: var(--box-shadow);
  transition: var(--transition);
}
.submit-button:hover,
.submit-button:focus-visible {
  color: var(--color-text);
  outline: 2px solid var(--primary-color);
  background: white;
  cursor: pointer;
}
section {
  background: linear-gradient(
    rgba(135, 207, 235, 0.75),
    15%,
    rgba(135, 207, 235) 30%,
    90%,
    rgba(135, 207, 235, 0.75)
  );
  border-radius: var(--border-radius);
  margin: 20px auto 0px;
  display: flex;
  justify-content: center;
  align-items: center;
  line-height: 1.4;
  padding: 60px 20px;
}
section,
small,
footer {
  text-align: center;
}
span.generating,
section,
footer p {
  font-size: 19px;
}
span.generating,
small {
  display: block;
  opacity: 0.9;
}
small,
footer {
  border-radius: var(--border-radius);
}
small {
  margin: 20px auto 0;
  padding: 10px;
  font-size: 14.5px;
  background: linear-gradient(
    rgb(189, 254, 214, 0.75),
    15%,
    rgb(189, 254, 214) 30%,
    90%,
    rgb(189, 254, 214, 0.75)
  );
}
footer {
  display: block;
  margin: 0 auto 50px;
  background: url("../media/footer-bg-img.jpg");
  background-size: cover;
  background-repeat: no-repeat;
  box-shadow: var(--box-shadow);
}
footer p {
  background: linear-gradient(
    rgba(201, 142, 255, 0.75),
    15%,
    rgba(201, 142, 255) 30%,
    90%,
    rgba(201, 142, 255, 0.75)
  );
  border-radius: var(--border-radius);
  margin: 0;
  padding: 25px 20px;
}
footer a {
  color: rgb(132, 1, 71);
  transition: var(--transition);
}
footer a:hover,
footer a:focus-visible {
  color: rgb(202, 21, 117);
}
.generating {
  animation: blink-animation 1000ms steps(5, start) infinite;
}
@keyframes blink-animation {
  to {
    visibility: hidden;
  }
}

@media (max-width: 670px) {
  h1 {
    font-size: 30px;
  }
  .user-input-container {
    flex-direction: column;
    padding: 30px 20px;
  }
  .radio-buttons-wrapper {
    margin-bottom: 40px;
  }
  span.generating,
  small {
    opacity: 1;
  }
  form {
    background: linear-gradient(
        rgb(252, 126, 187, 0.65),
        rgb(252, 126, 187, 0.65)
      ),
      url("../media/texture.png");
  }
  section {
    background: linear-gradient(
        rgba(135, 207, 235, 0.6),
        rgba(135, 207, 235, 0.6)
      ),
      url("../media/texture.png");
  }
  small {
    background: linear-gradient(
        rgb(189, 254, 214, 0.5),
        rgb(189, 254, 214, 0.5)
      ),
      url("../media/texture.png");
    background-position: center;
  }
  footer p {
    background: linear-gradient(
        rgba(187, 120, 249, 0.5),
        rgba(187, 120, 249, 0.5)
      ),
      url("../media/texture.png");
  }
  form,
  section,
  small,
  footer p {
    background-size: cover;
  }

  @media (max-width: 360px) {
    .user-input-container {
      padding: 30px 0;
    }
    fieldset {
      padding: 30px 5px;
    }
    .culture,
    .length {
      width: 80%;
    }
  }
}
