*, *:before, *:after {
  box-sizing: border-box;
}

body {
  background-color: #222;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  margin: 0;
  padding: 0;
  font-family: 'SF Pixelate', sans-serif;
  font-size: 16px;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  cursor: default;
}

canvas {
  position: absolute;
  top: 0;
  left: 0;
  border: 1px solid black;
  z-index: 1;
  width: 600px;
  height: 360px;
}

ul {
  list-style: none;
  padding: 0;
  margin: 0
}
li {
  padding: 10px 0;
}

a {
  text-decoration: none;
  color: inherit;
  text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000;
}

.wrapper {
  width: 600px;
  height: 360px;
  position: absolute;
  
}

#menu {
  position: absolute;
  width: 600px;
  height: 360px;
  border: 1px solid black;
  z-index: 2;
  text-align: center;
  background-color: grey;
}
#menu.main {
  background-image: url('imgs/menu-bg.png');
}
#menu.credits {
  background-image: url('imgs/credits-bg.png');
}

#progress {
  height: 12%;
  margin: auto;
  position: absolute;
  top: 0; left: 0; bottom: 0; right: 0;
}
#percent {
  color: white;
  font-weight: bold;
  text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000;
}
#progress-bar {
  width: 200px;
}

.sound {
  display: none;
  position: absolute;
  top: 10px;
  left: 10px;
  width: 30px;
  height: 25px;
  cursor: pointer;
  z-index: 3;
}
.sound-on {
  background-image: url('imgs/soundOn.png');
  background-repeat: no-repeat;
}
.sound-off {
  background-image: url('imgs/soundOff.png');
  background-repeat: no-repeat;
}

#main {
  display: none;
  height: 60%;
  overflow: auto;
  margin: auto;
  position: absolute;
  top: 0; left: 0; bottom: 0; right: 0;
}
#main h1 {
  color: white;
  text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000;
}

.button {
  display: block;
  width: 150px;
  margin: 0 auto;
  height: 30px;
  line-height: 30px;
  border: 1px solid #222;
  color: white;
  font-weight: bold;
  text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000;
  background-color: #222;
  border-radius: 5px;
  box-shadow: 0px 0px 10px #000;
}

.button:hover {
  background-color: #000000;
}

#credits {
  display: none;
  line-height: 30px;
  margin: auto;
  position: absolute;
  top: 0; left: 0; bottom: 0; right: 0;
}
#credits li {
  padding: 5px 0;
}

.artwork, .music, .developer {
  text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000;
}

.back, .back:hover {
  margin-top: 10px;
}

#game-over {
  display: none;
  text-align: center;
  padding-top: 92px;
  z-index: 1;
  width: 600px;
  height: 360px;
  position: absolute;
}

#footertext{
  position: absolute;
  margin-top: 15px;
  text-align: center;
  color: white;
  bottom: 20px;
  font-size: 10px;
}

#twitterlink{
  width: 100px;
  height: 100px;
  position: absolute;
  bottom: 0px;
  left: 0px;

}


#jump{
  font-size: 30px;
  width: 400px;
  height: 100px;
  margin-top: 150px;
  position: absolute;
  bottom: 250px;
  
}

.button2 {
  display: block;
  width: 150px;
  margin: 0 auto;
  height: 30px;
  line-height: 30px;
  border: 1px solid #222;
  color: white;
  font-weight: bold;
  text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000;
  background-color: #222;
  border-radius: 5px;
  box-shadow: 0px 0px 10px #000;
}

#name{
  position: absolute;
  bottom: 200px;
  color: white;
  font-weight: bold;
  background-color: #222;
  border-radius: 5px;
  border: 1px solid white;
  width: 150px;
  text-align: center;
  line-height: 20px;

}


.mobileShow { display: none;}
/* Smartphone Portrait and Landscape */
@media only screen
and (min-device-width : 320px)
and (max-device-width : 480px){ .mobileShow { display: inline;}}

.mobileHide { display: inline;}
/* Smartphone Portrait and Landscape */
@media only screen
and (min-device-width : 320px)
and (max-device-width : 480px){  .mobileHide { display: none;}}



