img {
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  touch-action: manipulation;
}

p {
  font-family: 'Cabin', sans-serif;
}

.card {
  position: relative;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -ms-flex-direction: column;
  flex-direction: column;
  min-width: 0;
  word-wrap: break-word;
  background-color: #fff;
  background-clip: border-box;
  border: 1px solid rgba(0, 0, 0, 0.125);
  border-radius: 0.25rem;
  border-width: 0px;
  border-radius: 10px;
}

.card-image {
  background-size: cover;
  background-position: top center;
  border-top-left-radius: 10px;
  border-top-right-radius: 10px;
  position: relative;
  overflow: hidden;
}

.card-title {
  font-size: 25px;
}
.card-title a {
  text-decoration: none;
  color: #2c3e50;
}

.card-image:before {
  display: block;
  content: '';
  width: 100%;
  padding-top: 51.4285714286%;
}

.card-image > img {
  width: 100%;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  height: 100%;
  -o-object-fit: cover;
  object-fit: cover;
}

.card-body {
  -webkit-box-flex: 1;
  -ms-flex: 1 1 auto;
  flex: 1 1 auto;
  padding: 1rem 1rem;
  padding-bottom: 60px;
}

.card-btn.btn {
  position: absolute;
  bottom: 7.5px;
  padding-left: 0px !important;
  padding-right: 0px !important;
}

.btn-link {
  color: #3c5df3 !important;
}

.btn-link:after {
  content: '>';
  display: inline-block;
  margin-left: 7.5px;
  -webkit-transition: 0.1s;
  transition: 0.1s;
}

.btn-link:hover:after {
  -webkit-transform: translatex(3px);
  transform: translatex(3px);
}

/**
 * Make 100%
 **/
#container {
  background-image: url('../img/game/game-background.png');
  position: absolute;
  top: 21%;
  left: 50%;
  transform: translateX(-50%);
  width: 45%;
  height: 46%;
  background-size: cover;
  background-position: center center;
}

#content {
  color: white;
  max-width: 1200px;
  font-size: 25px;
}

.about {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 40px;
}

.about__content {
  padding: 15px 30px;
  width: 100%;
  box-sizing: border-box;
}

.related__cta {
  text-align: center;
}

.related__cards {
  margin-top: 60px;
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
}

.related__cards .card {
  width: 100%;
}

.btn {
  display: inline-block;
  font-weight: 500;
  line-height: 1.5;
  color: #2c3e50;
  text-align: center;
  text-decoration: none;
  vertical-align: middle;
  cursor: pointer;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  background-color: transparent;
  border: 1px solid transparent;
  padding: 0.375rem 0.75rem;
  font-size: 1rem;
  border-radius: 50px;
  -webkit-transition: color 0.15s ease-in-out,
    background-color 0.15s ease-in-out, border-color 0.15s ease-in-out,
    -webkit-box-shadow 0.15s ease-in-out;
  transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out,
    border-color 0.15s ease-in-out, -webkit-box-shadow 0.15s ease-in-out;
  transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out,
    border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
  transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out,
    border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out,
    -webkit-box-shadow 0.15s ease-in-out;
}

.btn-primary {
  background-color: #f7c20f;
  border-color: #f7c20f;
  font-family: 'Cabin';
}

.btn-sm {
  padding: 0.3em 1em !important;
  font-size: 16px !important;
}

.btn-lg {
  padding: 0.5rem 1rem;
  font-size: 1.25rem;
  border-radius: 50px;
}

.btn-check:focus + .btn-primary,
.btn-primary:focus,
.is-rewind-styled .actions .btn-check:focus + [type='submit'],
.is-rewind-styled .actions [type='submit']:focus {
  color: #000;
  background-color: #f8cb33;
  border-color: #f8c827;
  -webkit-box-shadow: 0 0 0 0.25rem rgba(210, 165, 13, 0.5);
  box-shadow: 0 0 0 0.25rem rgba(210, 165, 13, 0.5);
}

.btn-primary.active {
  color: #000;
  background-color: #f9ce3f;
  border-color: #f8c827;
}

.btn-primary.active:focus {
  -webkit-box-shadow: 0 0 0 0.25rem rgba(210, 165, 13, 0.5);
  box-shadow: 0 0 0 0.25rem rgba(210, 165, 13, 0.5);
}

.btn-primary.disabled {
  color: #000;
  background-color: #f7c20f;
  border-color: #f7c20f;
}

#container.is-over {
  background-image: none;
}

#game-canvas {
  margin: 0;
  padding: 0;
  border: 0;
  height: 100%;
  width: 100%;
}

