* {
  box-sizing: border-box;
}
:root {
  --percent: 0%;
}
html,
body,
pre {
  margin: 0;
  padding: 0;
}

body {
  font-size: 24px;
  line-height: 1.5;
  background: #271329;
  color: #158c67;
  overflow-x: hidden;
  font-family: "Londrina Solid", sans-serif;
  min-height: 100vh;
}

h1,
h2,
h3,
h4,
h5 {
  font-weight: 400;
}
p {
  margin-top: 1rem;
  line-height: 1;
}
header {
  text-align: center;
  color: white;
  padding: 0 32px;
  z-index: 1;
  flex: 1;
  margin: auto 0;
}

h1 {
  font-size: calc(5vw + 10px);
  margin: 24px 0 0;
  line-height: 1;
}
h1 + p {
  font-size: calc(2vw + 10px);
  color: #ff9800;

  margin-top: 0;
}
p small {
  font-family: Lato, sans-serif;
  font-size: 0.875rem;
  color: #404040;
}
.jstours-bg {
  background-image: url(../images/beach-pirat.svg),
    linear-gradient(rgba(255, 255, 255, 0.1), rgba(11, 38, 6, 0.6)),
    url(../images/landscape-pirats.jpg);
  background-repeat: no-repeat, no-repeat, repeat-x;
  background-size: auto 100vh, cover, auto 200vh;
  background-position: var(--percent) bottom, 0 0,
    calc(4 * var(--percent)) center;
  transition: 1.5s;
  top: 0;

  bottom: 0;
  left: 0;
  width: 100%;
  position: absolute;
}
.content {
  display: flex;
  padding: 2rem;
}
.editor {
  max-width: calc(100% - 3rem);
  flex: 2;
  width: max(50rem, 65vw);
  position: relative;
  font-size: max(12px, 1.5vw);
  margin: auto 0;
}
.markup * {
  font-family: "Source Code Pro", monospace !important;
}
.markup {
  line-height: 1.6;
  border-radius: 4px;
  padding: 12px;
  background: rgba(250, 250, 250, 0.95);
  color: #111;
  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
}
.answer input {
  color: #17848b;
  border: none;
  background: rgba(255, 239, 213, 0.95);
  transition: 0.6s;
  margin-bottom: 1em;
  border: 2px solid transparent;
  font-family: "Source Code Pro", monospace;
}
input::placeholder {
  font-family: "Londrina Solid";
}
.answer input:focus {
  outline: none;
  border: 2px solid #51abff;
}
.answer .ok {
  animation: ok 0.75s;
}
.answer .wrong {
  animation: wrong 0.75s;
}
.hidden {
  animation: hide 3s;
}
.solid-hidden {
  opacity: 0;
}
@keyframes wrong {
  50% {
    background: #ee633f;
  }
}
@keyframes ok {
  50% {
    background: #c2f8e4;
  }
}
@keyframes hide {
  20% {
    opacity: 0;
  }
  80% {
    opacity: 0;
  }
}
@keyframes solidhide {
  20% {
    opacity: 0;
  }
  100% {
    opacity: 0;
  }
}

.shake {
  animation: shake 0.1s 5;
}

@keyframes shake {
  0% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-5px);
  }
  50% {
    transform: translateX(0);
  }
  75% {
    transform: translateX(5px);
  }
}

.enter-button {
  letter-spacing: 2px;
  background: #51abff;
  color: white;
  border: none;
  cursor: pointer;
  transition: 0.5s;
}
.enter-button:hover {
  background: orange;
}
.answer * {
  padding: 12px;
  font: inherit;
  width: 100%;
  border-radius: 4px;
}
@media screen and (min-width: 768px) {
  .answer {
    display: flex;
  }
  .editor input {
    flex: 2;
    border-radius: 4px 0 0 4px;
    margin: 0;
  }
  .enter-button {
    border-radius: 0 4px 4px 0;
    width: auto;
  }
}

progress {
  width: calc(100vh - 72px);
  position: fixed;
  top: calc(100vh - 60px);
  left: calc(100% - 22px);
  transform-origin: 0 0;
  transform: rotate(-90deg);
  /* Reset the default appearance */
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;

  height: 10px;

  /* Firefox */
  border: none;
  background: #fff;
  border-radius: 3px;
  box-shadow: none;
}

progress::-webkit-progress-bar {
  background: #fff;
  border-radius: 3px;
}

progress::-webkit-progress-value {
  background-color: #158c67;
  border: 2px solid white;
  border-radius: 3px;
}

progress::-moz-progress-bar {
  background-color: #158c67;
  border-radius: 3px;
}

footer {
  position: absolute;
  bottom: 0;
  left: 0;
  color: white;
  background: black;
  font-size: 14px;
  font-family: "Lato", sans-serif;
  padding: 0 1rem;
}
footer .wrapper {
  height: 48px;
  display: flex;
  max-width: 720px;
  margin: auto;
  justify-content: space-between;
  align-items: center;
}

footer a {
  color: inherit;
  opacity: 0.5;
  text-decoration: none;
}

.question {
  padding: 3px;
  border: 3px solid #51abff;
  position: relative;
  margin-top: 1rem;
  background: #51abff77;
}
.question:after {
  content: "";
  position: absolute;
  left: 2rem;
  bottom: -2rem;
  width: 0;
  border-left: 2px solid;
  border-color: inherit;
  height: 2rem;
}

.winner strong {
  font-size: 64px;
}

.reset-progress {
  display: inline-block;
  text-align: center;
  text-decoration: none;
  position: relative;
  border: solid 1px rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.4);
  padding: 0 6px;
  height: 24px;
  line-height: 24px;
  background: transparent;
}

.token.operator {
  background: transparent;
}

@keyframes star {
  0% {
    background-position: 0 center;
    transform: rotate(0);
  }
  100% {
    background-position: 400% center;
    transform: rotate(0deg);
  }
}

.bounceIn {
  display: inline-block;
  animation: bounceIn 2s 1;
  animation-fill-mode: both;
}

@keyframes bounceIn {
  0% {
    opacity: 0;
    transform: scale3d(0.3, 0.3, 0.3);
  }
  20% {
    transform: scale3d(1.1, 1.1, 1.1);
  }
  40% {
    transform: scale3d(0.9, 0.9, 0.9);
  }
  60% {
    opacity: 1;
    transform: scale3d(1.03, 1.03, 1.03);
  }
  80% {
    transform: scale3d(0.97, 0.97, 0.97);
  }
  100% {
    opacity: 1;
    transform: scale3d(1, 1, 1);
  }
}
