@font-face {
  font-family: 'Arcade';
  src: url('assets/fonts/arcadeclassic.TTF');
}

@font-face {
  font-family: 'Karmatic';
  src: url('assets/fonts/karmatic.ttf');
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background: linear-gradient(
    180deg,
    rgb(66, 182, 223) 50%,
    rgb(97, 62, 86) 50%
  );
  background-size: 100vw 100vh;
}

.flex {
  display: flex;
}

.game-container {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-image: url(assets/images/background-1.jpg);
  background-size: 67.5rem;
  background-repeat: repeat-x;
  background-position: center 90%;
  width: max(120rem, 100%);
  min-height: 650px;
  height: min(47rem, 90vh);
  animation: slide 25s infinite linear;
  overflow: hidden;
}

@keyframes slide {
  from {
    background-position: 0 90%;
  }
  to {
    background-position: 128.5% 90%;
  }
}

.top-container {
  display: flex;
  width: clamp(55rem, 95vw, 67.5rem);
  margin: 0 auto 1.5rem;
  justify-content: space-between;
}

.game-title {
  text-align: center;
  min-width: 20rem;
  width: min(22rem, 37vh);
}

.game-title > img {
  width: 100%;
}

.player-number {
  font-family: 'Karmatic';
  font-size: 1.2rem;
  color: rgb(5, 4, 44);
  margin-bottom: 0.8rem;
}

.hp-container {
  display: flex;
  align-items: center;
}

.hp-container-right {
  flex-direction: row-reverse;
}

.heart-icon {
  min-height: 2.2rem;
  height: min(2.5rem, 4.2vh);
  z-index: 1;
}

.hp-bar-container {
  display: flex;
  border: 4px solid rgb(5, 4, 44);
  border-radius: 10px;
  overflow: hidden;
  width: 250px;
  /* min-height: 1.6rem; */
  /* height: min(1.9rem, 3.2vh); */
  height: 1.9rem;
}

.hp-bar-container-left {
  margin-left: -1.4rem;
  justify-content: flex-end;
}

.hp-bar-container-right {
  margin-right: -1.4rem;
}

.hp-text {
  position: absolute;
  font-weight: bold;
  z-index: 2;
  font-size: 1.4rem;
  font-family: 'Arcade';
  padding: 0 0.6rem;
}

.hp-bar {
  position: relative;
  display: inline-block;
  height: 100%;
  width: 100%;

  /* Green */
  background: linear-gradient(
    180deg,
    #6ae061 0,
    #6ae061 15%,
    #4eb947 15%,
    #4eb947 80%,
    #298941 80%
  );
  transition: width 0.25s linear;
}

.stamina-container {
  display: flex;
  align-items: center;
  margin-top: 0.7rem;
  padding-left: 0.5rem;
  font-family: 'Arcade';
  font-weight: bold;
  font-size: 2rem;
  color: rgb(5, 4, 44);
}

.stamina-container-left {
  padding-left: 0.5rem;
}

.stamina-container-right {
  flex-direction: row-reverse;
  padding-right: 0.5rem;
}

.stamina-container > img {
  min-width: 2rem;
  width: min(2.2rem, 3.7vh);
}

.stamina-container-left > img {
  margin-right: 0.7rem;
}

.stamina-container-right > img {
  margin-left: 0.7rem;
}

.player-1-container {
  text-align: right;
}

.mid-container {
  display: flex;
  width: clamp(55rem, 95vw, 67.5rem);
  margin: 1rem auto;
  justify-content: space-between;
  color: rgb(5, 4, 44);
  align-items: flex-end;
}

.mid-right {
  text-align: right;
}

.mid-container p {
  font-family: 'Arcade';
  font-size: 1.6rem;
  line-height: 1rem;
  margin-bottom: 0.3rem;
}

.attack-power-text {
  font-family: 'Karmatic';
  font-size: clamp(2.3rem, 4.4vh, 2.6rem);
}

.power-up-container {
  display: flex;
  flex-direction: column-reverse;
  align-items: center;
}

