/* Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Base styles */
body {
  background: #0f0f0f;
  color: #eee;
  font-family: 'Share Tech Mono', monospace;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 4rem 1rem;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

/* Background layers */
.noise-bg,
.glitch-overlay,
.scanlines,
.rgb-split,
.animated-noise {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

/* Grain texture */
.noise-bg {
  background-image: 
    repeating-radial-gradient(#111 1px, transparent 2px),
    repeating-linear-gradient(90deg, rgba(255,255,255,0.01) 1px, transparent 2px);
  opacity: 0.05;
  z-index: 1;
}

.animated-noise {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url('animated_noise.gif');
  background-size: cover;
  opacity: 0.02;
  z-index: 4;
  pointer-events: none;
}

/* Glitch overlay (shifting bars) */
.glitch-overlay {
  background: repeating-linear-gradient(
    0deg,
    rgba(255,255,255,0.05) 1px,
    transparent 2px
  );
  animation: glitch-bars 2s infinite steps(1);
  opacity: 0.02;
  mix-blend-mode: overlay;
  z-index: 2;
}

@keyframes glitch-bars {
  0%, 100% { transform: translateY(0); }
  20% { transform: translateY(-2px); }
  40% { transform: translateY(3px); }
  60% { transform: translateY(-1px); }
  80% { transform: translateY(1px); }
}

/* Flashing scanlines */
.scanlines {
  background: repeating-linear-gradient(
    0deg,
    rgba(255, 255, 255, 0.03) 1px,
    transparent 2px
  );
  animation: scan-flicker 4s infinite;
  opacity: 0.04;
  z-index: 3;
}

@keyframes scan-flicker {
  0%, 100% { opacity: 0.03; }
  10% { opacity: 0.06; }
  20% { opacity: 0.01; }
  50% { opacity: 0.07; }
  70% { opacity: 0.02; }
  90% { opacity: 0.05; }
}

/* Animated noise gif */
.animated-noise {
  background-image: url('noise.gif'); /* Use a seamless animated noise GIF */
  background-size: cover;
  opacity: 0.02;
  z-index: 4;
}

/* RGB split effect */
.rgb-split {
  background: linear-gradient(
    to right,
    rgba(255, 0, 0, 0.01),
    rgba(0, 255, 255, 0.01)
  );
  mix-blend-mode: screen;
  animation: rgb-shift 3s infinite;
  z-index: 5;
}

@keyframes rgb-shift {
  0%, 100% { transform: translate(0, 0); }
  33% { transform: translate(1px, -1px); }
  66% { transform: translate(-1px, 1px); }
}

/* Container */
.container {
  max-width: 420px;
  width: 100%;
  text-align: center;
  margin: auto;
  z-index: 10;
  position: relative;
}

/* Logo */
.logo {
  width: 100px;
  height: 100px;
  object-fit: contain;
  margin-bottom: 1rem;
  filter: grayscale(100%) brightness(80%);
}

/* Heading with glitch */
h1 {
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  position: relative;
  color: #fff;
}

.glitch {
  position: relative;
}

.glitch::before,
.glitch::after {
  content: attr(data-text);
  position: absolute;
  left: 0;
  width: 100%;
  overflow: hidden;
  color: #f0f;
  clip: rect(0, 900px, 0, 0);
  animation: glitch 2s infinite linear alternate-reverse;
}

.glitch::after {
  color: #0ff;
  animation-delay: 0.5s;
}

@keyframes glitch {
  0% {
    clip: rect(42px, 9999px, 44px, 0);
    transform: translate(2px, -2px);
  }
  20% {
    clip: rect(12px, 9999px, 18px, 0);
    transform: translate(-2px, 0);
  }
  40% {
    clip: rect(60px, 9999px, 62px, 0);
    transform: translate(2px, 2px);
  }
  60% {
    clip: rect(30px, 9999px, 32px, 0);
    transform: translate(-1px, -2px);
  }
  80% {
    clip: rect(50px, 9999px, 52px, 0);
    transform: translate(2px, 1px);
  }
  100% {
    clip: rect(10px, 9999px, 12px, 0);
    transform: translate(0, 0);
  }
}

/* Tagline */
.tagline {
  font-size: 0.85rem;
  color: #aaa;
  margin-bottom: 2rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Links */
.links a {
  display: block;
  background: #1a1a1a;
  color: #ccc;
  text-decoration: none;
  padding: 1rem;
  margin: 0.5rem 0;
  border: 1px solid #333;
  border-radius: 8px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  z-index: 10;
  position: relative;
}

.links a:hover {
  background: #222;
  color: #fff;
  border: 1px solid #666;
  box-shadow: 0 0 10px #0ff55f22;
}