:root {
  --pink: #e1007e;
  --pink-dark: #bf006b;
  --pink-soft: #fff0f8;
  --ink: #54595f;
  --muted: #70757b;
  --line: rgba(225, 0, 126, 0.24);
  --panel: rgba(255, 255, 255, 0.92);
  --soft: #fff4fa;
  --shadow: 0 26px 90px rgba(84, 89, 95, 0.16);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  min-height: 100%;
  font-family: "Nunito", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 8% 10%, rgba(225, 0, 126, 0.16), transparent 24rem),
    radial-gradient(circle at 92% 16%, rgba(225, 0, 126, 0.1), transparent 22rem),
    linear-gradient(145deg, #fff 0%, var(--pink-soft) 54%, #fff 100%);
}

body {
  min-height: 100vh;
  margin: 0;
}

button,
a,
input {
  font: inherit;
}

a {
  color: inherit;
}

.shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: clamp(14px, 3vw, 34px);
}

.player {
  width: min(100%, 980px);
  min-width: 0;
  display: grid;
  gap: clamp(18px, 2.6vw, 28px);
  padding: clamp(18px, 3vw, 34px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.home-link,
.app-link {
  min-height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--line);
  border-radius: 8px;
  color: var(--pink);
  background: #fff;
  font-size: 1.02rem;
  font-weight: 900;
  text-decoration: none;
}

.home-link {
  min-width: 112px;
  gap: 7px;
  padding: 0 18px;
}

.home-link span {
  font-size: 1.45rem;
  line-height: 1;
}

.app-links {
  display: flex;
  gap: 10px;
}

.app-link {
  gap: 7px;
  padding: 0 14px;
}

.app-link svg {
  width: 25px;
  height: 25px;
  display: block;
  fill: currentColor;
}

.brand {
  display: grid;
  justify-items: center;
  text-align: center;
}

.eyebrow,
.status,
.status-row {
  margin: 0;
}

.status-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.status {
  color: var(--pink);
  font-size: 0.92rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.live-dot {
  width: 10px;
  height: 10px;
  display: inline-block;
  border-radius: 50%;
  background: var(--pink);
  box-shadow: 0 0 0 0 rgba(225, 0, 126, 0.42);
  animation: livePulse 2.2s ease-out infinite;
}

@keyframes livePulse {
  0% {
    box-shadow: 0 0 0 0 rgba(225, 0, 126, 0.42);
    transform: scale(1);
  }

  70% {
    box-shadow: 0 0 0 8px rgba(225, 0, 126, 0);
    transform: scale(1.08);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(225, 0, 126, 0);
    transform: scale(1);
  }
}

h1,
h2 {
  margin: 0;
  letter-spacing: 0;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.logo {
  width: min(100%, 390px);
  height: auto;
  display: block;
}

.main-grid {
  display: grid;
  grid-template-columns: minmax(300px, 440px) minmax(320px, 1fr);
  align-items: center;
  gap: clamp(20px, 3vw, 34px);
}

.artwork-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 8px;
  background: var(--pink);
  border: 1px solid var(--line);
  box-shadow: 0 14px 38px rgba(225, 0, 126, 0.08);
}

.artwork {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  background: var(--pink);
}

.listen-panel {
  min-width: 0;
  display: grid;
  align-content: center;
  gap: clamp(18px, 2.6vw, 28px);
}

.now-playing {
  min-width: 0;
  display: grid;
  gap: 8px;
}

#trackTitle {
  overflow-wrap: anywhere;
  color: var(--pink);
  font-size: clamp(2.05rem, 5vw, 3.65rem);
  line-height: 1.02;
  font-weight: 900;
}

#trackArtist {
  margin: 0;
  overflow-wrap: anywhere;
  color: var(--pink-dark);
  font-size: clamp(1.15rem, 2.2vw, 1.45rem);
  font-weight: 900;
}

.play-button {
  position: relative;
  width: 100%;
  min-height: clamp(118px, 16vw, 156px);
  display: grid;
  grid-template-columns: clamp(78px, 12vw, 104px) 1fr;
  align-items: center;
  gap: clamp(16px, 2.6vw, 24px);
  padding: clamp(18px, 2.6vw, 26px);
  border: 0;
  border-radius: 8px;
  color: #fff;
  background: var(--pink);
  box-shadow: 0 18px 38px rgba(225, 0, 126, 0.28);
  cursor: pointer;
  text-align: left;
  transition: transform 160ms ease, background-color 160ms ease;
}

.play-button:hover {
  background: var(--pink-dark);
  transform: translateY(-1px);
}

.play-button.is-playing {
  animation: none;
}

.play-button::after {
  content: "";
  position: absolute;
  inset: -6px;
  border: 2px solid rgba(225, 0, 126, 0.34);
  border-radius: 10px;
  opacity: 0;
  pointer-events: none;
  animation: playBorderCallout 2.4s ease-out infinite;
}

.play-button.is-playing::after {
  animation: none;
  opacity: 0;
}

@keyframes playBorderCallout {
  0% {
    opacity: 0;
    transform: scale(0.985);
  }

  50% {
    opacity: 1;
    transform: scale(1);
  }

  100% {
    opacity: 0;
    transform: scale(1.018);
  }
}

@media (prefers-reduced-motion: reduce) {
  .live-dot,
  .play-button::after {
    animation: none;
  }
}

.play-icon {
  width: clamp(78px, 12vw, 104px);
  height: clamp(78px, 12vw, 104px);
  display: grid;
  place-items: center;
  border: 4px solid rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  font-size: clamp(2rem, 4vw, 2.7rem);
  line-height: 1;
  text-align: center;
  text-indent: 4px;
}