.power-up-container > p {
  text-align: center;
  font-family: 'Karmatic';
  font-size: 1.3rem;
}

.text-bounce {
  animation: bounce 0.5s;
}

#power-up-btn {
  background: none;
  cursor: pointer;
  border: none;
  margin-top: 0.4rem;
  width: 11em;
  height: 8em;
  perspective: 800px;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

#power-up-btn > img {
  position: absolute;
  width: 100%;
  backface-visibility: visible;
  filter: drop-shadow(0.3rem 0.3rem 0 rgb(0, 0, 0, 50%));
}

.flipped {
  transform: rotateY(180deg);
}

.bottom-container {
  width: 100%;
  position: absolute;
  bottom: 0;
  text-align: center;
}

.arrow-container {
  display: flex;
  justify-content: space-between;
  margin: -3rem auto;
  width: 330px;
}

.arrow-container > img {
  width: 2.5rem;
}

.avatars {
  width: clamp(55rem, 95vw, 67.5rem);
  display: flex;
  margin: auto;
  justify-content: space-between;
  align-items: baseline;
}

.shrubs {
  width: 25%;
}

.chicken-image {
  width: 30rem;
  display: inline-block;
}

.foreground-container {
  background-image: url(assets/images/foreground.jpg);
  background-color: rgb(97, 62, 86);
  background-size: 1080px;
  background-repeat: repeat-x;
  display: flex;
  height: min(11rem, 17vh);
  justify-content: center;
}

.bottom-buttons-container {
  width: clamp(55rem, 95vw, 67.5rem);
  position: relative;
  text-align: center;
}

#attack-btn {
  background: none;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  position: absolute;
  bottom: 0;
  right: 50%;
  transform: translate(50%, 0);
}

#attack-btn > img {
  min-width: 10rem;
  width: min(11rem, 18vh);
  transition: all 0.2s;
}

#attack-btn > img:hover {
  filter: drop-shadow(0.5rem 0.5rem 0 rgb(0, 0, 0, 80%));
  transform: translate(-0.4rem, -0.4rem);
}

#attack-btn > img:active {
  filter: drop-shadow(0 0 0 black);
  transform: translate(0, 0);
}

.shortcut-buttons {
  position: absolute;
  bottom: 0;
  right: 0;
}

.shortcut-buttons img {
  width: 2.3rem;
  transition: all 0.2s;
}

.shortcut-buttons > button {
  background: none;
  border: none;
  cursor: pointer;
  margin-left: 5px;
}

.shortcut-buttons img:hover {
  filter: drop-shadow(0.3rem 0.3rem 0 rgb(0, 0, 0, 80%));
  transform: translate(-0.2rem, -0.2rem);
}

.shortcut-buttons img:active {
  filter: drop-shadow(0 0 0 black);
  transform: translate(0, 0);
}

.invisible {
  opacity: 0;
}

@keyframes bounce {
  0%,
  20%,
  50%,
  80%,
  100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-30px);
  }
  60% {
    transform: translateY(-15px);
  }
}
.bounce {
  animation: bounce 2s infinite;
}

.game-over {
  position: fixed;
  top: 45%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  width: clamp(55rem, 95vw, 67.5rem);
  margin: auto;
  z-index: 5;
  padding: 0 30px;
}

.trophy {
  width: 7rem;
  display: block;
  margin: 0 auto 15px;
}

.winner-text {
  width: 14rem;
}

.loser-text {
  width: 15rem;
}

.hidden {
  display: none !important;
}

