* {
   margin: 0;
   padding: 0;
   box-sizing: border-box;
}

body {
   overflow: hidden;
   background-color: rgba(29, 32, 41, 1);
   background-image: url("./pattern.png");
   font-family: Arial;
   user-select: none;
}
canvas {
   margin: 0;
   padding: 0;
   width: 100%;
   height: 100%;
}

.score {
   color: #ffe100;
   position: absolute;
   text-align: center;
   position: absolute;
   top: 40px;
   left: 50%;
   transform: translateX(-50%);
   border-radius: 10px;
   display: none;
}

@media (max-width: 768px) {
   .score {
      color: #ffe100;
      position: absolute;
      text-align: center;
      position: absolute;
      top: auto;
      bottom: 100px;
      left: 50%;
      transform: translateX(-50%);
      border-radius: 10px;
      display: none;
   }
}

.score span {
   display: block;
}
.score span:first-child {
   font-size: 18px;
   color: #fff;
}
.score span:last-child {
   font-size: 40px;
   font-weight: bold;
}

.health,
.ability {
   width: 250px;
   height: 25px;
   border: 3px solid #fff;
   position: absolute;
   bottom: 20px;
   left: 50%;
   transform: translateX(-50%) skew(-25deg);
   overflow: hidden;
   -webkit-transform: translateX(-50%) skew(-25deg);
   -moz-transform: translateX(-50%) skew(-25deg);
   -ms-transform: translateX(-50%) skew(-25deg);
   -o-transform: translateX(-50%) skew(-25deg);
   display: none;
}

.health span,
.ability span {
   position: absolute;
   left: 0;
   height: 100%;
   width: 0%;
   background-color: #1dbc60;
}

.ability {
   bottom: 50px;
   transform: translateX(-50%) skew(25deg);
   -webkit-transform: translateX(-50%) skew(25deg);
   -moz-transform: translateX(-50%) skew(25deg);
   -ms-transform: translateX(-50%) skew(25deg);
   -o-transform: translateX(-50%) skew(25deg);
}

.ability span {
   /* background-color: #fff; */
   background-color: #ffe100;
   box-shadow: 0px 0 5px #ffee6d, 0px 0 15px #ffee6d, 0px 0 20px #ffee6d;
}
.pauseScreen {
   display: none;
}
.startScreen,
.pauseScreen {
   width: 380px;
   padding: 30px;
   background-color: #393e52;
   border-bottom: 8px solid #14191b;
   box-shadow: inset 0px 2px 1px #516b77;
   color: #fff;
   position: absolute;
   top: 50%;
   left: 50%;
   transform: translate(-50%, -50%);
   -webkit-transform: translate(-50%);
   -moz-transform: translate(-50%);
   -ms-transform: translate(-50%);
   -o-transform: translate(-50%);
   border-radius: 10px;
   -webkit-border-radius: 10px;
   -moz-border-radius: 10px;
   -ms-border-radius: 10px;
   -o-border-radius: 10px;
}

.startScreen .highScore,
.pauseScreen .highScore {
   text-align: center;
   font-size: 18px;
}

.startScreen .highScore div,
.pauseScreen .highScore div {
   font-size: 40px;
   font-weight: bold;
   color: #ffe100;
}

.startScreen p,
.pauseScreen p {
   text-align: center;
}

.startScreen p a,
.pauseScreen p a {
   color: #fece2f;
   background-color: rgba(254, 206, 47, 0.2);
   padding: 4px;
   border-radius: 5px 8px;
   text-decoration: none;
   -webkit-border-radius: 5px 8px;
   -moz-border-radius: 5px 8px;
   -ms-border-radius: 5px 8px;
   -o-border-radius: 5px 8px;
}

.btn-Container {
}

.btn-Container div {
   text-align: center;
}

