@import url("https://fonts.googleapis.com/css?family=Comfortaa");
html, body {
  margin: 0;
  overflow: hidden;
  height: 100%;
  width: 100%;
  position: relative;
  font-family: 'Comfortaa', cursive;
}

#container {
  width: 100%;
  height: 100%;
}
#container #score {
  position: absolute;
  top: 20px;
  width: 100%;
  text-align: center;
  font-size: 10vh;
  -webkit-transition: -webkit-transform 0.5s ease;
  transition: -webkit-transform 0.5s ease;
  transition: transform 0.5s ease;
  transition: transform 0.5s ease, -webkit-transform 0.5s ease;
  color: #333344;
  -webkit-transform: translatey(-200px) scale(1);
          transform: translatey(-200px) scale(1);
}
#container #game {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
}
#container .game-over {
  position: absolute;
  top: 0;
  left: 0;
  margin-top: -4rem;
  width: 100%;
  height: 85%;
  display: -webkit-box;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
          flex-direction: column;
  -webkit-box-align: center;
          align-items: center;
  -webkit-box-pack: center;
          justify-content: center;
}
#container .game-over * {
  -webkit-transition: opacity 0.5s ease, -webkit-transform 0.5s ease;
  transition: opacity 0.5s ease, -webkit-transform 0.5s ease;
  transition: opacity 0.5s ease, transform 0.5s ease;
  transition: opacity 0.5s ease, transform 0.5s ease, -webkit-transform 0.5s ease;
  opacity: 0;
  -webkit-transform: translatey(-50px);
          transform: translatey(-50px);
  color: #fff;
}
#container .game-over h2 {
  margin: 0;
  padding: 0;
  font-size: 40px;
  text-shadow: 0 -1px 1px rgb(6 5 5);
  color: #8c8e90;
  transition: all 0.2s ease;
}
.end_button{
  display: flex;
  margin-top: 2rem;
  z-index: 111;
}
#container.ended .game-over {
  opacity: 1;
}
#container .game-over {
  opacity: 0;
}
#start-button,#ranking-button,#more-button{
  cursor: pointer;
}
#retry-button,#home-button{
  padding: 10px;
}
.game-over #retry-button button:hover,.game-over #home-button button:hover{
  transform: scale(1.1);
}
.game-over #retry-button button,.game-over #home-button button{
  opacity: 1;
  transition: transform .2s;
  -webkit-transform: translatey(0);
  transform: translatey(0);
  /* color: #ff0000; */
  margin-top: 0rem;
  padding: 8px 40px;
  border: 0px solid #000;
  font-size: 30px;
  background: #fff0;
  cursor: pointer;
  outline: none;
  text-shadow: 0 -1px 1px rgb(6 5 5);
  color: #8c8e90;
  box-shadow: 0 0 0 1px #5fc9ce6b inset, 0 0 0 2px rgb(255 255 255 / 10%) inset, 0.3px 5px 0 0 #326b6852, 0 8px 8px 1px rgb(0 0 0 / 37%);
  background-color: #72e8ac69;
  transition: all 0.2s ease;
  border-radius: 10px;
}
#container .game-ready {
  position: absolute;
  top:90px;
  left: 0;
  width: 100%;
  height: 100%;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  flex-direction: column;
  -webkit-box-align: center;
  align-items: center;
  justify-content: end;
}
#container .game-ready #logo{
  opacity: 0;  
  top: -30px;
  height: 0px;
}
.playing .logo img,.ended .logo img{
  height: 0px;
}
.playing  .game-ready #start-button,
.playing  .game-ready #ranking-button,
.playing  .game-ready #more-button,
.ended  .game-ready #start-button,
.ended  .game-ready #ranking-button,
.ended  .game-ready #more-button{
  height: 0px !important;
}
#container.ready .game-ready #logo:hover{
 cursor: pointer;
}
#container.ready .game-ready #start-button:hover,#container.ready .game-ready #ranking-button:hover,#container.ready .game-ready #more-button:hover {
  transform: scale(1.1);
}
#container .game-ready #logo,#container .game-ready #start-button,#container .game-ready #ranking-button,#container .game-ready #more-button {
  -webkit-transition: opacity 0.5s ease, -webkit-transform 0.5s ease;
  transition: opacity 0.5s ease, -webkit-transform 0.5s ease;
  transition: opacity 0.5s ease, transform 0.5s ease;
  transition: opacity 0.5s ease, transform 0.5s ease, -webkit-transform 0.5s ease;
  opacity: 0;
  -webkit-transform: translatey(-50px);
          transform: translatey(-50px);
  /* border: 3px solid #333344; */
  padding: 10px 20px;
  background-color: transparent;
  color: #333344;
  font-size: 30px;
  width: 200px;
  text-align: center;
}
.logo{
  bottom: 1rem;
  position: absolute;
}
#container #instructions {
  position: absolute;
  width: 100%;
  top: 16vh;
  left: 0;
  text-align: center;
  -webkit-transition: opacity 0.5s ease, -webkit-transform 0.5s ease;
  transition: opacity 0.5s ease, -webkit-transform 0.5s ease;
  transition: opacity 0.5s ease, transform 0.5s ease;
  transition: opacity 0.5s ease, transform 0.5s ease, -webkit-transform 0.5s ease;
  opacity: 0;
  text-shadow: 0 -1px 1px rgb(6 5 5);
  color: #8c8e90;
}
#container #instructions.hide {
  opacity: 0 !important;
}
#container.playing #score, #container.resetting #score {
  -webkit-transform: translatey(0px) scale(1);
  transform: translatey(0px) scale(1);
  text-shadow: 0 -1px 1px rgb(6 5 5);
  color: #8c8e90;
}
#container.playing #instructions {
  opacity: 1;
}
#container.ready .game-ready .logo{
  opacity: 1;
}
#container.ready .game-ready #logo{
  opacity: 1;
  transition: transform .2s !important;
  position: absolute;
  left: 0;
  height: 90px;
}
#container.ready .game-ready #start-button,#container.ready .game-ready #ranking-button,#container.ready .game-ready #more-button {
  opacity: 1;
  -webkit-transform: translatey(0);
  transform: translatey(0);
  margin: 20px 0px;
  text-shadow: 0 -1px 1px rgb(6 5 5);
  color: #8c8e90;
  box-shadow: 0 0 0 1px #5fc9ce6b inset, 0 0 0 2px rgb(255 255 255 / 10%) inset, 0.3px 5px 0 0 #326b6852, 0 8px 8px 1px rgb(0 0 0 / 37%);
  background-color: #72e8ac69;
  transition: all 0.2s ease;
  border-radius: 10px;
  transition: transform .2s !important;
}
#container.ended #score {
  -webkit-transform: translatey(6vh) scale(1.5);
          transform: translatey(6vh) scale(1.5);
          text-shadow: 0 -1px 1px rgb(6 5 5);
  color: #8c8e90;
  transition: all 0.2s ease;
}
#container.ended .game-over * {
  opacity: 1;
  -webkit-transform: translatey(0);
          transform: translatey(0);

}
#container.ended .game-over p {
  -webkit-transition-delay: 0.3s;
          transition-delay: 0.3s;
}
.logo img{
  width: 260px;
  margin-left: -1rem;
}
@media screen and (max-width: 1366px) {
  #container .game-ready {
    top: 35px;
  }
  #container .game-ready #logo {
    top: 10px;
}
}
@media screen and (max-width: 1280px) {
  #container.ready .game-ready #start-button, #container.ready .game-ready #ranking-button, #container.ready .game-ready #more-button {
    margin: 20px 0px;
  }
}
@media screen and (max-width: 768px) {
  #container .game-over {
    margin-top: -3rem;
    height: 100%;
}
.game-over #retry-button button, .game-over #home-button button {
  padding: 8px 30px;
}
#container .game-ready #start-button, #container .game-ready #ranking-button, #container .game-ready #more-button {
  text-align: center;
  padding: 12px 20px;
}
#container .game-ready #logo {
  top: auto;
  bottom: 30px !important;
}
#container .game-ready {
  top: 95px;
}
}
@media screen and (max-width: 600px) {

#container .game-ready #logo {
  top: auto;
  bottom: -20px !important;
}
#container .game-ready {
  top: 35px;
}
}
@media screen and (max-width: 480px) {
  #container .game-ready #start-button, #container .game-ready #ranking-button, #container .game-ready #more-button {
    font-size: 20px;
    width: 160px;
  }
  #container .game-ready #logo {
    bottom: -50px !important;
    left: -10px;
  }
  #container .game-ready {
    top: 20px;
  }
}
@media screen and (max-width: 340px) {
  #container .game-ready #start-button, #container .game-ready #ranking-button, #container .game-ready #more-button {
    padding: 6px 20px;
    font-size: 20px;
    width: 160px;
  }
  .logo {
    bottom: -.5rem;
  }
  .logo img {
    width: 160px;
    margin-left: 0;
  }
  #container .game-ready #logo {
    left: -40px !important;
  }
}
@media screen and (max-width: 920px) and (orientation: landscape) {
  #container .game-over {
    margin-top: 0rem;
    height: 100%;
}
.end_button {
  display: flex;
  margin-top: 0rem;
}
#container.ready .game-ready #start-button, #container.ready .game-ready #ranking-button, #container.ready .game-ready #more-button {
  margin-top: 20px 0px !important;
  padding: 6px 20px;
  font-size: 20px;
  width: 160px;
}
.logo {
  top: .4rem;
  left: 10px;
}
.logo img{
  width: 200px;
}
}
@media screen and (max-width: 520px) and (orientation: landscape) {
  .logo {
    bottom: 0rem;
    left: 10px;
    top: auto;
  }
  #container .game-ready #start-button, #container .game-ready #ranking-button, #container .game-ready #more-button {
    font-size: 18px;
    width: 120px;
    margin-top: .6rem !important;
  }
  .logo img {
    width: 150px;
  }
}