@font-face {
  font-family: 'LuckiestGuy';
  src: url('img/5.Font/Luckiest_Guy/LuckiestGuy-Regular.ttf') format('truetype');
}

:root {
  --mainBackgroundColor: rgba(0, 0, 0, 0.9);
  --btnBackgroundColor: #7fffe0;
  --btnTextColor: #531a82;
}

* {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
}

body {
  display: flex;
  justify-content: space-evenly;
  align-items: center;
  height: 100vh;
  background: url('img/3. Background/Layers/5. Water/D1.png') no-repeat center;
  background-size: cover;
  overflow: hidden;
  font-family: 'LuckiestGuy', Arial, sans-serif;
  font-size: 16px;
  color: var(--btnTextColor);
}

canvas {
  background-color: var(--mainBackgroundColor);
  display: block;
  z-index: 2;
}

/* Hide scrollbar for Chrome, Safari and Opera */
.hide-scrollbar::-webkit-scrollbar {
  display: none;
}

/* Hide scrollbar for IE, Edge and Firefox */
.hide-scrollbar {
  -ms-overflow-style: none; /* IE and Edge */
  scrollbar-width: none; /* Firefox */
}

.startScreen {
  display: flex;
  justify-content: center;
  align-items: center;
  position: absolute;
  width: 100%;
  height: 100vh;
  z-index: 3;
}

.overlay {
  position: relative;
  height: 480px;
  width: 720px;
  display: flex;
  justify-content: space-around;
  align-items: center;
  flex-direction: column;
  background: url('img/3. Background/Light/1.png') no-repeat center;
  background-size: cover;
}

.pop-up,
.winnerScreen,
.gameOverScreen {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
}

.winnerScreen,
.gameOverScreen {
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: var(--mainBackgroundColor);
}

.gameOverScreen {
  align-items: unset;
}

.restartBtn {
  position: absolute;
  bottom: 30px;
  height: 100px;
  width: 100px;
}

.winnerScreen img {
  width: 100%;
  height: 480px;
}
.imgContainer {
  display: flex;
  align-items: center;
  flex-direction: column;
  margin-top: 2rem;
}

.deadSharkie {
  height: 7rem;
  width: 13rem;
}

.gameOverText {
  width: 100%;
  padding: 0 40px;
}

.btnContainer {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 25px;
  width: 100%;
}

.btn {
  border-radius: 100%;
  border: 5px solid var(--btnTextColor);
  background-color: var(--btnBackgroundColor);
  color: var(--btnTextColor);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 225ms;
}

.startBtn {
  width: 100px;
  height: 100px;
  font-size: 25px;
}

.infoBtn {
  width: 75px;
  height: 75px;
  font-size: 20px;
}

.btn:hover,
.btn:active {
  border: 5px solid var(--btnBackgroundColor);
  background-color: var(--btnTextColor);
  color: var(--btnBackgroundColor);
}

header {
  display: flex;
  justify-content: space-between;
  width: 100%;
}

header i {
  cursor: pointer;
}

.introduction-container {
  position: absolute;
  inset: 40px;
  padding: 35px;
  overflow: auto;
  border-radius: 20px;
  background: var(--mainBackgroundColor);
  color: var(--btnBackgroundColor);
  box-shadow: 12px 12px 10px 5px rgb(0 0 0 / 20%);
}

.introduction-container p {
  line-height: 40px;
  font-weight: 400;
}

.introduction-container h2 {
  color: var(--btnTextColor);
}

.introduction-container h2,
.introduction-container p span {
  text-shadow: 2px 2px var(--btnBackgroundColor);
}

.introduction-container p span {
  color: var(--btnTextColor);
  font-size: 26px;
  vertical-align: middle;
  margin: 5px;
}

.introduction-container p img {
  margin: 5px;
  vertical-align: middle;
}

.arrow-keys {
  height: 30px;
  width: 45px;
}
.poison-bottle {
  width: 45px;
  height: 60px;
  margin: -15px 0 !important;
  vertical-align: baseline !important;
}

.air-bubble,
.coins {
  width: 30px;
  height: 30px;
}

.short-introduction {
  z-index: 2;
  opacity: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
}

.wrapper {
  width: 100%;
  display: flex;
  justify-content: space-around;
  align-items: flex-end;
  margin: auto;
}

.wrapper .info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.wrapper .info .arrow-keys {
  height: 100px;
  width: auto;
}
.wrapper .info .poison-bottle {
  height: 100px;
  width: auto;
  margin: 0 !important;
}
.wrapper .info .coins {
  height: 50px;
  width: auto;
}

.subTitle {
  font-size: 35px;
}

