@font-face {
  font-family: 'luckyGuy';
  src: url('../assets/fonts/LuckiestGuy-Regular.ttf') format('truetype');
}

body {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 32px;
  height: 100dvh;
  margin: 0;
  background-image: url('../assets/img/ai-generated-8843414_1920.jpg');
  background-size: cover;
  background-position: center;
  font-family: 'luckyGuy', Georgia, 'Times New Roman', Times, serif;
  color: rgb(255, 99, 71);
  font-size: 64px;
  line-height: 0;
  letter-spacing: 0.08em;
  text-shadow: 0px 0px 32px rgb(251, 255, 0);
  box-sizing: border-box;
}

main {
  display: flex;
  position: relative;
  border: 5px solid black;
  overflow: hidden;
  box-sizing: border-box;
}

canvas {
  background-color: black;
  display: block;
}

main>div {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  transition: all 125ms ease-in-out;
}

* {
  scrollbar-width: thin;
  scrollbar-color: #fbff00 #ffffff;
}


*::-webkit-scrollbar {
  width: 8px;
}

*::-webkit-scrollbar-track {
  background: #ffffff;
}

*::-webkit-scrollbar-thumb {
  background-color: #fbff00;
  border-radius: 14px;
  border: 3px outset #ff6347;
}

.d-none {
  display: none !important;
}

.tt-1 {
  transform: translateX(-110%);
}

.tt1 {
  transform: translateX(110%);
}


.op0 {
  opacity: 0;
}

.line {
  color: rgb(255, 99, 71);
  cursor: pointer;
  position: relative;
}

.line:after {
  content: '';
  position: absolute;
  width: 95%;
  height: 5px;
  bottom: 20%;
  left: 4px;
  transform: scaleX(0);
  box-shadow:
    0 5px 0 rgb(251, 255, 0),
    0 10px 0 rgb(33, 255, 118);
  background: rgb(255, 99, 71);
  transform-origin: bottom right;
  transition: transform 125ms ease-out;
}

.line:hover:after {
  transform: scaleX(1);
  transform-origin: bottom left;
}

#start,
#credits,
#manual,
#options,
#imprint {
  height: 100%;
  width: 100%;
  display: flex;
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
  background-image: url('../assets/img/3. Background/Layers/1. Light/1.png'), url('../assets/img/3. Background/Layers/2. Floor/L1.png'), url('../assets/img/3. Background/Layers/3.Fondo 1/L1.png'), url('../assets/img/3. Background/Layers/4.Fondo 2/L1.png'), url('../assets/img/3. Background/Layers/5. Water/L1.png');
}

#start>ul,
#pauseMenu>ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 16px;
  height: 100%;
  width: 33%;
  background-color: rgba(19, 0, 192, 0.8);
}

#start>ul>li,
#pauseMenu>ul>li {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  flex: 1;
}

#start>ul>li>a,
#pauseMenu>ul>li>a {
  font-size: 32px;
  color: rgb(251, 255, 0);
  text-shadow: 0px 0px 32px rgb(255, 99, 71);
  text-decoration: none;
  line-height: normal;
}

#start>ul>li:hover>a,
#pauseMenu>ul>li:hover>a,
#credits a:hover,
#imprint a:hover {
  color: #21ff76;
  text-shadow: 0px 0px 64px rgb(255, 99, 71);
}

#start>div {
  width: 66%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

#start>div>img {
  width: 80%;
  height: auto;
  transform: scaleX(-1);
}

#start>div h2,
#credits h2,
#manual h2,
#options h2,
#imprint h2 {
  font-size: 6vmin;
  margin: 0;
  color: rgb(251, 255, 0);
  text-shadow: 0px 0px 32px rgb(255, 99, 71);
  line-height: normal;
  text-align: center;
  margin-bottom: 0.5vh;
}

#imprint h3:not(.close) {
  font-size: 3vmax;
  color: rgb(251, 255, 0);
  text-shadow: 0px 0px 32px rgb(255, 99, 71);
  line-height: normal;
  text-align: center;
  margin-bottom: 0.5vh;
  margin-top: 0.5vh;
  text-wrap: wrap;
}

#start>div p,
#credits p,
#manual p,
#options p #options label,
#imprint p {
  margin: 0;
  font-size: 18px;
  color: rgb(255, 99, 71);
  text-shadow: 0px 0px 32px rgb(251, 255, 0);
  line-height: normal;
  text-align: center;
}

.half-circle {
  position: relative;
  width: 340px;
  height: 170px;
  background: rgba(33, 255, 118, 0.9);
  border-radius: 170px 170px 0 0;
}

.half-circle .content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.creditsWindow,
.manualWindow,
.optionsWindow,
.imprintWindow {
  z-index: 3;
  position: relative;
  margin: 2%;
  padding: 1%;
  flex: 1;
  background-color: rgba(19, 0, 192, 0.9);
  display: flex;
  flex-direction: column;
  align-items: center;
  border-radius: 24px;
  border: 8px outset rgb(19, 0, 192);
  overflow: hidden auto;
}

.manualWindow {
  justify-content: start;
  gap: 8px;
}

#credits .creditsWindow p,
.creditsWindow a,
#manual .manualWindow p,
#options .optionsWindow p,
#options .optionsWindow label,
.turnDevice p,
.imprintWindow a,
.imprintWindow p {
  color: rgb(251, 255, 0);
  text-decoration: none;
  font-size: 16px;
}

#credits .creditsWindow strong,
#manual .manualWindow strong,
#options .optionsWindow strong {
  font-size: 22px;
  color: rgb(255, 99, 71);
}

.manualstep {
  display: flex;
  flex: 1;
}

.manualstep img {
  object-fit: cover;
  width: 150px;
  height: auto;
  max-height: 90px;
}

