* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background: #000;
  overflow: hidden;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
    Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}

canvas {
  display: block;
  max-width: 100%;
  height: 100vh;
}

div[data-id='hacked'] {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  color: #0f0;
  text-align: center;
  display: flex;
  justify-content: center;
  align-items: center;
}

.typewriter {
  font-size: 8vmin;
  z-index: 999;
  user-select: none;
  overflow: hidden; /* Ensures the content is not revealed until the animation */
  border-right: 0.15em solid #0f0; /* The typwriter cursor */
  white-space: nowrap; /* Keeps the content on a single line */
  letter-spacing: 0.15em; /* Adjust as needed */
  animation: typing 3.5s steps(20, end), blink-caret 1s step-end infinite;
  width: fit-content;
}

@keyframes typing {
  from {
    width: 0;
  }
  to {
    width: 100%;
  }
}

@keyframes blink-caret {
  from,
  to {
    border-color: #0f0;
  }
  50% {
    border-color: transparent;
  }
}

.skull {
  position: absolute;
  top: 0;
  left: 50%;
  left: 0;
  width: 100%;
  max-width: 100%;
  height: auto;
  max-height: 40vh;
  /* aspect-ratio: 4 / 3; */
  z-index: 1;
  mix-blend-mode: screen;
  filter: contrast(1.5);
  margin: auto;
  /* transform: translateX(-50%); */
}

.loading {
  width: 100%;
  height: 100vh;
  background: #fff;
  transition: transform 1.5s ease-in-out, opacity 2s ease-in-out;
  display: flex;
  justify-content: center;
  align-items: center;
  position: absolute;
  inset: 0;
  opacity: 1;
}

.loading[data-state='moved'] {
  transform: translateY(100vh);
  opacity: 0;
}

.bar {
  background-color: white;
  width: 60vmin;
  height: 3rem;
  border-radius: 1.5rem;
  box-shadow: 0 0 0.5rem 0.25rem lightskyblue;
  display: flex;
  justify-content: center;
  align-items: center;
  background: linear-gradient(to right, white 0%, lightskyblue 100%);
  background-position-x: -100%;
  animation: gradient 1s infinite;
}

@keyframes gradient {
  0% {
    background-position-x: 0px;
  }
  100% {
    background-position-x: 60vmin;
  }
}

.popup {
  position: absolute;
  bottom: 0;
  left: 0;
  background-color: white;
  padding: 0.5rem;
  text-align: center;
  transform: translateY(100%);
  animation: popup 0.75s ease-in-out forwards 8s;
  width: 100%;
}

@keyframes popup {
  0% {
    transform: translateY(100%);
  }
  100% {
    transform: translateY(0);
  }
}
