@import url("https://fonts.googleapis.com/css?family=Bungee+Shade");

:root {
  --f-size: 15;
  --f-unit: 0.5vmin;
  --f: calc(var(--f-size) * var(--f-unit));
  --bg: #181717;
}

*,
*::after,
*::before {
  box-sizing: border-box;
}

form {
  display: flex;
  flex-direction: column;
  width: calc(100% - 100px);
  gap: 20px;
  width: 100%;
}

body {
  font-family: "Bungee Shade", cursive;
  font-size: var(--f);
  background-color: var(--bg);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  color: #1af0dc;
  margin: 0;
  padding: 20px 40px;
  overflow: hidden;
}

input {
  border: 0;
  border-left: 2px solid #1af0dc;
  border-bottom: 2px solid #1af0dc;
  background: transparent;
  padding: 20px;
  color: #fff;
  width: 100%;
  font-size: 20px;
}

.glitch {
  line-height: 0.75;
  text-align: center;
  transform: scaleX(var(--scale, 1));
  animation: glitch-p 11s infinite alternate;
}

.glitch::before,
.glitch::after {
  --top: 0;
  --left: 0;
  --v-height: 30%;
  --n-tenth: calc(var(--f-size) * 0.1 * var(--top));
  --t-cut: calc(var(--n-tenth) / var(--f-size) * 100%);
  --b-cut: calc(var(--t-cut) + var(--v-height));
  content: attr(data-text);
  position: absolute;
  width: 100%;
  left: 0;
  text-align: center;
  transform: translateX(calc(var(--left) * 100%));
  filter: drop-shadow(0 0 transparent);
  text-shadow: calc(var(--left) * -3em) 0 0.02em lime, calc(var(--left) * -6em) 0 0.02em #ff00e1;
  background-color: var(--bg);
  clip-path: polygon(0% var(--t-cut), 100% var(--t-cut), 100% var(--b-cut), 0% var(--b-cut));
}

.glitch::before {
  animation: glitch-b 1.7s infinite alternate-reverse;
}

.glitch::after {
  animation: glitch-a 3.1s infinite alternate;
}

@keyframes glitch-p {
  17% {
    --scale: 0.87;
  }

  31% {
    --scale: 1.1;
  }

  37% {
    --scale: 1.3;
  }

  47% {
    --scale: 0.91;
  }

  87% {
    --scale: 1;
  }
}

@keyframes glitch-a {

  10%,
  30%,
  50%,
  70%,
  90% {
    --top: 0;
    --left: 0;
  }

  0% {
    --v-height: 15%;
  }

  20% {
    --left: 0.005;
  }

  40% {
    --left: 0.01;
    --v-height: 20%;
    --top: 3;
  }

  60% {
    --left: 0.03;
    --v-height: 25%;
    --top: 6;
  }

  80% {
    --left: 0.07;
    --v-height: 5%;
    --top: 8;
  }

  100% {
    --left: 0.083;
    --v-height: 30%;
    --top: 1;
  }
}

@keyframes glitch-b {

  10%,
  30%,
  50%,
  70%,
  90% {
    --top: 0;
    --left: 0;
  }

  0% {
    --v-height: 15%;
    --top: 10;
  }

  20% {
    --left: -0.005;
  }

  40% {
    --left: -0.01;
    --v-height: 17%;
    --top: 3;
  }

  60% {
    --left: -0.03;
    --v-height: 35%;
    --top: 6;
  }

  80% {
    --left: -0.07;
    --v-height: 5%;
    --top: 8;
  }

  100% {
    --left: -0.083;
    --v-height: 30%;
    --top: 1;
  }
}

.button-49 {
  position: relative;
  width: 100%;

}

.button-49,
.button-49:after {
  /* width: 150px; */
  height: 76px;
  line-height: 78px;
  font-size: 20px;
  font-family: 'Bebas Neue', sans-serif;
  background: linear-gradient(45deg, transparent 5%, #FF013C 5%);
  border: 0;
  color: #fff;
  letter-spacing: 3px;
  box-shadow: 6px 0px 0px #00E6F6;
  outline: transparent;
  position: relative;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
}

.button-49:after {
  --slice-0: inset(50% 50% 50% 50%);
  --slice-1: inset(80% -6px 0 0);
  --slice-2: inset(50% -6px 30% 0);
  --slice-3: inset(10% -6px 85% 0);
  --slice-4: inset(40% -6px 43% 0);
  --slice-5: inset(80% -6px 5% 0);

  content: 'ALTERNATE TEXT';
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, transparent 3%, #00E6F6 3%, #00E6F6 5%, #FF013C 5%);
  text-shadow: -3px -3px 0px #F8F005, 3px 3px 0px #00E6F6;
  clip-path: var(--slice-0);
}

.button-49:hover:after {
  animation: 1s glitch;
  animation-timing-function: steps(2, end);
}

@keyframes glitch {
  0% {
    clip-path: var(--slice-1);
    transform: translate(-20px, -10px);
  }

  10% {
    clip-path: var(--slice-3);
    transform: translate(10px, 10px);
  }

  20% {
    clip-path: var(--slice-1);
    transform: translate(-10px, 10px);
  }

  30% {
    clip-path: var(--slice-3);
    transform: translate(0px, 5px);
  }

  40% {
    clip-path: var(--slice-2);
    transform: translate(-5px, 0px);
  }

  50% {
    clip-path: var(--slice-3);
    transform: translate(5px, 0px);
  }

  60% {
    clip-path: var(--slice-4);
    transform: translate(5px, 10px);
  }

  70% {
    clip-path: var(--slice-2);
    transform: translate(-10px, 10px);
  }

  80% {
    clip-path: var(--slice-5);
    transform: translate(20px, -10px);
  }

  90% {
    clip-path: var(--slice-1);
    transform: translate(-10px, 0px);
  }

  100% {
    clip-path: var(--slice-1);
    transform: translate(0);
  }
}

@media (min-width: 768px) {

  .button-49,
  .button-49:after {
    width: 200px;
    height: 86px;
    line-height: 88px;
  }
}

pre {
  margin-top: 0;
}

[data-display] {
  height: 150px;
  font-size: 20px;
}

.typewriter-wrapper {
  font-size: 13px;
  display: flex;
  height: calc(100vh - 250px);
  overflow: hidden;
}

[data-typewriter] {
  align-self: flex-end;
  line-height: 1em;
  word-break: break-all;
  width: 100%;
  white-space: break-spaces;
}

.fullscreen {
  position: absolute;
  top: 20px;
  right: 20px;
  background: none;
  border: 0;
}