img.key {
  height: 20px;
  width: auto;
}

.optionsWindow {
  justify-content: space-between;
  padding: 16px;
}

.optionsWindow>div:first-of-type {
  height: 25%;
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
}

.optionsWindow label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 50%;
}

.optionsWindow input[type="range"] {
  width: 50%;
  height: 24px;
  background: transparent;
  -webkit-appearance: none;
  appearance: none;
  outline: none;
  border-radius: 12px;
  border: 2px solid rgb(255, 99, 71);
}

.optionsWindow input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 24px;
  height: 24px;
  background: rgb(251, 255, 0);
  border-radius: 50%;
  cursor: pointer;
}

.optionsWindow input[type="range"]::-moz-range-thumb {
  width: 24px;
  height: 24px;
  background: rgb(251, 255, 0);
  border-radius: 50%;
  cursor: pointer;
}

.optionsWindow button {
  background-color: rgb(251, 255, 0);
  color: rgb(255, 99, 71);
  border: none;
  border-radius: 8px;
  padding: 8px 16px;
  text-align: center;
  text-decoration: none;
  display: inline-block;
  font-size: 16px;
  cursor: pointer;
}

#loaderWindow {
  background-color: aliceblue;
  height: 100%;
  width: 100%;
  display: flex;
  align-items: flex-end;
}

#loader {
  background-color: aliceblue;
  width: 100%;
  height: 50%;
  background:
    radial-gradient(circle 11px at top, #0000 94%, #b0e5f3) 0 20px,
    radial-gradient(circle 11px at top, #0000 94%, #5dc1e4) 0 10px,
    radial-gradient(circle 11px at top, #0000 94%, #008cd9) 0 0;
  background-size: 20px 100%;
  background-repeat: repeat-x;
  animation: l7 1s infinite linear;
}

.endGame,
#pauseMenu {
  z-index: 2;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  align-items: center;
  background-color: rgba(0, 0, 0, 0.4);
  transition: all 125ms ease-in-out;
}

.endGame img {
  width: 75%;
  height: auto;
}

.endGame p {
  color: rgb(251, 255, 0);
  font-size: 3vmin;
  text-align: center;
}

.endGame>div {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
  height: 33%;
  width: 100%;
}

.endGame button {
  font-family: inherit;
  background-color: rgb(251, 255, 0);
  color: rgb(255, 99, 71);
  width: 33%;
  height: 10vh;
  border: none;
  border-radius: 8px;
  padding: 8px 16px;
  text-align: center;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.5vh;
  cursor: pointer;
}


.endGame button:hover {
  background-color: rgb(255, 99, 71);
  color: rgb(251, 255, 0);
}


#gameOverlay {
  position: absolute;
  top: 5%;
  left: 50%;
  width: 20%;
  display: flex;
  justify-content: flex-end;
}


#gameOverlay img {
  height: 7%;
  width: auto;
  cursor: pointer;
}

#gameOverlay img:hover {
  filter: drop-shadow(16px 16px 20px rgb(255, 99, 71)) hue-rotate(310deg);
}

#overlay {
  display: flex;
  justify-content: center;
}


#mobileOverlay {
  position: absolute;
  width: 90%;
  height: 30%;
  bottom: 8px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 12% 12% 12% 30% 15% 15%;
  grid-template-rows: 45% 5% 45%;
  grid-template-areas:
    ". up . . a b"
    ". . . . a b"
    "left down right . a b";
  grid-gap: 1%;
  justify-items: center;
  align-items: center;
  opacity: 0.7;
}

#mobileOverlay .mobileButton {
  width: 100%;
  height: 100%;
  background-color: #ccc;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 3vmax;
  font-weight: bold;
  user-select: none;
}

.leftup {
  grid-area: leftup;
}

.up {
  grid-area: up;
}

.rightup {
  grid-area: rightup;
}

.left {
  grid-area: left;
}

.a {
  grid-area: a;
}

.b {
  grid-area: b;
}

.right {
  grid-area: right;
}

.leftdown {
  grid-area: leftdown;
}

.down {
  grid-area: down;
}

.rightdown {
  grid-area: rightdown;
}

#mobileOverlay {
  display: none;
}

.turnDevice {
  display: none;
}

.close {
  position: absolute;
  margin: 0;
  top: 8px;
  right: 8px;
  width: 32px;
  height: 32px;
  cursor: pointer;
  color: rgb(251, 255, 0);
  font-size: 32px;
  line-height: normal;
}

.close:hover {
  text-shadow: 0px 0px 32px rgb(255, 99, 71);
}

@keyframes l7 {
  50% {
    background-position: 10px 15px, -10px 12px, 15px 8px
  }

  100% {
    background-position: 20px 20px, -20px 10px, 20px 0px
  }
}

@keyframes rotate {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

@media only screen and (max-height: 700px) {
  h1 {
    display: none;
  }
}

@media only screen and (max-height: 480px) {

  main,
  canvas {
    height: 100dvh;
    width: auto;
  }

}

@media only screen and (max-width: 720px) {

  main,
  canvas {
    width: 100%;
    height: auto;
    border: none;
  }

  h1 {
    display: none;
  }
}

@media only screen and (max-width: 719px) and (orientation: portrait) {
  .turnDevice {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(19, 0, 192, 1);
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    align-items: center;
    z-index: 25;
  }

  .turnDevice p {
    font-size: 8vmin;
    height: 10%;
    margin: 0;
    line-height: normal;
    text-align: center;
  }

  .turnDevice img {
    width: 50%;
    height: auto;
    animation: rotate 5s linear infinite;
  }
}

@media (pointer: coarse) {

  #mobileOverlay {
    display: grid;
  }

}