@import url("https://fonts.googleapis.com/css2?family=Inconsolata:wght@400;500;700&display=swap");

body {
  margin: 0;
  height: 100%;
}

html,
body {
  height: 100%;
  overflow: hidden;
}

html {
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
  background-image: url(./images/background.jpg);
  font-family: "Inconsolata", monospace;
}

#app {
  min-height: 100%;
  position: relative;
  height: 100%;
  width: 100%;
}

.game-elements-container {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
  overflow: hidden;
}

#game-elements {
  position: relative;
  height: 100%;
  width: 100%;
}

/* MENU */

.menu .sound svg {
  width: 40px;
  height: 40px;
  margin: 10px;
  fill: #fff;
}

.menu .sound {
  cursor: pointer;
}

.menu .music svg {
  width: 35px;
  height: 35px;
  position: absolute;
  top: 60px;
  right: 15px;
  fill: #fff;
  cursor: pointer;
}

.menu {
  display: flex;
  justify-content: space-between;
  position: relative;
  z-index: 9999;
}

.menu .lifes {
  display: flex;
  margin: 10px;
}
.menu .lifes span {
  background-image: url(./images/bird-life.svg);
  width: 40px;
  height: 40px;
  display: block;
  background-repeat: no-repeat;
  background-size: contain;
}

.menu .score,
.menu .eggs-count {
  color: #fff;
  font-size: 34px;
  font-weight: 700;
  margin-top: 10px;
  right: 65px;
  position: absolute;
  z-index: 9999;
  text-shadow: rgba(2, 0, 1, 0.5) 1px 1px 3px;
}

.menu .eggs-count {
  right: calc(50% - 65px);
}

/* PLAYER */

#player {
  display: block;
  position: absolute;
  width: 130px;
  height: 135px;
  background-size: contain;
  position: absolute;
  top: 35px;
  left: calc(50% - 65px);
  transition: all 0.3s ease-out;
  background-repeat: no-repeat;
  background-position: center;
  z-index: 9998;
}

#player.skin1 {
  background-image: url(./images/angry-goose.gif);
}

#player.skin2 {
  background-image: url(./images/angry-seagull.gif);
}

.egg {
  display: block;
  position: absolute;
  left: 154px;
  top: 107px;
  width: 16px;
  height: 22px;
  background-color: #edffeb;
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  box-shadow: 0px 0px 10px, 0px 0px 2px inset;
  animation: glow 1.5s linear infinite;
}

