:root {
  --bg: #0a0810;
  --text: #eae5da;
  --accent: #e05c4a;
  --accent2: #4ad8e0;
  --text-dim: #a39c8c;
}

* { box-sizing: border-box; }

html, body {
  height: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  text-align: center;
  padding: 1.5rem;
  overflow-x: hidden;
  position: relative;
}

/* faded, glitching thumbnail grid, tiled across the whole viewport */
.thumb-grid {
  position: fixed;
  inset: 0;
  z-index: 0;
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  overflow: hidden;
}

.thumb-grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: grayscale(0.7) contrast(1.15) brightness(0.4) saturate(0.6);
  opacity: 0.55;
  transition: filter 0.08s steps(1), transform 0.08s steps(1);
}

.thumb-grid img.glitching {
  filter: grayscale(0.1) hue-rotate(140deg) saturate(3) contrast(1.4) brightness(0.75);
  transform: translate(3px, -2px) skewX(-3deg);
  opacity: 0.85;
  z-index: 1;
}

/* CRT scanlines */
.scanlines {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0) 0px,
    rgba(0, 0, 0, 0) 1px,
    rgba(0, 0, 0, 0.25) 2px,
    rgba(0, 0, 0, 0.25) 3px
  );
  mix-blend-mode: multiply;
}

/* dark vignette so foreground text stays legible over the grid */
.vignette {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(ellipse at center, rgba(10, 8, 16, 0.35) 0%, rgba(10, 8, 16, 0.92) 75%);
}

main {
  position: relative;
  z-index: 2;
  max-width: 640px;
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.badge {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  padding: 0.4rem 0.7rem;
  border-radius: 2px;
}

.badge.construction {
  background: repeating-linear-gradient(45deg, #f4c430 0, #f4c430 12px, #111 12px, #111 24px);
  background-size: 200% 200%;
  color: #111;
  animation: stripeMove 10s linear infinite;
  text-shadow: none;
}

.badge.crt {
  background: #000;
  color: #4ad84a;
  border: 1px solid #2a2620;
  font-family: "Courier New", monospace;
}

@keyframes stripeMove {
  from { background-position: 0 0; }
  to { background-position: 240px 0; }
}

.glitch-title {
  font-size: clamp(3rem, 14vw, 6.5rem);
  font-weight: 900;
  margin: 0 0 0.4rem;
  letter-spacing: 0.04em;
  color: var(--text);
  text-shadow: 2px 0 var(--accent), -2px 0 var(--accent2);
  animation: glitchShift 2.6s infinite steps(1);
}

@keyframes glitchShift {
  0%, 88%, 100% {
    text-shadow: 2px 0 var(--accent), -2px 0 var(--accent2);
    transform: translate(0, 0);
  }
  90% {
    text-shadow: -5px 0 var(--accent), 5px 0 var(--accent2);
    transform: translate(-2px, 1px);
  }
  93% {
    text-shadow: 4px 2px var(--accent), -3px -2px var(--accent2);
    transform: translate(2px, -1px);
  }
  96% {
    text-shadow: -3px -1px var(--accent), 3px 1px var(--accent2);
    transform: translate(-1px, 2px);
  }
}

.tagline {
  font-size: 1.1rem;
  margin: 0 0 1.75rem;
  color: var(--text);
}

.counter-row {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #000;
  border: 1px solid #2a2620;
  padding: 0.4rem 0.8rem;
  margin-bottom: 1.75rem;
  font-family: "Courier New", monospace;
}

.counter-label {
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  color: var(--text-dim);
}

.counter {
  font-size: 1.1rem;
  font-weight: 700;
  color: #4ad84a;
  letter-spacing: 0.15em;
}

.status {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin: 0;
}

.blink {
  animation: blink 1s steps(1) infinite;
}

@keyframes blink {
  50% { opacity: 0; }
}

.ticker {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 3;
  background: #000;
  color: #4ad84a;
  font-family: "Courier New", monospace;
  font-size: 0.9rem;
  font-weight: 700;
  padding: 0.5rem 0;
  border-top: 2px solid var(--accent);
}