.btn-Container div:first-of-type {
   width: 100%;
   background-image: linear-gradient(to bottom, #fece2f, #a38626);
   box-shadow: inset 1px 2px 1px #ffeaa6;
   color: #79600f;
   border-bottom: 5px solid #5a4b1a;
   font-size: 25px;
   font-weight: bold;
   text-align: center;
   padding: 15px;
   margin-top: 15px;
   border-radius: 8px;
   -webkit-border-radius: 8px;
   -moz-border-radius: 8px;
   -ms-border-radius: 8px;
   -o-border-radius: 8px;
   transition: 0.3s;
   -webkit-transition: 0.3s;
   -moz-transition: 0.3s;
   -ms-transition: 0.3s;
   -o-transition: 0.3s;
}

.btn-Container div:first-of-type:hover {
   background-image: linear-gradient(to bottom, #ffdd6c, #a38626);
   border-color: #746125;
   cursor: pointer;
}

.btn-Container div:last-child {
   margin-top: 20px;
   margin-bottom: 0;
   color: #ddd;
   font-size: 14px;
}
.btn-Container div:last-child span {
   margin-top: 20px;
   margin-bottom: 0;
   background-color: rgb(0 0 0 / 20%);
   padding: 5px 10px;
   border-radius: 5px;
   margin: 0 2px;
   color: #fff;
}

#playerName {
   height: 50px;
   border-radius: 8px;
   border: 0;
   padding: 10px;
   width: 100%;
   font-size: 20px;
   font-weight: bold;
   outline: none;
   text-align: center;
   border: 4px solid #a38626;
   color: #a38626;
}
.gamename {
   font-size: 9em;
   text-align: center;
   margin-bottom: 20px;
   color: #fff;
   margin-top: 100px;
   font-family: "Modak";
   position: absolute;
   left: 50%;
   transform: translateX(-50%);
   line-height: 1;
   /* text-shadow: 0px 7px 0 #5c5509; */
}

@media (max-width: 768px) {
   .gamename {
      font-size: 6em;
   }
}

.gamename div {
   font-size: 1.4em;
   background-image: linear-gradient(135deg, #ffd45f, #d69c30);
   background-clip: text;
   -webkit-background-clip: text;
   -webkit-text-fill-color: transparent;
}

#copyright {
   position: absolute;
   bottom: 10px;
   left: 10px;
}

@media (max-width: 768px) {
   #copyright {
      position: absolute;
      top: 10px;
      left: 10px;
   }
}

#copyright a {
   color: #fff;
   font-weight: 200;
   text-decoration: none;
   text-transform: uppercase;
}

.leaderboard {
   position: absolute;
   top: 10px;
   right: 10px;
   width: 200px;
   background-color: rgb(0 0 0 / 25%);
   padding: 10px;
   border-radius: 10px;
   color: #fff;
   opacity: 0.7;
}

.leaderboard h3 {
   margin-bottom: 8px;
}

.leaderboard h3 span {
   display: inline-block;
}
.leaderboard .items {
   text-align: center;
}

.leaderboard .items i {
   font-size: 14px;
}
.leaderboard .items .item {
   display: flex;
   /* justify-content: space-between; */
   align-items: baseline;
   font-size: 12px;
   margin-bottom: 4px;
}

.leaderboard .items .item > div span:first-child {
   font-size: 16px;
}
.leaderboard .items .item > div span:last-child.active {
   color: #ffe100;
}
.leaderboard .items .item > div:last-child {
   font-size: 12px;
   margin-left: auto;
}

@media (max-width: 768px) {
   .leaderboard {
      right: 5px;
      top: 5px;
      width: 180px;
   }
   .leaderboard h3 {
      font-size: 1em;
   }
   .leaderboard .items .item > div span:first-child {
      font-size: 1em;
   }
   .leaderboard .items .item {
      font-size: 0.75em;
   }
   .leaderboard .items .item > div:last-child {
      font-size: 1em;
      margin-left: auto;
   }
}

.highScore {
   display: flex;
   flex-direction: column;
   align-items: center;
   justify-content: center;
   margin-bottom: 20px;
}
.highScore span:first-child {
   font-size: 35px;
   color: #ffe100;
}
.highScore span:last-child {
   text-transform: uppercase;
   letter-spacing: 2px;
   font-size: 12px;
}

.leaderItem {
   display: flex;
   justify-content: space-between;
   background-color: #454b66;
   margin: 10px 0;
   padding: 10px;
   border-radius: 6px;
   -webkit-border-radius: 6px;
   -moz-border-radius: 6px;
   -ms-border-radius: 6px;
   -o-border-radius: 6px;
}
