:root {
  color-scheme: dark;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-width: 320px;
  min-height: 100%;
}

body {
  margin: 0;
  background: #050505;
  color: #fff;
  -webkit-font-smoothing: antialiased;
}

body.showing-player {
  height: 100svh;
  overflow: hidden;
}

.is-hidden {
  display: none !important;
}

.library-view {
  min-height: 100svh;
  padding: 0 clamp(28px, 6vw, 90px) 116px;
  color: #1d1d1f;
  background:
    radial-gradient(circle at 75% 7%, rgba(255, 211, 219, 0.45), transparent 31rem),
    #fff;
}

.library-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1160px;
  height: 76px;
  margin: 0 auto;
}

.library-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #1d1d1f;
  font-size: 18px;
  text-decoration: none;
}

.library-brand-mark {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 9px;
  color: #fff;
  background: linear-gradient(145deg, #ff5b70, #ed1736);
  box-shadow: 0 6px 16px rgba(250, 45, 72, 0.24);
}

.library-brand-mark svg {
  width: 19px;
  height: 19px;
}

.library-domain {
  padding: 7px 12px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 999px;
  color: #77777c;
  font-size: 11px;
  background: rgba(255, 255, 255, 0.68);
}

.library-hero {
  display: grid;
  grid-template-columns: minmax(250px, 360px) minmax(300px, 650px);
  align-items: end;
  gap: clamp(42px, 7vw, 90px);
  max-width: 1160px;
  min-height: 420px;
  margin: 0 auto;
  padding: 34px 0 48px;
}

.cover-library {
  width: 100%;
  aspect-ratio: 1;
  padding: 25px;
  border: 0;
  border-radius: 12px;
  cursor: pointer;
  text-align: left;
  box-shadow: 0 24px 58px rgba(90, 18, 31, 0.24), 0 4px 14px rgba(0, 0, 0, 0.14);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.cover-library:hover {
  transform: translateY(-4px);
}

.cover-library strong {
  position: absolute;
  z-index: 1;
  left: 22px;
  bottom: 8px;
  font-size: clamp(96px, 11vw, 150px);
  font-weight: 760;
  letter-spacing: -0.09em;
  line-height: 0.85;
}

.library-copy {
  padding-bottom: 7px;
}

.library-copy > span {
  color: #fa2d48;
  font-size: 13px;
  font-weight: 700;
}

.library-copy h1 {
  margin: 10px 0 15px;
  font-size: clamp(50px, 7vw, 78px);
  font-weight: 760;
  letter-spacing: -0.065em;
  line-height: 0.96;
}

.library-copy p {
  max-width: 620px;
  margin: 0 0 15px;
  color: #55555a;
  font-size: clamp(15px, 1.5vw, 18px);
  line-height: 1.65;
}

.library-copy small {
  color: #8a8a8f;
  font-size: 13px;
}

.library-actions {
  display: flex;
  gap: 10px;
  margin-top: 28px;
}

.library-primary,
.library-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 38px;
  padding: 0 18px;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 650;
}

.library-primary {
  color: #fff;
  background: #fa2d48;
}

.library-secondary {
  color: #fa2d48;
  background: rgba(250, 45, 72, 0.09);
}

.library-primary svg,
.library-secondary svg {
  width: 16px;
  height: 16px;
}

.library-tracks {
  max-width: 1160px;
  margin: 0 auto;
  padding-top: 25px;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.library-section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 8px;
}

.library-section-heading h2 {
  margin: 0;
  font-size: 22px;
  letter-spacing: -0.03em;
}

.library-section-heading span {
  color: #77777c;
  font-size: 12px;
}

.library-track-list {
  display: grid;
}

.library-track {
  display: grid;
  grid-template-columns: 28px 48px minmax(220px, 1.5fr) minmax(130px, 1fr) 48px;
  align-items: center;
  gap: 13px;
  width: 100%;
  min-height: 68px;
  padding: 8px;
  border: 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.07);
  border-radius: 8px;
  cursor: pointer;
  color: #1d1d1f;
  text-align: left;
  background: transparent;
}

.library-track:hover {
  background: rgba(0, 0, 0, 0.035);
}

.library-track.active .library-index,
.library-track.active .library-track-copy strong {
  color: #fa2d48;
}

.library-index,
.library-album,
.library-duration {
  color: #77777c;
  font-size: 12px;
}

