:root {
  color-scheme: dark;
  --bg: #020617;
  --ink: #ffffff;
  --muted: rgba(255, 255, 255, 0.56);
  --quiet: rgba(255, 255, 255, 0.34);
  --cyan: #00e8ff;
  --pink: #ff38d1;
  --violet: #8b5cf6;
  --line: rgba(255, 255, 255, 0.12);
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
  background: var(--bg);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

body {
  overflow: hidden;
}

.page-shell {
  width: 100vw;
  height: 100svh;
  min-height: 620px;
  background: var(--bg);
  color: var(--ink);
}

.player {
  position: relative;
  isolation: isolate;
  width: 100%;
  height: 100%;
  max-width: 560px;
  margin: 0 auto;
  overflow: hidden;
  background: var(--bg);
}

.cover-layer {
  position: absolute;
  inset: 0 0 auto;
  height: min(68vw, 380px);
  min-height: 260px;
  z-index: -1;
  overflow: hidden;
}

.cover-image,
.cover-fallback {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cover-image {
  opacity: 0;
  transition: opacity 280ms ease;
}

.cover-image.is-loaded {
  opacity: 1;
}

.cover-fallback {
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 24% 28%, rgba(0, 232, 255, 0.5), transparent 26%),
    radial-gradient(circle at 78% 18%, rgba(255, 56, 209, 0.42), transparent 22%),
    linear-gradient(135deg, #06111f, #160a2c 48%, #04151c);
  color: rgba(255, 255, 255, 0.82);
  font-size: 42px;
  font-weight: 950;
}

.cover-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(2, 6, 23, 0.24) 0%,
    rgba(2, 6, 23, 0.42) 44%,
    rgba(2, 6, 23, 0.92) 82%,
    #020617 100%
  );
}

.song-header {
  padding: max(22px, env(safe-area-inset-top)) 24px 0;
  text-align: center;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 28px;
  padding: 0 12px;
  border: 1px solid rgba(0, 232, 255, 0.28);
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.42);
  color: rgba(255, 255, 255, 0.82);
  font-size: 12px;
  font-weight: 900;
  backdrop-filter: blur(14px);
}

.song-title {
  max-width: 100%;
  margin: 78px auto 14px;
  color: #fff;
  font-size: 28px;
  line-height: 1.08;
  font-weight: 950;
  text-align: center;
  text-wrap: balance;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.55);
}

.author-row {
  display: inline-flex;
  max-width: 100%;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.46);
  backdrop-filter: blur(16px);
}

.author-avatar {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--cyan), var(--pink));
  color: #fff;
  font-size: 13px;
  font-weight: 950;
  overflow: hidden;
}

.author-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.author-name {
  max-width: 250px;
  color: rgba(255, 255, 255, 0.92);
  font-size: 13px;
  font-weight: 900;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: left;
}

.author-subtitle {
  color: var(--quiet);
  font-size: 11px;
  font-weight: 800;
  text-align: left;
}

.lyrics-panel {
  position: absolute;
  inset: 256px 0 168px;
  overflow: hidden;
}

.lyrics-list {
  height: 100%;
  overflow-y: auto;
  padding: 38% 24px 42%;
  scroll-behavior: smooth;
  scrollbar-width: none;
}

.lyrics-list::-webkit-scrollbar {
  display: none;
}

.lyric-line {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 0;
  color: rgba(255, 255, 255, 0.43);
  font-size: 15px;
  line-height: 1.36;
  font-weight: 800;
  text-align: center;
  transition: transform 180ms ease, color 180ms ease, opacity 180ms ease;
}

.lyric-line.is-active {
  transform: scale(1.055);
  color: #fff;
  font-size: 20px;
  font-weight: 950;
  text-shadow: 0 0 12px rgba(255, 56, 209, 0.55);
}

.lyric-line.is-active span {
  background: linear-gradient(90deg, var(--cyan), #4c8dff, var(--violet), var(--pink));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lyric-section {
  min-height: 36px;
  padding: 4px 0;
  color: rgba(0, 232, 255, 0.78);
  font-size: 11px;
  font-weight: 950;
  text-align: center;
  text-transform: uppercase;
}

.lyric-section span {
  display: inline-flex;
  max-width: 100%;
  padding: 4px 10px;
  border: 1px solid rgba(0, 232, 255, 0.26);
  border-radius: 999px;
  background: rgba(0, 232, 255, 0.08);
}

.state-text {
  margin-top: 40px;
  color: var(--muted);
  font-size: 15px;
  font-weight: 850;
  text-align: center;
}

.control-dock {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 12px 22px max(18px, env(safe-area-inset-bottom));
  background: linear-gradient(180deg, rgba(2, 6, 23, 0), rgba(2, 6, 23, 0.86) 22%, #020617 100%);
}

.status-text {
  min-height: 18px;
  margin-bottom: 10px;
  color: rgba(255, 255, 255, 0.48);
  font-size: 12px;
  font-weight: 850;
  text-align: center;
}

.progress-row {
  display: grid;
  grid-template-columns: 42px 1fr 42px;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  color: rgba(255, 255, 255, 0.58);
  font-size: 11px;
  font-weight: 900;
}

.progress-row span {
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.progress-track {
  position: relative;
  height: 5px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.09);
}

.progress-fill {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(0, 232, 255, 0.82), rgba(255, 56, 209, 0.82));
}

.play-button {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  margin: 0 auto;
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-radius: 50%;
  background:
    linear-gradient(#151932, #151932) padding-box,
    linear-gradient(135deg, var(--cyan), var(--pink)) border-box;
  box-shadow: 0 0 28px rgba(0, 232, 255, 0.16), 0 0 30px rgba(255, 56, 209, 0.18);
  cursor: pointer;
}

.play-icon {
  width: 0;
  height: 0;
  margin-left: 5px;
  border-top: 13px solid transparent;
  border-bottom: 13px solid transparent;
  border-left: 19px solid #fff;
}

.play-button.is-playing .play-icon {
  width: 22px;
  height: 24px;
  margin-left: 0;
  border: 0;
  background: linear-gradient(90deg, #fff 0 34%, transparent 34% 66%, #fff 66% 100%);
}

.download-cta {
  display: none;
  width: min(100%, 420px);
  min-height: 52px;
  align-items: center;
  justify-content: center;
  margin: 16px auto 0;
  padding: 0 18px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 14px;
  background: linear-gradient(135deg, #00e8ff, #4c8dff 44%, #ff38d1);
  color: #fff;
  font-size: 15px;
  font-weight: 950;
  text-align: center;
  text-decoration: none;
  box-shadow: 0 14px 36px rgba(255, 56, 209, 0.28);
}

.download-cta.is-visible {
  display: flex;
}

@media (max-height: 700px) {
  .song-title {
    margin-top: 48px;
    font-size: 24px;
  }

  .lyrics-panel {
    inset-top: 220px;
    bottom: 152px;
  }

  .lyric-line {
    min-height: 54px;
    font-size: 14px;
  }

  .lyric-line.is-active {
    font-size: 18px;
  }

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

@media (min-width: 720px) {
  body {
    background:
      radial-gradient(circle at 20% 12%, rgba(0, 232, 255, 0.16), transparent 32%),
      radial-gradient(circle at 80% 20%, rgba(255, 56, 209, 0.12), transparent 32%),
      #020617;
  }

  .page-shell {
    display: grid;
    place-items: center;
    min-height: 760px;
    background: transparent;
  }

  .player {
    height: min(860px, 100svh);
    border-left: 1px solid rgba(255, 255, 255, 0.08);
    border-right: 1px solid rgba(255, 255, 255, 0.08);
  }
}
