  @font-face {
   font-family: "Inter";
   src: url("./fonts/Inter.ttf") format("opentype")
  }

  html, body {
    height: 100%;
    margin: 0;
    overflow: hidden;
  }

  body {
    background: #233255;
    display: flex;
    justify-content: center;
    align-items: center;
  }
  canvas {
    background: #233255;
    background-image: linear-gradient( 
45deg, #2C3C63 25%, transparent 25%), linear-gradient( 
-45deg, #2C3C63 25%, transparent 25%), linear-gradient( 
45deg, transparent 75%, #2C3C63 75%), linear-gradient( 
-45deg, transparent 75%, #2C3C63 75%);
    background-size: 80px 80px;
    background-position: 0 0, 0 40px, 40px -40px, -40px 0px;
  }
  #game-header {
    position: absolute;
    top: 0px;
    display: flex;
    width: 100%;
    padding-top: 15px;
    user-select: none;
  height: 59px;
  }
  #score, #lives, #time {
    flex: 1;
    font-family: Inter;
    font-style: normal;
    font-weight: bold;
    font-size: 37px;
    line-height: 45px;
    padding: 5px;
    color: white;
    text-align: center;
  }

  #lives {
    display: flex;
    flex: 3;
    flex-direction: row;
  }

  #lives img {
    /**width: 84px;**/
  width: 64px;
    padding-left:29px;
  }
  
  #score {
  flex: unset;
    padding-top: 16px;
  padding-left: 30px;
  }
  
  #time {
  padding-top: 16px;
  }
  
  #score-block {
  flex: 1;
    display: flex;
    justify-content: center;
  }
  
  #welcome-popup, #snake-died {
    display: flex;
    position: absolute;
    width: 100%;
    height: 100%;
    background: rgb(44 60 99 / 80%);
    align-items: center;
    flex-direction: column;
    justify-content: center;
    z-index:10;
  }
  
  #welcome-popup .snake-bg img{
   width: auto;
   height: 170%;
  }
  
  #welcome-popup .snake-bg{
  width: fit-content;
    height: 8%;
    top: 42.7%;
    background-color: #131F38;
    border: 1px solid #131F38;
    border-radius: 55px;
    display: flex;
    align-items: center;
    padding: 5px 20px 5px 0px;
  }
  
  #welcome-popup a{
    font-family: Inter;
    font-weight: bold;
    font-size: 61px;
    line-height: 74px;
    color: #FABE00;
    cursor: pointer;
  }
  
  #welcome-popup.hidden, #badend-popup.hidden, #goodend-popup.hidden, #snake-died.hidden, #score-block.hidden, #time.hidden, #controls-overlay.hidden{
   display: none;
  }

  .goodend-popup .popup-text, #badend-popup .popup-text {
    font-family: Inter;
    font-style: normal;
    font-weight: 600;
    font-size: 32px;
    line-height: 140%;
    color: white;
  }

  .goodend-popup .popup-text.yellow {
    color: #FABE00;
  }

  .goodend-popup .popup-text.header {
    padding-bottom: 20px;
  }

	#goodendtext2{
		padding-bottom: 50px;
	}

  .goodend-popup .popup-button {
    position: relative;
    font-family: Inter;
    font-style: normal;
    font-weight: 600;
    font-size: 25px;
    line-height: 140%;
    display: flex;
    height: 70px;
    background-color: #FABE00;
    border-radius: 10px;
    width: 50%;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    text-decoration: none;
    color: #131F38;
    margin: 0 auto;
  }
  
  #goodendbutton img {
    width: 2em;
    height: 2em;
    position: absolute;
    right: -1em;
    top: -1em;
    transform: rotate(45deg);
  }

  #badend-popup .small-popup-button {
  font-family: Inter;
    font-style: normal;
    font-weight: 600;
    font-size: 25px;
    line-height: 140%;
    display: flex;
  height: 48px;
  width: 93px;
    background-color: #FABE00;
    border-radius: 10px;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    text-decoration: none;
    color: #131F38;
  z-index:20;
  margin-left: 9px;
  }
  
  #badend-popup .small-popup-button.no {
    background-color: #233255;
    color: white;
  }

#hint {
    position: absolute;
    font-family: Inter;
    font-style: normal;
    font-weight: normal;
    font-size: 16px;
    line-height: 19px;
    text-align: center;
    color: white;
    display: flex;
    align-items: center;
    bottom: 8%;
}
  #hint img{
    height: 40px;
    padding-left: 15px;
  }

  #controls-overlay {
    position: absolute;
  bottom: 0px;
  right: 0px;
  }

   #click-up, #click-right, #click-down, #click-left {
    position: absolute;
    /**border: 1px solid red;*/
    z-index: 100;
    user-select: none;
   }

   #click-up {
    height: 20%;
    width: 100%;
    top: 0px;
   }

   #click-right {
    width: 20%;
    height: 100%;
    right: 0px;
   }

  #click-left {
    width: 20%;
    height: 100%;
    left: 0px;
   }

  #click-down {
    height: 20%;
    width: 100%;
    bottom: 0px;
   }

  .goodend-popup, .badend-popup {
    background: #FFFFFF;
    text-align: left;
    max-width: 666px;
    margin: 40px auto;
    position: absolute;
    border: 14px dashed #E62D32;
    border-radius: 10px;
    z-index:  100;
  }
  
  .goodend-popup__wrapper, .badend-popup__wrapper {
    background: #131F38;
    padding: 50px 49px;
    position: relative;
  }

   .goodend-popup .snake-bg {
    display: flex;
    //background-image: url(popup-bg.png);
    width: 80%;
    height: 80%;
    position: absolute;
    justify-content: center;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    max-width: fit-content;
   }
   
   #badend-popup .snake-bg {
  display: flex;
    background-image: url(popup-bg-2.png);
    width: 70vmax;
    height: 80%;
    position: absolute;
    justify-content: center;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    max-width: fit-content;
   }
   
   #badend-popup .bottom-text-w-buttons {
  display: flex;
  flex-direction: row;
  font-family: Inter;
  font-style: normal;
  font-weight: normal;
  font-size: 25px;
  line-height: 140%;
  color: white;
  padding-top: 50px;
   }
   
   .small-text {
     flex: 1;
   }

   #restart-button {
    max-height: 136px;
    max-width: 136px;
    height: 10em;
    width: 10em;
    background-color: #FABE00;
    border-radius: 68px;
    position: relative;
    cursor: pointer;
   }

   #restart-button img {
    width:  100%;
    height: 100%;
   }

   #snake-died .text {
    top: 3.5em;
    font-family: Inter;
    font-style: normal;
    font-weight: bold;
    font-size: 48px;
    line-height: 58px;
    display: flex;
    align-items: center;
    text-align: center;
    color: #FABE00;
    position: absolute;
    left: -0.75em;
   }
   
   #score-block img{
     display: flex;
     width: 64px;
   }
   
   #changeLanguageButton {
    font-family: Inter;
    font-style: normal;
    font-weight: 600;
    font-size: 27px;
    line-height: 33px;
    display: flex;
    align-items: center;
    text-align: center;
    justify-content: center;
    color: white;
    left: 67px;
    bottom: 67px;
    position: absolute;
    width: 60px;
    height: 60px;
    border: 3px solid white;
    border-radius: 9px;
    z-index: 100;
    cursor: pointer;
    user-select: none;
   }
   
   #changeLanguageButton.en {
     background-color: #AEB4C1;
     border: 3px solid #AEB4C1;
     color: #233255;
   }
   
   .snowflake {
  --size: 1vw;
  width: var(--size);
  height: var(--size);
  background: white;
  border-radius: 50%;
  position: absolute;
  top: -5vh;
}