.library-index {
  text-align: center;
}

.cover-thumb,
.cover-mini {
  display: grid;
  place-items: center;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.17);
}

.cover-thumb {
  width: 48px;
  height: 48px;
}

.cover-thumb strong,
.cover-mini strong {
  position: relative;
  z-index: 1;
  letter-spacing: -0.08em;
}

.cover-thumb strong {
  font-size: 21px;
}

.library-track-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.library-track-copy strong {
  overflow: hidden;
  font-size: 14px;
  font-weight: 520;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.library-track-copy small {
  color: #77777c;
  font-size: 12px;
}

.library-mini-player {
  position: fixed;
  z-index: 20;
  right: 0;
  bottom: 0;
  left: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 13px;
  min-height: 88px;
  padding: 10px clamp(28px, 6vw, 90px);
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  cursor: pointer;
  background: rgba(249, 249, 251, 0.92);
  backdrop-filter: saturate(180%) blur(26px);
  box-shadow: 0 -10px 28px rgba(0, 0, 0, 0.035);
}

.cover-mini {
  width: 58px;
  height: 58px;
}

.cover-mini strong {
  font-size: 25px;
}

.mini-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.mini-copy strong {
  overflow: hidden;
  color: #1d1d1f;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-copy span {
  color: #77777c;
  font-size: 11px;
}

.mini-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

.mini-controls button {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 0;
  cursor: pointer;
  color: #252529;
  background: transparent;
}

.mini-controls svg {
  width: 22px;
  height: 22px;
}

.mini-controls #mini-play {
  border-radius: 50%;
  color: #fff;
  background: #252529;
}

.mini-controls #mini-play svg {
  width: 19px;
  height: 19px;
  fill: currentColor;
  stroke: none;
}

.mini-controls .pause-icon {
  display: none;
}

.is-playing .mini-controls .play-icon {
  display: none;
}

.is-playing .mini-controls .pause-icon {
  display: block;
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
  -webkit-tap-highlight-color: transparent;
}

svg {
  width: 1.25rem;
  height: 1.25rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.immersive-player {
  --tone-a: #5d4249;
  --tone-b: #844d70;
  --tone-c: #56577c;
  position: relative;
  isolation: isolate;
  width: 100%;
  height: 100svh;
  min-height: 0;
  overflow: hidden;
  background:
    linear-gradient(115deg, rgba(32, 23, 25, 0.7), transparent 43%),
    linear-gradient(145deg, var(--tone-a), var(--tone-b) 60%, var(--tone-c));
  transition: background 500ms ease;
}

.immersive-player.cover-01 {
  --tone-a: #574247;
  --tone-b: #8b4f68;
  --tone-c: #555a82;
}

.immersive-player.cover-02 {
  --tone-a: #514637;
  --tone-b: #87633d;
  --tone-c: #635b77;
}

.immersive-player.cover-03 {
  --tone-a: #324a51;
  --tone-b: #3d7480;
  --tone-c: #585e82;
}

.immersive-player::before {
  position: absolute;
  z-index: -3;
  inset: 0;
  content: "";
  background:
    radial-gradient(circle at 72% 20%, rgba(255, 255, 255, 0.14), transparent 26%),
    radial-gradient(circle at 22% 84%, rgba(245, 202, 185, 0.13), transparent 35%);
}

.immersive-player::after {
  position: absolute;
  z-index: -1;
  inset: 0;
  content: "";
  background: rgba(20, 13, 18, 0.12);
  backdrop-filter: blur(34px) saturate(115%);
}

.ambient {
  position: absolute;
  z-index: -2;
  width: 46vw;
  aspect-ratio: 1;
  border-radius: 50%;
  filter: blur(110px);
  opacity: 0.32;
  pointer-events: none;
}

.ambient-one {
  left: -12vw;
  bottom: -27vw;
  background: #d99177;
}

.ambient-two {
  top: -25vw;
  right: -10vw;
  background: #9668ba;
}

.immersive-header {
  position: absolute;
  z-index: 4;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 86px;
  padding: 18px clamp(26px, 4vw, 64px);
}

.close-player {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 50%;
  cursor: pointer;
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px);
}

.close-player:hover {
  background: rgba(255, 255, 255, 0.16);
}

