:root {
  --speed: 6s;
  --randomPos1: 0px;
  --randomPos2: 0px;
  --randomPos3: 0px;
  --randomPos4: 0px;
  --randomPos5: 0px;
  /* --randomPos6: 0px;
  --randomPos7: 0px;
  --randomPos8: 0px;
  --randomPos9: 0px;
  --randomPos10: 0px; */
  --multiplactorDistance: 1.4;
}

html {
  padding: 15px 15px;
  box-sizing: border-box;
  /* border: 40px ridge rgba(177, 49, 139, 1); */
  border-radius: 25px;
  width: 100vw;
  height: 100vh;
  max-width: 100vw;
  max-height: 100vh;
}

.container {
  transform: translateX(410px);
  font-family: "Major Mono Display", monospace;
  font-size: small;
  padding: 20px 20px;
  position: absolute;
  right: 3%;
  display: flex;
  flex-direction: column;
  width: fit-content;
  background-color: rgba(255, 242, 205, 0.276);
  border-radius: 20px;
  box-shadow: 10px 10px 28px -20px rgb(82, 82, 82);
  border: 1px solid rgb(233, 233, 233);
  z-index: 100;
  animation-name: slide;
  animation-duration: 4s;
  animation-timing-function: ease-in-out;
  animation-delay: 1.5s;
  animation-iteration-count: 1;
  animation-direction: normal;
  transition: transform ease 0.3s;
}

label {
  margin: 10px 10px 5px 10px;
  text-overflow: clip;
  text-wrap: nowrap;
  height: 1rem;
}

input {
  margin: 5px 10px 10px 15px;
}

input[type="range"] {
  /* Style général de la barre de défilement */
  -webkit-appearance: none; /* Supprime l'apparence par défaut de WebKit */
  width: 100%; /* Pour occuper la largeur complète du conteneur parent */
  height: 10px; /* Hauteur de la barre de défilement */

  /* Style de la barre de défilement pour les navigateurs WebKit (Chrome, Safari) */
  background: rgb(67, 17, 52); /* Couleur de fond de la barre de défilement */
  border-radius: 10%; /* Pour un thumb arrondi */
  cursor: pointer;
  /* Style de la barre de défilement pour Firefox */
  /* Vous pouvez ajuster la couleur ici selon vos besoins */
  /* Pour Firefox, le style est défini directement sur le thumb */
}

.container:hover {
  transform: translateX(30px);
}

.node-superfood {
  animation-name: rainbow, moveSuper;
  animation-duration: 0.15s, 5s;
  animation-timing-function: linear;
  animation-delay: 0.3s;
  animation-iteration-count: infinite;
  animation-direction: normal;
}

.node-food {
  animation-name: move;
  animation-duration: var(--speed);
  animation-timing-function: linear;
  animation-delay: 2.3s;
  animation-iteration-count: infinite;
  animation-direction: normal;
}

.node-food:hover {
  animation-name: wizz;
  animation-duration: 0.2s;
  animation-timing-function: ease-out;
  animation-delay: 0s;
  animation-iteration-count: infinite;
  animation-direction: normal;
}

.node-food::after {
  background-color: white;
  top: -25px;
  visibility: hidden;
  content: "please don't eat me 🥺";
  position: absolute;
  padding: 4px;
  border: 1px solid rgb(82, 82, 82);
  border-radius: 10px;
  color: grey;
  width: max-content;
  font-family: Verdana, Geneva, Tahoma, sans-serif;
  font-size: 13px;
}

div.node-food:hover::after {
  visibility: visible;
}

@keyframes slide {
  0% {
    transform: translateX(410px);
  }
  40% {
    transform: translateX(-50px);
  }
  45% {
    transform: translateX(0px);
  }
  50% {
    transform: translateX(-50px);
  }
  55% {
    transform: translateX(0px);
  }
  60% {
    transform: translateX(-50px);
  }
  100% {
    transform: translateX(410px);
  }
}

@keyframes move {
  0% {
    transform: translate(0px, 0px);
  }

  20% {
    transform: translate(var(--randomPos1), var(--randomPos2));
  }

  40% {
    transform: translate(var(--randomPos2), var(--randomPos3));
  }

  60% {
    transform: translate(var(--randomPos3), var(--randomPos4));
  }
  80% {
    transform: translate(var(--randomPos4), var(--randomPos5));
  }
  90% {
    transform: translate(var(--randomPos5), var(--randomPos1));
  }
  100% {
    transform: translate(0px, 0px);
  }
}

