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

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

:root {
  --color-main: #5a13ff;
}

body {
  display: flex;
  flex-direction: column;
  height: 100dvh;
  font-family: "Bangers", system-ui;
  gap: 30px;
  user-select: none;

  /* background-image: url("https://static.vecteezy.com/system/resources/previews/053/102/317/non_2x/an-anime-style-illustration-of-clouds-in-the-sky-vector.jpg"); */
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
}

main {
  backdrop-filter: blur(8px);
  background-color: rgba(255, 255, 255, 0.548);
  border-radius: 20px;

  max-width: 800px;
  margin: auto;
  flex: 1;
  width: 100%;
  margin-top: 30px;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 35px;

  position: relative;

  .config_buttons {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    flex-direction: column;

    .selector__image {
      position: absolute;
      top: -10px;
      left: 80px;
      padding: 20px;
      backdrop-filter: blur(8px);
      background-color: rgba(255, 255, 255, 0.548);
      border-radius: 20px;
      display: flex;
      flex-direction: column;
      gap: 20px;

      transition: all 0.3s;

      transform: translateX(-170px) scale(0);
      opacity: 0;

      &.active {
        transform: translateX(0px) scale(1);
        opacity: 1;
      }

      .no-img {
        width: 250px;
        height: 150px;
        background-color: rgb(224, 224, 224);
        border-radius: 20px;
        border: 1px solid rgba(128, 128, 128, 0.452);
        display: flex;
        align-items: center;
        justify-content: center;

        cursor: pointer;
        transition: all 0.15s ease;

        &:hover {
          transform: scale(1.01);
        }

        svg {
          width: 80px;
          color: gray;
        }
      }

      img {
        width: 250px;
        height: 150px;
        border-radius: 20px;
        /* box-shadow: 0 3px 3px rgba(0, 0, 0, 0.397); */
        cursor: pointer;
        transition: all 0.15s ease;

        &:hover {
          transform: scale(1.01);
        }
      }
    }

    button {
      background: none;
      border: 1px;
      outline: none;
      cursor: pointer;

      font-size: 40px;
      text-shadow: 2px 2px 0px rgb(100, 100, 100),
        -2px -2px 0px rgb(100, 100, 100), 2px -2px 0px rgb(100, 100, 100),
        -2px 2px 0px rgb(100, 100, 100);
    }
  }

  #info-text {
    font-size: 60px;
    color: rgb(255, 230, 0);
    text-shadow: 2px 2px 0px black, -2px -2px 0px black, 2px -2px 0px black,
      -2px 2px 0px black;
    letter-spacing: 4px;
  }

  .egg__container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    /* border: 1px solid red; */
    display: flex;

    img {
      cursor: pointer;
      max-width: 500px;
      clip-path: ellipse(35% 48% at 50% 51%);
    }
  }

  .details__game {
    min-height: 120px;
    /* border: 1px solid blue; */
    width: 100%;

    display: flex;
    align-items: center;
    justify-content: end;
    font-size: 60px;
    justify-content: space-between;

    .info__gun {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      user-select: none;

      .icon {
        display: flex;
        align-items: center;
        justify-content: center;
        flex-direction: column;
      }

      p {
        font-size: 30px;
      }

      .data__gun {
        display: flex;
        flex-direction: column;
      }
    }

    .diamonts__count {
      color: rgb(28, 119, 255);
      user-select: none;
      display: flex;
      align-items: center;
      gap: 8px;
      text-shadow: 2px 2px 0px black, -2px -2px 0px black, 2px -2px 0px black,
        -2px 2px 0px black;
      letter-spacing: 2px;
      /* animation: add-diamonds 0.5 ease forwards; */

      p {
        /* animation: jump-anim 1.3s infinite linear; */
        margin-bottom: 20px;
        text-shadow: none;
      }
    }

    .bounce-error {
      color: red;
      animation: bounce-anim 0.2s ease forwards;
    }
  }
}

.object__selection {
  backdrop-filter: blur(8px);
  background-color: rgba(255, 255, 255, 0.548);

  margin: auto;
  margin-bottom: 30px;

  padding: 16px 20px;
  border: 1px solid rgba(0, 0, 0, 0.3);

  border-radius: 999px;
  box-shadow: 0 8px 20px -15px rgba(0, 0, 0, 0.5);

  ul {
    display: flex;
    list-style: none;
    gap: 20px;

    font-size: 60px;

    li {
      user-select: none;
      cursor: pointer;
      height: 100px;
      width: 100px;
      border-radius: 999px;

      position: relative;
      display: flex;
      align-items: center;
      justify-content: center;
      border: 1px solid rgba(0, 0, 0, 0.3);

      transition: all 0.06s linear;

      &.selected {
        background-color: rgba(0, 92, 196, 0.26);
        border: 1px solid rgba(0, 0, 255, 0.3);
      }

      &:hover {
        transform: scale(1.1);
      }

      .blocked__button {
        font-size: 28px;
        background-color: rgba(161, 4, 4, 0.582);
        /* border: 1px solid rgba(202, 2, 2, 0.644); */
        text-shadow: 2px 2px 0px black, -2px -2px 0px black, 2px -2px 0px black,
          -2px 2px 0px black;
        letter-spacing: 2px;

        position: absolute;
        border-radius: 999px;
        height: 100%;
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
        text-align: center;
        color: white;

        p {
          margin-bottom: 10px;
          text-shadow: none;
        }
      }
    }
  }
}

.point__js {
  text-shadow: 2px 2px 0px black, -2px -2px 0px black, 2px -2px 0px black,
    -2px 2px 0px black;
  letter-spacing: 2px;
  font-size: 50px;
  position: absolute;
  color: rgb(28, 119, 255);
  pointer-events: none;

  animation: disappear 1s ease forwards;
}

/* animations */

.jump {
  animation: jump-anim 0.2s ease forwards;
}

.aim__diamonds {
  animation: add-diamonds 0.25s ease forwards;
}

@keyframes bounce-anim {
  0% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-30px);
  }
  100% {
    transform: translateY(0);
  }
}

@keyframes add-diamonds {
  0%,
  100% {
    transform: scale(1) rotate(0);
  }
  40% {
    transform: scale(1.3) rotate(30deg);
  }
  80% {
    transform: rotate(-30deg);
  }
}

@keyframes jump-anim {
  25% {
    transform: rotate(10deg);
  }
  50% {
    transform: rotate(0deg);
  }
  80% {
    transform: rotate(-10deg);
  }
}

@keyframes disappear {
  0% {
    opacity: 0;
    transform: translateY(10px);
  }
  20% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translateY(-10px);
  }
}
