/* Listening room: plum, amber, a turntable and recent listens */

.listen-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(2.5rem, 6vw, 6rem);
  max-width: 86rem;
}

/* Deck */

.deck {
  display: grid;
  grid-template-columns: minmax(14rem, 1.2fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(1.5rem, 3.5vw, 3rem);
}
.turntable {
  position: relative;
  aspect-ratio: 1 / 0.9;
  border-radius: 12px;
  background:
    radial-gradient(120% 90% at 20% 10%, rgb(255 255 255 / 0.14), transparent 55%),
    linear-gradient(160deg, #f07a3a, #d4521f);
  box-shadow:
    inset 0 -6px 0 rgb(0 0 0 / 0.18),
    0 34px 50px -26px rgb(0 0 0 / 0.75);
}
.platter {
  position: absolute;
  left: 6%;
  top: 7%;
  width: 72%;
  aspect-ratio: 1;
  padding: 2.4%;
  border-radius: 50%;
  background: #262626;
  box-shadow: 0 10px 18px -8px rgb(0 0 0 / 0.6);
}
.platter::after {
  content: "";
  position: absolute;
  inset: 2.4%;
  border-radius: 50%;
  background: conic-gradient(
    from 25deg,
    transparent 0deg,
    rgb(255 255 255 / 0.09) 25deg,
    transparent 55deg,
    transparent 180deg,
    rgb(255 255 255 / 0.07) 205deg,
    transparent 235deg
  );
  pointer-events: none;
}
.record {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: repeating-radial-gradient(circle at center, #0d0d0d 0 1px, #1b1b1b 1px 3px);
  animation: spin 1.8s linear infinite;
  animation-play-state: paused;
}
.record::after {
  content: "";
  position: absolute;
  width: 3.5%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #d9d9d9;
}
.record-label {
  width: 36%;
  aspect-ratio: 1;
  border-radius: 50%;
  object-fit: cover;
}
.is-spinning .record {
  animation-play-state: running;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.tonearm {
  position: absolute;
  right: 4%;
  top: 4%;
  width: 19%;
  transform: rotate(-6deg);
  transform-origin: 66.7% 11%;
  transition: transform 0.9s var(--ease-out);
  filter: drop-shadow(0 6px 6px rgb(0 0 0 / 0.35));
}
.is-spinning .tonearm {
  transform: rotate(17deg);
}
.deck-knobs {
  position: absolute;
  right: 6%;
  bottom: 7%;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.deck-knobs i {
  width: 1.6rem;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #4a4a4a, #161616);
}
.deck-knobs b {
  width: 0.5rem;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #5a2a14;
  transition: background-color 0.3s;
}
.is-spinning .deck-knobs b {
  background: var(--lemon);
  box-shadow: 0 0 10px var(--lemon);
}

.deck-label {
  margin: 0.9rem 0 0;
  font-size: 0.95rem;
  color: var(--text);
  opacity: 0.85;
}
.deck-title {
  font-size: clamp(2.4rem, 4.6vw, 4.5rem);
  overflow-wrap: anywhere;
}
.deck-artist {
  margin: 0.9rem 0 0;
  font-size: 1.1rem;
}
.deck-meter {
  height: 5px;
  margin-top: 1.2rem;
  max-width: 16rem;
  overflow: hidden;
  border-radius: 3px;
  background: rgb(255 255 255 / 0.16);
}
.deck-meter span {
  display: block;
  height: 100%;
  background: var(--amber);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 1s linear;
}
.deck-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.25rem;
  margin: 1.2rem 0 0;
}
.deck-links a {
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.2em;
  text-decoration-color: var(--amber);
}
.deck-links .btn {
  text-decoration: none;
}

/* Recent listens */

.recent-wrap {
  min-width: 0;
}
.recent-wrap h2 {
  font-size: clamp(1.9rem, 3.4vw, 2.9rem);
}
.recent-note {
  margin: 0.7rem 0 0;
  max-width: 36ch;
  opacity: 0.85;
}
.recent {
  display: grid;
  gap: 0.85rem;
  margin: 1.5rem 0 0;
  padding: 0;
  list-style: none;
}
.recent-empty {
  opacity: 0.7;
}
.recent-item {
  display: grid;
  grid-template-columns: 3.5rem minmax(0, 1fr) auto;
  gap: 0.85rem 1rem;
  align-items: center;
  padding: 0.55rem 0.65rem;
  border-radius: 10px;
  background: rgb(255 255 255 / 0.05);
}
.recent-art {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 4px;
  object-fit: cover;
  background: rgb(255 255 255 / 0.08);
}
.recent-body {
  display: grid;
  gap: 0.1rem;
  min-width: 0;
}
.recent-body strong,
.recent-body span,
.recent-body em {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.recent-body strong {
  font-size: 1.02rem;
  line-height: 1.25;
}
.recent-body span {
  opacity: 0.9;
}
.recent-body em {
  font-style: normal;
  font-size: 0.88rem;
  opacity: 0.65;
}
.recent-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.45rem 0.85rem;
}
.recent-actions a,
.recent-play {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  font-weight: 700;
  font-size: 0.9rem;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.2em;
  text-decoration-color: var(--amber);
  cursor: pointer;
}

@media (max-width: 1150px) {
  .listen-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 560px) {
  .recent-item {
    grid-template-columns: 3.25rem minmax(0, 1fr);
  }
  .recent-actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }
}
@media (max-width: 640px) {
  .deck {
    grid-template-columns: 1fr;
  }
  .turntable {
    max-width: 22rem;
  }
}
@media (prefers-reduced-motion: reduce) {
  .record {
    animation: none;
  }
}
