/* CRT Screen Effect */
body::after {
    content: " ";
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5) 1px, transparent 1px, transparent 2px);
    pointer-events: none;
    z-index: 100;
    animation: flicker 0.15s infinite;
}

@keyframes flicker {
    0% {
        opacity: 0.5;
    }
    50% {
        opacity: 0.6;
    }
    100% {
        opacity: 0.5;
    }
}

/* Glitchy Text Effect */
.glitch {
    position: relative;
    color: #fff;
    font-size: 4em;
    letter-spacing: 0.5em;
    animation: glitch-skew 1s infinite linear alternate-reverse;
}

.glitch::before {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    left: 2px;
    text-shadow: -2px 0 #ff00c1;
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim 5s infinite linear alternate-reverse;
}

.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    left: -2px;
    text-shadow: -2px 0 #00fff9, 2px 2px #ff00c1;
    animation: glitch-anim2 1s infinite linear alternate-reverse;
}

@keyframes glitch-anim {
    0% {
        clip: rect(32px, 9999px, 9px, 0);
        transform: skew(0.3deg);
    }
    /* ... (add more keyframes for a more complex glitch) */
}

@keyframes glitch-anim2 {
    0% {
        clip: rect(29px, 9999px, 91px, 0);
        transform: skew(0.5deg);
    }
    /* ... (add more keyframes for a more complex glitch) */
}

@keyframes glitch-skew {
  0% {
    transform: skew(0deg);
  }
  5% {
    transform: skew(1deg);
  }
  10% {
    transform: skew(-1deg);
  }
  15% {
    transform: skew(0deg);
  }
  100% {
    transform: skew(0deg);
  }
}

#constellation-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}
