:root {
  --fondo: #000000;
  --card: #0e0e10;
  --bordo: rgba(255, 255, 255, 0.08);
  --testo: #f4f4f6;
  --tenue: #8a8a92;
  --pillola: #f4f4f6;
  --pillola-testo: #0b0b0d;
  --accento: #b9a3ff;
  --scelto: #1d1a2b;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; background: var(--fondo); }

body {
  font-family: "Mona Sans Variable", system-ui, sans-serif;
  color: var(--testo);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

.stage {
  position: relative;
  height: 100vh;
  width: 100%;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.card {
  width: clamp(250px, 86vw, 340px);
  padding: clamp(14px, 3.6vh, 18px);
  border-radius: 20px;
  background: var(--card);
  border: 1px solid var(--bordo);
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  display: flex;
  flex-direction: column;
  gap: clamp(12px, 3.2vh, 18px);
}

.head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  font-size: 12.5px;
  font-weight: 520;
}
.head__title { color: var(--testo); letter-spacing: 0.01em; }
.head__count { color: var(--tenue); display: inline-flex; align-items: baseline; }

.roll {
  position: relative;
  display: inline-block;
  overflow: hidden;
  vertical-align: bottom;
  height: 1.25em;
  line-height: 1.25em;
  -webkit-mask-image: linear-gradient(transparent, #000 22%, #000 78%, transparent);
  mask-image: linear-gradient(transparent, #000 22%, #000 78%, transparent);
}
.roll__d { display: block; }
.roll__d + .roll__d { position: absolute; left: 0; top: 0; }

.track {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 8px;
  margin: -8px;
  border-radius: 12px;
}

.cover {
  position: relative;
  width: 44px;
  height: 44px;
}
.art {
  display: block;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  box-shadow: 0 6px 14px -6px rgba(0, 0, 0, 0.8), inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}
.cover__ghost {
  position: absolute;
  inset: 0;
  border-radius: 8px;
  border: 1px dashed rgba(255, 255, 255, 0.28);
  opacity: 0;
}

.track__text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.track__title { font-size: 15px; font-weight: 600; font-stretch: 104%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.track__artist { font-size: 12.5px; color: var(--tenue); font-weight: 460; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.track__time { font-size: 12.5px; color: var(--tenue); font-weight: 460; }

.actions { display: flex; justify-content: flex-end; }

.btn {
  position: relative;
  height: 40px;
  padding: 0 18px 0 14px;
  border: 0;
  border-radius: 999px;
  background: none;
  color: var(--pillola-testo);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  outline: none;
}
.btn:focus-visible .btn__bg { box-shadow: 0 0 0 2px var(--fondo), 0 0 0 4px var(--accento); }
.btn__bg {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: var(--pillola);
  box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.12);
  overflow: hidden;
}
.btn__dark {
  position: absolute;
  inset: 0;
  background: var(--scelto);
  box-shadow: inset 0 0 0 1px rgba(185, 163, 255, 0.16);
  border-radius: inherit;
  clip-path: circle(0px at 24px 50%);
}
.icon {
  position: relative;
  width: 20px;
  height: 20px;
  overflow: visible;
}
.icon__line { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.icon__line--short { opacity: 0; }
.icon__mini { fill: var(--accento); opacity: 0; }

.btn__labels { position: relative; display: grid; justify-items: start; }
.btn__label { grid-area: 1 / 1; white-space: nowrap; }

.fly {
  position: absolute;
  left: 0;
  top: 0;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  overflow: hidden;
  pointer-events: none;
  visibility: hidden;
  box-shadow: 0 14px 26px -10px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(255, 255, 255, 0.08);
  will-change: transform;
}
.fly svg { display: block; width: 100%; height: 100%; }

.pointer {
  position: absolute;
  left: 0;
  top: 0;
  width: 22px;
  height: 22px;
  pointer-events: none;
  fill: #ffffff;
  stroke: #0b0b0d;
  stroke-width: 1.2;
  stroke-linejoin: round;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.5));
  opacity: 0;
}

@media (hover: hover) and (pointer: fine) {
  .track:hover { background: rgba(255, 255, 255, 0.025); }
}