#invader-info {
  position: absolute;
  bottom: 230px;
  left: 415px;

  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;

  width: 200px;
  height: 145px;

  font-family: 'Bungee Inline', cursive;
  font-size: 20px;
  color: #fff;
}

#invader-info p {
  margin: 0;
  border: 0;
  padding: 0;
}

#splash-instruction {
  position: absolute;
  bottom: 170px;
  left: 215px;
  width: 500px;
  height: 40px;

  text-align: center;
  font-family: 'Bungee Inline', cursive;
  font-size: 23px;
  color: #fff;
  letter-spacing: 2px;
}

#audio {
  position: absolute;
  bottom: 10px;
  right: 10px;

  height: 40px;
  width: 40px;
}

#mute {
  position: absolute;
  text-transform: uppercase;
  background: transparent;
  border-radius: 3px;
  outline: none;
  border: 0px;
  color: #2c3e50;
  font-weight: bold;
  bottom: -60px;
  right: 10px;
  width: 70px;
}

#mute img {
  /* max-width: 70px; */
  max-width: 100%;
}

#audio:hover {
  cursor: pointer;
}

#mute:hover {
  cursor: pointer;
}

#menu-button {
  font-family: 'Bungee Inline', cursive;
  font-size: 23px;
  color: #e7e7e7;

  position: absolute;
  top: 11px;
  left: 420px;

  width: 300px;
  height: 30px;
  z-index: 5;
}

#menu-button:hover {
  cursor: pointer;
  color: #ffff6d;
}

#menu-container {
  position: absolute;
  bottom: 100px;
  left: 300px;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-around;

  background-color: grey;
  height: 400px;
  width: 300px;

  font-family: 'Bungee Inline', cursive;
  font-size: 22px;
  letter-spacing: 2px;
  color: #fff;

  border-radius: 10px;
}

.popup-wrapper {
  background: rgba(236, 240, 241, 0.95);
  padding: 30px 30px 30px 15px;
  border-radius: 15px;
  /* display: flex;
  align-items: flex-start; */
}

.popup-wrapper__content {
  max-width: 350px;
  margin: auto;
  min-height: 100%;
  color: #2c3e50;
  font-size: 14px;
  padding-left: 25px;
  max-height: 430px;
  overflow-y: auto;
  overflow-x: hidden;
}

.popup-wrapper__title {
  width: auto !important;
  max-height: 25px;
  max-width: 100%;
  height: auto;
}

.popup-wrapper__content hr {
  margin-top: 30px;
  margin-bottom: 30px;
  border-color: #2c3e50;
  opacity: 0.5;
  border-width: 1px;
}

.popup-wrapper__content h3 {
  margin-top: 10px;
}

.popup-wrapper__content > h3 {
  text-transform: uppercase;
  font-weight: bold;
}

.popup-wrapper__close {
  cursor: pointer;
  background: none;
  border: none;
  outline: none;
  font-size: 40px;
  position: relative;
}

.popup-wrapper__close:before {
  content: '';
  background-image: url('../img/game/close.svg');
  background-size: contain;
  background-repeat: no-repeat;
  display: block;
  width: 100%;
  height: 100%;
  width: 15px;
  height: 15px;
}

.mobile-btns {
  display: flex;
  justify-content: space-between;
}

.mobile-btns__item {
  /* max-width: 70px; */
  margin-right: 10px;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.mobile-btns__item:last-child {
  margin-right: 0px;
}

.mobile-btns__item img {
  margin-bottom: 10px;
  max-width: 30px;
  height: auto;
}

.invader-types {
  margin-top: 30px;
}

.invader-types__item {
  display: flex;
  align-items: flex-start;
}

.invader-types__item img {
  max-width: 40px;
  margin-right: 10px;
}

.invader-types__item h3 {
  margin-top: 0;
  margin-bottom: 3px;
}

.invader-types__item p {
  margin-top: 0;
}

.button:hover {
  cursor: pointer;
}

#port-link {
  color: #ffff6d;
  text-decoration: none;
  transition: color 0.15s ease-in;
}

#port-link:hover {
  color: #fff;
  transition: color 0.15s ease-in;
}

#close-about {
  margin-left: 200px;
  margin-top: 5px;
  color: #fff;
}

#close-about:hover {
  cursor: pointer;
  color: #ffff6d;
}

#instructions-button:hover {
  cursor: pointer;
  color: #ffff6d;
}

#instructions {
  padding: 0 15px 0 15px;

  position: absolute;
  bottom: 100px;
  left: 300px;

  background-color: grey;
  height: 400px;
  width: 300px;

  font-family: 'Bungee Inline', cursive;
  letter-spacing: 1px;
  line-height: 25px;
  color: #000;

  text-align: center;
  border-radius: 10px;
}

