/* CSS is how you can add style to your website, such as colors, fonts, and positioning of your
   HTML content. To learn how to do something, just try searching Google for questions like
   "how to change link color." */

body {
  background-image: url('glitch.gif');
  cursor: none;
}
.word {
  position: absolute;
  color: white;
  font-size: 3rem;
  opacity: 0;
}

/* glitch layers */
.word::before,
.word::after {
  content: attr(data-text);
  position: absolute;
  left: 0;
  top: 0;
}

.word::before {
  color: magenta;
}

.word::after {
  color: cyan;
}

/* active glitch */
.word.active {
  opacity: 1;
}

.word.active::before {
  animation: g1 0.15s infinite;
}

.word.active::after {
  animation: g2 0.1s infinite;
}

@keyframes g1 {
  from { transform: translate(-2px, 0); }
  to   { transform: translate(2px, 0); }
}

@keyframes g2 {
  from { transform: translate(2px, 0); }
  to   { transform: translate(-2px, 0); }
  
}

/* Main cursor */
    .cursor {
        position: fixed;
        width: 14px;
        height: 14px;
        border-radius: 50%;
        background: white;
        pointer-events: none;
        z-index: 9999;
        transform: translate(-50%, -50%);
        mix-blend-mode: difference;
    }

    /* Glitch trail */
    .trail {
        position: fixed;
        width: 14px;
        height: 14px;
        border-radius: 50%;
        pointer-events: none;
        z-index: 9998;
        opacity: 0.7;
        transform: translate(-50%, -50%);
    }
}