/***
*
* GLOBAL **
*
***/

html {
  height: 100%;
  min-width: 960px;
}

body {
  font: 18px/24px Roboto, sans-serif;
  font-weight: 400;
  color: #292929;
  height: 100%;
  background-color: #fff;
  position: relative;
  -webkit-font-smoothing: antialiased;
  -moz-font-smoothing: antialiased;
  -o-font-smoothing: antialiased;
}

body.no-select {
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -khtml-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

h1 {
  font-size: inherit;
  margin: 0;
  display: inline;
  font-weight: normal;
  position: relative;
  z-index: 2;
}

p,
ul,
li {
  margin: 0;
  padding: 0;
}

a {
  text-decoration: none;
  color: #3c9;
}

button {
  font-family: inherit;
  font-weight: 500;
  font-size: 18px;
  padding: 8px 70px;
  border: 0;
  border-radius: 6px;
  color: #fff;
  outline: none;
  background: #292929;
  backdrop-filter: blur(4px);
}

button:hover {
  background-color: #434343;
}

#mobile-inter {
  display: none;
}

.value {
  font-weight: 500;
  color: #292929;
}

.value-label {
  color: #292929;
}

.logo-link {
  z-index: 100;
  position: absolute;
  top: 28px;
  left: 50%;
  margin-left: -51px;
  outline: none !important;
  -webkit-transition: top 0.7s, left 0.7s, margin-left 0.7s;
  transition: top 0.7s, left 0.7s, margin-left 0.7s;
  -webkit-transition-timing-function: ease-out;
  transition-timing-function: ease-out;
}

.logo-link.intro {
  top: 40px;
  margin-left: -144px;
  z-index: 2;
}

.logo-link.toggle-final {
  -webkit-transition: top 0s, left 0s, width 0s, margin-left 0s;
  transition: top 0s, left 0s, width 0s, margin-left 0s;
}

.logo {
  font-size: 28px;
  font-weight: 600;
  width: 138px;
  color: transparent;
  -webkit-text-fill-color: transparent;
  background: linear-gradient(124.78deg,
      rgba(255, 0, 0, 0.8) 0%,
      rgba(0, 255, 0, 0.8) 50%,
      rgba(0, 0, 255, 0.8) 100%);
  background-size: 400% 400%;
  background-clip: text;
  -webkit-background-clip: text;
  animation: gradientMove 12s ease infinite;
  transition: width 0.7s ease-out, font-size 0.7s ease-out;
  overflow: visible;
  line-height: 1.2;
}

.gradient-text {
  color: transparent;
  -webkit-text-fill-color: transparent;
  background: linear-gradient(124.78deg,
      rgba(255, 0, 0, 0.9) 0%,
      rgba(0, 255, 0, 0.9) 50%,
      rgba(0, 0, 255, 0.9) 100%);
  background-size: 400% 400%;
  background-clip: text;
  -webkit-background-clip: text;
  animation: gradientMove 10s ease infinite;
  font-weight: 700;
}

.update_title {
  position: relative;
  z-index: 2;
  font-size: 20px;
  padding: 30px 20px 15px;
  font-weight: 500;
  letter-spacing: 0.4px;
}

.update-grid {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px;
  padding: 0 20px 24px;
  margin: 0 auto;
  max-width: 800px;
}

.update {
  position: relative;
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
  padding: 16px 20px 20px;
  margin: 0;
  flex: 1 1 320px;
  max-width: 300px;
  color: #333;
  border: 1px solid #e2e2e2;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
}

.update-title {
  display: inline-block;
  font-size: 18px;
  font-weight: 500;
  line-height: 26px;
}

.update a:hover {
  text-decoration: underline;
}

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

  50% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0% 50%;
  }
}

.logo-link.intro .logo {
  width: 301px;
  font-size: 80px;
}

.logo.toggle-final {
  -webkit-transition: top 0s, left 0s, width 0s, margin-left 0s;
  transition: top 0s, left 0s, width 0s, margin-left 0s;
}

.instant {
  -webkit-transition: width 0s, height 0s;
  transition: width 0s, height 0s;
}

@-webkit-keyframes marching-ants-anim {
  0% {
    background-position: 0 0, 0 100%, 0 0, 100% 0;
  }

  100% {
    background-position: 12px 0, -12px 100%, 0 -12px, 100% 12px;
  }
}

@keyframes marching-ants-anim {
  0% {
    background-position: 0 0, 0 100%, 0 0, 100% 0;
  }

  100% {
    background-position: 40px 0, -40px 100%, 0 -40px, 100% 40px;
  }
}