.close-player svg {
  width: 25px;
  height: 25px;
  stroke-width: 2.2;
}

.header-volume {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 230px;
  padding: 12px 18px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px);
}

.header-volume svg {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  color: rgba(255, 255, 255, 0.85);
}

.player-layout {
  display: grid;
  grid-template-columns: minmax(420px, 0.82fr) minmax(420px, 1.18fr);
  gap: clamp(60px, 9vw, 150px);
  width: min(1450px, calc(100% - 10vw));
  height: 100svh;
  min-height: 0;
  margin: 0 auto;
  padding: 112px 0 92px;
}

.now-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.cover {
  position: relative;
  overflow: hidden;
  color: #fff;
  user-select: none;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.cover::before,
.cover::after {
  position: absolute;
  content: "";
  pointer-events: none;
}

.cover::before {
  inset: 0;
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.18), transparent 42%),
    repeating-linear-gradient(90deg, transparent 0 35px, rgba(255, 255, 255, 0.025) 36px);
}

.cover::after {
  right: -28%;
  bottom: -32%;
  width: 65%;
  height: 65%;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  box-shadow: 0 0 0 24px rgba(255, 255, 255, 0.04), 0 0 0 49px rgba(255, 255, 255, 0.025);
}

.cover.cover-01 {
  background:
    radial-gradient(circle at 72% 19%, rgba(255, 202, 212, 0.72), transparent 28%),
    linear-gradient(145deg, #631222, #ee3150 60%, #ff8b9c);
}

.cover.cover-02 {
  background:
    radial-gradient(circle at 78% 12%, rgba(253, 230, 186, 0.7), transparent 26%),
    linear-gradient(145deg, #463019, #b97727 58%, #e4b766);
}

.cover.cover-03 {
  background:
    radial-gradient(circle at 78% 16%, rgba(205, 240, 255, 0.7), transparent 29%),
    linear-gradient(145deg, #123649, #287f9b 56%, #70c5cf);
}

.cover-main {
  width: min(100%, 420px);
  aspect-ratio: 1;
  padding: 27px;
  border-radius: 13px;
  box-shadow: 0 26px 65px rgba(16, 8, 12, 0.34), 0 4px 16px rgba(0, 0, 0, 0.22);
  transition: background 350ms ease;
}

.cover-main strong {
  position: absolute;
  z-index: 1;
  left: 25px;
  bottom: 10px;
  font-size: clamp(104px, 10vw, 156px);
  font-weight: 760;
  letter-spacing: -0.09em;
  line-height: 0.84;
}

.cover-kicker,
.cover-foot {
  position: absolute;
  z-index: 1;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.22em;
}

.cover-kicker {
  top: 27px;
  left: 28px;
}

.cover-foot {
  right: 24px;
  bottom: 22px;
  writing-mode: vertical-rl;
}

.song-copy {
  margin-top: 32px;
}

.song-copy .eyebrow {
  display: none;
}

.song-copy h1 {
  margin: 0;
  font-size: clamp(25px, 2.2vw, 34px);
  font-weight: 720;
  letter-spacing: -0.04em;
  line-height: 1.18;
}

.song-copy p {
  margin: 8px 0 0;
  color: rgba(255, 255, 255, 0.67);
  font-size: 16px;
}

.timeline {
  width: min(100%, 540px);
  margin-top: 30px;
}

.timeline input[type="range"] {
  width: 100%;
}

.time-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 2px;
  color: rgba(255, 255, 255, 0.52);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

input[type="range"] {
  --range-progress: 0%;
  width: 100%;
  height: 30px;
  margin: 0;
  border: 0;
  outline: none;
  appearance: none;
  background: transparent;
  cursor: pointer;
  touch-action: none;
}

input[type="range"]::-webkit-slider-runnable-track {
  height: 7px;
  border-radius: 999px;
  background: linear-gradient(to right, rgba(255, 255, 255, 0.94) var(--range-progress), rgba(255, 255, 255, 0.3) var(--range-progress));
}

input[type="range"]::-webkit-slider-thumb {
  width: 17px;
  height: 17px;
  margin-top: -5px;
  border: 0;
  border-radius: 50%;
  appearance: none;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.34);
}

input[type="range"]::-moz-range-track {
  height: 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.3);
}

input[type="range"]::-moz-range-progress {
  height: 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
}

input[type="range"]::-moz-range-thumb {
  width: 17px;
  height: 17px;
  border: 0;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.34);
}