.fight-keys {
  color: var(--btnTextColor);
  font-size: 35px;
  text-shadow: 2px 2px var(--btnBackgroundColor);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.collectables {
  display: flex;
  align-items: flex-end;
}

.fadeOut {
  opacity: 0;
  transition: opacity 225ms ease-in;
}

.game-container {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.settings {
  position: absolute;
  top: 20px;
  right: 30px;
  z-index: 2;
  font-size: 28px;
  color: white;
}

.sound {
  cursor: pointer;
}

h1 {
  position: relative;
  font-size: calc(10px + 5vw);
  font-weight: 700;
  color: var(--btnTextColor);
  letter-spacing: 0.09em;
  text-transform: uppercase;
  perspective: 500px;
}

h1::before,
h1::after {
  content: attr(aria-label);
  position: absolute;
  top: 0;
  left: 0;
  transform: translate(-50%, -50%);
  text-shadow: 0.01em 0.01em 0.01em rgba(0, 0, 0, 0.3);
}

h1::before {
  animation: floatAbove 3.5s ease-in-out infinite;
  -webkit-clip-path: polygon(0% 0%, 100% 0%, 100% 50%, 0% 50%);
  clip-path: polygon(0% 0%, 100% 0%, 100% 50%, 0% 50%);
}

h1::after {
  opacity: 0.65;
  filter: blur(0.02em);
  transform: translate(-50%, -50%) rotateX(21deg);
  animation: floatBelow 3.5s ease-in-out infinite;
  -webkit-clip-path: polygon(0% 50%, 100% 50%, 100% 100%, 0% 100%);
  clip-path: polygon(0% 50%, 100% 50%, 100% 100%, 0% 100%);
}

.slide-out-fwd-center {
  -webkit-animation: slide-out-fwd-center 0.7s
    cubic-bezier(0.55, 0.085, 0.68, 0.53) both;
  animation: slide-out-fwd-center 0.7s cubic-bezier(0.55, 0.085, 0.68, 0.53)
    both;
}

.mobile-btnContainer {
  position: absolute;
  bottom: 20px;
  display: none;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  width: 120px;
  height: 120px;
  z-index: 2;
}

.leftContainer {
  left: 20px;
  transform: rotate(45deg);
  -webkit-transform: rotate(45deg);
  -moz-transform: rotate(45deg);
  -o-transform: rotate(45deg);
}

.leftBtns {
  transform: rotate(-45deg);
  -webkit-transform: rotate(-45deg);
  -moz-transform: rotate(-45deg);
  -o-transform: rotate(-45deg);
  font-size: 40px;
}

.rightContainer {
  right: 40px;
  gap: 20px;
  transform: rotate(135deg);
  -webkit-transform: rotate(135deg);
  -moz-transform: rotate(135deg);
  -o-transform: rotate(135deg);
}

.rightBtns {
  border-radius: 100%;
  background-color: rgba(0, 0, 0, 0.3);
  transform: rotate(-135deg);
  -webkit-transform: rotate(-135deg);
  -moz-transform: rotate(-135deg);
  -o-transform: rotate(-135deg);
}

.finSlap,
.bubbleShoot {
  height: 45px;
  width: auto;
}

.mobileBtns {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 60px;
  width: 60px;
}

.turnThePhone {
  display: none;
}

.d-none {
  display: none;
}

.overflow-auto {
  overflow: auto;
}

@media (max-width: 916px) and (max-height: 480px),
  (max-width: 720px) and (orientation: landscape) {
  canvas {
    width: 100%;
    height: 100vh;
    position: absolute;
  }

  .overlay,
  .game-container {
    width: 100%;
    height: 100%;
  }

  .mobile-btnContainer {
    display: grid;
  }
  .introduction-container {
    position: unset;
    border-radius: unset;
  }

  .winnerScreen img {
    height: 100vh;
  }
}

@media (max-width: 660px) and (orientation: portrait) {
  canvas,
  .overlay {
    width: 100%;
    height: 100%;
  }

  .settings {
    display: none;
  }

  .turnThePhone {
    position: absolute;
    height: 100vh;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: var(--mainBackgroundColor);
    color: white;
  }

  .turnThePhone i {
    font-size: 160px;
  }

  .turnThePhone span {
    margin-top: 20px;
    font-size: 20px;
    text-align: center;
  }

  .rotate-90-ccw {
    -webkit-animation: rotate-90-ccw 1.2s ease-in-out infinite alternate both;
    animation: rotate-90-ccw 1.2s ease-in-out infinite alternate both;
  }
}

@-webkit-keyframes rotate-90-ccw {
  0% {
    -webkit-transform: rotate(0);
    transform: rotate(0);
  }
  100% {
    -webkit-transform: rotate(-90deg);
    transform: rotate(-90deg);
  }
}
@keyframes rotate-90-ccw {
  0% {
    -webkit-transform: rotate(0);
    transform: rotate(0);
  }
  100% {
    -webkit-transform: rotate(-90deg);
    transform: rotate(-90deg);
  }
}

@keyframes floatAbove {
  50% {
    transform: translate(-50%, -60%);
    -webkit-clip-path: polygon(0% 0%, 100% 0%, 100% 60%, 0% 60%);
    clip-path: polygon(0% 0%, 100% 0%, 100% 60%, 0% 60%);
  }
}

@keyframes floatBelow {
  50% {
    transform: translate(-50%, -60%) rotateX(10deg);
    -webkit-clip-path: polygon(0% 60%, 100% 60%, 100% 100%, 0% 100%);
    clip-path: polygon(0% 60%, 100% 60%, 100% 100%, 0% 100%);
  }
}

@-webkit-keyframes slide-out-fwd-center {
  0% {
    -webkit-transform: translateZ(1);
    transform: translateZ(1);
    opacity: 1;
  }
  100% {
    -webkit-transform: translateZ(600px);
    transform: translateZ(600px);
    opacity: 0;
  }
}
@keyframes slide-out-fwd-center {
  0% {
    -webkit-transform: translateZ(1);
    transform: translateZ(1);
    opacity: 1;
  }
  100% {
    -webkit-transform: translateZ(600px);
    transform: translateZ(600px);
    opacity: 0;
  }
}
