html, body {
  height: 100%;
  display: flex;
  flex-direction: column;
  font-family: Arial;
  color: #2d3436;
  background-color: #f7f8fc;
  background: linear-gradient(to top left, #f7f8fc, rgba(0, 151, 230, 0.2) 500%);
  padding: 0px;
}

main {
  display: contents;
}

main > * {
  flex-shrink: 0;
  box-shadow: grey 2px 2px 2px;
  border: solid 2px #edeef1;
}

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

.header {
  display: flex;
  flex-direction: column;
  margin-bottom: 5rem;
  min-height: 310px;
  margin: auto;
  margin-bottom: 2rem;
  background-color: #feffff;
  padding: 2rem;
  position: relative;
  width: 360px;
  max-width: 100%;
  margin-top: 5.5rem;
  border-radius: 4px;
}
.header .title-container {
  position: absolute;
  top: -65px;
  width: 380px;
  max-width: 100%;
  right: 20px;
  box-shadow: grey 4px 4px 8px;
  background-color: #1f2833;
  color: #66fcf1;
  border-radius: 4px;
}
.header .title-container h1 {
  margin-bottom: 5rem;
  margin-top: 3rem;
  text-align: center;
  cursor: default;
  font-size: 56px;
}
.header .title-container h1.shake {
  animation: shake 0.5s;
}
@keyframes shake {
  0% {
    transform: translate(5px, 5px) rotate(0deg);
  }
  10% {
    transform: translate(-5px, -10px) rotate(-5deg);
  }
  20% {
    transform: translate(-15px, 0px) rotate(5deg);
  }
  30% {
    transform: translate(15px, 10px) rotate(0deg);
  }
  40% {
    transform: translate(5px, -5px) rotate(5deg);
  }
  50% {
    transform: translate(-5px, 10px) rotate(-5deg);
  }
  60% {
    transform: translate(-15px, 5px) rotate(0deg);
  }
  70% {
    transform: translate(15px, 5px) rotate(-5deg);
  }
  80% {
    transform: translate(-5px, -5px) rotate(5deg);
  }
  90% {
    transform: translate(5px, 10px) rotate(0deg);
  }
  100% {
    transform: translate(5px, -10px) rotate(-5deg);
  }
}
.header .range-container {
  display: flex;
  flex-direction: row;
  margin: auto;
  margin-bottom: 2rem;
}
.header .range-container .range {
  font-size: 20px;
  text-align: center;
  width: 100px;
  height: 80px;
  border-radius: 4px;
  border: #1f2833 solid 1px;
  margin-left: 7px;
  box-shadow: grey 2px 2px 2px;
}
.header .range-container .range:focus {
  outline: none;
}
.header .range-container .buttons-container {
  display: flex;
  flex-direction: column;
}
.header .range-container .buttons-container .button-container {
  position: relative;
}
.header .range-container .buttons-container .button-container input {
  font-size: 20px;
  background-color: #1f2833;
  color: #66fcf1;
  border-radius: 4px;
  box-shadow: grey 2px 2px 2px;
  font-weight: bold;
  border: none;
  width: 38px;
  height: 38px;
  position: absolute;
}
.header .range-container .buttons-container .button-container input:first-child {
  margin-bottom: 2px;
}
.header .range-container .buttons-container .button-container input:hover {
  cursor: pointer;
}
.header .range-container .buttons-container .button-container input:focus {
  outline: none;
}
.header .range-container .buttons-container .button-container input.plus {
  right: 2px;
  top: 0px;
}
.header .range-container .buttons-container .button-container input.plus:hover {
  top: -1px;
}
.header .range-container .buttons-container .button-container input.plus:active {
  top: 1px;
}
.header .range-container .buttons-container .button-container input.minus {
  right: 2px;
  top: 44px;
}
.header .range-container .buttons-container .button-container input.minus:hover {
  top: 43px;
}
.header .range-container .buttons-container .button-container input.minus:active {
  top: 45px;
}
.header .clear-container {
  min-height: 30px;
  max-height: 30px;
  margin: auto;
  margin-bottom: 2rem;
}
.header .clear-container .clear {
  max-width: 120px;
  margin: auto;
  background-color: #1f2833;
  color: #66fcf1;
  border: none;
  cursor: pointer;
  font-size: 36px;
  border-radius: 4px;
  padding: 8px;
  padding-right: 12px;
  padding-left: 12px;
  box-shadow: grey 2px 2px 2px;
}
.header .clear-container .clear:focus {
  outline: none;
}
.header .clear-container .clear:hover {
  margin-top: -1px;
}
.header .clear-container .clear:active {
  margin-top: 1px;
}

.front, .back {
  opacity: 1;
  transition: 0.2s;
}
.front.hidden, .back.hidden {
  display: none;
}
.front.disappear, .back.disappear {
  opacity: 0;
  transition: 0.2s;
}

.back {
  color: #1f2833;
}
.back * {
  margin-bottom: 1rem;
}
.back *:hover {
  cursor: pointer;
}
.back .radio {
  background: #1f2833;
  border: #45a29e 3px solid;
  font-size: 20px;
  border-radius: 4px;
  box-shadow: grey 2px 2px 2px;
}
.back .radio.checked {
  background: #66fcf1;
}
.back .checkbox {
  background: #1f2833;
  border: #45a29e 3px solid;
  font-size: 20px;
  border-radius: 4px;
  box-shadow: grey 2px 2px 2px;
}
.back .checkbox.checked {
  background: #66fcf1;
}

.output {
  flex-grow: 1;
  min-width: calc(100% - 8rem);
  max-width: calc(100% - 8rem);
  word-break: break-word;
  font-size: 42px;
  padding-top: 5rem;
  padding-bottom: 5rem;
  padding-left: 2rem;
  padding-right: 2rem;
  margin-right: 2rem;
  margin-left: 2rem;
  margin-bottom: 5rem;
  background-color: #feffff;
}
.output:focus {
  outline: none;
}

div[data-placeholder]:not(:focus):not([data-div-placeholder-content]):before {
  content: attr(data-placeholder);
  float: left;
  margin-left: 2px;
  color: #b3b3b3;
}

.settings {
  display: flex;
  width: 40px;
  height: 100px;
  margin-top: 6rem;
  margin-left: 330px;
  margin-bottom: -50px;
}
.settings:hover {
  cursor: pointer;
}
.settings .gear {
  position: relative;
  width: 40px;
  height: 40px;
  margin: auto;
  border-radius: 50%;
}
.settings .gear:hover {
  top: -1px;
}
.settings .gear:active {
  top: 1px;
}
.settings .circle {
  z-index: 2;
  position: absolute;
  width: 40px;
  height: 40px;
  margin: auto;
  background: #1f2833;
  border-radius: 50%;
  box-shadow: grey 2px 2px 2px;
}
.settings .centre {
  z-index: 3;
  position: absolute;
  width: 20px;
  height: 20px;
  margin: auto;
  background: #feffff;
  border-radius: 50%;
  top: 10px;
  left: 10px;
}
.settings .tooth {
  position: absolute;
  top: -5px;
  left: 16px;
  width: 9px;
  z-index: 1;
  height: 50px;
  background: #45a29e;
  box-shadow: grey 2px 2px 2px;
}
.settings .tooth:nth-child(3) {
  transform: rotate(45deg);
}
.settings .tooth:nth-child(4) {
  transform: rotate(90deg);
}
.settings .tooth:nth-child(5) {
  transform: rotate(135deg);
}
.settings.spin {
  transition: 0.6s;
  transform: rotate(360deg);
}

.container {
  display: flex;
  justify-content: center;
  min-height: 200px;
}

.share-container {
  position: relative;
  background-color: #1f2833;
  height: 65px;
  padding-left: 10px;
  width: 370px;
  margin: auto;
  border: none;
  border-radius: 4px;
  margin-bottom: 2rem;
  font-family: fontello;
}

.share {
  color: #66fcf1;
  position: absolute;
  width: 60px;
  font-size: 52px;
  padding-top: 6px;
}
.share:nth-child(2) {
  left: 70px;
}
.share:nth-child(3) {
  left: 130px;
}
.share:nth-child(4) {
  left: 190px;
}
.share:nth-child(5) {
  left: 250px;
}
.share:nth-child(6) {
  left: 318px;
}
.share:hover {
  cursor: pointer;
  top: -2px;
}
.share:active {
  top: 2px;
}

@font-face {
  font-family: fontello;
  src: url("./fontello.woff");
}
@media all and (max-width: 800px) {
  body {
    padding: 0px;
  }
  .container {
    padding: 0px;
    max-width: 100%;
  }
  .header {
    padding: 0px;
    margin-top: 0px;
  }
  .header .title-container {
    position: static;
  }
  .settings {
    margin-left: 75%;
    margin-top: 0px;
  }
  .output {
    margin-left: 0px;
    margin-right: 0px;
    min-width: calc(100% - 4rem);
    max-width: calc(100% - 4rem);
  }
  .share-container {
    height: 60px;
    width: 285px;
  }
  .share {
    width: 50px;
    font-size: 40px;
  }
  .share:nth-child(2) {
    left: 55px;
  }
  .share:nth-child(3) {
    left: 100px;
  }
  .share:nth-child(4) {
    left: 145px;
  }
  .share:nth-child(5) {
    left: 190px;
  }
  .share:nth-child(6) {
    left: 242px;
  }
  .share:hover {
    cursor: pointer;
    top: -2px;
  }
  .share:active {
    top: 2px;
  }
}

/* ---- visible keyboard focus (overrides the outline:none rules above) ---- */
.range:focus-visible,
.plus:focus-visible,
.minus:focus-visible,
.clear:focus-visible,
.share:focus-visible,
.settings:focus-visible,
.output:focus-visible {
  outline: 3px solid #45a29e;
  outline-offset: 2px;
}