.snow-block {
    padding: 0;
    margin: 0;
    width: 100vw;
    height: 100vh;
    position: fixed;
    overflow: hidden;
    top: 0;
    left: 0;
}

@keyframes snowfall {
  0% {
    transform: translate3d(var(--left-ini), 0, 0);
  }
  100% {
    transform: translate3d(var(--left-end), 110vh, 0);
  }
}
.snowflake:nth-child(1) {
  --size: 0.2vw;
  --left-ini: 0vw;
  --left-end: -2vw;
  left: 19vw;
  animation: snowfall 10s linear infinite;
  animation-delay: -5s;
}

.snowflake:nth-child(2) {
  --size: 0.6vw;
  --left-ini: 0vw;
  --left-end: 3vw;
  left: 79vw;
  animation: snowfall 13s linear infinite;
  animation-delay: -10s;
}

.snowflake:nth-child(3) {
  --size: 0.4vw;
  --left-ini: 4vw;
  --left-end: -2vw;
  left: 2vw;
  animation: snowfall 9s linear infinite;
  animation-delay: -6s;
}

.snowflake:nth-child(4) {
  --size: 1vw;
  --left-ini: 8vw;
  --left-end: 8vw;
  left: 9vw;
  animation: snowfall 8s linear infinite;
  animation-delay: -10s;
}

.snowflake:nth-child(5) {
  --size: 0.4vw;
  --left-ini: -6vw;
  --left-end: -1vw;
  left: 85vw;
  animation: snowfall 6s linear infinite;
  animation-delay: -4s;
}

.snowflake:nth-child(6) {
  --size: 0.6vw;
  --left-ini: -3vw;
  --left-end: 3vw;
  left: 15vw;
  animation: snowfall 15s linear infinite;
  animation-delay: -9s;
}

.snowflake:nth-child(7) {
  --size: 1vw;
  --left-ini: 9vw;
  --left-end: -4vw;
  left: 54vw;
  animation: snowfall 8s linear infinite;
  animation-delay: -10s;
}

.snowflake:nth-child(8) {
  --size: 0.8vw;
  --left-ini: 5vw;
  --left-end: 7vw;
  left: 40vw;
  animation: snowfall 11s linear infinite;
  animation-delay: -6s;
}

.snowflake:nth-child(9) {
  --size: 0.4vw;
  --left-ini: -3vw;
  --left-end: -6vw;
  left: 12vw;
  animation: snowfall 8s linear infinite;
  animation-delay: -5s;
}

.snowflake:nth-child(10) {
  --size: 0.6vw;
  --left-ini: -4vw;
  --left-end: -7vw;
  left: 50vw;
  animation: snowfall 10s linear infinite;
  animation-delay: -4s;
}

.snowflake:nth-child(11) {
  --size: 0.6vw;
  --left-ini: 3vw;
  --left-end: 6vw;
  left: 97vw;
  animation: snowfall 13s linear infinite;
  animation-delay: -6s;
}

.snowflake:nth-child(12) {
  --size: 0.8vw;
  --left-ini: 2vw;
  --left-end: -3vw;
  left: 9vw;
  animation: snowfall 15s linear infinite;
  animation-delay: -8s;
}

.snowflake:nth-child(13) {
  --size: 0.6vw;
  --left-ini: 1vw;
  --left-end: -6vw;
  left: 61vw;
  animation: snowfall 14s linear infinite;
  animation-delay: -1s;
}

.snowflake:nth-child(14) {
  --size: 0.4vw;
  --left-ini: 0vw;
  --left-end: 8vw;
  left: 92vw;
  animation: snowfall 14s linear infinite;
  animation-delay: -3s;
}

.snowflake:nth-child(15) {
  --size: 0.2vw;
  --left-ini: 8vw;
  --left-end: -5vw;
  left: 89vw;
  animation: snowfall 10s linear infinite;
  animation-delay: -3s;
}

.snowflake:nth-child(16) {
  --size: 0.6vw;
  --left-ini: -3vw;
  --left-end: 8vw;
  left: 48vw;
  animation: snowfall 8s linear infinite;
  animation-delay: -5s;
}

.snowflake:nth-child(17) {
  --size: 0.4vw;
  --left-ini: -2vw;
  --left-end: 10vw;
  left: 24vw;
  animation: snowfall 12s linear infinite;
  animation-delay: -4s;
}