@keyframes moveSuper {
  0% {
    transform: translate(0px, 0px);
  }

  20% {
    transform: translate(
      calc(var(--randomPos1) * var(--multiplactorDistance)),
      calc(var(--randomPos2) * var(--multiplactorDistance))
    );
  }

  40% {
    transform: translate(
      calc(var(--randomPos2) * var(--multiplactorDistance)),
      calc(var(--randomPos3) * var(--multiplactorDistance))
    );
  }

  60% {
    transform: translate(
      calc(var(--randomPos3) * var(--multiplactorDistance)),
      calc(var(--randomPos4) * var(--multiplactorDistance))
    );
  }
  80% {
    transform: translate(
      calc(var(--randomPos4) * var(--multiplactorDistance)),
      calc(var(--randomPos5) * var(--multiplactorDistance))
    );
  }
  90% {
    transform: translate(
      calc(var(--randomPos5) * var(--multiplactorDistance)),
      calc(var(--randomPos1) * var(--multiplactorDistance))
    );
  }
  100% {
    transform: translate(0px, 0px);
  }
}

@keyframes wizz {
  0% {
    transform: translate(0px, 2px);
  }

  20% {
    transform: translate(-6px, 3px);
  }

  40% {
    transform: translate((6px, -2px));
  }

  60% {
    transform: translate((6px, -2px));
  }
  80% {
    transform: translate(-3px, -2px);
  }
  90% {
    transform: translate(2px, 1px);
  }
  100% {
    transform: translate(-2px, -1px);
  }
}
@keyframes rainbow {
  0% {
    background-color: white;
    box-shadow: 1px 5px 3px -1px rgba(70, 70, 70, 0.6);
  }
  4% {
    background-color: white;
    box-shadow: 1px 5px 3px -1px rgba(70, 70, 70, 0.6);
  }

  5% {
    background-color: rgb(97, 215, 228);
    box-shadow: 1px 5px 10px -1px rgb(79, 224, 240);
  }
  19% {
    background-color: rgb(84, 220, 235);
    box-shadow: 1px 5px 10px -1px rgb(73, 218, 234);
  }

  20% {
    background-color: rgb(49, 108, 219);
    box-shadow: 1px 5px 10px -1px rgb(57, 117, 228);
  }
  29% {
    background-color: rgb(79, 139, 251);
    box-shadow: 1px 5px 10px -1px rgb(60, 126, 248);
  }

  30% {
    background-color: rgb(245, 93, 192);
    box-shadow: 1px 5px 10px -1px rgb(241, 101, 192);
  }
  39% {
    background-color: rgb(238, 114, 195);
    box-shadow: 1px 5px 10px -1px rgb(230, 137, 198);
  }

  40% {
    background-color: rgb(215, 59, 67);
    box-shadow: 1px 5px 10px -1px rgb(215, 34, 43);
  }
  49% {
    background-color: rgb(236, 54, 63);
    box-shadow: 1px 5px 10px -1px rgb(216, 52, 60);
  }
  50% {
    background-color: rgb(232, 148, 64);
    box-shadow: 1px 5px 10px -1px rgb(221, 126, 31);
  }
  59% {
    background-color: rgb(247, 147, 48);
    box-shadow: 1px 5px 10px -1px rgb(221, 126, 31);
  }
  60% {
    background-color: rgb(255, 208, 0);
    box-shadow: 1px 5px 10px -1px rgb(255, 208, 0);
  }
  89% {
    background-color: rgb(255, 208, 0);
    box-shadow: 1px 5px 10px -1px rgb(255, 208, 0);
  }
  90% {
    background-color: rgb(116, 255, 106);
    box-shadow: 1px 5px 10px -1px rgb(83, 197, 75);
  }
  99% {
    background-color: rgb(123, 255, 114);
    box-shadow: 1px 5px 10px -1px rgb(80, 185, 73);
  }
  100% {
    background-color: white;
    box-shadow: 1px 5px 3px -1px rgba(70, 70, 70, 0.6);
  }
}

span:hover {
  transform: scale(1.7);
  transition-duration: 1s;
  transition-timing-function: cubic-bezier(0, 2.37, 0.62, -0.64);
}

h1 {
  display: block;
  visibility: visible;
  opacity: 1;
  animation-name: vanish;
  animation-duration: 0.6s;
  animation-timing-function: linear;
  animation-delay: 2.1s;
  animation-iteration-count: 1;
  animation-fill-mode: forwards;
  position: absolute;
  outline: 1000px solid white;
  z-index: 90;
  top: 33vh;
  left: 50vw;
  transform: translateX(-50%);
  text-align: center;
  padding: 50px;
  width: 50vw;
  font-size: 45px;
  font-weight: 700;
  line-height: 1.5em;
  font-family: "Major Mono Display", monospace;
  color: rgb(67, 17, 52);
  background-color: white;
  border: 15px ridge rgba(177, 49, 139, 1);
  border-radius: 35px;
  box-shadow: 0px 0px 30px 15px rgba(43, 43, 43, 0.574);
}

@keyframes vanish {
  0% {
    outline: 1000px solid white;
    opacity: 1;
  }
  100% {
    outline: 0px solid rgba(255, 255, 255, 0);
    opacity: 0;
    visibility: hidden;
    display: none;
  }
}
