@import url('https://fonts.googleapis.com/css2?family=Roboto+Mono:wght@500&display=swap');

body {
  background: linear-gradient(#000000, #0a2129);
  color: #1ae5e5;
  font-family: 'Roboto Mono', monospace;
  font-size: 18px;
  font-weight: bold;
  height: 100%;
  margin: 0;
  overflow-x: hidden;
  padding: 0;
  text-align: center;
}

.generator__wrapper {
  height: 100%;
}

.generator__container {
  display: grid;
  grid-gap: 1em;
  height: 100%;
  margin: 0 auto;
  width: 50%;
}

.generator--alpha,
.generator--num {
  border: 2.5px ridge #61f5f5;
  border-radius: 5px;
  box-shadow: 0 0 2px 1px #12a0a0, inset 0 0 2px 1px #12a0a0;
  height: fit-content;
  padding-bottom: 1em;
}

.generator--alpha {
  padding-bottom: 2em;
}

.generator__header {
  border-bottom: 1px ridge #1ae5e5;
  padding-bottom: 1em;
}

.generator__form {
  display: grid;
  grid-auto-flow: column;
  grid-template-columns: 60% 40%;
}

fieldset {
  border: none;
}

.generator__input__row {
  padding: 0.5em;
}

input[type="text"] {
   /* background-clip: content-box, border-box; */
   background-origin: border-box;
   border: 1px solid;
   border-image: linear-gradient(90deg, #207585, #1a818f, #158d97, #12999f, #16a6a5, #20b2aa, #61f5f5) 1;
   border-radius: 5px !important;
   font-size: 1em;
   padding: 0.25em;
}

button {
  background: linear-gradient(#207585, #1a818f, #158d97, #12999f, #16a6a5, #20b2aa, #61f5f5);
  border: 2.5px inset #61f5f5;
  border-radius: 5px;
  color: white;
  font-family: 'Roboto Mono', monospace;
  font-size: 1em;
  font-weight: bold;
  margin: 0.5em auto;
  padding: 0.75em;
  text-align: center;
  text-transform: uppercase;
}

button:focus,
button:hover {
  background: transparent;
  background-clip: content-box, border-box;
  background-origin: border-box;
  border: 2.5px inset;
  border-image: linear-gradient(90deg, #207585, #1a818f, #158d97, #12999f, #16a6a5, #20b2aa, #61f5f5) 1;
  border-radius: 5px !important;
  color: white;
}

.generator--results {
  display: grid;
  font-size: 2em;
  justify-content: stretch;
  width: 100%;
}

.generator--results__circle {
  align-self: center;
  background: transparent;
  border-radius: 50%;
  box-shadow: 0px 0px 4px 3px #1ae5e5;
  height: 3em;
  margin: 0 auto;
  position: relative;
  width: 3em;
}

.generator--results__circle--outer {
  animation-duration: 2s;
  animation-iteration-count: infinite;
  animation-name: rotate-counterclockwise;
  animation-timing-function: linear;
  border: 6px solid transparent;
  border-bottom-color: #61f5f5;
  border-radius: 50%;
  height: calc(100% + 15px);
  left: -10px;
  position: absolute;
  top: -10px;
  width: calc(100% + 15px);
}

.generator--results__circle--inner {
  animation-duration: 2s;
  animation-iteration-count: infinite;
  animation-name: rotate-clockwise;
  animation-timing-function: linear;
  border: 6px solid transparent;
  border-radius: 50%;
  border-top-color: #61f5f5;
  height: calc(100% + 10px);
  left: -10px;
  position: absolute;
  top: -10px;
  width: calc(100% + 10px);
}

.results {
  padding: 0.75em 0;
}

footer {
  margin: 2em 0;
}

footer a {
  color: #1ae5e5;
  text-decoration: none;
}

footer a:focus,
footer a:hover {
  text-decoration: underline;
}



@keyframes rotate-clockwise {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@keyframes rotate-counterclockwise {
  from {
    transform: rotate(360deg);
  }
  to {
    transform: rotate(0deg);
  }
}



/***** MEDIA QUERIES *****/
@media screen and (min-width: 320px) and (max-width: 430px) {
 main {
    margin: 0 auto;
    min-height: 100vh;
    overflow-x: hidden;
    width: 100%;
  }

  .generator__container {
    margin: 0 0.75em;
    width: 100%;
  }

  .generator--alpha,
  .generator--num {
    width: 90%;
  }

  .generator--num {
    padding-bottom: 2em;
  }

  .generator--alpha .generator__form {
    grid-template-columns: 55% 35%;
  }

  .generator--num .generator__form {
    grid-auto-flow: unset;
    grid-template-columns: none;
    width: 100%;
  }

  footer {
    padding-bottom: 1em;
    position: sticky;
  }
}

@media (prefers-reduced-motion) {
  .generator--results__circle--outer,
  .generator--results__circle--inner {
    animation: none;
  }
}