:root {
  color-scheme: dark;
  --ink: #f7f8f3;
  --muted: rgba(247, 248, 243, .7);
  --accent: #a8ff00;
}

* { box-sizing: border-box; }

html,
body { height: 100%; }

body {
  margin: 0;
  overflow: hidden;
  background: #070908;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.now-playing {
  position: relative;
  min-height: 100%;
  display: grid;
  place-items: center;
  isolation: isolate;
  overflow: hidden;
}

.backdrop {
  position: absolute;
  z-index: -2;
  inset: -8%;
  background: #111 center / cover no-repeat;
  filter: blur(45px) saturate(1.25);
  transform: scale(1.08);
  opacity: .55;
  transition: background-image .5s ease;
}

.now-playing::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background:
    radial-gradient(circle at 72% 12%, rgba(168, 255, 0, .12), transparent 34%),
    linear-gradient(90deg, rgba(5, 7, 6, .96) 0%, rgba(5, 7, 6, .8) 47%, rgba(5, 7, 6, .6) 100%);
}

.display-grid {
  width: min(1500px, calc(100vw - 5vw));
  height: min(820px, calc(100vh - 6vh));
  display: grid;
  grid-template-columns: minmax(320px, .68fr) minmax(640px, 1.55fr);
  gap: clamp(22px, 2.5vw, 42px);
  min-height: 0;
}

.history {
  display: grid;
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: clamp(18px, 2.2vh, 28px);
  min-height: 0;
}

.history-card {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(120px, 39%) 1fr;
  align-items: center;
  gap: clamp(18px, 1.8vw, 28px);
  padding: clamp(18px, 2vw, 30px);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .16);
  background: rgba(6, 8, 7, .68);
  backdrop-filter: blur(18px);
}

.history-art {
  width: 100%;
  aspect-ratio: 1;
  display: block;
  object-fit: cover;
  box-shadow: 0 18px 40px rgba(0, 0, 0, .45);
}

.history-info { min-width: 0; }

.history-card .eyebrow { margin-bottom: 12px; }

.history-title {
  margin: 0;
  font-size: clamp(22px, 1.7vw, 34px);
  font-weight: 850;
  letter-spacing: -.045em;
  line-height: .98;
  overflow-wrap: anywhere;
}

.history-artist {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: clamp(16px, 1.25vw, 22px);
  font-weight: 600;
  line-height: 1.12;
}

.history-isrc {
  margin: 24px 0 0;
  color: var(--muted);
  font-size: clamp(10px, .72vw, 12px);
  letter-spacing: .12em;
}

.history-isrc span { font-weight: 800; }
.history-isrc strong { color: var(--ink); }

.player-card {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(270px, .8fr);
  gap: clamp(18px, 2.2vh, 28px);
  padding: clamp(22px, 2vw, 34px);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .16);
  background: rgba(6, 8, 7, .58);
  backdrop-filter: blur(18px);
}

.artwork-wrap {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  background: rgba(0, 0, 0, .5);
  display: grid;
  place-items: center;
}

.artwork-wrap::after {
  content: "";
  position: absolute;
  inset: 5% -5% -7% 5%;
  z-index: -1;
  background: rgba(0, 0, 0, .7);
  filter: blur(35px);
}

.artwork {
  width: min(100%, 78vh);
  height: auto;
  max-height: 100%;
  aspect-ratio: 1;
  display: block;
  object-fit: contain;
  border: 1px solid rgba(255, 255, 255, .22);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .55);
}

.track-info {
  align-self: center;
  min-width: 0;
  padding: clamp(20px, 2vw, 32px);
  border: 1px solid rgba(255, 255, 255, .18);
  background: rgba(4, 6, 5, .72);
  backdrop-filter: blur(20px);
  box-shadow: 0 20px 55px rgba(0, 0, 0, .45);
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent);
  font-size: clamp(12px, 1vw, 16px);
  font-weight: 800;
  letter-spacing: .24em;
  text-transform: uppercase;
}

.title {
  margin: 0;
  max-width: 100%;
  font-size: clamp(30px, 2.35vw, 48px);
  font-weight: 900;
  letter-spacing: -.055em;
  line-height: .93;
  overflow-wrap: anywhere;
}

.artist {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: clamp(19px, 1.6vw, 29px);
  font-weight: 600;
  letter-spacing: -.025em;
  line-height: 1.08;
}

.isrc-line {
  display: flex;
  gap: 14px;
  align-items: baseline;
  margin: 16px 0 0;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, .22);
  color: var(--muted);
  font-size: clamp(13px, 1.05vw, 17px);
  letter-spacing: .18em;
}

.isrc-line span { font-weight: 800; }

.isrc-line strong {
  color: var(--ink);
  font-size: 1.12em;
  letter-spacing: .1em;
}

@media (max-width: 1100px) {
  .display-grid {
    grid-template-columns: minmax(280px, .72fr) minmax(500px, 1.5fr);
  }

  .player-card {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 1fr) auto;
  }

  .artwork { width: min(100%, 52vh); }
}

@media (max-width: 780px), (orientation: portrait) {
  body { overflow: auto; }

  .display-grid {
    width: min(88vw, 620px);
    height: auto;
    grid-template-columns: 1fr;
    padding: 7vh 0;
  }

  .player-card {
    grid-row: 1;
    min-height: 72vh;
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 1fr) auto;
  }
  .history { grid-row: 2; }
  .artwork-wrap { width: 100%; height: 100%; }

  .title { max-width: 100%; }
  .isrc-line { margin-top: 34px; }
}