.transport-buttons {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(100%, 540px);
  margin-top: 12px;
}

.icon-button,
.play-button {
  display: grid;
  place-items: center;
  border: 0;
  cursor: pointer;
  background: transparent;
}

.icon-button {
  width: 54px;
  height: 54px;
  color: rgba(255, 255, 255, 0.92);
}

.icon-button.subtle {
  color: rgba(255, 255, 255, 0.72);
}

.icon-button.active {
  color: #fff;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
}

.icon-button svg {
  width: 32px;
  height: 32px;
  stroke-width: 2;
}

.play-button {
  width: 76px;
  height: 76px;
  color: #fff;
  transition: transform 120ms ease;
}

.play-button:hover {
  transform: scale(1.05);
}

.play-button svg {
  width: 54px;
  height: 54px;
  fill: currentColor;
  stroke: none;
}

.play-button .pause-icon {
  display: none;
}

.is-playing .play-button .play-icon {
  display: none;
}

.is-playing .play-button .pause-icon {
  display: block;
}

.lyrics-panel {
  min-width: 0;
  min-height: 65vh;
  align-self: center;
  border-radius: 24px;
}

button:focus-visible,
input:focus-visible,
a:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.86);
  outline-offset: 3px;
}

@media (max-width: 900px) {
  .player-layout {
    grid-template-columns: minmax(330px, 0.92fr) minmax(200px, 1.08fr);
    gap: 7vw;
    width: calc(100% - 8vw);
  }

  .cover-main {
    max-width: 360px;
  }
}

@media (max-width: 700px) {
  .library-view {
    padding: 0 20px 104px;
  }

  .library-header {
    height: 64px;
  }

  .library-brand {
    font-size: 15px;
  }

  .library-domain {
    display: none;
  }

  .library-hero {
    grid-template-columns: 1fr;
    gap: 26px;
    min-height: auto;
    padding: 24px 0 38px;
  }

  .cover-library {
    width: min(78vw, 310px);
  }

  .library-copy h1 {
    font-size: 45px;
  }

  .library-track {
    grid-template-columns: 24px 46px minmax(0, 1fr) 40px;
    gap: 10px;
  }

  .library-album {
    display: none;
  }

  .library-section-heading span {
    display: none;
  }

  .library-mini-player {
    min-height: 82px;
    padding: 9px 14px;
  }

  .cover-mini {
    width: 50px;
    height: 50px;
  }

  .mini-controls {
    gap: 3px;
  }

  .mini-controls #mini-previous {
    display: none;
  }

  .immersive-player {
    overflow: hidden;
  }

  .immersive-header {
    position: absolute;
    height: 68px;
    padding: 12px 18px;
  }

  .header-volume {
    width: 130px;
    padding: 8px 12px;
  }

  .header-volume svg {
    display: none;
  }

  .player-layout {
    display: block;
    width: min(100% - 40px, 470px);
    height: 100svh;
    min-height: 0;
    padding: 76px 0 max(18px, env(safe-area-inset-bottom));
  }

  .now-panel {
    height: 100%;
    min-height: 0;
    align-items: stretch;
    justify-content: flex-start;
  }

  .cover-main {
    align-self: center;
    width: min(100%, 42svh, 340px);
  }

  .song-copy {
    margin-top: auto;
    padding-top: 18px;
  }

  .song-copy h1 {
    font-size: 25px;
  }

  .timeline,
  .transport-buttons {
    flex: 0 0 auto;
    width: 100%;
  }

  .lyrics-panel {
    display: none;
  }
}

@media (max-height: 700px) and (min-width: 701px) {
  .immersive-header {
    height: 58px;
    padding-block: 8px;
  }

  .player-layout {
    grid-template-columns: minmax(310px, 0.82fr) minmax(330px, 1.18fr);
    height: 100svh;
    min-height: 0;
    padding: 62px 0 12px;
  }

  .cover-main {
    width: min(32svh, 160px);
  }

  .song-copy {
    margin-top: 8px;
  }

  .timeline {
    margin-top: 7px;
  }

  .transport-buttons {
    margin-top: 0;
  }

  .play-button {
    width: 48px;
    height: 48px;
  }

  .play-button svg {
    width: 36px;
    height: 36px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