.snowflake:nth-child(18) {
  --size: 0.4vw;
  --left-ini: 0vw;
  --left-end: 0vw;
  left: 93vw;
  animation: snowfall 6s linear infinite;
  animation-delay: -10s;
}

.snowflake:nth-child(19) {
  --size: 0.4vw;
  --left-ini: -8vw;
  --left-end: -1vw;
  left: 8vw;
  animation: snowfall 15s linear infinite;
  animation-delay: -6s;
}

.snowflake:nth-child(20) {
  --size: 1vw;
  --left-ini: 1vw;
  --left-end: -3vw;
  left: 29vw;
  animation: snowfall 11s linear infinite;
  animation-delay: -2s;
}

.snowflake:nth-child(21) {
  --size: 0.4vw;
  --left-ini: 0vw;
  --left-end: 8vw;
  left: 70vw;
  animation: snowfall 9s linear infinite;
  animation-delay: -6s;
}

.snowflake:nth-child(22) {
  --size: 0.8vw;
  --left-ini: -5vw;
  --left-end: -6vw;
  left: 71vw;
  animation: snowfall 8s linear infinite;
  animation-delay: -8s;
}

.snowflake:nth-child(23) {
  --size: 0.6vw;
  --left-ini: 9vw;
  --left-end: 4vw;
  left: 32vw;
  animation: snowfall 8s linear infinite;
  animation-delay: -9s;
}

.snowflake:nth-child(24) {
  --size: 0.8vw;
  --left-ini: 9vw;
  --left-end: -5vw;
  left: 16vw;
  animation: snowfall 13s linear infinite;
  animation-delay: -2s;
}

.snowflake:nth-child(25) {
  --size: 0.2vw;
  --left-ini: 6vw;
  --left-end: 10vw;
  left: 55vw;
  animation: snowfall 11s linear infinite;
  animation-delay: -6s;
}

.snowflake:nth-child(26) {
  --size: 0.4vw;
  --left-ini: 7vw;
  --left-end: -8vw;
  left: 16vw;
  animation: snowfall 8s linear infinite;
  animation-delay: -7s;
}

.snowflake:nth-child(27) {
  --size: 0.6vw;
  --left-ini: 5vw;
  --left-end: 8vw;
  left: 23vw;
  animation: snowfall 7s linear infinite;
  animation-delay: -1s;
}

.snowflake:nth-child(28) {
  --size: 0.6vw;
  --left-ini: 6vw;
  --left-end: 5vw;
  left: 76vw;
  animation: snowfall 10s linear infinite;
  animation-delay: -7s;
}

.snowflake:nth-child(29) {
  --size: 0.2vw;
  --left-ini: 6vw;
  --left-end: -9vw;
  left: 76vw;
  animation: snowfall 10s linear infinite;
  animation-delay: -9s;
}

.snowflake:nth-child(30) {
  --size: 0.8vw;
  --left-ini: 1vw;
  --left-end: -9vw;
  left: 76vw;
  animation: snowfall 15s linear infinite;
  animation-delay: -4s;
}

.snowflake:nth-child(31) {
  --size: 0.6vw;
  --left-ini: 5vw;
  --left-end: -8vw;
  left: 28vw;
  animation: snowfall 11s linear infinite;
  animation-delay: -2s;
}

.snowflake:nth-child(32) {
  --size: 1vw;
  --left-ini: 2vw;
  --left-end: 0vw;
  left: 86vw;
  animation: snowfall 9s linear infinite;
  animation-delay: -4s;
}

.snowflake:nth-child(33) {
  --size: 1vw;
  --left-ini: 0vw;
  --left-end: -6vw;
  left: 55vw;
  animation: snowfall 8s linear infinite;
  animation-delay: -6s;
}

.snowflake:nth-child(34) {
  --size: 1vw;
  --left-ini: 5vw;
  --left-end: -5vw;
  left: 27vw;
  animation: snowfall 13s linear infinite;
  animation-delay: -4s;
}

.snowflake:nth-child(35) {
  --size: 0.2vw;
  --left-ini: 1vw;
  --left-end: 5vw;
  left: 14vw;
  animation: snowfall 12s linear infinite;
  animation-delay: -4s;
}

.snowflake:nth-child(36) {
  --size: 0.2vw;
  --left-ini: -4vw;
  --left-end: 3vw;
  left: 49vw;
  animation: snowfall 6s linear infinite;
  animation-delay: -10s;
}

.snowflake:nth-child(37) {
  --size: 0.2vw;
  --left-ini: 1vw;
  --left-end: -4vw;
  left: 66vw;
  animation: snowfall 13s linear infinite;
  animation-delay: -7s;
}

.snowflake:nth-child(38) {
  --size: 0.2vw;
  --left-ini: -8vw;
  --left-end: -2vw;
  left: 40vw;
  animation: snowfall 15s linear infinite;
  animation-delay: -8s;
}

.snowflake:nth-child(39) {
  --size: 1vw;
  --left-ini: -5vw;
  --left-end: 1vw;
  left: 95vw;
  animation: snowfall 9s linear infinite;
  animation-delay: -7s;
}

.snowflake:nth-child(40) {
  --size: 0.4vw;
  --left-ini: 3vw;
  --left-end: 0vw;
  left: 81vw;
  animation: snowfall 11s linear infinite;
  animation-delay: -5s;
}

.snowflake:nth-child(41) {
  --size: 0.6vw;
  --left-ini: 3vw;
  --left-end: 2vw;
  left: 50vw;
  animation: snowfall 11s linear infinite;
  animation-delay: -5s;
}

.snowflake:nth-child(42) {
  --size: 0.2vw;
  --left-ini: -9vw;
  --left-end: -4vw;
  left: 87vw;
  animation: snowfall 8s linear infinite;
  animation-delay: -10s;
}

.snowflake:nth-child(43) {
  --size: 0.2vw;
  --left-ini: 2vw;
  --left-end: 7vw;
  left: 44vw;
  animation: snowfall 9s linear infinite;
  animation-delay: -10s;
}