.play-button.is-playing .play-icon {
  text-indent: 0;
  font-size: clamp(1.9rem, 3.4vw, 2.4rem);
}

.play-copy {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.play-copy strong {
  font-size: clamp(1.65rem, 3.8vw, 2.45rem);
  line-height: 1;
  font-weight: 900;
}

.play-copy span {
  font-size: clamp(1.08rem, 2vw, 1.25rem);
  font-weight: 800;
}

.volume-control {
  display: grid;
  gap: 12px;
  padding: 18px;
  border: 2px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
  box-shadow: inset 0 0 0 1px rgba(225, 0, 126, 0.08);
}

.volume-control label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: var(--ink);
}

.volume-control label span,
.volume-control label strong {
  font-size: clamp(1.2rem, 2.5vw, 1.45rem);
  font-weight: 900;
}

.volume-actions {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) 58px;
  align-items: center;
  gap: 12px;
}

.volume-button {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 8px;
  color: #fff;
  background: var(--pink);
  box-shadow: 0 10px 24px rgba(225, 0, 126, 0.18);
  cursor: pointer;
  font-size: 2.2rem;
  line-height: 1;
  font-weight: 900;
}

.volume-button:hover {
  background: var(--pink-dark);
}

.volume-meter {
  height: 14px;
  overflow: hidden;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--line);
}

.volume-meter span {
  width: var(--volume-level, 80%);
  height: 100%;
  display: block;
  border-radius: inherit;
  background: var(--pink);
}

.volume-control input:not(.sr-only) {
  width: 100%;
  height: 34px;
  accent-color: var(--pink);
  cursor: pointer;
}

.history-panel {
  display: grid;
  gap: 10px;
  padding-top: 2px;
}

.history-panel h3 {
  margin: 0;
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.1;
  font-weight: 900;
}

.history-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.history-item {
  display: grid;
  grid-template-columns: 44px 54px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.66);
}

.history-cover {
  width: 44px;
  height: 44px;
  display: block;
  object-fit: cover;
  border-radius: 6px;
  background: var(--pink);
}

.history-item time {
  color: var(--pink);
  font-size: 0.95rem;
  font-weight: 900;
}

.history-text {
  min-width: 0;
  display: grid;
  gap: 1px;
}

.history-text strong,
.history-text span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-text strong {
  color: var(--pink-dark);
  font-size: 1rem;
  line-height: 1.1;
  font-weight: 900;
}

.history-text span {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 800;
}

.play-button:focus-visible,
.home-link:focus-visible,
.app-link:focus-visible,
.volume-button:focus-visible,
.volume-control input:focus-visible {
  outline: 4px solid rgba(225, 0, 126, 0.28);
  outline-offset: 4px;
}

@media (max-width: 760px) {
  .shell {
    align-items: start;
    min-height: auto;
  }

  .player {
    gap: 14px;
  }

  .topbar {
    order: 3;
    align-items: stretch;
    padding-top: 2px;
  }

  .home-link {
    min-width: 96px;
    padding: 0 14px;
  }

  .app-links {
    flex: 1;
    justify-content: flex-end;
  }

  .app-link {
    min-width: 58px;
    padding: 0 10px;
    font-size: 0;
  }

  .app-link svg {
    width: 28px;
    height: 28px;
  }

  .brand {
    order: 1;
    justify-items: start;
    text-align: left;
  }

  .logo {
    width: min(100%, 330px);
  }

  .main-grid {
    order: 2;
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .artwork-frame {
    width: min(100%, 252px);
    justify-self: center;
  }

  .listen-panel {
    gap: 12px;
  }

  .now-playing {
    gap: 4px;
  }

  .status {
    font-size: 0.82rem;
  }

  #trackTitle {
    font-size: clamp(1.7rem, 8vw, 2.15rem);
  }

  #trackArtist {
    font-size: clamp(1rem, 4.7vw, 1.18rem);
  }

  .play-button {
    grid-template-columns: 72px 1fr;
    min-height: 104px;
    padding: 14px;
  }

  .play-icon {
    width: 72px;
    height: 72px;
    font-size: 1.9rem;
  }

  .play-copy strong {
    font-size: clamp(1.45rem, 7vw, 1.9rem);
  }

  .play-copy span {
    font-size: clamp(0.98rem, 4.2vw, 1.12rem);
  }

  .volume-control {
    gap: 8px;
    padding: 12px;
  }

  .volume-actions {
    grid-template-columns: 52px minmax(0, 1fr) 52px;
    gap: 8px;
  }

  .volume-button {
    width: 52px;
    height: 52px;
  }

  .history-panel {
    gap: 8px;
  }

  .history-panel h3 {
    font-size: 0.95rem;
  }

  .history-list {
    gap: 6px;
  }

  .history-item {
    grid-template-columns: 40px 46px minmax(0, 1fr);
    padding: 8px 10px;
  }

  .history-cover {
    width: 40px;
    height: 40px;
  }
}

@media (max-width: 420px) {
  .shell {
    padding: 12px;
  }

  .player {
    padding: 14px;
  }

  .logo {
    width: min(100%, 310px);
  }

  .artwork-frame {
    width: min(100%, 236px);
  }

  .play-button {
    grid-template-columns: 66px 1fr;
    gap: 12px;
    min-height: 98px;
    padding: 12px;
  }

  .play-icon {
    width: 66px;
    height: 66px;
    border-width: 3px;
  }

  .volume-actions {
    grid-template-columns: 50px minmax(0, 1fr) 50px;
  }

  .volume-button {
    width: 50px;
    height: 50px;
  }
}
