@import url('https://fonts.googleapis.com/css2?family=MedievalSharp&family=Metamorphous&display=swap');

:root {
  --color-1: #e7ccf7;
  --color-2: #5d3e7d;
  --color-3: #ffffff;
  --color-4: #a792c8;
  --color-5: #fd5d8e;
}

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

body {
  font-family: 'Courier New', Courier, monospace;
  color: var(--color-3);
  background-color: #1d1d1d;
}

.highlightable-paragraph {
  strong {
    font-weight: normal;
    text-shadow: 0 0 10px #ffffff;
  }

  .shiny {
    color: #dddd00;
    text-shadow: 0 0 5px #dddd00, 0 0 10px #dddd00;
    animation: sparkle 5s infinite;
  }

  .key {
    background: #fff;
    color: #000;
    font-family: 'Courier New', Courier, monospace;
    padding: 0.1em 0.3em;
    border-radius: 3px;
    box-shadow: 0 5px 0 #7d7d7d;
  }
}

#titleScreen,
#gameOverScreen {
  height: 100vh;
  width: 100vw;
  padding: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  font-size: 2rem;
  gap: 1em;
  background: url('assets/dark_castle/1/Dark Castle (7).jpg'), #00000080;
  background-position: center;
  background-blend-mode: multiply;
  background-repeat: no-repeat;
  background-size: cover;

  &>* {
    max-width: 1400px;
  }

  h1 {
    display: flex;
    align-items: center;
    gap: 0.5em;
    font-family: 'Metamorphous', serif;
    font-size: 3em;
    text-align: center;

    img {
      height: 1em;
      border-radius: 20%;
    }
  }

  h2 {
    font-family: 'Metamorphous', serif;
    text-align: center;
  }

  .description {
    font-family: 'MedievalSharp', cursive;
    text-align: center;
  }

  #startForm {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1em;

    label {
      font-family: 'MedievalSharp', cursive;
    }

    input[type="text"] {
      padding: 0.5em;
      font-size: 1em;
      border-radius: 3px;
      border: 2px solid #ffffff40;
      font-family: 'MedievalSharp', cursive;
      background-color: #00000040;
      outline: none;
      color: #ffffff;
      backdrop-filter: blur(5px);

      &:focus {
        background-color: #00000060;
      }
    }
  }

  #startButton,
  #restartButton,
  #leaderBoardButton {
    --background-blend-color: #00000060;
    border-radius: 0;
    padding: 0.5em 1em;
    background: url('assets/stone-tile.jpg'), var(--background-blend-color);
    background-blend-mode: multiply;
    background-size: 100px;
    color: white;
    font-family: 'MedievalSharp', cursive;
    border: none;
    font-size: 1em;
    cursor: pointer;
    position: relative;

    &:hover {
      --background-blend-color: #00000080;
    }

    &:active {
      --background-blend-color: #000000a0;
    }
  }

  #arrow-1 {
    position: absolute;
    top: 40px;
    left: -70px;
    transform: rotate(-50deg);
    filter: invert(100%);
    animation: hover-1 2.5s ease-in-out infinite;
  }

  #arrow-2 {
    position: absolute;
    top: -10px;
    right: -90px;
    transform: rotate(180deg);
    filter: invert(100%);
    animation: hover-2 3s ease-in-out infinite;
  }
}

#app {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  background-image: url("assets/dark_castle/1/Dark\ Castle\ \(24\).jpg");
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;

  #hud {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    padding: 1rem;
    text-align: right;
    font-size: 3em;
    font-family: 'MedievalSharp', cursive;
    color: #dddd00;
    text-shadow: 0 0 5px #dddd00, 0 0 10px #dddd00;
  }

  .spritesheetBox {
    width: 520px;
    height: 420px;
    overflow: hidden;
    background: radial-gradient(circle at center, #45e6cb50 0%, transparent 70%, transparent 100%);
    transform-origin: top left;

    img {
      top: 0;
      position: relative;
    }
  }

  .entity {
    position: absolute;
    background-size: cover;
  }
}

.dialog {
  background: #00000080;
  color: #ffffff;
  backdrop-filter: blur(5px);
  border-radius: 10px;
  border: 3px solid #ffffff80;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 60%;

  .dialog-head {
    display: flex;
    justify-content: space-between;
    background-color: #00000080;
    padding: 1rem;

    button {
      background: transparent;
      border: none;
      color: #ffffff;
      font-size: 1.5em;
      cursor: pointer;
    }
  }

  .dialog-content {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    justify-content: center;

    table {
      border-collapse: collapse;
      border: 1px solid #ffffff80;

      th {
        background-color: #00000060;
      }

      td:first-child {
        text-align: right;
      }

      td,
      th {
        border: 1px solid #ffffff80;
        padding: 0.3rem;
      }

      .last-score {
        background-color: #44444480;
      }
    }
  }
}

@keyframes hover-1 {

  0%,
  100% {
    transform: translateY(0) rotate(-50deg);
  }

  50% {
    transform: translateY(-10px) rotate(-50deg);
  }
}

@keyframes hover-2 {

  0%,
  100% {
    transform: translateY(0) rotate(180deg);
  }

  50% {
    transform: translateY(-10px) rotate(180deg);
  }
}

@keyframes sparkle {

  0%,
  100% {
    text-shadow: 0 0 5px #dddd00, 0 0 10px #dddd00;
    color: #dddd00;
  }

  50% {
    text-shadow: 0 0 10px #dddd00, 0 0 20px #dddd00;
    color: #ffff00;
  }
}