@font-face {
  font-family: 'game-font';
  src: url('font/motion-control-bold.ttf') format('truetype');
}
* {
  box-sizing: border-box;
  user-select: none;
}
html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  margin: 0;
  padding: 0;
}
body {
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 4vh;
  font-family: game-font;
  background: linear-gradient(to bottom, #0C7A4D 0%, #22A146 50%, #95CE49 85%);
}
.game-container-wrapper {
  width: 100%;
  max-width: 420px;
}
.game-container-inner {
  padding-top: 180%;
  height: 0;
  position: relative;
}
.fill-abs {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
}
.congrate {
  pointer-events: none;
  transform: scale(1.5);
  opacity: 0;
  max-width: 90%;
  transition: all 0.2s ease;
  position: relative;
  z-index: 9;
}
.congrate.show {
  transform: scale(1);
  opacity: 1;
}
.bg-cover {
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
}
.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}
#game-container {
  /* background: url(images/g-bg.jpg) no-repeat center; */
  background: #67B641;
  position: relative;
  width: 800px;
  height: 800px;
  overflow: hidden;
  border-radius: 10px;
}
#game-container::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 12%;
  background: url(images/g-bg-grass.png) no-repeat center top;
  background-size: cover;
}
.fill-abs2 {
  width: 100% !important;
  margin-left: 0 !important;
}
.game-screen {
  display: none;
  overflow: hidden;
}
.game-pane-holder {
  width: 96%;
  padding-top: 96%;
  position: relative;
}
.full-width .game-pane-holder {
  width: 70%;
  padding-top: 70%;
}
#game-pane {
  display: flex;
  flex-wrap: wrap;
}
.game-cell {
  width: 14.285%;
  height: 14.285%;
  border: 0.1vw solid #67B641;
}
.game-cell:nth-child(2n) {
  background: url(images/cell-1.png) no-repeat center;
  background-size: cover;
}
.game-cell:nth-child(2n + 1) {
  background: url(images/cell-2.png) no-repeat center;
  background-size: cover;
}
.game-cell:not(.inactive) {
  cursor: pointer;
  background: linear-gradient(to bottom, #25731F 0%, #25962E 7%, #36AF2C 25%);
}
.item-f .game-cell:not(.inactive):hover,
.item-fly .item.in-cell:hover,
.item-shovel .item.in-cell:hover {
  box-shadow: inset 0 0 5px 2px rgba(255, 255, 255, 0.6);
}
img {
  max-width: 100%;
  height: auto;
}
.menu {
  position: absolute;
  left: 10%;
  width: 80%;
  height: 70%;
  top: 15%;
  background: url(images/g-bg-menu.png) no-repeat center;
  background-size: contain;
  color: white;
  font-family: 'game-font', sans-serif;
  font-weight: bolder;
  font-size: 6vh;
  line-height: 1.3;
  text-align: center;
  display: none;
}
.menu-item {
  cursor: pointer;
  margin: 0 10%;
}
.btn {
  cursor: pointer;
  text-align: center;
}
.btn.disabled {
  opacity: 0.5;
  pointer-events: none;
  cursor: none;
}
.overlay {
  display: none;
  flex-direction: column;
}
.help-page-title {
  margin-bottom: 5%;
  font-size: 5vh;
  text-align: center;
}
.help-page-dots {
  text-align: center;
}
.help-page-dots span {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 5px;
  margin: 4px 6px;
  background: white;
  opacity: 0.4;
}
.help-page-dots span.active {
  opacity: 1;
}
.overlay-box {
  background: url(images/g-bg-popup.png) no-repeat center;
  background-size: contain;
  width: 90%;
  height: 70%;
  margin-left: 5%;
  padding: 18% 8%;
}
.overlay-title {
  text-align: center;
  font-size: 6vh;
  margin-top: 10%;
}
.overlay-buttons {
  position: absolute;
  bottom: 0;
  right: 0;
  left: 0;
  padding: 10% 10% ;
  display: flex;
  align-items: center;
  justify-content: center;
}
.overlay-buttons .btn {
  margin: 0 5%;
}
.settings .overlay-box {
  flex-direction: column;
  justify-content: space-around;
  padding: 22% 8%;
}
.setting-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 80%;
}
.setting-item .toggle {
  position: relative;
  width: 40%;
  flex-basis: 40%;
  height: 8px;
  border: 1px solid white;
  border-radius: 5px;
  overflow: visible;
  transition: background-color 0.2s ease;
  cursor: pointer;
}
.setting-item .toggle.on {
  background-color: white;
}
.setting-item .toggle::after {
  content: '';
  width: 40px;
  height: 40px;
  transition: all 0.2s ease;
  left: -10px;
  position: absolute;
  top: -16px;
  opacity: 0.8;
  background: url(images/fl-white.png) no-repeat center;
  background-size: contain;
}
.setting-item .toggle.on::after {
  left: calc(100% - 30px);
  opacity: 1;
}
.item {
  width: 14%;
  height: 0;
  padding-top: 14%;
  background-repeat: no-repeat;
  background-size: 90%;
  background-position: center;
  position: absolute;
  transition: all 0.3s ease;
  transform: scale(1);
  opacity: 1;
  z-index: 3;
  pointer-events: none;
}
.full-width .item {
  width: 10%;
  padding-top: 10%;
}
.item.shovel {
  z-index: 1;
  margin-left: 1%;
}
.item.fly {
  z-index: 4;
}
.item.zoom {
  transform: scale(0.3);
  opacity: 0.2;
}
.item.died {
  transform: scale(0.3);
  opacity: 0;
}
.item.shoveled {
  margin-left: -3%;
  margin-top: -1%;
  z-index: 5;
}
.item-inner {
  width: 40%;
  height: 40%;
  position: absolute;
  left: 30%;
  top: 32%;
  background-repeat: no-repeat;
  background-size: contain;
  background-position: center;
}
.game-screen .info-step {
  position: absolute;
  left: 0;
  top: 0;
  padding: 5%;
}
.game-screen .info-score {
  position: absolute;
  left: 0;
  bottom: 0;
  padding: 5%;
}
.game-screen .info-menu {
  position: absolute;
  right: 0;
  bottom: 0;
  padding: 5%;
}
.game-screen.full-width .info-step {
  padding: 2% 5%;
}
.game-screen.full-width .info-score {
  padding: 2% 5%;
}
.game-screen.full-width .info-menu {
  padding: 2% 5%;
}
.dark-backdrop {
  background-color: rgba(0,0,0,0.5);
}
.menu-confirm .overlay-box {
  flex-direction: column;
  font-size: 5vh;
  margin-left: 0;
}
.menu-confirm .overlay-box .btn + .btn {
  margin-top: 20%;
}
.menu,
.overlay {
  z-index: 10;
}
.level-finish .overlay-box {
  justify-content: space-around;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.box-title {
  font-size: 6vh;
}
.fill-abs2 .overlay-box {
  margin-left: 0;
  padding: 5vh 7vh;
  max-width: 60vh;
}
.btn-bg {
  min-width: 70%;
  line-height: 1.5;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.3) 0%, rgba(255, 255, 255, 0) 20%,  rgba(255, 255, 255, 0) 80%,  rgba(255, 255, 255, 0.3) 100% );
  text-align: center;
}
.btn-bg:hover {
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.6) 0%, rgba(255, 255, 255, 0) 20%,  rgba(255, 255, 255, 0) 80%,  rgba(255, 255, 255, 0.6) 100% );
}
@keyframes bounce {
  0% {
    margin-top: 0.6vh;
  }
  50% {
    margin-top: -0.6vh;
  }
  100% {
    margin-top: 0.6vh;
  }
}
.item.vibrate {
  animation: bounce 1s ease 0s infinite;
}
.flash-score {
  position: absolute;
  z-index: 6;
  font-size: 5vh;
  font-family: Arial, Helvetica, sans-serif;
  font-weight: 700;
  animation: flash 0.4s linear 0s 1;
  opacity: 0;
  text-shadow:
   -1px -1px 0 #000,  
    1px -1px 0 #000,
    -1px 1px 0 #000,
     1px 1px 0 #000;
}
@keyframes flash {
  0% {
    opacity: 1;
    margin-top: 0;
  }
  50% {
    opacity: 0.7;
    margin-top: -3vh;
  }
  100% {
    opacity: 0;
    margin-top: -6vh;
  }
}
.resume-menu .overlay-box {
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  padding: 10vh;
  font-size: 5vh;
}
