:root{
  --bg: #0b0b0d;
  --panel: rgba(255,255,255,.02);
  --text: #f2f2f2;
  --muted: rgba(242,242,242,.62);
  --accent: #7b37d4;
}

.ls-music{
  background:
    radial-gradient(900px 520px at 55% 10%, rgba(123,55,212,.12), transparent 55%),
    radial-gradient(900px 520px at 20% 70%, rgba(123,55,212,.07), transparent 60%),
    var(--bg);
  padding: clamp(44px, 6vw, 90px) 20px;
  color: var(--text);
}

.ls-music__inner{
  max-width: 1080px;
  margin: 0 auto;
  margin-top: 200px;
}

.ls-music__title{
  text-align: center;
  letter-spacing: .16em;
  font-weight: 600;
  margin: 0 0 40px;
}

.ls-albumGrid{
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: clamp(24px, 3vw, 54px);
  align-items: start;
}

.ls-album{
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ----------- VISUAL WRAP ----------- */
.ls-album__visual{
  position: relative;
  width: min(220px, 100%);
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
  overflow: visible;

  /* hover controls */
  --discShift: 0%;
  --discRot: 0deg;

  /* front (cover + icon) move together */
  --frontShift: 0px;
  --frontScale: 1;

  transform-style: preserve-3d;
}

/* Hover variables */
.ls-album:hover .ls-album__visual,
.ls-album:focus-within .ls-album__visual{
  --discShift: 58%;
  --discRot: 14deg;

  --frontShift: -10px;  /* cover moves left */
  --frontScale: 1.01;
}

/* Subtle accent glow on hover */
.ls-album__visual::after{
  content: "";
  position: absolute;
  inset: -14px;
  border-radius: 10px;
  background: radial-gradient(circle at 40% 50%, rgba(123,55,212,.18), transparent 55%);
  filter: blur(10px);
  z-index: 0;
  pointer-events: none;

  opacity: 0;
  transition: opacity .35s ease;
}

.ls-album:hover .ls-album__visual::after,
.ls-album:focus-within .ls-album__visual::after{
  opacity: 1;
}

/* ----------- COVER ----------- */
.ls-album__cover{
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 2;
  border-radius: 2px;
  box-shadow: 0 22px 60px rgba(0,0,0,.55);

  transform: translateX(var(--frontShift)) scale(var(--frontScale));
  transition: transform .45s cubic-bezier(.2,.9,.2,1),
              box-shadow .45s cubic-bezier(.2,.9,.2,1),
              filter .45s ease;
  will-change: transform;
}

.ls-album:hover .ls-album__cover,
.ls-album:focus-within .ls-album__cover{
  box-shadow: 0 28px 75px rgba(0,0,0,.65);
  filter: brightness(1.02) contrast(1.03);
}

/* ----------- CD behind the cover ----------- */
.ls-album__disc{
  position: absolute;
  top: 50%;
  left: 50%;
  width: 92%;
  height: 92%;
  border-radius: 50%;
  z-index: 1;

  background:
    radial-gradient(circle at 50% 50%, rgba(255,255,255,.10) 0 8%, transparent 8% 12%),
    radial-gradient(circle at 50% 50%, rgba(0,0,0,.45) 0 12%, transparent 12% 14%),
    radial-gradient(circle at 50% 50%, rgba(255,255,255,.22) 0 45%, rgba(255,255,255,.06) 60%, rgba(0,0,0,.25) 100%),
    conic-gradient(from 0deg,
      rgba(255,255,255,.28),
      rgba(123,55,212,.18),
      rgba(255,255,255,.22),
      rgba(0,0,0,.22),
      rgba(255,255,255,.26)
    );

  box-shadow: 0 26px 70px rgba(0,0,0,.55);
  filter: saturate(1.05);

  transform: translate(-50%, -50%) translateX(var(--discShift)) rotate(var(--discRot));
  transition: transform .55s cubic-bezier(.2,.9,.2,1);
}

/* ----------- Center circle icon (moves WITH the cover) ----------- */
.ls-album__action{
  position: absolute;
  inset: 0;
  margin: auto;
  width: 54px;
  height: 54px;
  border-radius: 999px;
  z-index: 3;

  border: none;
  background: rgba(255,255,255,.85);
  color: var(--accent);
  box-shadow: 0 18px 48px rgba(0,0,0,.55);

  display: grid;
  place-items: center;

  opacity: 0;

  /* IMPORTANT: translateX uses same var as cover */
  transform: translateX(var(--frontShift)) scale(.92);

  transition: opacity .18s ease,
              transform .18s ease,
              background .18s ease;
  cursor: pointer;
}

.ls-album:hover .ls-album__action,
.ls-album:focus-within .ls-album__action{
  opacity: 1;
  transform: translateX(var(--frontShift)) scale(1);
}

.ls-album__action i{
  font-size: 14px;
}

/* ----------- Stars + title ----------- */
.ls-album__meta{
  text-align: center;
  margin-top: 14px;
}

.ls-album__stars{
  display: inline-flex;
  gap: 4px;
  margin-bottom: 10px;
  color: rgba(123,55,212,.95);
  filter: drop-shadow(0 0 14px rgba(123,55,212,.25));
  transform: scale(.92);
  transform-origin: center;
}

.ls-album__name{
  margin: 0;
  font-size: 16px;
  letter-spacing: .04em;
  color: var(--text);
}

/* Responsive */
@media (max-width: 980px){
  .ls-albumGrid{ grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 620px){
  .ls-albumGrid{ grid-template-columns: 1fr; }
}