.marching-ants {
  background-size: 6px 1px, 6px 1px, 1px 6px, 1px 6px;
  background-position: 0 0, 0 100%, 0 0, 100% 0;
  background-repeat: repeat-x, repeat-x, repeat-y, repeat-y;
  -webkit-animation: marching-ants-anim 1s;
  animation: marching-ants-anim 2s;
  -webkit-animation-timing-function: linear;
  animation-timing-function: linear;
  -webkit-animation-iteration-count: infinite;
  animation-iteration-count: infinite;
  -webkit-animation-play-state: running;
  animation-play-state: running;
  background-image: -webkit-linear-gradient(left,
      #fff 50%,
      rgba(255, 255, 255, 0) 50%),
    -webkit-linear-gradient(left, #fff 50%, rgba(255, 255, 255, 0) 50%),
    -webkit-linear-gradient(top, #fff 50%, rgba(255, 255, 255, 0) 50%),
    -webkit-linear-gradient(top, #fff 50%, rgba(255, 255, 255, 0) 50%);
  background-image: linear-gradient(to right,
      #292929 50%,
      rgba(255, 255, 255, 0) 50%),
    linear-gradient(to right, #292929 50%, rgba(255, 255, 255, 0) 50%),
    linear-gradient(to bottom, #292929 50%, rgba(255, 255, 255, 0) 50%),
    linear-gradient(to bottom, #292929 50%, rgba(255, 255, 255, 0) 50%);
}

@-webkit-keyframes color-change {
  0% {
    color: #f26d7d;
  }

  100% {
    color: #292929;
  }
}

@-moz-keyframes color-change {
  0% {
    color: #f26d7d;
  }

  100% {
    color: #292929;
  }
}

@-ms-keyframes color-change {
  0% {
    color: #f26d7d;
  }

  100% {
    color: #292929;
  }
}

@-o-keyframes color-change {
  0% {
    color: #f26d7d;
  }

  100% {
    color: #292929;
  }
}

@keyframes color-change {
  0% {
    color: #f26d7d;
  }

  100% {
    color: #292929;
  }
}

.color-change {
  color: #f26d7d;
  -webkit-animation: color-change 1s linear 1s 1;
  -moz-animation: color-change 1s linear 1s 1;
  -o-animation: color-change 1s linear 1s 1;
  -ms-animation: color-change 1s linear 1s 1;
  animation: color-change 1s linear 1s 1;
}

.support {
  padding: 20px;
}

/***
*
* HUD **
*
***/

/*#hud {
}*/

.hud-inner {
  padding: 37px 0 12px;
  background-color: #fff;
  border-bottom: 1px solid #292929;
  -webkit-transition: all 0.75s linear 0.25s;
  transition: all 0.75s 0.25s;
}

.hud-inner.intro {
  opacity: 0;
}

.score-round-wrapper {
  width: 960px;
  height: 38px;
  margin: 0 auto;
  position: relative;
  border: 0;
  border-image: url(../img/hud-border.gif) 0 0 2;
}

.score-copy-wrapper {
  float: right;
  position: relative;
}

.score-copy,
.round-copy {
  line-height: 20px;
  float: left;
}

#best-score {
  position: absolute;
  right: 0;
  top: 56px;
}

#best-score .value {
  font-size: 18px;
}

.score-copy .value {
  color: #f26d7d;
}

#score-deets {
  width: 34px;
  height: 34px;
  padding: 0;
  margin-top: -6px;
  margin-right: 10px;
  background: url(../img/arrow-sprite.png) no-repeat center 14px;
  float: left;
  z-index: 20;
  border: #292929 1px solid;

  position: relative;
}

#score-deets:hover {
  background-position: center -46px;
  background-color: #f0f0f0;
}

#score-deets.open {
  background-position: center -17px;
}

#score-deets.open:hover {
  background-position: center -77px;
}

#round-scores {
  list-style: none;
  padding: 14px 20px 14px;
  min-width: 100%;
  box-sizing: border-box;
  background-color: #fff;
  border: #292929 1px solid;
  border-radius: 6px;
  position: absolute;
  top: 30px;
  left: 0;
  z-index: 61;
  display: none;
}

#round-scores li {
  padding: 4px;
  white-space: nowrap;
}

#round-scores .value {
  margin-left: 5px;
}

#round-scores .value.scored {
  color: #f26d7d;
}

#round-scores .value.percent {
  margin-left: 0;
}

#height-width {
  text-align: center;
  margin: 18px 0 1px;
}

.width-copy,
.height-copy {
  display: inline;
}

.width-copy {
  margin-right: 60px;
}

/***
*
* INTRO **
*
***/

#intro {
  margin: 0px auto 80px;
  text-align: center;
  position: relative;
  z-index: 0;
}

.intro-text {
  text-align: center;
  margin-bottom: 25px;
  font-size: 18px;
  font-weight: 500;
  line-height: 26px;
  display: inline;
  position: relative;
  z-index: 2;
}

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

  50% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0% 50%;
  }
}