.egg-broken {
  display: block;
  position: absolute;
  left: 154px;
  bottom: 0;
  width: 100px;
  height: 20px;
  transition: all 0.3s ease-out;
  background-image: url(./images/broken-egg.gif);
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

@keyframes glow {
  from {
    color: lime;
    box-shadow: 0px 0px 9px lime;
  }

  50% {
    color: lime;
    box-shadow: 0px 0px 18px lime;
  }

  to {
    color: lime;
    box-shadow: 0px 0px 9px lime;
  }
}

/* BONUSES */

.tank {
  width: 300px;
  height: 169px;
  left: 50%;
  bottom: 21%;
  background-image: url(./images/tank-war.gif);
  display: block;
  background-size: contain;
  position: absolute;
  transition: all 0.3s ease-out;
  background-repeat: no-repeat;
  background-position: center;
}

.tank.boom {
  width: 300px;
  height: 80px;
  background-image: url(./images/bird-life.svg);
}

.bavovna {
  display: block;
  position: absolute;
  top: 28%;
  left: 0;
  width: 100px;
  height: 100px;
  background-image: url(./images/bavovna.gif);
  transition: all 0.3s ease-out;
  transform: rotate(180deg) scale(1, -1);
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

.bavovna.boom {
  background-image: url(./images/boom-bavovna.gif);
}

.duck-right {
  display: block;
  position: absolute;
  top: 200px;
  right: 0;
  width: 50px;
  height: 50px;
  background-image: url(./images/duck.gif);
  transition: all 0.3s ease-out;
  transform: rotate(170deg) scale(1, -1);
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  cursor: pointer;
}

.duck-left {
  display: block;
  position: absolute;
  top: 200px;
  left: 0;
  width: 50px;
  height: 50px;
  background-image: url(./images/duck.gif);
  transition: all 0.3s ease-out;
  transform: rotate(10deg);
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  cursor: pointer;
}

/* ENEMY */

.enemy {
  display: block;
  position: absolute;
  background-size: contain;
  background-image: url(./images/pig-dog-son-cut.png);
  transition: all 0.5s ease-out;
  background-repeat: no-repeat;
  background-position: center;
}

.enemy.skin-1 {
  width: 134px;
  height: 120px;
  right: 0px;
  bottom: 0px;
  background-image: url(./images/pig-dog-son-cut.png);
  z-index: 9998;
}

.enemy.skin-1.boom {
  background-image: url(./images/boom-1.gif);
}

.enemy.skin-1.boom.bag {
  width: 130px;
  height: 150px;
  background-image: url(./images/black-plastic-bag.png);
}

.enemy.skin-2 {
  width: 137px;
  height: 253px;
  left: 0px;
  bottom: 0px;
  background-image: url(./images/soldier-wc.gif);
  transform: rotate(180deg) scale(1, -1);
  z-index: 9990;
}

.enemy.skin-2.boom {
  height: 155px;
  background-image: url(./images/boom-2.gif);
}

.enemy.skin-2.boom.bag {
  width: 130px;
  height: 150px;
  background-image: url(./images/black-plastic-bag.png);
}

.black-plastic-bag {
  width: 130px;
  height: 150px;
  left: 300px;
  bottom: 0px;
  background-image: url(./images/black-plastic-bag.png);
}

.enemy.skin-3 {
  width: 200px;
  height: 62px;
  right: 0;
  top: 25%;
  background-image: url(./images/shahed.png);
  transform: rotate(180deg) scale(1, -1);
}

.enemy.skin-3.boom {
  width: 150px;
  height: 150px;
  background-image: url(./images/boom-1.gif);
  background-size: contain;
}

.siren {
  display: block;
  position: absolute;
  background-size: contain;
  position: absolute;
  width: 24px;
  height: 24px;
  left: 10px;
  background-image: url(./images/siren.gif);
  transform: rotate(180deg);
  top: 0;
  left: calc(50% - 12px);
  transition: all 0.3s ease-out;
  background-repeat: no-repeat;
  background-position: center;
}

/* INTRODUCTION GAME WINDOWS */

.introduction {
  width: 500px;
  height: fit-content;
  border-radius: 10px;
  position: absolute;
  top: calc(50% - 270px);
  left: calc(50% - 230px);
  padding: 20px;
  background-image: url(./images/window-bg.jpg);
  box-shadow: rgba(0, 0, 0, 0.5) 1px 1px 8px, rgba(34, 34, 34, 0.3) 1px 1px 10px;
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  z-index: 9999;
  color: #ffffff;
  text-shadow: rgba(2, 0, 1, 0.5) 1px 1px 3px;
  border: solid 2px #fff;
}

.introduction .close-introduction {
  position: absolute;
  fill: #fff;
  width: 30px;
  height: 30px;
  right: 10px;
  top: 10px;
  cursor: pointer;
}

.introduction h1,
.introduction h2 {
  margin: 2px;
  text-align: center;
  text-transform: uppercase;
  font-size: 24px;
}

.introduction p {
  margin: 2px 0;
  font-size: 14px;
  text-indent: 24px;
}

.introduction .resources-used {
  margin-top: 10px;
}

.introduction p a,
.developers a {
  text-decoration: none;
  color: #cecece;
}

.developers {
  color: #fff;
  font-size: 12px;
  text-align: center;
  margin: -10px 0 0 0;
}

.introduction p a:hover,
.introduction p a:focus,
.developers a:hover,
.developers a:focus {
  color: #b4b4b4;
}

.introduction span {
  display: inline-block;
  vertical-align: middle;
  width: 30px;
  height: 30px;
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
}

.introduction .key-a {
  background-image: url(./images/key-a.png);
}

.introduction .key-d {
  background-image: url(./images/key-d.png);
}

.introduction .key-arrow-left {
  background-image: url(./images/key-arrow-left.png);
}

.introduction .key-arrow-right {
  background-image: url(./images/key-arrow-right.png);
}

.introduction .key-space {
  background-image: url(./images/key-space.png);
  width: 60px;
}

/* START/END GAME WINDOWS */

.start-game,
.end-game {
  width: 400px;
  height: fit-content;
  border-radius: 10px;
  position: absolute;
  top: calc(50% - 230px);
  left: calc(50% - 220px);
  padding: 20px;
  background-image: url(./images/window-bg.jpg);
  box-shadow: rgba(0, 0, 0, 0.5) 1px 1px 8px, rgba(34, 34, 34, 0.3) 1px 1px 10px;
  transition: all 0.3s ease-out;
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  z-index: 9999;
  border: solid 2px #940202;
}

.start-game h1,
.end-game h1 {
  margin: 10px auto;
  text-align: center;
  font-size: 42px;
  text-transform: uppercase;
  color: #ffffff;
  text-shadow: rgba(2, 0, 1, 0.5) 1px 1px 3px;
}

.start-game h2 {
  margin: 5px auto;
  text-align: center;
  font-size: 28px;
  text-transform: uppercase;
  color: #ffffff;
  text-shadow: rgba(2, 0, 1, 0.5) 1px 1px 3px;
}

.start-game button,
.end-game button {
  background-image: linear-gradient(
    92.88deg,
    #da2626 9.16%,
    #a31616 43.89%,
    #a80000 64.72%
  );
  border-radius: 15px;
  border-style: none;
  box-sizing: border-box;
  color: #ffffff;
  cursor: pointer;
  font-size: 20px;
  font-weight: 500;
  height: 3rem;
  padding: 0 1.3rem;
  text-align: center;
  text-shadow: rgba(2, 0, 1, 0.5) 1px 1px 3px;
  transition: all 0.5s;
  touch-action: manipulation;
  margin: 15px auto;
  display: block;
  box-shadow: rgba(0, 0, 0, 0.5) 1px 1px 8px, rgba(34, 34, 34, 0.3) 1px 1px 10px;
}

.start-game button:hover,
.start-game button:focus,
.end-game button:hover,
.end-game button:focus {
  border: 3px solid #110000;
  box-shadow: rgba(46, 46, 46, 0.5) 1px 1px 10px,
    rgba(95, 95, 95, 0.3) 1px 1px 14px;
  transition-duration: 0.1s;
}

.start-game .skins {
  display: flex;
}

.start-game .select-skin {
  width: 50%;
  height: 220px;
  margin: 5px;
  border: 4px solid #940202;
  border-radius: 5px;
  background-repeat: no-repeat;
  background-size: contain;
  background-position: center;
  cursor: pointer;
}

.start-game .select-skin:hover,
.start-game .select-skin:focus {
  border: 4px solid lime;
  box-shadow: rgba(0, 0, 0, 0.5) 1px 1px 8px, rgba(34, 34, 34, 0.3) 1px 1px 10px;
  transition-duration: 0.1s;
}

.start-game .select-skin.skin-1 {
  background-image: url(./images/like-goose.gif);
}

.start-game .select-skin.skin-2 {
  background-image: url(./images/like-seagull.gif);
}

.start-game .skins input {
  display: none;
}

.start-game .skins input[type="radio"]:checked + label {
  border: 4px solid lime;
}

.end-game-head {
  display: flex;
}

.result {
  margin: 10px auto;
  text-align: center;
  font-size: 32px;
  text-transform: uppercase;
  color: #ffffff;
  text-shadow: rgba(2, 0, 1, 0.5) 1px 1px 3px;
}

.end-game .logo {
  height: 70px;
}

.end-game .end-gif {
  width: 98%;
  border-radius: 10px;
  box-shadow: rgba(0, 0, 0, 0.5) 1px 1px 8px, rgba(34, 34, 34, 0.3) 1px 1px 10px;
  border: solid 2px #940202;
}

.game-elements {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
}

/* ARROWS */

.arrow {
  position: absolute;
  top: calc(50% - 50px);
  transition: all 0.5s ease-out;
  width: 100px;
  height: 100px;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  opacity: 0.3;
  z-index: 9999;
  cursor: pointer;
}

.arrow-left {
  left: 20px;
  background-image: url(./images/arrow_left_circle_icon.svg);
}

.arrow-left:hover {
  opacity: 0.5;
  transform: rotate(360deg);
}

.arrow-right {
  right: 20px;
  background-image: url(./images/arrow_right_circle_icon.svg);
}

.arrow-right:hover {
  opacity: 0.5;
  transform: rotate(-360deg);
}

.shot-btn {
  position: absolute;
  background-image: url(./images/shot-btn.svg);
  top: calc(50% - 50px);
  left: calc(50% - 50px);
  transition: all 0.5s ease-out;
  width: 100px;
  height: 100px;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  opacity: 0.3;
  z-index: 9999;
  cursor: pointer;
}

.shot-btn:hover {
  opacity: 0.5;
  transform: scale(0.9);
}

/* HELPERS */

.hidden {
  display: none;
}

@media screen and (max-width: 768px) {
  .menu .score,
  .menu .eggs-count {
    font-size: 28px;
  }

  .introduction {
    width: 400px;
    height: 420px;
    top: calc(50% - 230px);
    left: calc(50% - 220px);
  }

  .introduction h1,
  .introduction h2 {
    font-size: 20px;
  }
  .introduction p {
    font-size: 12px;
    text-indent: 10px;
  }

  .introduction span {
    width: 15px;
    height: 15px;
  }

  .introduction .key-space {
    width: 30px;
  }

  .start-game,
  .end-game {
    width: 340px;
    height: fit-content;
    top: calc(50% - 195px);
    left: calc(50% - 195px);
  }

  .start-game h1,
  .end-game h1 {
    margin: 0;
    font-size: 28px;
  }

  .start-game h2 {
    margin: 0;
    font-size: 22px;
  }

  .start-game .select-skin {
    height: 180px;
    margin: 10px;
  }

  .end-game-head {
    display: flex;
    align-items: flex-start;
    gap: 30px;
    margin-bottom: -25px;
  }

  .end-game .logo {
    height: 50px;
  }

  .result {
    font-size: 20px;
  }

  .developers {
    font-size: 10px;
    margin: 0;
  }

  .menu .score,
  .menu .eggs-count {
    font-size: 18px;
    right: 68px;
  }

  .menu .eggs-count {
    margin-top: 10px;
  }

  .menu .score {
    margin-top: 30px;
  }

  #player {
    width: 90px;
    height: 90px;
  }

  .bavovna {
    width: 80px;
    height: 80px;
  }

  .tank {
    width: 205px;
    height: 120px;
  }

  .tank.boom {
    width: 205px;
    height: 60px;
  }

  .enemy.skin-1 {
    width: 113px;
    height: 100px;
  }

  .enemy.skin-1.boom.bag {
    width: 82px;
    height: 100px;
  }

  .enemy.skin-2 {
    width: 110px;
    height: 200px;
  }

  .enemy.skin-2.boom {
    height: 140px;
  }

  .enemy.skin-2.boom.bag {
    width: 82px;
    height: 100px;
  }

  .enemy.skin-3 {
    width: 150px;
    height: 45px;
  }

  .enemy.skin-3.boom {
    width: 120px;
    height: 120px;
  }

  .arrow-left {
    left: 10px;
  }

  .arrow-right {
    right: 10px;
  }
}

@media screen and (max-width: 425px) {
  .introduction {
    width: 300px;
    height: 420px;
    top: calc(50% - 230px);
    left: calc(50% - 172px);
  }

  .introduction h1,
  .introduction h2 {
    font-size: 14px;
  }

  .introduction p {
    font-size: 10px;
  }

  .developers {
    font-size: 8px;
  }
}

@media screen and (max-width: 375px) {
  .start-game,
  .end-game {
    width: 295px;
    height: 325px;
    top: calc(50% - 185px);
    left: calc(50% - 170px);
  }

  .start-game .select-skin {
    height: 160px;
  }

  .end-game .end-gif {
    margin: 6px auto;
  }

  .arrow-left {
    left: 5px;
  }

  .arrow-right {
    right: 5px;
  }
}