#close-instructions {
  margin-left: 200px;
  margin-top: 5px;
  color: #fff;
}

#close-instructions:hover {
  cursor: pointer;
  color: #ffff6d;
}

#close-instructions:hover {
  cursor: pointer;
  color: #ffff6d;
}

#resume-button:hover {
  cursor: pointer;
  color: #ffff6d;
}

#restart-button:hover {
  cursor: pointer;
  color: #ffff6d;
}

#grunt-1 {
  position: absolute;
  left: 355px;
  bottom: 350px;

  height: 30px;
  width: 30px;
}

#soldier-1 {
  position: absolute;
  left: 355px;
  bottom: 310px;

  height: 30px;
  width: 30px;
}

#invader-1 {
  position: absolute;
  left: 355px;
  bottom: 270px;

  height: 30px;
  width: 30px;
}

#ufo {
  position: absolute;
  left: 344px;
  bottom: 226px;

  height: 32px;
  width: 55px;
}

.hide {
  display: none;
  z-index: -5;
}

.show {
  z-index: 5;
}

#game-over {
  position: absolute;
  z-index: 99999;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  text-align: center;
  color: white;
  font-family: 'Bungee Inline', cursive;
  background: black;
}

#game-over-wrapper {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 50%;
}

#game-over-wrapper img {
  width: 100%;
}

#restart-text {
  cursor: pointer;
  display: inline-block;
  font-family: 'Bungee Inline', cursive;
}

#game-over-wrapper #share-btn {
  width: auto;
  height: 54px;
  cursor: pointer;
}

#final-score {
  font-size: 18px;
  font-family: 'Bungee Inline', cursive;
}

#copied-text {
  font-size: 14px;
  padding: 21px 0 20px;
  margin: 0;
  font-family: 'Bungee Inline', cursive;
}

.cover-container {
  width: 100%;
  height: 100%;
  background: url('../img/game/cover-bg.png');
  background-size: cover;
  background-position: center;
  position: absolute;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 24px;
  box-sizing: border-box;
}

.cover-container.hide {
  display: none;
}

.logo-wrapper {
  text-align: center;
  width: 65%;
  display: flex;
  flex-direction: column;
}

#main-logo {
  width: 100%;
}

.cover-btn-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
}

.cover-btn-wrapper img {
  width: 100%;
}

#play-game,
#help,
#story {
  cursor: pointer;
}

#cover-score {
  width: 30%;
  margin-left: 10%;
}

#control-btn-wrapper {
  align-items: center;
  justify-content: space-between;
  margin-top: 24px;
  padding: 24px 12px 0;
  display: none;
}

#right-btn {
  margin-left: 24px;
}

#control-btn-wrapper img {
  width: 100px;
  cursor: pointer;
}

#help-menu,
#story-menu {
  position: absolute;
  left: 50%;
  top: 70%;
  transform: translate(-50%, -50%);
  width: 90%;
}

#help-menu img,
#story-menu img {
  width: 100%;
}

#controller-img {
  max-width: 100%;
  width: 100%;
  max-height: 100%;
}

#wrapper.container {
  padding-left: 0px;
  padding-right: 0px;
}

#canvas-wrapper {
  height: 100%;
  width: 100%;
}

@media screen and (max-width: 980px) {
  #container {
    width: 100%;
    top: 0;
    left: 0;
    transform: none;
    position: relative;
    padding-bottom: 20px;
  }

  #canvas-wrapper {
    height: calc(100vh - 300px);
  }

  #control-btn-wrapper:not(.hide) {
    display: flex;
  }

  #controller-img {
    display: none;
  }
}

@media (min-width: 768px) {
  .related__cards {
    flex-wrap: nowrap;
  }

  .related__cards .card {
    width: 33%;
  }

  #help-menu,
  #story-menu {
    width: 60%;
    top: 50%;
  }

  .popup-wrapper__content {
    padding-left: 45px;
  }

  .popup-wrapper__close:before {
    width: 20px;
    height: 20px;
  }
}

@media (min-width: 980px) {
  .outer {
    position: relative;
  }

  .outer:before {
    display: block;
    content: '';
    width: 100%;
    padding-top: calc((9 / 16) * 100%);
  }

  .outer > .inner {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
  }

  .mobile-btns__item img {
    max-width: 60px;
  }

  #mute {
    bottom: 0px;
    width: 45px;
    right: 0;
  }
}

@media (min-width: 1200px) {
  #mute {
    width: 50px;
  }
}