.snowflake:nth-child(44) {
  --size: 0.6vw;
  --left-ini: -4vw;
  --left-end: -4vw;
  left: 83vw;
  animation: snowfall 11s linear infinite;
  animation-delay: -2s;
}

.snowflake:nth-child(45) {
  --size: 0.2vw;
  --left-ini: -1vw;
  --left-end: -5vw;
  left: 38vw;
  animation: snowfall 6s linear infinite;
  animation-delay: -6s;
}

.snowflake:nth-child(46) {
  --size: 0.2vw;
  --left-ini: -5vw;
  --left-end: 10vw;
  left: 33vw;
  animation: snowfall 7s linear infinite;
  animation-delay: -9s;
}

.snowflake:nth-child(47) {
  --size: 0.8vw;
  --left-ini: -6vw;
  --left-end: -2vw;
  left: 64vw;
  animation: snowfall 7s linear infinite;
  animation-delay: -10s;
}

.snowflake:nth-child(48) {
  --size: 0.6vw;
  --left-ini: 10vw;
  --left-end: 3vw;
  left: 29vw;
  animation: snowfall 10s linear infinite;
  animation-delay: -5s;
}

.snowflake:nth-child(49) {
  --size: 0.6vw;
  --left-ini: 9vw;
  --left-end: 1vw;
  left: 70vw;
  animation: snowfall 8s linear infinite;
  animation-delay: -9s;
}

.snowflake:nth-child(50) {
  --size: 1vw;
  --left-ini: 2vw;
  --left-end: -4vw;
  left: 83vw;
  animation: snowfall 12s linear infinite;
  animation-delay: -9s;
}

/* added small blur every 6 snowflakes*/
.snowflake:nth-child(6n) {
  filter: blur(1px);
}

.volume.off {
    background-image: url(volume-off.svg);
}
.volume {
    display: flex;
    flex: 1;
    cursor: pointer;
    background-size: contain;
    height: 100%;
    max-width: 110px;
    min-width: 50px;
    background-repeat: no-repeat;
    background-position: center;
    display: block;
    background-image: url(volume.svg);
   z-index: 100;
}

@media (max-width: 1000px), (max-height: 750px) { 
  #goodend-popup .popup-button {
   position: relative;
    font-family: Inter;
    font-style: normal;
    font-weight: 600;
    font-size: 0.9em;
    line-height: 140%;
    display: flex;
    height: unset;
    background-color: #FABE00;
    border-radius: 10px;
    width: 50%;
    justify-content: center;
    align-items: center;
    margin-top: 1.5em;
    cursor: pointer;
    text-decoration: none;
    color: #131F38;
    text-align: center;
    align-self: center;
    padding: 5px;
  }
  
  #score, #lives, #time {
    padding: 0.1em;
    font-size: 1.5em;
  }

#lives img {
    padding-left: 0.3em;
  font-size: 5px;
  max-width: 10em;
}

  #game-header {
    height: 2.5em;
  }

  #score-block img{
    width: 2em;
  }

  canvas {
    background: #233255;
    background-image: linear-gradient(45deg, #2C3C63 25%, transparent 25%), linear-gradient(-45deg, #2C3C63 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #2C3C63 75%), linear-gradient(-45deg, transparent 75%, #2C3C63 75%);
    background-size: 40px 40px;
    background-position: 0 0, 0 20px, 20px -20px, -20px 0px;
  }

  #goodend-popup .popup-text, #badend-popup .popup-text{
    font-family: Inter;
    font-style: normal;
    font-weight: 600;
    font-size: 1em;
    line-height: 140%;
    color: white;
  }
  
  #changeLanguageButton {
    font-family: Inter;
    font-style: normal;
    font-weight: 600;
    font-size: 1.1em;
    line-height: 33px;
    display: flex;
    align-items: center;
    text-align: center;
    justify-content: center;
    color: white;
    left: 1em;
    bottom: 1em;
    position: absolute;
    width: 2em;
    height: 2em;
    border: 3px solid white;
    border-radius: 9px;
    z-index: 100;
    cursor: pointer;
    user-select: none;
   }

   #welcome-popup a{
    font-size: 2.5em;
   }
   
     #badend-popup .small-popup-button {
  font-family: Inter;
    font-style: normal;
    font-weight: 600;
    font-size: 1em;
    line-height: 140%;
    display: flex;
  height: 2em;
  width: 4em;
    background-color: #FABE00;
    border-radius: 10px;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    text-decoration: none;
    color: #131F38;
  z-index:20;
  margin-left: 9px;
  }
  
#hint img {
  height: 2em;
    padding-left: 0.4em;
}

  #badend-popup .small-popup-button.no {
    background-color: #233255;
    color: white;
  }
  
     #badend-popup .bottom-text-w-buttons {
  display: flex;
  flex-direction: row;
  font-family: Inter;
  font-style: normal;
  font-weight: normal;
  font-size: 1em;
  line-height: 140%;
  color: white;
  padding-top: 50px;
   }