main {
  position: absolute;
  width: 20rem;
  height: 21.5rem;
  background-color: #ffffff;
  -webkit-box-shadow: 0px 5px 15px 8px #e4e7fb;
  box-shadow: 0px 5px 15px 8px #e4e7fb;
  display: flex;
  flex-direction: column;
  align-items: center;
  border-radius: 0.5rem;
}

#header {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1rem;
}

.share {
  width: 2.25rem;
  height: 1.5rem;
  background-color: #f55e77;
  border: 0;
  border-bottom: 0.1rem solid #c0506a;
  border-radius: 1rem;
  cursor: pointer;
}

.share:active {
  border-bottom: 0;
}

.share i {
  color: #fff;
  font-size: 1rem;
}

h1 {
  font-family: "Rubik", sans-serif;
  font-size: 0.85rem;
  color: #141a39;
  text-transform: uppercase;
  cursor: default;
}

#leaderboard {
  width: 100%;
  position: relative;
}

table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  color: #141a39;
  cursor: default;
}

tr {
  transition: all 0.2s ease-in-out;
  border-radius: 0.1rem;
}

tr:not(:first-child):hover {
  background-color: #fff;
  transform: scale(1.1);
  -webkit-box-shadow: 0px 5px 15px 8px #e4e7fb;
  box-shadow: 0px 5px 15px 8px #e4e7fb;
}

tr:nth-child(odd) {
  background-color: #f9f9f9;
}

tr:nth-child(1) {
  color: #fff;
}

td {
  height: 2.5rem;
  font-family: "Rubik", sans-serif;
  font-size: 0.7rem;
  padding: 0.5rem 1rem;
  position: relative;
}

.number {
  width: 0.5rem;
  font-size: 1.1rem;
  font-weight: bold;
  text-align: left;
}

.name {
  text-align: left;
  font-size: 0.6rem;
}

.points {
  font-weight: bold;
  font-size: 0.65rem;
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.points:first-child {
  width: 5rem;
}

.gold-medal {
  height: 1.5rem;
  margin-left: 0.75rem;
}

.ribbon {
  width: 21rem;
  height: 2.75rem;
  top: -0.5rem;
  background-color: #5c5be5;
  position: absolute;
  left: -0.5rem;
  -webkit-box-shadow: 0px 15px 11px -6px #7a7a7d;
  box-shadow: 0px 15px 11px -6px #7a7a7d;
}

.ribbon::before {
  content: "";
  height: 1.5rem;
  width: 1.5rem;
  bottom: -0.8rem;
  left: 0.35rem;
  transform: rotate(45deg);
  background-color: #5c5be5;
  position: absolute;
  z-index: -1;
}

.ribbon::after {
  content: "";
  height: 1.5rem;
  width: 1.5rem;
  bottom: -0.8rem;
  right: 0.35rem;
  transform: rotate(45deg);
  background-color: #5c5be5;
  position: absolute;
  z-index: -1;
}

#buttons {

  margin-top: 3rem;
  display: flex;
  justify-content: center;
  gap: 2rem;
}

.exit {
  width: 11rem;
  height: 3rem;
  font-family: "Rubik", sans-serif;
  font-size: 1.3rem;
  text-transform: uppercase;
  color: #7e7f86;
  border: 0;
  background-color: #fff;
  border-radius: 2rem;
  cursor: pointer;
}

.exit:hover {
  border: 0.1rem solid #5c5be5;
}

.continue {
  width: 5.5rem;
  height: 1.5rem;
  font-family: "Rubik", sans-serif;
  font-size: 0.75rem;
  color: #fff;
  text-transform: uppercase;
  background-color: #5c5be5;
  border: 0;
  border-bottom: 0.1rem solid #3838b8;
  border-radius: 1rem;
  cursor: pointer;
}

.continue:active {
  border-bottom: 0;
}

@media (max-width: 740px) {
    * {
      font-size: 70%;
    }
}

@media (max-width: 500px) {
    * {
      font-size: 55%;
    }
}

@media (max-width: 390px) {
    * {
      font-size: 45%;
    }
}

* {
  font-size: 62, 5%;
  box-sizing: border-box;
  margin: 0;
}
