body {
  display: flex;
  justify-content: center;
  align-items: center;
}


#game-container {
  position: absolute;
  width: 780px;
  /* virtual width */
  height: 750px;
  /* virtual height */
  transform-origin: top left;
  background: linear-gradient(#000011, #001133);
  overflow: hidden;
}

/* Stars will be dynamically added to #background */
#background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.star {
  position: absolute;
  width: 2px;
  height: 2px;
  background: white;
}

#player {
  position: absolute;
  width: 60px;
  height: 60px;
  background: url(images/rocket.png);
  background-size: contain;
  border-radius: 50%;
}

.crystal {
  position: absolute;
  width: 40px;
  height: 40px;
  background: url(images/diamond.png);
  background-size: cover;
  border-radius: 50%;
}

.asteroid {
  position: absolute;
  width: 50px;
  height: 50px;
  background: url(images/astroid.png);
  background-size: cover;
  border-radius: 50%;
}

#score {
  position: absolute;
  top: 10px;
  left: 10px;
  color: white;
  font-family: Arial, sans-serif;
  font-size: 20px;
  z-index: 10;
}

.start {
  position: absolute;
  height: 100%;
  width: 100%;
  background: url(images/bg4.png);
  background-size: cover;
  background-position: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 11;
  transition: transform 0.5s ease, opacity 0.5s ease;
  transform: scale(1);
  opacity: 1;
}


.start.popup-hide {
  transform: scale(0.1);
  opacity: 0;
  pointer-events: none;
}



.logo {
  background: url(images/logo.png);
  height: 300px;
  width: 300px;
  background-size: cover;
  /* border: 2px solid white; */
  position: absolute;
  top: 130px;
  left: 50%;
  transform: translateX(-50%);
}

.statbutton {
  height: auto;
  width: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 60px;
  border-radius: 40px;
  position: absolute;
  top: 450px;
  left: 50%;
  transform: translateX(-50%);
}



/* CSS */
button.button-4,
button.button-4:before,
button.button-4:after {
  box-sizing: border-box;
}

button.button-4 {
  touch-action: manipulation;
  position: relative;
  background: transparent;
  border: none;
  outline: none;
  display: block;
  height: 60px;
  width: 175px;
  padding: 20px;
  font-size: 20px;
  line-height: 20px;
  font-weight: 100;
  text-transform: uppercase;
  margin: 0 auto;
  border-radius: 10px;
  top: 0;
  -webkit-transition: 0.15s ease-in-out;
  -moz-transition: 0.15s ease-in-out;
  -ms-transition: 0.15s ease-in-out;
  -o-transition: 0.15s ease-in-out;
  transition: 0.15s ease-in-out;
}

button.button-4 {
  touch-action: manipulation;
  -webkit-transform: perspective(500px) rotateX(35deg);
}

button.button-4:before {
  content: "";
  display: block;
  position: absolute;
  z-index: 1;
  background: #f25d30;
  /* Old browsers */
  background: -moz-linear-gradient(top, #f25d30 0%, #e03b00 100%);
  /* FF3.6+ */
  background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #f25d30), color-stop(100%, #e03b00));
  /* Chrome,Safari4+ */
  background: -webkit-linear-gradient(top, #f25d30 0%, #e03b00 100%);
  /* Chrome10+,Safari5.1+ */
  background: -o-linear-gradient(top, #f25d30 0%, #e03b00 100%);
  /* Opera 11.10+ */
  background: -ms-linear-gradient(top, #f25d30 0%, #e03b00 100%);
  /* IE10+ */
  background: linear-gradient(to bottom, #f25d30 0%, #e03b00 100%);
  /* W3C */
  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr="#f25d30", endColorstr="#e03b00", GradientType=0);
  /* IE6-9 */
  top: 0;
  left: 0;
  border-radius: 5px;
  width: 100%;
  height: 100%;
  padding: 20px;
  box-shadow: inset 0 -2px 5px rgba(255, 255, 255, 0.3);
}

button.button-4:after {
  content: "";
  display: block;
  position: absolute;
  bottom: -10px;
  left: 1px;
  height: 15px;
  width: 173px;
  background: #ba2500;
  /* Old browsers */
  background: -moz-linear-gradient(top, #ba2500 0%, #9b3100 100%);
  /* FF3.6+ */
  background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #ba2500), color-stop(100%, #9b3100));
  /* Chrome,Safari4+ */
  background: -webkit-linear-gradient(top, #ba2500 0%, #9b3100 100%);
  /* Chrome10+,Safari5.1+ */
  background: -o-linear-gradient(top, #ba2500 0%, #9b3100 100%);
  /* Opera 11.10+ */
  background: -ms-linear-gradient(top, #ba2500 0%, #9b3100 100%);
  /* IE10+ */
  background: linear-gradient(to bottom, #ba2500 0%, #9b3100 100%);
  /* W3C */
  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr="#ba2500", endColorstr="#9b3100", GradientType=0);
  /* IE6-9 */
  border-radius: 0 0 5px 5px;
  -webkit-transform: perspective(500px) rotateX(-40deg);
  box-shadow: inset 0 -2px 3px rgba(0, 0, 0, 0.5), 0 3px 2px -1px black;
  -webkit-transition: 0.15s ease-in-out;
  -moz-transition: 0.15s ease-in-out;
  -ms-transition: 0.15s ease-in-out;
  -o-transition: 0.15s ease-in-out;
  transition: 0.15s ease-in-out;
}

button.button-4:hover {
  top: -3px;
}

button.button-4:hover:after {
  height: 18.5px;
  bottom: -13px;
}

button.button-4:active {
  top: 0px;
}

button.button-4:active:after {
  height: 15px;
  bottom: -10px;
}

button.button-4 .text {
  position: relative;
  z-index: 2;
  font-weight: bold;
  color: white;
  text-shadow: 0 2px 2px rgba(0, 0, 0, 0.4);
}




.popup {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1100;
}

.popup-content {
  background: white;
  padding: 30px 50px;
  text-align: center;
  border-radius: 15px;
  font-family: sans-serif;
}

.popup.hide {
  display: none;
}


.ctrl-btn {
  position: absolute;
  width: 60px;
  height: 60px;
  font-size: 30px;
  margin: 5px;
  background-color: #333;
  color: white;
  border: none;
  border-radius: 10px;
  cursor: pointer;
}

.up {
  bottom: 30px;
  left: 30px;
}

.down {
  bottom: 30px;
  left: 100px;
}

.right {
  bottom: 30px;
  right: 30px;
}

.left {
  bottom: 30px;
  right: 100px;
}

.pause-button {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 10;
  background-color: rgba(255, 255, 255, 0.7);
  border: none;
  font-size: 24px;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.pause-button:hover {
  background-color: rgba(255, 255, 255, 0.9);
}