#enter {
  margin: 40px auto 0;
  display: block;
  position: relative;
  z-index: 1;
}

.caveats {
  line-height: 14px;
  font-size: 14px;
  margin: 20px 0px 40px;
  position: relative;
  z-index: 2;
}

.squares-wrapper {
  width: 100%;
  height: 100%;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 0;
}

/* Thanks to @saran5h linkedin.com/in/saranshsinha */

.squares {
  background: transparent;
  -webkit-animation: animSquare 100s linear infinite;
  animation: animSquare 100s linear infinite;
}

.squares:after {
  content: " ";
  position: absolute;
  top: 2000px;
  background: transparent;
}

#squares1 {
  width: 4px;
  height: 4px;
  -webkit-animation-duration: 330s;
  animation-duration: 330s;
}

#squares1:after {
  width: 4px;
  height: 4px;
}

#squares2 {
  width: 6px;
  height: 6px;
  -webkit-animation-duration: 180s;
  animation-duration: 160s;
}

#squares2:after {
  width: 6px;
  height: 6px;
}

#squares3 {
  width: 10px;
  height: 10px;
  -webkit-animation-duration: 80s;
  animation-duration: 70s;
}

#squares3:after {
  width: 10px;
  height: 10px;
}

@-webkit-keyframes animSquare {
  from {
    transform: translateY(0px);
  }

  to {
    transform: translateY(-2000px);
  }
}

@keyframes animSquare {
  from {
    transform: translateY(0px);
  }

  to {
    transform: translateY(-2000px);
  }
}

/***
*
* CANVAS **
*
***/

#canvas {
  position: relative;
  height: 100%;
  height: calc(100% - 139px);
  cursor: crosshair;
  overflow: hidden;
  display: none;
}

.draw-text {
  font: 48px Noto Serif, serif;
  font-weight: 400;
  line-height: normal;
  color: #292929;
  margin: 283px 0 0;
  text-align: center;
  position: relative;
  z-index: 70;
}

#user-rect {
  box-sizing: border-box;
  background: linear-gradient(124.78deg,
      rgba(255, 0, 0, 0.3) 0%,
      rgba(0, 255, 0, 0.3) 50%,
      rgba(0, 0, 255, 0.3) 100%);
  position: absolute;
  z-index: 40;
  left: 0;
  top: 0;
  background-size: 400% 400%;
  animation: gradient 20s ease infinite;
}

#system-rect {
  /*border: 1px dashed #808080;*/
  width: 1px;
  height: 1px;
  box-sizing: border-box;
  /*background-color: rgba(255,255,255,.0);*/
  -webkit-transition: width 0.4s ease-out, height 0.6s ease-in;
  transition: width 0.4s ease-out, height 0.6s ease-in;
  opacity: 0;
  position: absolute;
  left: 0;
  top: 0;
}

.round-feedback {
  display: none;
  font-size: 18px;
  width: 500px;
  text-align: center;
  position: absolute;
  top: 100px;
  left: 50%;
  padding: 20px;
  margin-left: -250px;
  z-index: 60;
  box-sizing: border-box;
  cursor: auto;
}

.unicorn {
  display: none;
  margin: -240px 0 13px;
  position: relative;
  z-index: 120;
}

#round-feedback-message {
  font: 48px Noto Serif, serif;
  font-weight: 400;
  line-height: normal;
  color: #292929;
  margin-bottom: 4px;
}

.round-score {
  margin: 60px 0px 20px;
}

.round-score .value {
  color: #f26d7d;
}

.round-width-height-copy .value {
  font-size: 18px;
  font-weight: 500;
}

.round-width-copy {
  margin-right: 25px;
}

.round-width-score,
.round-height-score {
  color: #f26d7d;
}

.round-accuracy {
  margin-top: 10px;
  display: none;
}

.round-accuracy .value {
  font-size: 18px;
}

.canvas-button {
  display: none;
  margin-top: 60px;
}

/***
*
* FINAL RESULTS **
*
***/

#results {
  margin: -31px auto 70px;
  text-align: center;
  display: none;
  opacity: 0;
  pointer-events: none;
}

#results.visible {
  display: block;
  opacity: 1;
  pointer-events: auto;
}

#results .score-info {
  margin: 0 auto 0;
  text-align: center;
}

#results .total-score-title {
  font-size: 24px;
  text-align: center;
}

#results .total-score-readout {
  font-size: 72px;
  margin: 20px 0;
  line-height: normal;
  color: #292929;
  font: 48px Noto Serif, serif;
  font-style: italic;
  font-weight: 400;
  text-align: center;
}

#results .total-accuracy-readout {
  margin-top: -4px;
  font-size: 18px;
  display: none;
}

#results .total-accuracy-readout .value {
  font-size: inherit;
  color: #f26d7d;
}

