/* 999nevermind.com — rebuilt from the original hand-made page (same look),
   with the broken tablet media query fixed and WCAG 2.1 AA additions. */
* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Comic Sans MS", "Comic Sans", "Chalkboard SE", "Trebuchet MS", cursive, sans-serif;
  color: #fff700;
  background-color: #0b0018;
  background:
    radial-gradient(circle at 20% 20%, #2b0057 0 2px, transparent 3px),
    radial-gradient(circle at 80% 30%, #5ff 0 2px, transparent 3px),
    radial-gradient(circle at 40% 70%, #ff4fd8 0 2px, transparent 3px),
    linear-gradient(180deg, #000428 0%, #2b0048 45%, #0b0018 100%);
  background-size: 140px 140px, 180px 180px, 220px 220px, cover;
  overflow-x: hidden;
}

.scanlines::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255,255,255,0.06) 0,
    rgba(255,255,255,0.06) 1px,
    rgba(0,0,0,0) 2px,
    rgba(0,0,0,0) 4px
  );
  mix-blend-mode: soft-light;
  opacity: 0.35;
  z-index: 999;
}

/* --- accessibility helpers --- */
.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; left: 8px; top: -60px; z-index: 1000;
  background: #fff700; color: #000; padding: 10px 14px; font-weight: bold; text-decoration: none;
  border: 3px outset #fff;
}
.skip:focus { top: 8px; }
a:focus-visible, button:focus-visible, main:focus-visible {
  outline: 3px solid #fff700;
  outline-offset: 3px;
  box-shadow: 0 0 0 6px #000;
}
main:focus { outline: none; }
h1, h2, .tagline { text-wrap: balance; }
.nowrap { white-space: nowrap; }

.wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 14px;
}

.chrome {
  border: 5px ridge #c0c0c0;
  background: rgba(0, 0, 50, 0.78);
  box-shadow: 0 0 0 4px #ff00aa, 0 0 18px rgba(0,255,255,.5);
  margin-bottom: 16px;
}

.titlebar {
  position: relative;
  background: linear-gradient(90deg, #0ff, #f0f, #0ff);
  color: #000;
  padding: 6px 10px;
  font-weight: bold;
  text-shadow: 1px 1px 0 #fff;
  border-bottom: 3px solid #fff;
  text-align: center;
}

/* Win95-style "pause the chaos" button in the title bar */
.pause {
  font: inherit;
  font-size: 0.8rem;
  font-weight: bold;
  color: #000;
  text-shadow: none;
  background: #c0c0c0;
  border: 3px outset #fff;
  padding: 2px 10px;
  min-height: 28px;
  cursor: pointer;
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
}
.pause:active { border-style: inset; }

.hero {
  text-align: center;
  padding: 14px;
}

.cats-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  align-items: center;
  margin: 12px 0 18px;
}

.cats-row picture,
.gifs picture { display: contents; }
source { display: none; }

.cats-row img,
.gifs img {
  width: 100%;
  max-width: 150px;
  height: auto;
  justify-self: center;
  border: 4px solid #fff700;
  background: #000;
  padding: 4px;
  box-shadow: 0 0 10px rgba(255,255,0,.6);
  display: block;
}

h1 {
  font-size: clamp(2.2rem, 7vw, 5rem);
  margin: 10px 0;
  color: #00ffff;
  text-shadow:
    2px 2px 0 #ff00ff,
    4px 4px 0 #000,
    0 0 18px rgba(0,255,255,.7);
  letter-spacing: 2px;
}

.sub {
  color: #fff;
  font-size: 1.1rem;
  margin: 4px 0 10px;
  text-shadow: 1px 1px 0 #000;
}

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

@keyframes blink {
  to { visibility: hidden; }
}

/* CSS replacement for <marquee behavior="alternate">: bounces edge to edge */
.marquee {
  font-weight: bold;
  color: #00ff66;
  background: #1a0034;
  border-top: 3px dashed #ff0;
  border-bottom: 3px dashed #ff0;
  padding: 8px;
  font-size: 1.1rem;
  overflow: hidden;
  white-space: nowrap;
  container-type: inline-size;
}
.marquee-track {
  display: inline-block;
  animation: marquee var(--mq-dur, 6s) linear infinite alternate;
}
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(calc(100cqw - 100%)); }
}

.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.panel {
  padding: 12px;
  min-height: 100%;
  background: rgba(10, 0, 40, 0.9);
  border: 4px outset #9cf;
}

