/* juya.co.uk - hand made, early-2000s style. No external resources. */
* { box-sizing: border-box; }

html { background: #000010; }
body {
  margin: 0;
  color: #fff;
  font-family: "Comic Sans MS", "Comic Sans", "Chalkboard SE", "Comic Neue", cursive, sans-serif;
  font-size: 16px;
  line-height: 1.45;
  /* starfield: three tiled layers of dots at different sizes/densities */
  background-color: #000010;
  background-image:
    radial-gradient(1.5px 1.5px at 20px 30px, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 90px 120px, #ccf 50%, transparent 51%),
    radial-gradient(1px 1px at 160px 60px, #fff 50%, transparent 51%),
    radial-gradient(2px 2px at 130px 170px, #ffd 50%, transparent 51%),
    radial-gradient(1px 1px at 50px 190px, #aaf 50%, transparent 51%),
    radial-gradient(1px 1px at 190px 10px, #fff 50%, transparent 51%);
  background-size: 200px 200px, 200px 200px, 200px 200px, 200px 200px, 200px 200px, 200px 200px;
  animation: drift 120s linear infinite;
}
@keyframes drift { to { background-position: 0 2000px, 0 1400px, 0 1000px, 0 2400px, 0 1200px, 0 1800px; } }

a { color: #00ffff; }
a:visited { color: #ff66ff; }
a:hover { color: #ffff00; background: #ff00ff; }

/* ---------- marquee ---------- */
.marquee {
  overflow: hidden;
  white-space: nowrap;
  background: #000080;
  border-top: 3px ridge #c0c0c0;
  border-bottom: 3px ridge #c0c0c0;
  color: #ffff00;
  font-family: "Times New Roman", Times, serif;
  font-weight: bold;
  font-size: 18px;
  padding: 4px 0;
}
.marquee-track { display: inline-block; animation: scroll 28s linear infinite; }
@keyframes scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ---------- table layout ---------- */
.page {
  width: 100%;
  max-width: 800px;
  margin: 16px auto;
  border: 4px outset #c0c0c0;
  background: rgba(0, 0, 40, .85);
  border-collapse: separate;
  border-spacing: 6px;
}
.page td { vertical-align: top; }
.sidebar { width: 190px; }
.main {
  padding: 10px 14px;
  border: 2px inset #8080ff;
  background: rgba(0, 0, 0, .55);
}

.box {
  border: 3px ridge #ff00ff;
  background: #200040;
  margin-bottom: 10px;
  padding: 6px;
  text-align: center;
}
.box-title {
  margin: 0 0 6px;
  font-size: 15px;
  color: #ffff00;
  background: #800080;
  border: 1px solid #ff99ff;
}
.nav { list-style: none; margin: 0; padding: 0; text-align: left; }
.nav li { margin: 4px 0; }

h1, h2 { font-family: "Times New Roman", Times, serif; }
h2 { color: #ffcc00; text-align: center; text-shadow: 2px 2px #ff0000; }

/* ---------- rainbow / glow / blink ---------- */
.rainbow, .rainbow-inline {
  background: linear-gradient(90deg, #f00, #f80, #ff0, #0f0, #0ff, #00f, #f0f, #f00);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: rainbow 4s linear infinite;
}
.rainbow {
  text-align: center;
  font-size: clamp(28px, 7vw, 46px);
  margin: 8px 0 12px;
  font-style: italic;
}
@keyframes rainbow { to { background-position: 200% 0; } }

.glow { color: #fff; text-shadow: 0 0 6px #0ff, 0 0 12px #0ff; }
.blink { animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { visibility: hidden; } }
.new { color: #ff0000; font-weight: bold; font-size: 12px; background: #ffff00; padding: 0 3px; }

/* ---------- under construction ---------- */
.construction {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 8px auto 14px;
  padding: 8px;
  max-width: 520px;
  background: repeating-linear-gradient(-45deg, #ffd800 0 14px, #111 14px 28px);
  border: 3px solid #000;
}
.construction-text {
  background: #ffd800;
  color: #000;
  font-family: Impact, "Arial Black", sans-serif;
  font-size: clamp(16px, 4.2vw, 24px);
  letter-spacing: 1px;
  padding: 2px 8px;
  border: 2px solid #000;
}
.cone { width: 48px; height: 30px; flex: none; }

/* ---------- glitter divider ---------- */
.glitter {
  border: 0;
  height: 14px;
  margin: 18px 0;
  background:
    radial-gradient(circle, #fff 0 1.5px, transparent 2px) 0 0 / 14px 14px,
    linear-gradient(90deg, #ff00ff, #00ffff, #ffff00, #ff00ff);
  background-size: 14px 14px, 200% 100%;
  animation: glitter 3s linear infinite;
  border-radius: 7px;
  box-shadow: 0 0 8px #f0f;
}
@keyframes glitter { to { background-position: 14px 0, 200% 0; } }

/* ---------- content bits ---------- */
.intro { font-size: 17px; }
.stars { list-style: none; padding-left: 4px; }
.stars li { position: relative; padding-left: 20px; margin: 3px 0; }
.stars li::before { content: "\2605"; color: #ffcc00; position: absolute; left: 0; }
.news { width: 100%; border: 2px solid #00ffff; border-collapse: collapse; }
.news td { border: 1px dotted #00ffff; padding: 4px 6px; }
.news .date { color: #ffff00; white-space: nowrap; font-family: "Courier New", monospace; width: 1%; vertical-align: top; }
.news-list { margin: 0; padding-left: 18px; list-style: none; }
.news-list li { margin: 2px 0; position: relative; }
.news-list li[hidden], .news tr[hidden] { display: none; }
.news-more:not([hidden]) { display: block; margin: 8px auto 0; }
.news-list li::before { content: "\2726"; color: #ff66ff; position: absolute; left: -16px; }
.big-link { font-size: 19px; font-weight: bold; }

.counter { display: inline-flex; gap: 2px; background: #000; padding: 3px; border: 2px inset #888; }
.counter span {
  display: inline-block; width: 18px;
  background: linear-gradient(#333, #000 50%, #222 50%, #000);
  color: #0f0; font-family: "Courier New", monospace; font-weight: bold; font-size: 18px;
}
.tiny { font-size: 11px; color: #ccc; margin: 4px 0 0; }

.tune-btn {
  font: inherit; font-size: 14px; cursor: pointer;
  color: #000; background: #c0c0c0;
  border: 3px outset #fff; padding: 4px 8px;
}
.tune-btn:active, .tune-btn[aria-pressed="true"] { border-style: inset; background: #ffff99; }

.badges { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 10px 0; }
.badge { width: 88px; height: 31px; image-rendering: pixelated; }

.footer { text-align: center; font-size: 13px; color: #ccc; }
#np-text { color: #ffff99; overflow-wrap: anywhere; }
.np-song { display: block; margin: 3px 0 0; padding: 4px 8px; border-left: 3px solid #1ed760; background: rgba(30, 215, 96, .08); }
.np-title { display: block; color: #ffff99; }
.np-by { display: block; color: #ccc; font-size: 14px; }
.np-live { font-size: 12px; color: #1ed760; font-weight: bold; white-space: nowrap; margin-left: 4px; }
.np-live .blink { color: #ff3333; }

/* ---------- cursor trail ---------- */
.spark {
  position: fixed; pointer-events: none; z-index: 99;
  width: 12px; height: 12px; margin: -6px 0 0 -6px;
  background: radial-gradient(circle, #fff 0 2px, #ff0 3px, transparent 6px);
  animation: spark .8s ease-out forwards;
}
@keyframes spark { to { transform: translateY(14px) scale(.2); opacity: 0; } }

/* ---------- flying space cat (original pixel art) ---------- */
.marquee, .page { position: relative; z-index: 1; }       /* content stays above the cat */
.flyer {
  position: fixed; top: 0; left: 0; z-index: 0;
  display: flex; align-items: flex-start;
  pointer-events: none; will-change: transform;
  transform: translate(-500px, -500px);        /* parked off-screen; script.js flies it */
  transform-origin: 50% 50%;
}
.spacecat { width: 128px; height: 69px; display: block; animation: bob .5s steps(2) infinite; }
@keyframes bob { 50% { transform: translateY(3px); } }
.spacecat .cape { transform-origin: 8px 5px; animation: flap .3s steps(2) infinite; }
@keyframes flap { 50% { transform: skewY(-14deg); } }
.trail { display: flex; height: 30px; margin: 30px -18px 0 0; }
.trail span {
  width: 20px; height: 100%;
  background: linear-gradient(#ff1a1a 0 16.66%, #ff9900 0 33.33%, #ffee00 0 50%, #33dd00 0 66.66%, #0099ff 0 83.33%, #6633ff 0);
  animation: wave .4s steps(2) infinite;
}
.trail span:nth-child(even) { animation-delay: -.2s; }
.trail span:nth-child(1) { opacity: .35; } .trail span:nth-child(2) { opacity: .6; } .trail span:nth-child(3) { opacity: .85; }
@keyframes wave { 50% { transform: translateY(4px); } }
@media (max-width: 640px) {
  .spacecat { width: 64px; height: 35px; }
  .trail { height: 16px; margin-top: 15px; }
  .trail span { width: 11px; }
}

/* ---------- phones: stack the table ---------- */
@media (max-width: 640px) {
  .page, .page > tbody, .page > tbody > tr, .page > tbody > tr > td { display: block; width: 100%; }
  .page { margin: 8px 0; border-width: 3px; border-spacing: 0; padding: 6px; }
  .sidebar { display: flex; flex-wrap: wrap; gap: 6px; }
  .sidebar .box { flex: 1 1 140px; margin-bottom: 0; }
  .main { margin-top: 6px; padding: 8px; }
}

/* ---------- respect reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  body, .marquee-track, .rainbow, .rainbow-inline, .blink, .glitter { animation: none; }
  .flyer { display: none; }
  .marquee { white-space: normal; text-align: center; }
  .marquee-track span[aria-hidden] { display: none; }
}
