@font-face {
  font-family: myfont2;
  src: url("font.ttf");
}

html, body {
    margin: 0;
    padding: 0;
    overflow: hidden;
    touch-action: none;
	-ms-touch-action: none;
	-webkit-touch-callout: none;
	-webkit-touch-callout: none;
    -webkit-user-select: none;
     -khtml-user-select: none;
       -moz-user-select: none;
        -ms-user-select: none;
            user-select: none;
            font-family: myfont2, sans-serif;
}

#pcui2{
  position: absolute;
  text-align: center;
  width: 10vw;
  bottom: 5vh;
  right: 0;
  z-index: 2;
  pointer-events: none;
}

#pcui2 img{
  max-width: 25%;
  height: 5vh;
}

.joy{
  position: absolute;
  left: 2vw;
  bottom: 6vh;
  width: 5vw;
  height: 5vh;
  display: block;
}

.joystick-container {
  position: absolute;
  bottom: 4vh;
  transform: translateX(-50%);
  left: 50vw;
  width: 150px;
    height: 150px;
    border: 2px solid rgb(62, 62, 62);
    border-radius: 50%;
    box-shadow: 0 0 10px rgb(67, 222, 113);
  }

  .joystick {
    position: absolute;
    width: 75px;
    height: 75px;
    background-color: rgba(108, 177, 129,0.5);
    border-radius: 50%;
    box-shadow:0 0 10px rgb(108, 177, 129);
  }

  img{
    pointer-events:none;
    }

canvas {
    display: block;
}

.inventory {
  padding: 20px;
  position: absolute;
  left: 0px;
  top:0px;
}

.inventory > *{
  display: inline-block;
}

.stats {
  padding: 20px;
  position: absolute;
  left: 0px;
  bottom: 0px;
}

h2, h3 {
  color: #333;
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 90;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5); /* Полупрозрачный черный цвет */
    display: flex;
    justify-content: center;
    align-items: center;
}

.overlay .content {
    text-align: center;
}

.overlay h1 {
    color: white;
    font-size: 6vh;
}

.overlay p {
    color: white;
    font-size: 3vh;
}

button {
    background-color: #4fb74c;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    margin-top: 20px;
    cursor: pointer;
    font-size: 3vh;
}

.overlay ul {
    list-style: none;
    color: white;
    padding: 0;
    margin: 0;
    font-size: 16px;
}

.overlay li {
    margin-bottom: 10px;
}

.range {
  position: relative;
  font-size:18px;
  display: inline-block;
  background-color: #333;
  width: 20vw;
  height: 20px;
  transform: skew(30deg);
  text-shadow:2px 2px 4px rgba(0, 0, 0, 1);
  color: white;
  margin-bottom: 3vh;
}
.range:before {
  --width: calc(var(--p) * 1%);
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 100%;
  z-index: 0;
  -webkit-animation: load 0.5s forwards linear, glitch 2s infinite linear;
          animation: load 0.5s forwards linear, glitch 2s infinite linear;
}

#hpbar:before{
    background-color: rgb(243, 82, 82);
}

.range:after {
  counter-reset: progress var(--p);
  content: counter(progress) "%";
  color: #000;
  position: absolute;
  left: 5%;
  top: 50%;
  transform: translateY(-50%) skewX(-30deg);
  z-index: 1;
}
.range__label {
  -webkit-text-stroke-width: 1px;
  -webkit-text-stroke-color: #7ff189;
  white-space: nowrap;
  transform: skew(-30deg) translateY(-100%) translateX(5%);
  line-height: 1.5;
}

@-webkit-keyframes load {
  to {
    width: var(--width);
  }
}

@keyframes load {
  to {
    width: var(--width);
  }
}
@-webkit-keyframes glitch {
  0%, 5% {
    transform: translate(0, 0);
  }
  1% {
    transform: translate(-5%, -10%);
  }
  2% {
    transform: translate(10%, 30%);
  }
  3% {
    transform: translate(-43%, 10%);
  }
  4% {
    transform: translate(2%, -23%);
  }
}
@keyframes glitch {
  0%, 5% {
    transform: translate(0, 0);
  }
  1% {
    transform: translate(-5%, -10%);
  }
  2% {
    transform: translate(10%, 30%);
  }
  3% {
    transform: translate(-43%, 10%);
  }
  4% {
    transform: translate(2%, -23%);
  }
}


  .leaderbords{
    display: block;
    color: white;
  }

  .leaderbords h3{
    font-size: 2vh;
  }

  .leaderbord{
    display: inline-block;
    width: 90vw;
    margin-right: 0.5vw;
  }

  .leaderbord_data{
    display: block;
    width: 100%;
    max-height: 50vh;
    overflow-x:hidden;
    overflow-y: scroll;
  }

.leaderbord_data::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

.leaderbord_data::-webkit-scrollbar-thumb {
  background: linear-gradient(to bottom right, #4d7fff 0%, #1a56ff 100%);
  border-radius: 5px;
}

.leaderbord_data::-webkit-scrollbar-track {
  background-color: rgb(167, 167, 167);
}

  .leaderbord_data .row{
    display: block;
    background-color: #7674e4;
  }

  .leaderbord_data .col{
    display: inline-block;
    width: 10vw;
    text-align: center;
    color: white;
  }

  .col:first-child{
    float:left;
  }

  .col:last-child{
    float:right;
  }

  .leaderbord_data_rows{
    position: relative;
    top: 0px;
    left: 0px;
  }

  .leaderbord_data_rows *{
    pointer-events: none;
  }

  .leaderbord_data_rows > :nth-child(even) {
      background-color: #9190de !important;
  }

  .col img{
    width: auto;
    height: 3vh;
  }

  .col span{
    font-size: 2vh;
  }

  @media (max-width: 433px){
    .col span{
      font-size: 1vh !important;
    }
  }
