:root {
  --accent: #b77cff;
  --text: #fff;
  --muted: rgba(255, 255, 255, 0.72);
  color-scheme: dark;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: #0b0612;
  color: var(--text);
  font-family: "gg sans", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
}

#bg {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Darkens the bottom so the text stays readable over any video. */
.shade {
  position: fixed;
  inset: 0;
  background: linear-gradient(to top, rgba(8, 4, 14, 0.88) 0%, rgba(8, 4, 14, 0.45) 32%, transparent 60%);
}

.now {
  position: fixed;
  left: clamp(12px, 4vw, 56px);
  right: clamp(12px, 4vw, 56px);
  bottom: clamp(12px, 5vh, 56px);
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.6);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-size: clamp(10px, 1.6vw, 15px);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.dot {
  width: 0.6em;
  height: 0.6em;
  border-radius: 50%;
  background: #ff4d6d;
  animation: pulse 1.6s ease-in-out infinite;
}

@keyframes pulse { 50% { opacity: 0.35; } }

h1 {
  margin: 0.25em 0 0;
  font-size: clamp(18px, 5.2vw, 64px);
  line-height: 1.1;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.artist {
  margin-top: 0.2em;
  font-size: clamp(12px, 2.4vw, 26px);
  color: var(--muted);
}
.artist:empty { display: none; }

.progress {
  margin-top: clamp(8px, 2vh, 20px);
  height: clamp(3px, 0.6vh, 6px);
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.2);
  overflow: hidden;
}

#bar {
  height: 100%;
  width: 0;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent);
  transition: width 1s linear;
}

.times {
  display: flex;
  justify-content: space-between;
  margin-top: 0.4em;
  font-size: clamp(10px, 1.5vw, 15px);
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.next {
  margin-top: 0.6em;
  font-size: clamp(11px, 1.8vw, 18px);
  color: var(--muted);
}
.next:empty { display: none; }

/* Tiny picture-in-picture window: only the title. */
@media (max-height: 220px) {
  .badge, .times, .next, .artist { display: none; }
  h1 { font-size: clamp(14px, 6vw, 24px); }
}

@media (prefers-reduced-motion: reduce) {
  .dot { animation: none; }
  #bar { transition: none; }
}
