:root {
  --bg:      #111110;   /* near-black ink           */
  --s1:      #1a1918;   /* panel surface            */
  --s2:      #232220;   /* panel header             */
  --border:  #3a3835;   /* charcoal border          */
  --brite:   #504e4a;   /* highlighted border       */
  --text:    #ece8e0;   /* off-white paper          */
  --muted:   #6a6662;   /* dimmed ink               */
  --hi:      #ffffff;   /* pure white for emphasis  */
  --green:   #1db954;   /* spotify green            */
  --twitch:  #9060c8;   /* twitch purple, muted     */
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Azeret Mono', monospace;
  font-size: 12px;
  line-height: 1.65;
  transition: background 0.25s, color 0.25s;
  -webkit-font-smoothing: none;
  -moz-osx-font-smoothing: unset;
  font-smooth: never;
}

.wrap {
  max-width: 560px;
  margin: 0 auto;
  padding: 28px 14px 52px;
  position: relative; z-index: 1;
  zoom: 1.25;
}

#bg-gif {
  position: fixed; inset: 0; z-index: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0.4;
  filter: blur(8px);
  pointer-events: none;
}

#paper-grain {
  position: fixed; inset: 0; z-index: 9000; pointer-events: none;
  opacity: 0.055;
  mix-blend-mode: multiply;
}
.pg-vignette {
  position: fixed; inset: 0; z-index: 9001; pointer-events: none;
  background: radial-gradient(ellipse at 50% 50%,
    transparent 50%,
    rgba(0,0,0,0.50) 100%
  );
}
.wobble {
  position: relative;
  overflow: visible !important;
  border-color: transparent !important;
}

.wobble::before {
  content: '';
  position: absolute;
  inset: 0;
  border: 1px solid var(--wobble-border, var(--border));
  filter: url(#f-wobble);
  pointer-events: none;
  z-index: 1;
}

.hdr.wobble                { --wobble-border: var(--brite); }
.status-bar.wobble::before { border-top: none; }

.hdr {
  border: 1px solid var(--brite);
  background: var(--s1);
  padding: 18px 22px 16px;
  position: relative;
}

.hdr-corner {
  position: absolute; top: 0; right: 0;
  width: 70px; height: 70px;
  background: repeating-linear-gradient(
    45deg,
    var(--brite) 0px, var(--brite) 1px,
    transparent 1px, transparent 5px
  );
  opacity: 0.35;
  pointer-events: none;
}

.hdr-title {
  font-family: 'Press Start 2P', monospace;
  font-size: clamp(20px, 5.5vw, 36px);
  color: var(--hi);
  letter-spacing: 1px;
  line-height: 1.2;
  text-shadow: 2px 2px 0 var(--muted);
  position: relative; z-index: 1;
  margin-bottom: 10px;
}
.hdr-sub {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.12em;
  position: relative; z-index: 1;
}
.hdr-sub .hl { color: var(--text); }

.blink { animation: blink 1.1s step-end infinite; }
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0} }

.status-bar {
  border: 1px solid var(--border);
  border-top: none;
  background: var(--s2);
  padding: 7px 14px;
  display: flex; align-items: center; gap: 10px;
}

.s-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--muted); flex-shrink: 0;
}
.s-dot.live {
  background: var(--twitch);
  box-shadow: 0 0 6px var(--twitch);
  animation: sdot-pulse 1.4s ease-in-out infinite;
}
.s-dot.playing {
  background: var(--green);
  box-shadow: 0 0 5px var(--green);
}

@keyframes sdot-pulse { 0%,100%{opacity:1} 50%{opacity:0.3} }

.s-label { flex: 1; font-size: 11px; color: var(--muted); display: flex; align-items: center; gap: 5px; min-width: 0; }
.s-label strong { color: var(--text); font-weight: 400; }

.spotify-clip { flex: 1; overflow: hidden; min-width: 0; }
#spotify-text { white-space: nowrap; display: inline-block; }
#spotify-text.scrolling {
  animation: sp-bounce var(--sp-dur, 8s) ease-in-out infinite;
}
@keyframes sp-bounce {
  0%, 20%  { transform: translateX(0); }
  45%, 55% { transform: translateX(var(--sp-dist, 0px)); }
  80%, 100% { transform: translateX(0); }
}

.status-link { color: var(--text); text-decoration: none; }
.status-link:hover { text-decoration: underline; }

.spotify-eq {
  display: none;
  gap: 2px;
  align-items: flex-end;
  height: 11px;
  flex-shrink: 0;
}
.spotify-eq.active { display: inline-flex; }

.spotify-eq span {
  display: block;
  width: 2px;
  background: var(--green);
  height: 3px;
  animation: eq-bar 0.65s ease-in-out infinite alternate;
}
.spotify-eq span:nth-child(2) { animation-delay: 0.2s;  }
.spotify-eq span:nth-child(3) { animation-delay: 0.38s; }
@keyframes eq-bar { from { height: 3px; } to { height: 10px; } }
.spotify-eq.paused span { animation-play-state: paused; }

.s-link {
  font-size: 10px; text-decoration: none; color: var(--muted);
  border: 1px solid var(--border); padding: 2px 9px;
  letter-spacing: 0.1em; text-transform: uppercase;
  transition: all 0.12s; white-space: nowrap;
}
.s-link:hover         { color: var(--hi);    border-color: var(--brite); }
.s-link.spotify:hover { color: var(--green); border-color: var(--green); }

.div {
  font-size: 10px; color: var(--brite); letter-spacing: 3px;
  text-align: center; margin: 6px 0; overflow: hidden; white-space: nowrap;
}

.box {
  border: 1px solid var(--border);
  background: var(--s1);
  margin-top: 8px;
}

.bh {
  font-family: 'VT323', monospace;
  font-size: 19px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--text); background: var(--s2);
  border-bottom: 1px solid var(--border);
  padding: 4px 12px; display: flex; align-items: center; gap: 6px;
}
.bh::before { content: '»'; color: var(--muted); font-size: 15px; }

.bb { padding: 11px 12px; }

.slinks { list-style: none; display: flex; flex-direction: column; gap: 1px; }

.slinks a {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 8px; color: var(--text); text-decoration: none;
  font-size: 11px; border: 1px solid transparent; transition: all 0.1s;
}
.slinks a:hover { background: var(--s2); border-color: var(--border); padding-left: 14px; }
.slinks a:hover .sarr { color: var(--hi); }

.sico { color: var(--muted); width: 14px; text-align: center; font-size: 12px; flex-shrink: 0; }
.slbl { flex: 1; }
.sarr { color: var(--muted); font-size: 10px; transition: color 0.1s; }

.badges { display: flex; flex-wrap: wrap; gap: 4px; padding: 10px 12px; }

.badges a {
  display: block;
  position: relative;
  overflow: hidden;
  transition: opacity 0.12s;
}
.badges a::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--border);
  mix-blend-mode: color;
  opacity: 0.7;
  pointer-events: none;
  transition: opacity 0.12s;
}
.badges a:hover::after { opacity: 0; }

.badges img { display: block; width: 88px; height: 31px; image-rendering: pixelated; }

.ftr {
  border: 1px solid var(--border); background: var(--s2);
  padding: 7px 14px; font-size: 10px; color: var(--muted);
  display: flex; justify-content: space-between; flex-wrap: wrap;
  gap: 4px; margin-top: 8px;
}
.ftr a { color: var(--muted); text-decoration: none; }
.ftr a:hover { color: var(--hi); }