.panel h2 {
  margin-top: 0;
  color: #ff8cf9;
  text-shadow: 2px 2px 0 #000;
  font-size: 1.4rem;
}

.center-box {
  background: repeating-linear-gradient(
    45deg,
    rgba(255, 0, 255, 0.18),
    rgba(255, 0, 255, 0.18) 12px,
    rgba(0,255,255,0.12) 12px,
    rgba(0,255,255,0.12) 24px
  );
  border: 4px double #fff;
  padding: 16px;
  text-align: center;
}

.tagline {
  font-size: 1.3rem;
  color: #ffffff;
  text-shadow: 2px 2px 0 #ff00ff;
  margin: 0;
}

.gifs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  align-items: center;
  margin: 12px 0;
}

.guestbook,
.counter,
.construction {
  margin-top: 14px;
  padding: 10px;
  border: 3px dashed #0ff;
  background: rgba(0,0,0,.35);
  text-align: center;
}

.counter-digits {
  display: inline-block;
  padding: 6px 10px;
  background: #000;
  color: #00ff66;
  font-family: "Courier New", monospace;
  font-size: 1.4rem;
  letter-spacing: 4px;
  border: 3px inset #aaa;
}

.btns {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 14px;
}

/* gradient darkened slightly from #ff5fd2→#8f00ff so white text meets 4.5:1 */
.btn {
  background: linear-gradient(180deg, #c8008f, #7300d6);
  color: white;
  border: 3px outset #fff;
  padding: 10px 14px;
  font-weight: bold;
  text-decoration: none;
  box-shadow: 0 0 12px rgba(255,0,255,.5);
  display: inline-block;
}
.btn:hover { filter: brightness(1.12); }

.cool-cat {
  width: 100%;
  max-width: 220px;
  height: auto;
  margin: 0 auto;
  display: block;
}

.footer {
  text-align: center;
  padding: 18px;
  font-size: 1rem;
  color: #fff;
  text-shadow: 1px 1px 0 #000;
}
.footer a { color: #0ff; }
.footer-nav { list-style: none; margin: 10px 0 0; padding: 0; display: flex; justify-content: center; flex-wrap: wrap; gap: 6px 18px; }
.footer-nav a { display: inline-block; padding: 4px 2px; min-height: 24px; }

.spin {
  display: inline-block;
  font-size: 40px;
  animation: spin 6s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.small {
  font-size: 0.9rem;
  color: #b8f7ff;
}

/* inner pages (accessibility, 404) */
.page-body { text-align: left; max-width: 760px; margin: 0 auto; color: #fff; line-height: 1.55; }
.page-body h2 { color: #ff8cf9; text-shadow: 2px 2px 0 #000; font-size: 1.3rem; margin: 1.4em 0 .4em; }
.page-body a { color: #0ff; }
.page-body li { margin: .3em 0; }

/* --- paused / reduced motion: everything holds still --- */
.paused .blink, .paused .spin, .paused .marquee-track { animation-play-state: paused; }
.paused .blink { animation: none; }
@media (prefers-reduced-motion: reduce) {
  html:not(.motion-ok) .blink,
  html:not(.motion-ok) .spin,
  html:not(.motion-ok) .marquee-track { animation: none; }
}

@media (max-width: 900px) {
  .pause {
    position: static;
    transform: none;
    display: block;
    margin: 6px auto 0;
  }
}

@media (max-width: 768px) {
  .wrap {
    padding: 8px;
  }

  .hero {
    padding: 10px 8px;
  }

  .cats-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    justify-items: center;
  }

  .cats-row img,
  .gifs img {
    max-width: 160px;
  }

  h1 {
    font-size: clamp(2rem, 11vw, 3.4rem);
    line-height: 1;
  }

  .sub {
    font-size: 0.95rem;
  }

  .btns {
    flex-direction: column;
    align-items: center;
  }

  .btn {
    width: 100%;
    max-width: 320px;
    text-align: center;
  }

  .panel,
  .footer {
    padding: 10px;
  }

  .marquee {
    font-size: 0.95rem;
    padding: 6px;
  }
}

@media (max-width: 480px) {
  .cats-row {
    grid-template-columns: 1fr;
  }

  .cats-row img,
  .gifs img {
    max-width: 220px;
  }

  .counter-digits {
    font-size: 1.1rem;
    letter-spacing: 2px;
  }

  .titlebar {
    font-size: 0.9rem;
    line-height: 1.3;
  }

  .tagline {
    font-size: 1.05rem;
  }
}
