@import url('https://fonts.googleapis.com/css2?family=VT323&display=swap');

body {
  background: url('assets/bgv7.jpg') no-repeat center center fixed;
  background-size: cover;
  font-family: 'VT323', monospace;
  color: #ff44aa;
  margin: 0;
  padding: 0;
}

body::before {
  content: "";
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.3);
  z-index: -1;
}

h1, p, ul, li {
  text-align: center;
  opacity: 0.9;
}

a {
  color: #f2a5cf;
  text-decoration: none;
  position: relative;
  display: inline-block;
  transition: transform 0.1s ease;
}

a:hover {
  color: #fff;
  text-shadow:
    1px 0 red,
    -1px 0 cyan,
    2px 1px magenta,
    -2px -1px lime;
  animation: baseFlicker 0.3s infinite, glitchJump 0.2s steps(2, end) infinite;
  transform: skewX(-2deg) scale(1.01);
  outline: 1px dashed #ff44aa;
}

a::before,
a::after {
  content: attr(href);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  pointer-events: none;
  mix-blend-mode: screen;
  opacity: 0;
  z-index: -1;
}

a::before {
  color: red;
  transform: translate(-2px, 0);
}

a::after {
  color: blue;
  transform: translate(2px, 0);
}

a:hover::before,
a:hover::after {
  opacity: 0.8;
  animation: glitchRGBShift 0.15s steps(3, end) infinite;
}

@keyframes baseFlicker {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.8; }
}

@keyframes glitchJump {
  0%   { transform: translate(0, 0); }
  20%  { transform: translate(-2px, 1px); }
  40%  { transform: translate(2px, -1px); }
  60%  { transform: translate(-1px, 2px); }
  80%  { transform: translate(1px, -2px); }
  100% { transform: translate(0, 0); }
}

@keyframes glitchRGBShift {
  0%   { transform: translate(-1px, 0); opacity: 0.2; }
  50%  { transform: translate(1px, 1px); opacity: 0.4; }
  100% { transform: translate(-1px, 0); opacity: 0.2; }
}

#vhs {
  position: relative;
  height: 100vh;
  width: 100vw;
}

.scanlines {
  background: url('assets/vhs_overlay.gif') repeat;
  opacity: 0.15;
  position: absolute;
  top: 0; left: 0;
  height: 100%;
  width: 100%;
  pointer-events: none;
}

.cat-scanlines {
  pointer-events: none;
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.03) 0px,
    rgba(255, 255, 255, 0.03) 1px,
    transparent 1px,
    transparent 3px
  );
  animation: scanlineMove 1s linear infinite;
  z-index: 9999;
}

@keyframes scanlineMove {
  0% { background-position: 0 0; }
  100% { background-position: 0 4px; }
}

.static {
  position: relative;
  padding-top: 20ch;
  animation: flicker 3s infinite, glowPulse 2s ease-in-out infinite;
  text-shadow: 0 0 5px #00ffcc, 0 0 10px #00ffcc;
}

@keyframes flicker {
  0% { opacity: 1; }
  50% { opacity: 0.8; transform: translateX(-1px); }
  100% { opacity: 1; }
}

@keyframes glowPulse {
  0%, 100% { text-shadow: 0 0 5px #00ffcc, 0 0 10px #00ffcc; }
  50% { text-shadow: 0 0 15px #00ffff, 0 0 30px #00ffff; }
}

.glitch-color {
  animation: glitch-color-cycle 6s infinite alternate;
}

@keyframes glitch-color-cycle {
  0%   { color: #00ffcc; }
  25%  { color: #ff44aa; }
  50%  { color: #ffff00; }
  75%  { color: #ff0000; }
  100% { color: #00ffff; }
}

.glitch-text {
  position: relative;
  display: inline-block;
  color: #ff0055;
}

.glitch-text::before,
.glitch-text::after {
  content: attr(data-text);
  position: absolute;
  left: 0;
  width: 100%;
  overflow: hidden;
  clip: rect(0, 900px, 0, 0);
}

.glitch-text::before {
  color: #ff44aa;
  animation: glitchTop 1.3s infinite linear;
}

.glitch-text::after {
  color: #ff0055;
  animation: glitchBottom 1s infinite linear;
}

@keyframes glitchTop {
  0%   { clip: rect(10px, 9999px, 20px, 0); transform: translateX(0); }
  15%  { clip: rect(5px, 9999px, 15px, 0); transform: translateX(-2px); }
  30%  { clip: rect(12px, 9999px, 22px, 0); transform: translateX(2px); }
  45%  { clip: rect(0, 9999px, 8px, 0); transform: translateX(-1px); }
  60%  { clip: rect(20px, 9999px, 30px, 0); transform: translateX(3px); }
  75%  { clip: rect(8px, 9999px, 18px, 0); transform: translateX(-3px); }
  100% { clip: rect(10px, 9999px, 20px, 0); transform: translateX(0); }
}


@keyframes glitchBottom {
  0%   { clip: rect(0, 9999px, 0, 0); }
  10%  { clip: rect(10px, 9999px, 20px, 0); }
  20%  { clip: rect(5px, 9999px, 15px, 0); }
  100% { clip: rect(0, 9999px, 0, 0); }
}

.animated-border {
  border: 2px solid #ff44aa;
  box-shadow: 0 0 4px #ff44aa;
  animation: borderPulse 1.5s infinite alternate;
}

@keyframes borderPulse {
  0% { box-shadow: 0 0 2px #ff44aa; }
  50% { box-shadow: 0 0 8px #ff44aa; }
  100% { box-shadow: 0 0 2px #ff44aa; }
}
