# Synced song lyrics

> Like lyrics in a music app: the current line fills with light in time, the others blur, and any line can be tapped.

- Category: [Text & scroll](https://library.aimran.es/components/text-scroll)
- Built with: HTML + CSS
- Live editor: https://library.aimran.es/blocks/uv-tx-lyrics-sync
- Library: AIMRAN Library (https://library.aimran.es), free, no sign-up, by Aimran Oukham

## Where to use it

Music apps turned lyrics into a reading experience: the active line glows and sweeps from left to right while the rest wait out of focus. This card recreates it with a background clip on the text, a blur on the inactive lines and a list that slides up on its own. It fits artist pages, podcasts with transcripts and karaoke style promos.

Write your own lines in the list and set the first one in the text field. The main and secondary colors paint the background glow. Each line is a button, so people can jump with a click, the keyboard or a tap, and pause with the round button.

## Code

### HTML

```html
<div class="uvq14-lyr"><div class="hd"><span class="art" aria-hidden="true"><i></i><i></i><i></i></span><p><b>City light</b><span>Aurora Sur</span></p><button type="button" class="pl" aria-pressed="true" aria-label="Play"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.6" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M9 6v12M15 6v12"/></svg><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M8 5.5v13l10.5-6.5z" fill="currentColor"/></svg></button></div><div class="vw"><ol><li><button type="button" aria-current="true"><span>Under the city lights</span></button></li><li><button type="button"><span>The streets are singing again</span></button></li><li><button type="button"><span>Your name written on the glass</span></button></li><li><button type="button"><span>And the train that won't come back</span></button></li><li><button type="button"><span>We dance alone until the sun</span></button></li></ol></div></div>
```

### CSS

```css
.uvq14-lyr {
  --c1: #0d9488;
  --c2: #ca8a04;
  --s: 16px;
  /* tamaño */
  --k: 1;
  /* velocidad */
  --fg: #1d1d1f;
  /* texto */
  --bg: #f5f5f7;
  /* fondo */
}

.uvq14-lyr {
  font-family: -apple-system,BlinkMacSystemFont,"SF Pro Text","Inter",system-ui,sans-serif;
  font-size: var(--s);
  color: var(--fg);
  -webkit-tap-highlight-color: transparent;
  width: 19em;
  height: 17.5em;
  padding: 1em 1.1em 0;
  border-radius: 1.4em;
  color: #fff;
  background: radial-gradient(120% 80% at 0 0,var(--c1),transparent 62%),radial-gradient(110% 90% at 100% 100%,var(--c2),transparent 60%),#121212;
  box-shadow: 0 1.6em 3em -1.6em rgba(0,0,0,.6);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.uvq14-lyr .hd {
  display: flex;
  align-items: center;
  gap: .7em;
}

.uvq14-lyr .art {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: .15em;
  width: 2.6em;
  height: 2.6em;
  padding: .55em;
  box-sizing: border-box;
  border-radius: .5em;
  background: linear-gradient(135deg,var(--c2),var(--c1));
  box-shadow: 0 .4em .8em -.3em rgba(0,0,0,.5);
}

.uvq14-lyr .art i {
  width: .28em;
  height: 100%;
  border-radius: 1em;
  background: #fff;
  transform-origin: bottom;
  animation: uvq14-lyr-eq calc(0.9s / var(--k)) ease-in-out infinite alternate;
}

.uvq14-lyr .art i:nth-child(2) {
  animation-delay: -.3s;
}

.uvq14-lyr .art i:nth-child(3) {
  animation-delay: -.6s;
}

.uvq14-lyr .hd p {
  flex: 1;
  margin: 0;
  display: grid;
  line-height: 1.25;
}

.uvq14-lyr .hd b {
  font-size: .9em;
}

.uvq14-lyr .hd p span {
  font-size: .75em;
  opacity: .65;
}

.uvq14-lyr .pl {
  font: inherit;
  color: inherit;
  border: 0;
  margin: 0;
  background: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  display: grid;
  place-items: center;
  width: 2.3em;
  height: 2.3em;
  border-radius: 50%;
  color: #111;
  background: #fff;
  transition: transform calc(0.25s / var(--k)) cubic-bezier(.34,1.56,.64,1);
}

.uvq14-lyr .pl:hover {
  transform: scale(1.07);
}

.uvq14-lyr .pl:active {
  transform: scale(.92);
}

.uvq14-lyr .pl:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

.uvq14-lyr .pl svg {
  grid-area: 1/1;
  width: 1.05em;
  height: 1.05em;
}

.uvq14-lyr .pl[aria-pressed=true] svg:last-child,.uvq14-lyr .pl[aria-pressed=false] svg:first-child {
  display: none;
}

.uvq14-lyr .vw {
  position: relative;
  flex: 1;
  margin: 0 -1.1em;
  padding: 0 1.1em;
  overflow: hidden;
  -webkit-mask: linear-gradient(transparent,#000 14%,#000 72%,transparent);
  mask: linear-gradient(transparent,#000 14%,#000 72%,transparent);
}

.uvq14-lyr ol {
  position: relative;
  margin: 0;
  padding: 1.6em 0 8em;
  list-style: none;
  transition: transform calc(0.8s / var(--k)) cubic-bezier(.22,1,.36,1);
}

.uvq14-lyr li button {
  font: inherit;
  color: inherit;
  border: 0;
  margin: 0;
  background: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  display: block;
  width: 100%;
  padding: .22em .2em;
  border-radius: .4em;
  text-align: left;
  font-size: 1.32em;
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: -.02em;
  color: rgba(255,255,255,.34);
  filter: blur(1.4px);
  transform: scale(.95);
  transform-origin: 0 50%;
  transition: filter calc(0.5s / var(--k)) cubic-bezier(.25,.1,.25,1),transform calc(0.6s / var(--k)) cubic-bezier(.22,1,.36,1),color calc(0.4s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

.uvq14-lyr li button.past {
  color: rgba(255,255,255,.22);
}

.uvq14-lyr li button:hover {
  filter: none;
  color: rgba(255,255,255,.62);
}

.uvq14-lyr li button:focus-visible {
  filter: none;
  outline: 2px solid #fff;
  outline-offset: 1px;
}

.uvq14-lyr li button:active {
  transform: scale(.93);
}

.uvq14-lyr li button[aria-current=true] {
  filter: none;
  transform: none;
}

.uvq14-lyr li button[aria-current=true] span {
  color: transparent;
  background: linear-gradient(90deg,#fff 50%,rgba(255,255,255,.4) 50%) 100% 0/200% 100% no-repeat;
  -webkit-background-clip: text;
  background-clip: text;
  animation: uvq14-lyr-f calc(3.4s / var(--k)) linear forwards;
}

.uvq14-lyr.paused li button[aria-current=true] span,.uvq14-lyr.paused .art i {
  animation-play-state: paused;
}

@keyframes uvq14-lyr-f {
  to {
    background-position: 0 0;
  }
}

@keyframes uvq14-lyr-eq {
  from {
    transform: scaleY(.25);
  }
  to {
    transform: scaleY(1);
  }
}

@media (prefers-reduced-motion:reduce) {
  .uvq14-lyr ol,.uvq14-lyr li button {
    transition: none;
  }
  .uvq14-lyr li button {
    filter: none;
  }
  .uvq14-lyr .art i {
    animation: none;
  }
}
```

### JavaScript

```js
document.querySelectorAll(".uvq14-lyr").forEach(el => {
  const bs=[...el.querySelectorAll("ol button")],ol=el.querySelector("ol"),pl=el.querySelector(".pl");let i=0;
const go=n=>{i=(n+bs.length)%bs.length;bs.forEach((b,j)=>{if(j===i)b.setAttribute("aria-current","true");else b.removeAttribute("aria-current");b.classList.toggle("past",j<i)});const s=bs[i].firstElementChild;s.style.animation="none";void s.offsetWidth;s.style.animation="";ol.style.transform="translateY("+(-(bs[i].parentElement.offsetTop-parseFloat(getComputedStyle(ol).paddingTop)))+"px)"};
ol.addEventListener("animationend",e=>{if(e.target===bs[i].firstElementChild)go(i+1)});
bs.forEach((b,j)=>b.addEventListener("click",()=>go(j)));
ol.addEventListener("keydown",e=>{const j=bs.indexOf(document.activeElement);if(j<0)return;if(e.key==="ArrowDown"&&bs[j+1]){e.preventDefault();bs[j+1].focus()}if(e.key==="ArrowUp"&&bs[j-1]){e.preventDefault();bs[j-1].focus()}});
pl.addEventListener("click",()=>{const on=pl.getAttribute("aria-pressed")!=="true";pl.setAttribute("aria-pressed",String(on));el.classList.toggle("paused",!on)});
go(0)
});
```

### React

```tsx
// @ts-nocheck: setup() es JavaScript del DOM sin tipos, el mismo de la pestaña JS.
import { useEffect, useRef, type CSSProperties } from "react";

const css = `
.uvq14-lyr {
  font-family: -apple-system,BlinkMacSystemFont,"SF Pro Text","Inter",system-ui,sans-serif;
  font-size: var(--s);
  color: var(--fg);
  -webkit-tap-highlight-color: transparent;
  width: 19em;
  height: 17.5em;
  padding: 1em 1.1em 0;
  border-radius: 1.4em;
  color: #fff;
  background: radial-gradient(120% 80% at 0 0,var(--c1),transparent 62%),radial-gradient(110% 90% at 100% 100%,var(--c2),transparent 60%),#121212;
  box-shadow: 0 1.6em 3em -1.6em rgba(0,0,0,.6);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.uvq14-lyr .hd {
  display: flex;
  align-items: center;
  gap: .7em;
}

.uvq14-lyr .art {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: .15em;
  width: 2.6em;
  height: 2.6em;
  padding: .55em;
  box-sizing: border-box;
  border-radius: .5em;
  background: linear-gradient(135deg,var(--c2),var(--c1));
  box-shadow: 0 .4em .8em -.3em rgba(0,0,0,.5);
}

.uvq14-lyr .art i {
  width: .28em;
  height: 100%;
  border-radius: 1em;
  background: #fff;
  transform-origin: bottom;
  animation: uvq14-lyr-eq calc(0.9s / var(--k)) ease-in-out infinite alternate;
}

.uvq14-lyr .art i:nth-child(2) {
  animation-delay: -.3s;
}

.uvq14-lyr .art i:nth-child(3) {
  animation-delay: -.6s;
}

.uvq14-lyr .hd p {
  flex: 1;
  margin: 0;
  display: grid;
  line-height: 1.25;
}

.uvq14-lyr .hd b {
  font-size: .9em;
}

.uvq14-lyr .hd p span {
  font-size: .75em;
  opacity: .65;
}

.uvq14-lyr .pl {
  font: inherit;
  color: inherit;
  border: 0;
  margin: 0;
  background: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  display: grid;
  place-items: center;
  width: 2.3em;
  height: 2.3em;
  border-radius: 50%;
  color: #111;
  background: #fff;
  transition: transform calc(0.25s / var(--k)) cubic-bezier(.34,1.56,.64,1);
}

.uvq14-lyr .pl:hover {
  transform: scale(1.07);
}

.uvq14-lyr .pl:active {
  transform: scale(.92);
}

.uvq14-lyr .pl:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

.uvq14-lyr .pl svg {
  grid-area: 1/1;
  width: 1.05em;
  height: 1.05em;
}

.uvq14-lyr .pl[aria-pressed=true] svg:last-child,.uvq14-lyr .pl[aria-pressed=false] svg:first-child {
  display: none;
}

.uvq14-lyr .vw {
  position: relative;
  flex: 1;
  margin: 0 -1.1em;
  padding: 0 1.1em;
  overflow: hidden;
  -webkit-mask: linear-gradient(transparent,#000 14%,#000 72%,transparent);
  mask: linear-gradient(transparent,#000 14%,#000 72%,transparent);
}

.uvq14-lyr ol {
  position: relative;
  margin: 0;
  padding: 1.6em 0 8em;
  list-style: none;
  transition: transform calc(0.8s / var(--k)) cubic-bezier(.22,1,.36,1);
}

.uvq14-lyr li button {
  font: inherit;
  color: inherit;
  border: 0;
  margin: 0;
  background: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  display: block;
  width: 100%;
  padding: .22em .2em;
  border-radius: .4em;
  text-align: left;
  font-size: 1.32em;
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: -.02em;
  color: rgba(255,255,255,.34);
  filter: blur(1.4px);
  transform: scale(.95);
  transform-origin: 0 50%;
  transition: filter calc(0.5s / var(--k)) cubic-bezier(.25,.1,.25,1),transform calc(0.6s / var(--k)) cubic-bezier(.22,1,.36,1),color calc(0.4s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

.uvq14-lyr li button.past {
  color: rgba(255,255,255,.22);
}

.uvq14-lyr li button:hover {
  filter: none;
  color: rgba(255,255,255,.62);
}

.uvq14-lyr li button:focus-visible {
  filter: none;
  outline: 2px solid #fff;
  outline-offset: 1px;
}

.uvq14-lyr li button:active {
  transform: scale(.93);
}

.uvq14-lyr li button[aria-current=true] {
  filter: none;
  transform: none;
}

.uvq14-lyr li button[aria-current=true] span {
  color: transparent;
  background: linear-gradient(90deg,#fff 50%,rgba(255,255,255,.4) 50%) 100% 0/200% 100% no-repeat;
  -webkit-background-clip: text;
  background-clip: text;
  animation: uvq14-lyr-f calc(3.4s / var(--k)) linear forwards;
}

.uvq14-lyr.paused li button[aria-current=true] span,.uvq14-lyr.paused .art i {
  animation-play-state: paused;
}

@keyframes uvq14-lyr-f {
  to {
    background-position: 0 0;
  }
}

@keyframes uvq14-lyr-eq {
  from {
    transform: scaleY(.25);
  }
  to {
    transform: scaleY(1);
  }
}

@media (prefers-reduced-motion:reduce) {
  .uvq14-lyr ol,.uvq14-lyr li button {
    transition: none;
  }
  .uvq14-lyr li button {
    filter: none;
  }
  .uvq14-lyr .art i {
    animation: none;
  }
}
`;

// Interacción en JavaScript del DOM: la misma que en la pestaña JS.
// eslint-disable-next-line @typescript-eslint/no-explicit-any
function setup(el: any) {
  const bs=[...el.querySelectorAll("ol button")],ol=el.querySelector("ol"),pl=el.querySelector(".pl");let i=0;
const go=n=>{i=(n+bs.length)%bs.length;bs.forEach((b,j)=>{if(j===i)b.setAttribute("aria-current","true");else b.removeAttribute("aria-current");b.classList.toggle("past",j<i)});const s=bs[i].firstElementChild;s.style.animation="none";void s.offsetWidth;s.style.animation="";ol.style.transform="translateY("+(-(bs[i].parentElement.offsetTop-parseFloat(getComputedStyle(ol).paddingTop)))+"px)"};
ol.addEventListener("animationend",e=>{if(e.target===bs[i].firstElementChild)go(i+1)});
bs.forEach((b,j)=>b.addEventListener("click",()=>go(j)));
ol.addEventListener("keydown",e=>{const j=bs.indexOf(document.activeElement);if(j<0)return;if(e.key==="ArrowDown"&&bs[j+1]){e.preventDefault();bs[j+1].focus()}if(e.key==="ArrowUp"&&bs[j-1]){e.preventDefault();bs[j-1].focus()}});
pl.addEventListener("click",()=>{const on=pl.getAttribute("aria-pressed")!=="true";pl.setAttribute("aria-pressed",String(on));el.classList.toggle("paused",!on)});
go(0)
}

export default function TxLyricsSync() {
  const ref = useRef<HTMLDivElement>(null);

  useEffect(() => {
    const el = ref.current?.firstElementChild;
    return el ? setup(el) : undefined;
  }, []);

  return (
    <>
      <style>{css}</style>
      <div
        ref={ref} style={{
          "--c1": "#0d9488",
          "--c2": "#ca8a04",
          "--s": "16px",
          "--k": "1",
          "--fg": "#1d1d1f",
          "--bg": "#f5f5f7",
        } as CSSProperties}
      >
        <div className="uvq14-lyr"><div className="hd"><span className="art" aria-hidden="true"><i></i><i></i><i></i></span><p><b>City light</b><span>Aurora Sur</span></p><button type="button" className="pl" aria-pressed="true" aria-label="Play"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2.6" strokeLinecap="round" strokeLinejoin="round" aria-hidden="true"><path d="M9 6v12M15 6v12" /></svg><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.6" strokeLinecap="round" strokeLinejoin="round" aria-hidden="true"><path d="M8 5.5v13l10.5-6.5z" fill="currentColor" /></svg></button></div><div className="vw"><ol><li><button type="button" aria-current="true"><span>Under the city lights</span></button></li><li><button type="button"><span>The streets are singing again</span></button></li><li><button type="button"><span>Your name written on the glass</span></button></li><li><button type="button"><span>And the train that won't come back</span></button></li><li><button type="button"><span>We dance alone until the sun</span></button></li></ol></div></div>
      </div>
    </>
  );
}
```

## Prompt for AI assistants

Paste this into ChatGPT, Claude, Cursor, v0 or Lovable to adapt the block to your stack (Tailwind, Vue, Svelte…):

````text
I want to add the “Synced song lyrics” block (Text & scroll) from AIMRAN Library to my project.

## What it is
Like lyrics in a music app: the current line fills with light in time, the others blur, and any line can be tapped.

## Chosen settings
- Main color: #0d9488
- Secondary color: #ca8a04
- Size: 16px (from 12 to 24px)
- Speed: 1x (from 0.5 to 2x)
- Text: "Bajo la luz de la ciudad"

## What I need
1. Add it to my project with the same look and animation as the reference code: same sizes, colours, radii, shadows, timings and easing.
2. It is built with plain HTML and CSS (the reference wraps it in a React component with its CSS). If my project uses something else (Vue, Svelte, Astro, plain HTML…), translate it without losing any behaviour. If I use Tailwind, turn the styles into classes; if not, keep the CSS in its own file.
3. Expose the settings above as props (or CSS variables) with those values as defaults.
4. Make it work well on phones: nothing that depends only on hover, touch targets of at least 44 px and no overflow on 320 px screens.
5. Make it look right in light and dark mode.
6. Keep it accessible: semantic HTML, roles and aria-* where needed, visible focus and keyboard support.
7. Respect prefers-reduced-motion: with reduced motion, no big animations but the same end result.

## Reference code
```tsx
// @ts-nocheck: setup() es JavaScript del DOM sin tipos, el mismo de la pestaña JS.
import { useEffect, useRef, type CSSProperties } from "react";

const css = `
.uvq14-lyr {
  font-family: -apple-system,BlinkMacSystemFont,"SF Pro Text","Inter",system-ui,sans-serif;
  font-size: var(--s);
  color: var(--fg);
  -webkit-tap-highlight-color: transparent;
  width: 19em;
  height: 17.5em;
  padding: 1em 1.1em 0;
  border-radius: 1.4em;
  color: #fff;
  background: radial-gradient(120% 80% at 0 0,var(--c1),transparent 62%),radial-gradient(110% 90% at 100% 100%,var(--c2),transparent 60%),#121212;
  box-shadow: 0 1.6em 3em -1.6em rgba(0,0,0,.6);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.uvq14-lyr .hd {
  display: flex;
  align-items: center;
  gap: .7em;
}

.uvq14-lyr .art {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: .15em;
  width: 2.6em;
  height: 2.6em;
  padding: .55em;
  box-sizing: border-box;
  border-radius: .5em;
  background: linear-gradient(135deg,var(--c2),var(--c1));
  box-shadow: 0 .4em .8em -.3em rgba(0,0,0,.5);
}

.uvq14-lyr .art i {
  width: .28em;
  height: 100%;
  border-radius: 1em;
  background: #fff;
  transform-origin: bottom;
  animation: uvq14-lyr-eq calc(0.9s / var(--k)) ease-in-out infinite alternate;
}

.uvq14-lyr .art i:nth-child(2) {
  animation-delay: -.3s;
}

.uvq14-lyr .art i:nth-child(3) {
  animation-delay: -.6s;
}

.uvq14-lyr .hd p {
  flex: 1;
  margin: 0;
  display: grid;
  line-height: 1.25;
}

.uvq14-lyr .hd b {
  font-size: .9em;
}

.uvq14-lyr .hd p span {
  font-size: .75em;
  opacity: .65;
}

.uvq14-lyr .pl {
  font: inherit;
  color: inherit;
  border: 0;
  margin: 0;
  background: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  display: grid;
  place-items: center;
  width: 2.3em;
  height: 2.3em;
  border-radius: 50%;
  color: #111;
  background: #fff;
  transition: transform calc(0.25s / var(--k)) cubic-bezier(.34,1.56,.64,1);
}

.uvq14-lyr .pl:hover {
  transform: scale(1.07);
}

.uvq14-lyr .pl:active {
  transform: scale(.92);
}

.uvq14-lyr .pl:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

.uvq14-lyr .pl svg {
  grid-area: 1/1;
  width: 1.05em;
  height: 1.05em;
}

.uvq14-lyr .pl[aria-pressed=true] svg:last-child,.uvq14-lyr .pl[aria-pressed=false] svg:first-child {
  display: none;
}

.uvq14-lyr .vw {
  position: relative;
  flex: 1;
  margin: 0 -1.1em;
  padding: 0 1.1em;
  overflow: hidden;
  -webkit-mask: linear-gradient(transparent,#000 14%,#000 72%,transparent);
  mask: linear-gradient(transparent,#000 14%,#000 72%,transparent);
}

.uvq14-lyr ol {
  position: relative;
  margin: 0;
  padding: 1.6em 0 8em;
  list-style: none;
  transition: transform calc(0.8s / var(--k)) cubic-bezier(.22,1,.36,1);
}

.uvq14-lyr li button {
  font: inherit;
  color: inherit;
  border: 0;
  margin: 0;
  background: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  display: block;
  width: 100%;
  padding: .22em .2em;
  border-radius: .4em;
  text-align: left;
  font-size: 1.32em;
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: -.02em;
  color: rgba(255,255,255,.34);
  filter: blur(1.4px);
  transform: scale(.95);
  transform-origin: 0 50%;
  transition: filter calc(0.5s / var(--k)) cubic-bezier(.25,.1,.25,1),transform calc(0.6s / var(--k)) cubic-bezier(.22,1,.36,1),color calc(0.4s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

.uvq14-lyr li button.past {
  color: rgba(255,255,255,.22);
}

.uvq14-lyr li button:hover {
  filter: none;
  color: rgba(255,255,255,.62);
}

.uvq14-lyr li button:focus-visible {
  filter: none;
  outline: 2px solid #fff;
  outline-offset: 1px;
}

.uvq14-lyr li button:active {
  transform: scale(.93);
}

.uvq14-lyr li button[aria-current=true] {
  filter: none;
  transform: none;
}

.uvq14-lyr li button[aria-current=true] span {
  color: transparent;
  background: linear-gradient(90deg,#fff 50%,rgba(255,255,255,.4) 50%) 100% 0/200% 100% no-repeat;
  -webkit-background-clip: text;
  background-clip: text;
  animation: uvq14-lyr-f calc(3.4s / var(--k)) linear forwards;
}

.uvq14-lyr.paused li button[aria-current=true] span,.uvq14-lyr.paused .art i {
  animation-play-state: paused;
}

@keyframes uvq14-lyr-f {
  to {
    background-position: 0 0;
  }
}

@keyframes uvq14-lyr-eq {
  from {
    transform: scaleY(.25);
  }
  to {
    transform: scaleY(1);
  }
}

@media (prefers-reduced-motion:reduce) {
  .uvq14-lyr ol,.uvq14-lyr li button {
    transition: none;
  }
  .uvq14-lyr li button {
    filter: none;
  }
  .uvq14-lyr .art i {
    animation: none;
  }
}
`;

// Interacción en JavaScript del DOM: la misma que en la pestaña JS.
// eslint-disable-next-line @typescript-eslint/no-explicit-any
function setup(el: any) {
  const bs=[...el.querySelectorAll("ol button")],ol=el.querySelector("ol"),pl=el.querySelector(".pl");let i=0;
const go=n=>{i=(n+bs.length)%bs.length;bs.forEach((b,j)=>{if(j===i)b.setAttribute("aria-current","true");else b.removeAttribute("aria-current");b.classList.toggle("past",j<i)});const s=bs[i].firstElementChild;s.style.animation="none";void s.offsetWidth;s.style.animation="";ol.style.transform="translateY("+(-(bs[i].parentElement.offsetTop-parseFloat(getComputedStyle(ol).paddingTop)))+"px)"};
ol.addEventListener("animationend",e=>{if(e.target===bs[i].firstElementChild)go(i+1)});
bs.forEach((b,j)=>b.addEventListener("click",()=>go(j)));
ol.addEventListener("keydown",e=>{const j=bs.indexOf(document.activeElement);if(j<0)return;if(e.key==="ArrowDown"&&bs[j+1]){e.preventDefault();bs[j+1].focus()}if(e.key==="ArrowUp"&&bs[j-1]){e.preventDefault();bs[j-1].focus()}});
pl.addEventListener("click",()=>{const on=pl.getAttribute("aria-pressed")!=="true";pl.setAttribute("aria-pressed",String(on));el.classList.toggle("paused",!on)});
go(0)
}

export default function TxLyricsSync() {
  const ref = useRef<HTMLDivElement>(null);

  useEffect(() => {
    const el = ref.current?.firstElementChild;
    return el ? setup(el) : undefined;
  }, []);

  return (
    <>
      <style>{css}</style>
      <div
        ref={ref} style={{
          "--c1": "#0d9488",
          "--c2": "#ca8a04",
          "--s": "16px",
          "--k": "1",
          "--fg": "#1d1d1f",
          "--bg": "#f5f5f7",
        } as CSSProperties}
      >
        <div className="uvq14-lyr"><div className="hd"><span className="art" aria-hidden="true"><i></i><i></i><i></i></span><p><b>City light</b><span>Aurora Sur</span></p><button type="button" className="pl" aria-pressed="true" aria-label="Play"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2.6" strokeLinecap="round" strokeLinejoin="round" aria-hidden="true"><path d="M9 6v12M15 6v12" /></svg><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.6" strokeLinecap="round" strokeLinejoin="round" aria-hidden="true"><path d="M8 5.5v13l10.5-6.5z" fill="currentColor" /></svg></button></div><div className="vw"><ol><li><button type="button" aria-current="true"><span>Under the city lights</span></button></li><li><button type="button"><span>The streets are singing again</span></button></li><li><button type="button"><span>Your name written on the glass</span></button></li><li><button type="button"><span>And the train that won't come back</span></button></li><li><button type="button"><span>We dance alone until the sun</span></button></li></ol></div></div>
      </div>
    </>
  );
}
```

Give me the complete final code, ready to paste, and tell me in one line where to put it in my project.
````