.set {
    overflow: hidden;
    padding: 30px;
    /* text-align: right; */
    display: flex;
    justify-content: flex-end;
    /* vertical-align: bottom; */
    /* flex: 1; */
    height: 95%;
    /* margin-top: 85%; */
    align-items: self-end;
}
.set .d-pad {
  margin-right: 0px;
}
.set .d-pad,
.set .o-pad {
  display: inline-block;
}
.set.setbg {
  background: #222;
}
.set.setbg2 {
  background: #5f9837;
}
.d-pad {
  position: relative;
  width: 9em;
  height: 9em;
  border-radius: 48%;
  overflow: hidden;
}
.d-pad:before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    border-radius: 5%;
    transform: translate(-50%, -50%);
    width: 26.6%;
    height: 32.6%;
    background: #ddd;
}
.d-pad:after {
  content: '';
  position: absolute;
  display: none;
  z-index: 2;
  width: 20%;
  height: 20%;
  top: 50%;
  left: 50%;
  background: #ddd;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: all 0.25s;
  cursor: pointer;
}
.d-pad:hover:after {
  width: 30%;
  height: 30%;
}
.d-pad a {
  display: block;
  position: absolute;
  -webkit-tap-highlight-color: rgba(255, 255, 255, 0);
  width: 33.3%;
  height: 43%;
  line-height: 40%;
  color: #fff;
  background: #ddd;
  text-align: center;
}
.d-pad a:hover {
  background: #eee;
}
.d-pad a:before {
  content: '';
  position: absolute;
  width: 0;
  height: 0;
  border-radius: 5px;
  border-style: solid;
  transition: all 0.25s;
}
.d-pad a:after {
  content: '';
  position: absolute;
  width: 102%;
  height: 78%;
  border-radius: 20%;
}
.d-pad a.left,
.d-pad a.right {
  width: 43%;
  height: 33%;
}
.d-pad a.left:after,
.d-pad a.right:after {
  width: 78%;
  height: 102%;
}
.d-pad a.up {
  top: 0;
  left: 50%;
  transform: translate(-50%, 0);
  border-radius: 17% 17% 50% 50%;
}
.d-pad a.up:hover {
  background: linear-gradient(0deg, #ddd 0%, #eee 50%);
}
.d-pad a.up:after {
  left: 0;
  top: 0;
  transform: translate(-100%, 0);
  border-top-left-radius: 50%;
  pointer-events: none;
}
.d-pad a.up:before {
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%);
  border-width: 0 13px 19px 13px;
  border-color: transparent transparent #aaa transparent;
}
.d-pad a.up:active:before {
  border-bottom-color: #333;
}
.d-pad a.up:hover:before {
  top: 35%;
}
.d-pad a.down {
  bottom: 0;
  left: 50%;
  transform: translate(-50%, 0);
  border-radius: 50% 50% 17% 17%;
}
.d-pad a.down:hover {
  background: linear-gradient(180deg, #ddd 0%, #eee 50%);
}
.d-pad a.down:after {
  right: 0;
  bottom: 0;
  transform: translate(100%, 0);
  border-bottom-right-radius: 50%;
  pointer-events: none;
}
.d-pad a.down:before {
  bottom: 40%;
  left: 50%;
  transform: translate(-50%, 50%);
  border-width: 19px 13px 0px 13px;
  border-color: #aaa transparent transparent transparent;
}
.d-pad a.down:active:before {
  border-top-color: #333;
}
.d-pad a.down:hover:before {
  bottom: 35%;
}
.d-pad a.left {
  top: 50%;
  left: 0;
  transform: translate(0, -50%);
  border-radius: 17% 50% 50% 17%;
}
.d-pad a.left:hover {
  background: linear-gradient(-90deg, #ddd 0%, #eee 50%);
}
.d-pad a.left:after {
  left: 0;
  bottom: 0;
  transform: translate(0, 100%);
  border-bottom-left-radius: 50%;
  pointer-events: none;
}
.d-pad a.left:before {
  left: 40%;
  top: 50%;
  transform: translate(-50%, -50%);
  border-width: 13px 19px 13px 0;
  border-color: transparent #aaa transparent transparent;
}
.d-pad a.left:active:before {
  border-right-color: #333;
}
.d-pad a.left:hover:before {
  left: 35%;
}
.d-pad a.right {
  top: 50%;
  right: 0;
  transform: translate(0, -50%);
  border-radius: 50% 17% 17% 50%;
}
.d-pad a.right:hover {
  background: linear-gradient(90deg, #ddd 0%, #eee 50%);
}
.d-pad a.right:after {
  right: 0;
  top: 0;
  transform: translate(0, -100%);
  border-top-right-radius: 50%;
  pointer-events: none;
}
.d-pad a.right:before {
  right: 40%;
  top: 50%;
  transform: translate(50%, -50%);
  border-width: 13px 0 13px 19px;
  border-color: transparent transparent transparent #aaa;
}
.d-pad a.right:active:before {
  border-left-color: #333;
}
.d-pad a.right:hover:before {
  right: 35%;
}
.d-pad.up a.up:before {
  border-bottom-color: #333;
}
.d-pad.down a.down:before {
  border-top-color: #333;
}
.d-pad.left a.left:before {
  border-right-color: #333;
}
.d-pad.right a.right:before {
  border-left-color: #333;
}
.o-pad {
  position: relative;
  background: #ddd;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  overflow: hidden;
}
.o-pad:after {
  content: '';
  position: absolute;
  z-index: 2;
  width: 20%;
  height: 20%;
  top: 50%;
  left: 50%;
  background: #ddd;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  display: none;
  transition: all 0.25s;
  cursor: pointer;
}
.o-pad:hover:after {
  width: 30%;
  height: 30%;
}
.o-pad a {
  display: block;
  position: absolute;
  -webkit-tap-highlight-color: rgba(255, 255, 255, 0);
  width: 50%;
  height: 50%;
  text-align: center;
  transform: rotate(45deg);
  border: 1px solid rgba(0, 0, 0, 0.2);
}
.o-pad a:before {
  content: '';
  position: absolute;
  width: 60%;
  height: 60%;
  top: 50%;
  left: 50%;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: all 0.25s;
  cursor: pointer;
  display: none;
}
.o-pad a:after {
  content: '';
  position: absolute;
  width: 0;
  height: 0;
  border-radius: 5px;
  border-style: solid;
  transform: translate(-50%, -50%) rotate(-45deg);
  transition: all 0.25s;
}
.o-pad a.up {
  bottom: 50%;
  left: 50%;
  transform: translate(-50%, -20%) rotate(45deg);
  border-top-left-radius: 50%;
  z-index: 1;
}
.o-pad a.up:hover {
  background: linear-gradient(315deg, rgba(255, 255, 255, 0) 15%, rgba(255, 255, 255, 0.4) 100%);
}
.o-pad a.up:before {
  left: 57%;
  top: 57%;
}
.o-pad a.up:after {
  left: 53%;
  top: 53%;
  border-width: 0 13px 19px 13px;
  border-color: transparent transparent #aaa transparent;
}
.o-pad a.up:active:after {
  border-bottom-color: #333;
}
.o-pad a.down {
  top: 50%;
  left: 50%;
  transform: translate(-50%, 20%) rotate(45deg);
  border-bottom-right-radius: 50%;
  z-index: 1;
}
.o-pad a.down:hover {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0) 15%, rgba(255, 255, 255, 0.4) 100%);
}
.o-pad a.down:before {
  left: 43%;
  top: 43%;
}
.o-pad a.down:after {
  left: 47%;
  top: 47%;
  border-width: 19px 13px 0px 13px;
  border-color: #aaa transparent transparent transparent;
}
.o-pad a.down:active:after {
  border-top-color: #333;
}
.o-pad a.left {
  top: 50%;
  right: 50%;
  transform: translate(-20%, -50%) rotate(45deg);
  border-bottom-left-radius: 50%;
  border: none;
}
.o-pad a.left:hover {
  background: linear-gradient(225deg, rgba(255, 255, 255, 0) 15%, rgba(255, 255, 255, 0.4) 100%);
}
.o-pad a.left:before {
  left: 57%;
  top: 43%;
}
.o-pad a.left:after {
  left: 53%;
  top: 47%;
  border-width: 13px 19px 13px 0;
  border-color: transparent #aaa transparent transparent;
}
.o-pad a.left:active:after {
  border-right-color: #333;
}
.o-pad a.right {
  top: 50%;
  left: 50%;
  transform: translate(20%, -50%) rotate(45deg);
  border-top-right-radius: 50%;
  border: none;
}
.o-pad a.right:hover {
  background: linear-gradient(45deg, rgba(255, 255, 255, 0) 15%, rgba(255, 255, 255, 0.4) 100%);
}
.o-pad a.right:before {
  left: 43%;
  top: 57%;
}
.o-pad a.right:after {
  left: 47%;
  top: 53%;
  border-width: 13px 0 13px 19px;
  border-color: transparent transparent transparent #aaa;
}
.o-pad a.right:active:after {
  border-left-color: #333;
}
.o-pad a:hover:after {
  left: 50%;
  top: 50%;
}
.dark .d-pad a {
  border-radius: 35%;
}
.dark .d-pad:before,
.dark .d-pad a {
  background: #111;
}
.dark .d-pad a.up:hover {
  background: linear-gradient(0deg, #111 0%, #222 50%);
}
.dark .d-pad a.right:hover {
  background: linear-gradient(90deg, #111 0%, #222 50%);
}
.dark .d-pad a.down:hover {
  background: linear-gradient(180deg, #111 0%, #222 50%);
}
.dark .d-pad a.left:hover {
  background: linear-gradient(-90deg, #111 0%, #222 50%);
}
.dark .d-pad a.up:before {
  border-bottom-color: rgba(255, 255, 255, 0.9);
}
.dark .d-pad a.right:before {
  border-left-color: rgba(255, 255, 255, 0.9);
}
.dark .d-pad a.down:before {
  border-top-color: rgba(255, 255, 255, 0.9);
}
.dark .d-pad a.left:before {
  border-right-color: rgba(255, 255, 255, 0.9);
}
.dark .d-pad a.up:active:before {
  border-bottom-color: #61e22d;
}
.dark .d-pad a.right:active:before {
  border-left-color: #61e22d;
}
.dark .d-pad a.down:active:before {
  border-top-color: #61e22d;
}
.dark .d-pad a.left:active:before {
  border-right-color: #61e22d;
}
.dark .o-pad {
  background: #111;
}
.dark .o-pad a {
  border-color: rgba(255, 255, 255, 0.4);
}
.dark .o-pad a:before {
  display: block;
}
.dark .o-pad:before,
.dark .o-pad a {
  background: #111;
}
.dark .o-pad a.up:after {
  border-bottom-color: rgba(255, 255, 255, 0.9);
}
.dark .o-pad a.right:after {
  border-left-color: rgba(255, 255, 255, 0.9);
}
.dark .o-pad a.down:after {
  border-top-color: rgba(255, 255, 255, 0.9);
}
.dark .o-pad a.left:after {
  border-right-color: rgba(255, 255, 255, 0.9);
}
.dark .o-pad a.up:active:after {
  border-bottom-color: #61e22d;
}
.dark .o-pad a.right:active:after {
  border-left-color: #61e22d;
}
.dark .o-pad a.down:active:after {
  border-top-color: #61e22d;
}
.dark .o-pad a.left:active:after {
  border-right-color: #61e22d;
}
.pink .d-pad:before,
.pink .d-pad a {
  background: #ff1285;
}
.pink .d-pad a:after {
  border-radius: 30%;
}
.pink .d-pad a.up:hover {
  background: linear-gradient(0deg, #ff1285 0%, #f366aa 50%);
}
.pink .d-pad a.right:hover {
  background: linear-gradient(90deg, #ff1285 0%, #f366aa 50%);
}
.pink .d-pad a.down:hover {
  background: linear-gradient(180deg, #ff1285 0%, #f366aa 50%);
}
.pink .d-pad a.left:hover {
  background: linear-gradient(-90deg, #ff1285 0%, #f366aa 50%);
}
.pink .d-pad a.up:before {
  border-bottom-color: rgba(255, 255, 255, 0.7);
}
.pink .d-pad a.right:before {
  border-left-color: rgba(255, 255, 255, 0.7);
}
.pink .d-pad a.down:before {
  border-top-color: rgba(255, 255, 255, 0.7);
}
.pink .d-pad a.left:before {
  border-right-color: rgba(255, 255, 255, 0.7);
}
.pink .d-pad a.up:active:before {
  border-bottom-color: #ffffff;
}
.pink .d-pad a.right:active:before {
  border-left-color: #ffffff;
}
.pink .d-pad a.down:active:before {
  border-top-color: #ffffff;
}
.pink .d-pad a.left:active:before {
  border-right-color: #ffffff;
}
.pink .o-pad {
  background: #ff1285;
}
.pink .o-pad a {
  border-color: rgba(255, 255, 255, 0.6);
}
.pink .o-pad:before,
.pink .o-pad a {
  background: #ff1285;
}
.pink .o-pad a.up:after {
  border-bottom-color: rgba(255, 255, 255, 0.7);
}
.pink .o-pad a.right:after {
  border-left-color: rgba(255, 255, 255, 0.7);
}
.pink .o-pad a.down:after {
  border-top-color: rgba(255, 255, 255, 0.7);
}
.pink .o-pad a.left:after {
  border-right-color: rgba(255, 255, 255, 0.7);
}
.pink .o-pad a.up:active:after {
  border-bottom-color: #ffffff;
}
.pink .o-pad a.right:active:after {
  border-left-color: #ffffff;
}
.pink .o-pad a.down:active:after {
  border-top-color: #ffffff;
}
.pink .o-pad a.left:active:after {
  border-right-color: #ffffff;
}
.clear .d-pad {
  border-radius: 0;
}
.clear .d-pad a {
  border: 1px solid #fff;
}
.clear .d-pad:before,
.clear .d-pad a {
  background: none;
}
.clear .d-pad a:after {
  display: none;
}
.clear .d-pad a.up:hover {
  background: linear-gradient(0deg, #5f9837 0%, #6ea248 50%);
}
.clear .d-pad a.right:hover {
  background: linear-gradient(90deg, #5f9837 0%, #6ea248 50%);
}
.clear .d-pad a.down:hover {
  background: linear-gradient(180deg, #5f9837 0%, #6ea248 50%);
}
.clear .d-pad a.left:hover {
  background: linear-gradient(-90deg, #5f9837 0%, #6ea248 50%);
}
.clear .d-pad a.up:before {
  border-bottom-color: #fff;
}
.clear .d-pad a.right:before {
  border-left-color: #fff;
}
.clear .d-pad a.down:before {
  border-top-color: #fff;
}
.clear .d-pad a.left:before {
  border-right-color: #fff;
}
.clear .d-pad a.up:active:before {
  border-bottom-color: rgba(0, 0, 0, 0.6);
}
.clear .d-pad a.right:active:before {
  border-left-color: rgba(0, 0, 0, 0.6);
}
.clear .d-pad a.down:active:before {
  border-top-color: rgba(0, 0, 0, 0.6);
}
.clear .d-pad a.left:active:before {
  border-right-color: rgba(0, 0, 0, 0.6);
}
.clear .o-pad {
  background: none;
  border: 1px solid #fff;
}
.clear .o-pad a {
  border-color: #fff;
}
.clear .o-pad:before,
.clear .o-pad a {
  background: none;
}
.clear .o-pad a.up:after {
  border-bottom-color: #fff;
}
.clear .o-pad a.right:after {
  border-left-color: #fff;
}
.clear .o-pad a.down:after {
  border-top-color: #fff;
}
.clear .o-pad a.left:after {
  border-right-color: #fff;
}
.clear .o-pad a.up:active:after {
  border-bottom-color: rgba(0, 0, 0, 0.6);
}
.clear .o-pad a.right:active:after {
  border-left-color: rgba(0, 0, 0, 0.6);
}
.clear .o-pad a.down:active:after {
  border-top-color: rgba(0, 0, 0, 0.6);
}
.clear .o-pad a.left:active:after {
  border-right-color: rgba(0, 0, 0, 0.6);
}
.outline .d-pad {
  border-radius: 0;
}
.outline .d-pad a {
  border: 1px solid rgba(0, 0, 0, 0.1);
}
.outline .d-pad:after,
.outline .d-pad:before,
.outline .d-pad a {
  background: #fff;
}
.outline .d-pad a:after {
  display: none;
}
.outline .d-pad a.up:hover {
  background: linear-gradient(0deg, #fff 0%, #efefef 50%);
}
.outline .d-pad a.right:hover {
  background: linear-gradient(90deg, #fff 0%, #efefef 50%);
}
.outline .d-pad a.down:hover {
  background: linear-gradient(180deg, #fff 0%, #efefef 50%);
}
.outline .d-pad a.left:hover {
  background: linear-gradient(-90deg, #fff 0%, #efefef 50%);
}
.outline .d-pad a.up:before {
  border-bottom-color: rgba(0, 0, 0, 0.1);
}
.outline .d-pad a.right:before {
  border-left-color: rgba(0, 0, 0, 0.1);
}
.outline .d-pad a.down:before {
  border-top-color: rgba(0, 0, 0, 0.1);
}
.outline .d-pad a.left:before {
  border-right-color: rgba(0, 0, 0, 0.1);
}
.outline .o-pad {
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.1);
}
.outline .o-pad a {
  border-color: rgba(0, 0, 0, 0.1);
}
.outline .o-pad:after,
.outline .o-pad:before,
.outline .o-pad a {
  background: #fff;
}
.outline .o-pad a.up:after {
  border-bottom-color: rgba(0, 0, 0, 0.1);
}
.outline .o-pad a.right:after {
  border-left-color: rgba(0, 0, 0, 0.1);
}
.outline .o-pad a.down:after {
  border-top-color: rgba(0, 0, 0, 0.1);
}
.outline .o-pad a.left:after {
  border-right-color: rgba(0, 0, 0, 0.1);
}
.blue .d-pad:before,
.blue .d-pad a {
  background: transparent;
}
.blue .d-pad:after {
  display: block;
  background: #ccc;
}
.blue .d-pad a:after {
  border-radius: 10%;
}
.blue .d-pad a.up:hover {
  background: linear-gradient(0deg, transparent 0%, transparent 50%);
}
.blue .d-pad a.right:hover {
  background: linear-gradient(90deg, transparent 0%, transparent 50%);
}
.blue .d-pad a.down:hover {
  background: linear-gradient(180deg, transparent 0%, transparent 50%);
}
.blue .d-pad a.left:hover {
  background: linear-gradient(-90deg, transparent 0%, transparent 50%);
}
.blue .d-pad a.up:before {
  border-bottom-color: #ccc;
}
.blue .d-pad a.right:before {
  border-left-color: #ccc;
}
.blue .d-pad a.down:before {
  border-top-color: #ccc;
}
.blue .d-pad a.left:before {
  border-right-color: #ccc;
}
.blue .d-pad a.up:active:before {
  border-bottom-color: #ffffff;
}
.blue .d-pad a.right:active:before {
  border-left-color: #ffffff;
}
.blue .d-pad a.down:active:before {
  border-top-color: #ffffff;
}
.blue .d-pad a.left:active:before {
  border-right-color: #ffffff;
}
.blue .o-pad {
  background: transparent;
}
.blue .o-pad a {
  border-color: rgba(255, 255, 255, 0.6);
}
.blue .o-pad:before,
.blue .o-pad a {
  background: transparent;
}
.blue .o-pad:after {
  display: block;
  background: #ccc;
}
.blue .o-pad a.up:after {
  border-bottom-color: #ccc;
}
.blue .o-pad a.right:after {
  border-left-color: #ccc;
}
.blue .o-pad a.down:after {
  border-top-color: #ccc;
}
.blue .o-pad a.left:after {
  border-right-color: #ccc;
}
.blue .o-pad a.up:active:after {
  border-bottom-color: #ffffff;
}
.blue .o-pad a.right:active:after {
  border-left-color: #ffffff;
}
.blue .o-pad a.down:active:after {
  border-top-color: #ffffff;
}
.blue .o-pad a.left:active:after {
  border-right-color: #ffffff;
}
.setbg.white .d-pad:before,
.setbg.white .d-pad a {
  background: #fff;
}
.setbg.white .d-pad:after {
  display: block;
  background: rgba(0, 0, 0, 0.1);
}
.setbg.white .d-pad a:after {
  border-radius: 40%;
  background: #222;
}
.setbg.white .d-pad a.up:hover {
  background: #fff;
}
.setbg.white .d-pad a.right:hover {
  background: #fff;
}
.setbg.white .d-pad a.down:hover {
  background: #fff;
}
.setbg.white .d-pad a.left:hover {
  background: #fff;
}
.setbg.white .d-pad a.up:before {
  border-bottom-color: #0074D9;
}
.setbg.white .d-pad a.right:before {
  border-left-color: #FF851B;
}
.setbg.white .d-pad a.down:before {
  border-top-color: #3D9970;
}
.setbg.white .d-pad a.left:before {
  border-right-color: #FFDC00;
}
.setbg.white .d-pad a.up:active:before {
  border-bottom-color: rgba(0, 0, 0, 0.6);
}
.setbg.white .d-pad a.right:active:before {
  border-left-color: rgba(0, 0, 0, 0.6);
}
.setbg.white .d-pad a.down:active:before {
  border-top-color: rgba(0, 0, 0, 0.6);
}
.setbg.white .d-pad a.left:active:before {
  border-right-color: rgba(0, 0, 0, 0.6);
}
.setbg.white .o-pad {
  background: #fff;
}
.setbg.white .o-pad a {
  border-color: rgba(255, 255, 255, 0.6);
}
.setbg.white .o-pad:before,
.setbg.white .o-pad a {
  background: #fff;
}
.setbg.white .o-pad:after {
  display: block;
  background: #ccc;
}
.setbg.white .o-pad a.up:after {
  border-bottom-color: #2ECC40;
}
.setbg.white .o-pad a.right:after {
  border-left-color: #85144b;
}
.setbg.white .o-pad a.down:after {
  border-top-color: #7FDBFF;
}
.setbg.white .o-pad a.left:after {
  border-right-color: #B10DC9;
}
.setbg.white .o-pad a.up:active:after {
  border-bottom-color: rgba(0, 0, 0, 0.6);
}
.setbg.white .o-pad a.right:active:after {
  border-left-color: rgba(0, 0, 0, 0.6);
}
.setbg.white .o-pad a.down:active:after {
  border-top-color: rgba(0, 0, 0, 0.6);
}
.setbg.white .o-pad a.left:active:after {
  border-right-color: rgba(0, 0, 0, 0.6);
}
.wire .d-pad {
  overflow: initial;
  border: 1px dashed #93b4ff;
}
.wire .d-pad:after {
  display: block;
}
.wire .d-pad:after,
.wire .d-pad:before,
.wire .d-pad a,
.wire .d-pad a:after {
  background: none;
  border: 1px solid #93b4ff;
}
.wire .d-pad a:after {
  border: 1px dashed #93b4ff;
}
.wire .d-pad a.up:before {
  border-bottom-color: #93b4ff;
}
.wire .d-pad a.right:before {
  border-left-color: #93b4ff;
}
.wire .d-pad a.down:before {
  border-top-color: #93b4ff;
}
.wire .d-pad a.left:before {
  border-right-color: #93b4ff;
}
.wire .d-pad a:hover {
  background: none;
}
.wire .o-pad {
  border: 1px dashed #93b4ff;
  background: none;
  overflow: initial;
}
.wire .o-pad:after,
.wire .o-pad a:before {
  display: block;
}
.wire .o-pad:after,
.wire .o-pad:before,
.wire .o-pad a,
.wire .o-pad a:before {
  background: none;
  border: 1px solid #93b4ff;
}
.wire .o-pad a.up:after {
  border-bottom-color: #93b4ff;
}
.wire .o-pad a.right:after {
  border-left-color: #93b4ff;
}
.wire .o-pad a.down:after {
  border-top-color: #93b4ff;
}
.wire .o-pad a.left:after {
  border-right-color: #93b4ff;
}
.wire .o-pad a:hover {
  background: none;
}
.d-pad.up a.up:before {
  border-bottom-color: #333;
}
.d-pad.down a.down:before {
  border-top-color: #333;
}
.d-pad.left a.left:before {
  border-right-color: #333;
}
.d-pad.right a.right:before {
  border-left-color: #333;
}
.o-pad.up a.up:after {
  border-bottom-color: #333;
}
.o-pad.down a.down:after {
  border-top-color: #333;
}
.o-pad.left a.left:after {
  border-right-color: #333;
}
.o-pad.right a.right:after {
  border-left-color: #333;
}


}