.title-screen {
  position: absolute;
  z-index: 10;
  top: 25%;
  left: 50%;
  transform: translate(-50%, -25%);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.title-screen > img {
  width: 35rem;
  margin-bottom: 6vh;
}

.buttons-container {
  margin: auto;
}

.buttons-container > button {
  display: block;
  background: none;
  border: none;
  cursor: pointer;
  margin: 1.2vh 0;
}

.buttons-container img {
  width: 14rem;
  transition: all 0.2s;
}

.buttons-container img:hover {
  filter: drop-shadow(0.4rem 0.4rem 0 rgb(0, 0, 0, 80%));
  transform: translate(-0.4rem, -0.4rem);
}

.buttons-container img:active {
  filter: drop-shadow(0 0 0 black);
  transform: translate(0, 0);
}

.blur {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  backdrop-filter: blur(5px);
  z-index: 15;
}

.dark-blur {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgb(0, 0, 0, 30%);
  backdrop-filter: blur(10px);
  z-index: 15;
}

.modal {
  color: black;
  font-family: 'Courier New', Courier, monospace;
  font-size: 11px;
  text-align: center;
  position: absolute;
  padding: 30px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  min-width: 500px;
  width: min(75vw, 900px);
  min-height: 650px;
  height: min(85vh, 650px);
  background-color: rgb(236, 236, 236);
  z-index: 20;
  border: 4px solid black;
  border-radius: 6px;
}

.modal-confirmation {
  color: black;
  font-family: 'Karmatic';
  font-size: 20px;
  text-align: center;
  position: absolute;
  padding: 100px 30px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 550px;
  background-color: rgb(236, 236, 236);
  z-index: 20;
  border: 4px solid black;
  border-radius: 6px;
}

.modal-confirmation > p {
  margin-bottom: 24px;
}

.modal-confirmation > button {
  font-family: 'Arcade';
  font-size: 18px;
  padding: 4px 40px;
  margin: 0 5px;
  cursor: pointer;
  border: 2px solid black;
  transition: all 0.2s;
}

.btn:hover {
  filter: drop-shadow(0.3rem 0.3rem 0 rgb(0, 0, 0));
  transform: translate(-0.3rem, -0.3rem);
}

.btn:active {
  filter: drop-shadow(0 0 0 black);
  transform: translate(0, 0);
}

.close-modal {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 40px;
  position: absolute;
  top: 0;
  right: 0;
  margin-right: 7px;
}

.modal > h1 {
  font-family: 'Karmatic';
  font-size: 2rem;
  margin-bottom: 20px;
  font-weight: normal;
}

.game-instructions-intro {
  font-size: 1rem;
}

.game-instructions-container {
  font-size: 1.2rem;
}

.game-instructions {
  margin: 30px 0;
}

.game-elements {
  min-width: 30%;
  margin-right: 20px;
  flex-direction: column;
  align-items: flex-end;
}

.game-elements {
  margin-top: 15px;
}

.game-element:nth-child(1) {
  width: 130px;
  margin-top: 10px;
  margin-bottom: 20px;
}

.game-element:nth-child(2) {
  width: 100px;
  margin-top: 20px;
}

.game-element:nth-child(3) {
  width: 100px;
  margin-top: 20px;
}
.game-element:nth-child(4) {
  width: 80px;
  margin-top: 20px;
}

.game-element:nth-child(5) {
  width: 200px;
  margin-top: 25px;
}

.move-definition {
  font-size: 1.1rem;
}

.game-text {
  min-width: 70%;
  text-align: left;
}

.move-name {
  font-weight: 600;
}

.move-text {
  margin-top: 20px;
}

.move-text:nth-child(1) {
  margin-top: 10px;
}

.winner-text-instructions {
  width: 100%;
  text-align: center;
  font-family: 'Karmatic';
  font-size: 1.2rem;
}
footer {
  width: 75%;
  text-align: left;
  margin-bottom: 10px;
  position: absolute;
  bottom: 0;
  color: #fff;
  font-size: 0.8rem;
  font-family: 'Arial Narrow';
  opacity: 50%;
}

/*************************TAB PART*************************/
@media only screen and (max-width: 1024px) and (min-height: 768px) {
  .modal {
    color: black;
    font-family: 'Courier New', Courier, monospace;
    font-size: 11px;
    text-align: center;
    position: absolute;
    padding: 30px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    min-width: 650px;
    width: min(75vw, 900px);
    min-height: 500px;
    height: min(85vh, 650px);
    background-color: rgb(236, 236, 236);
    z-index: 20;
    border: 4px solid black;
    border-radius: 6px;
    -webkit-transition: all 0.5s ease-in-out;
    -moz-transition: all 0.5s ease-in-out;
    -o-transition: all 0.5s ease-in-out;
    transition: all 0.5s ease-in-out;
  }
  .game-instructions-intro {
    font-size: 1.5rem;
  }
  .move-definition {
    font-size: 1.2rem;
  }
  .game-attack {
    width: 130px;
    padding-bottom: 5px;
  }
  .game-stamina {
    width: 80px;
    padding-bottom: 20px;
  }

  .game-health-bar {
    height: 35px;
  }
  .game-elements {
    min-width: 30%;
    margin-right: 20px;
    flex-direction: column;
    align-items: flex-end;
    margin-top: 5px;
  }
}
/************************************************ MEDIA QUERY PHONE PART **************************/
@media only screen and (max-width: 1024px) and (min-height: 700px) {
  .game-container {
    position: fixed;
    top: 35%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-image: url(assets/images/background-1.jpg);
    background-size: 35rem;
    background-repeat: repeat-x;
    background-position: center 50%;
    width: max(100rem, 100%);
    min-height: 375px;
    height: min(210rem, 90vh);
    animation: slide 25s infinite linear;
    overflow: hidden;
  }
  .foreground-container {
    background-image: url(assets/images/foreground.jpg);
    background-color: rgb(97, 62, 86);
    background-size: 1000px;
    background-repeat: repeat-x;
    display: flex;
    height: min(10rem, 18vh);
    justify-content: center;
  }
  .title-screen {
    position: absolute;
    z-index: 10;
    top: 17%;
    left: 50%;
    transform: translate(-50%, -25%);
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
  .title-screen > img {
    width: 15rem;
    margin-bottom: 6vh;
  }
  .buttons-container img {
    width: 8rem;
    transition: all 0.2s;
  }
  .chicken-image {
    width: 15rem;
    display: inline-block;
  }
  /* INSTRUCTIONS PART */
  .modal > h1 {
    font-family: 'Karmatic';
    font-size: 0.8rem;
    margin-bottom: 10px;
    font-weight: normal;
  }

  .modal {
    color: black;
    font-family: 'Courier New', Courier, monospace;
    font-size: 5px;
    text-align: center;
    position: absolute;
    padding: 10px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    min-width: 625px;
    width: min(85vw, 500px);
    min-height: 370px;
    height: min(85vh, 300px);
    background-color: rgb(236, 236, 236);
    z-index: 20;
    border: 4px solid black;
    border-radius: 6px;
    -webkit-transition: all 0.5s ease-in-out;
    -moz-transition: all 0.5s ease-in-out;
    -o-transition: all 0.5s ease-in-out;
    transition: all 0.5s ease-in-out;
  }
  .game-instructions-intro {
    font-size: 0.8rem;
  }
  .game-instructions {
    margin: 1px;
  }
  .move-definition {
    font-size: 0.8rem;
  }
  .move-text {
    margin-top: 10px;
  }
  .move-name {
    font-weight: 600;
  }
  .game-attack {
    width: 60px;
    padding-bottom: 5px;
  }
  .game-stamina {
    width: 60px;
    padding-bottom: 15px;
  }

  .game-health-bar {
    width: 100px;
    height: 35px;
  }
  .game-elements {
    min-width: 20%;
    margin-right: 5px;
    flex-direction: column;
    align-items: center;
    margin-top: 5px;
  }

  .game-text {
    min-width: 70%;
    text-align: left;
  }
  .game-power-up {
    width: 60px;
  }
  .game-elements img {
    margin: 8px;
  }
  .game-instructions-container {
    font-size: 0.8rem;
  }
  .game-stamina {
    width: 40px;
    padding-bottom: 10px;
  }
  /* GAMEPLAY PART */
  .top-container {
    display: flex;
    width: clamp(30rem, 40vw, 30rem);
    margin: auto;
    justify-content: space-between;
  }
  .game-title {
    text-align: center;
    min-width: 18rem;
    width: min(30rem, 10vh);
  }
  .game-title > img {
    width: 70%;
  }
  #power-up-btn {
    background: none;
    cursor: pointer;
    border: none;
    margin-bottom: 0.5rem;
    width: 5em;
    height: 3.5em;
    perspective: 300px;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.8s cubic-bezier(0.5, 0.5, 0.5, 1.275);
  }
  #power-up-btn > img {
    position: absolute;
    width: 100%;
    backface-visibility: visible;
    filter: drop-shadow(0.3rem 0.3rem 0 rgb(0, 0, 0, 50%));
  }
  .game-container {
    position: fixed;
    top: 55%;
    left: 41%;
    transform: translate(-50%, -50%);
    background-image: url(assets/images/background-1.jpg);
    background-repeat: repeat-x;
    background-position: center 90%;
    width: max(50rem, 55%);
    min-height: 375px;
    height: min(40rem, 90vh);
    animation: slide 25s infinite linear;
    overflow: hidden;
  }
  .player-0-container {
    width: 10rem;
  }
  .player-1-container {
    width: 10rem;
  }
  .heart-icon {
    min-height: 1.7rem;
    height: min(2.5rem, 4.2vh);
    z-index: 1;
  }
  .hp-bar-container {
    display: flex;
    border: 4px solid rgb(5, 4, 44);
    border-radius: 10px;
    overflow: hidden;
    width: 200px;
    /* min-height: 1.6rem; */
    /* height: min(1.9rem, 3.2vh); */
    height: 1.5rem;
  }
  .hp-text {
    position: absolute;
    font-weight: bold;
    z-index: 2;
    font-size: 1rem;
    font-family: 'Arcade';
    padding: 0 0.6rem;
  }
  .stamina-container {
    display: flex;
    align-items: center;
    margin-top: 0.3rem;
    padding-left: 0rem;
    font-family: 'Arcade';
    font-weight: bold;
    font-size: 1.3rem;
    color: rgb(5, 4, 44);
  }
  .stamina-container > img {
    min-width: 1rem;
    width: min(2.2rem, 3.7vh);
  }
  .mid-container {
    display: flex;
    width: clamp(20rem, 100vw, 40em);
    margin: auto;
    justify-content: space-between;
    /* border: 1px solid red; */
    color: rgb(5, 4, 44);
    align-items: center;
    margin-left: 140px;
    padding: 5px;
    left: 50px;
  }
  .mid-container p {
    font-family: 'Arcade';
    font-size: 1.1rem;
    line-height: 0.6rem;
    margin-bottom: 0.3rem;
  }
  .attack-power-text {
    font-family: 'Karmatic';
    font-size: clamp(1rem, 4.4vh, 2.6rem);
  }
  .bottom-container {
    position: absolute;
    text-align: center;
    width: 115%;
  }
  #attack-btn {
    background: none;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    position: absolute;
    bottom: 30px;
  }
  #attack-btn > img {
    min-width: 5rem;
    width: min(4rem, 30vh);
    transition: all 0.2s;
  }
  .arrow-container > img {
    width: 1.5rem;
  }
  .player-number {
    font-family: 'Karmatic';
    font-size: 0.8rem;
    color: rgb(5, 4, 44);
    margin-bottom: 0.8rem;
  }
  .game-over {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    width: clamp(10rem, 70vw, 50.5rem);
    margin: auto;
    z-index: 5;
    padding: 0 30px;
    /* flex-direction: row-reverse; */
  }
  .trophy {
    width: 3rem;
    display: block;
    margin: 0 auto 15px;
  }
  .winner-text {
    width: 5rem;
  }
  .loser-text {
    width: 5rem;
  }
  .arrow-container {
    display: flex;
    justify-content: space-between;
    margin: -3rem auto;
    width: 180px;
  }
  .shortcut-buttons {
    position: absolute;
    bottom: 5em;
    right: 8em;
  }
  .bottom-buttons-container {
    width: clamp(55rem, 95vw, 67.5rem);
    position: relative;
    text-align: center;
  }
  footer {
    width: 75%;
    text-align: left;
    margin-left: 7rem;
    margin-bottom: 25px;
    position: absolute;
    bottom: 0;
    color: #fff;
    font-size: 0.6rem;
  }
}