#results .scores-readout {
  list-style: none;
  margin-top: 27px;
  /*    width: 700px;*/
  display: inline-block;
  overflow: hidden;
}

#results .scores-readout li {
  font-size: 18px;
  line-height: 26px;
  margin: 0 17px;
  display: inline-block;
  white-space: nowrap;
}

#results .scores-readout li .value {
  font-size: 18px;
  color: #f26d7d;
  padding-left: 5px;
}

#results .scores-readout li .value.tight {
  padding: 0;
}

#results .score-record {
  font-size: 18px;
  line-height: 26px;
  margin: 10px 0 0;
}

#results .score-record .value {
  font-size: 18px;
  color: #f26d7d;
}

#results .score-details {
  margin: 30px 0 60px;
  line-height: 24px;
}

#results .score-details .value-label {
  color: #292929;
  font-weight: 500;
}

#results .score-details .value {
  font-size: 18;
  color: #f26d7d;
}

.sociall-wrapper {
  margin: 60px 0 60px;
}

.sociall-wrapper p {
  text-align: center;
}

.sociall-wrapper .socialize {
  text-align: center;
  margin-top: 37px;
}

.sociall-wrapper .socialize .sociall-button {
  display: inline-block !important;
  width: 40px;
  height: 30px;
  background: transparent no-repeat top left;
  font-size: 1px;
  text-indent: -100px;
  overflow: hidden;
}

.sociall-wrapper .socialize .sociall-button.tweett-button {
  background-image: url(../img/x.svg);
  margin-right: 25px;
}

.sociall-wrapper .socialize .sociall-button.fbb-button {
  background-image: url(../img/facebook.svg);
}

/***
*
* RESTART **
*
***/

#restart-confirm {
  display: none;
  width: 100%;
  height: 100%;
  position: absolute;
  left: 0;
  top: 0;
  z-index: 100;
  background-color: rgba(255, 255, 255, 0.9);
}

#restart-confirm p {
  font: 48px Noto Serif, serif;
  font-style: italic;
  font-weight: 400;
  line-height: normal;
  color: #292929;
  text-align: center;
  margin-top: 183px;
}

#restart-confirm .restart-button {
  display: block;
  width: 200px;
  margin: 20px auto 0;
}

#restart-confirm .restart-button#restart-yes {
  margin-top: 47px;
}

.ad-wrapper {
  padding-bottom: 60px;
  max-width: 600px;
  margin: 40px auto;
  /* background-color: #3c9; */
}

/***
*
* FOOTER **
*
***/

footer {
  font-size: 14px;
  bottom: 15px;
  width: 100%;
  text-align: center;
  position: fixed;
  z-index: 1;
}

.version {
  margin-left: 12px;
}

#feedback {
  background-color: #ffc;
  border: 1px solid #ccc;
  padding: 2px 5px;
  border-radius: 2px;
  font-size: 10px;
  white-space: nowrap;
  position: absolute;
  z-index: 200;
  display: none;
}

/***
*
* TABLET **
*
***/

@media only screen and (max-width: 959px) {
  html.mobi {
    min-width: 0;
  }

  #mobile-inter {
    width: 100%;
    padding: 250px 30px 0;
    text-align: center;
    box-sizing: border-box;
    display: block;
    position: absolute;
  }

  .mobi #hud,
  .mobi #intro,
  .mobi footer {
    display: none;
  }

  .mobi .logo {
    display: none;
  }

  .mobi p {
    font-size: 18;
    line-height: 24px;
    text-align: center;
    width: 440px;
    margin: 0 auto;
  }

  .mobi p.mobi-title {
    font: 48px Noto Serif, serif;
    font-style: italic;
    font-weight: 400;
    line-height: 92px;
    color: #333;
    margin: 0 auto;
  }

  #mobi-close {
    margin-top: 48px;
  }
}

@media only screen and (max-width: 959px) and (orientation: landscape) {
  #mobile-inter {
    padding-top: 150px;
  }
}

/***
*
* MOBILE **
*
***/

@media only screen and (max-width: 640px) {
  #mobile-inter {
    width: auto;
    padding: 0 30px;
    position: absolute;
  }

  .mobi p {
    font-size: 18;
    line-height: 24px;
    width: auto;
    margin: 0;
  }

  .mobi p.mobi-title {
    font-size: 48px;
    line-height: 92px;
    margin: 30px 0 0;
  }

  #mobi-close {
    margin-top: 48px;
  }
}

@media only screen and (max-width: 640px) and (orientation: landscape) {
  #mobi-close {
    margin-top: 15px;
  }

  .mobi p.mobi-title {
    line-height: 80px;
    color: #333;
    margin: 5px 0 0;
  }

  .mobi p.mobi-title {
    line-height: 80px;
    color: #333;
    margin: 5px 0 0;
  }
}
