:root {
  --bg-1: #f4efe7;
  --bg-2: #ece2d4;
  --ink: #191f2a;
  --muted: #5d5d5d;
  --line: rgba(28, 32, 43, 0.18);
  --card: rgba(255, 252, 247, 0.78);
  --accent: #204f93;
  --accent-2: #19356b;
  --star-off: #d3c8b6;
  --star-on: #e4a53a;
  --album-bg: none;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Sora", sans-serif;
  color: #f7f8fb;
  background: #000;
  padding-bottom: 8.8rem;
}

.page-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.page-bg::before,
.page-bg::after {
  content: "";
  position: absolute;
  inset: 0;
}

.page-bg::before {
  background-image: var(--album-bg);
  background-position: center;
  background-size: cover;
  filter: blur(42px) saturate(1.05) brightness(0.56);
  transform: scale(1.12);
}

.page-bg::after {
  background: rgba(0, 0, 0, 0.45);
}

.app-shell {
  position: relative;
  z-index: 1;
  width: min(700px, 94vw);
  margin: 0 auto;
  padding: 1rem 0 3rem;
}

.brand-header {
  position: relative;
  margin: 0.2rem 0 0.5rem;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 44px;
}

.brand-logo {
  width: min(100px, 44vw);
  height: auto;
  display: block;
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.34));
}

.hero {
  text-align: center;
  margin: 1.45rem 0 1.4rem;
}

.album-cover-frame {
  position: relative;
  width: min(360px, 78vw);
  margin: 0 auto 1rem;
  border-radius: 16px;
  overflow: hidden;
}

.album-cover-frame.is-empty {
  display: none;
}

.album-cover {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.32);
  box-shadow: 0 32px 68px rgba(0, 0, 0, 0.4);
  display: block;
}

.album-cover-play {
  position: absolute;
  inset: 0;
  border: none;
  border-radius: inherit;
  background: radial-gradient(circle at center, rgba(16, 34, 64, 0.72) 0%, rgba(3, 8, 16, 0.62) 45%, rgba(2, 5, 10, 0.2) 100%);
  color: #f3fbff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(2.4rem, 8vw, 3.6rem);
  opacity: 0;
  cursor: pointer;
  transition: opacity 0.2s ease, backdrop-filter 0.2s ease;
  backdrop-filter: blur(1px);
}

.album-cover-play:hover,
.album-cover-play:focus-visible,
.album-cover-frame:hover .album-cover-play,
.album-cover-frame:focus-within .album-cover-play {
  opacity: 1;
}

.album-cover-play:focus-visible {
  outline: 2px solid rgba(165, 231, 255, 0.9);
  outline-offset: -3px;
}

.album-cover-play i {
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.42));
}

.album-cover-play:disabled {
  opacity: 0;
  pointer-events: none;
}

.album-cover.is-empty {
  display: none;
}

@media (hover: none) {
  .album-cover-play {
    opacity: 0.94;
    background: radial-gradient(circle at center, rgba(16, 34, 64, 0.58) 0%, rgba(3, 8, 16, 0.46) 52%, rgba(2, 5, 10, 0.18) 100%);
  }
}

h1,
h2 {
  margin: 0;
}

h1 {
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(2rem, 5.4vw, 3.4rem);
  letter-spacing: -0.03em;
  text-shadow: 0 4px 18px rgba(0, 0, 0, 0.28);
}

.album-title-main,
.album-title-data {
  display: inline;
}

.album-title-data {
  white-space: nowrap;
}

.album-meta,
.album-description {
  margin: 0;
}

.socials-wrap {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  margin: 0;
  padding: 0;
  display: block;
}

.socials-list {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  gap: 0.4rem;
  justify-content: flex-end;
  width: auto;
  max-width: min(46vw, 320px);
}

.social-chip {
  text-decoration: none;
  color: #fff;
  border: none;
  background: transparent;
  border-radius: 8px;
  min-width: 1.8rem;
  min-height: 1.8rem;
  padding: 0.2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.16s ease, opacity 0.16s ease;
  flex-shrink: 0;
  opacity: 0.84;
}

.social-chip:hover {
  transform: translateY(-1px);
  opacity: 1;
}

.social-icon {
  font-size: 1.22rem;
  line-height: 1;
}

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

.tracks-section {
  background: rgba(0, 0, 0, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 14px;
  padding: 0.8rem 0.9rem;
  backdrop-filter: blur(8px);
  max-width: 700px;
  margin: 0 auto;
}

.track-row {
  display: grid;
  grid-template-columns: 36px 34px minmax(0, 1fr) 56px fit-content(160px);
  gap: 0.45rem;
  align-items: center;
}

.tracks-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.track-row {
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  padding: 0.58rem 0.2rem;
}

.track-row:first-child {
  border-top: none;
}

.track-row.is-active {
  background: rgba(255, 255, 255, 0.06);
}

.track-col {
  min-width: 0;
}

.track-number {
  display: block;
  font-family: "Space Grotesk", sans-serif;
  color: rgba(255, 255, 255, 0.64);
  font-size: 0.82rem;
}

.track-title {
  display: block;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.track-title-main,
.track-title-data {
  display: inline;
}

.track-title-data {
  color: rgba(166, 214, 234, 0.86);
  font-size: 0.84em;
  font-weight: 500;
}

.track-row-trigger {
  border: none;
  background: transparent;
  margin: 0;
  padding: 0;
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.track-row-trigger:hover {
  color: #d7f1ff;
}

.track-row-trigger:focus-visible {
  outline: 2px solid rgba(131, 220, 255, 0.8);
  outline-offset: 2px;
  border-radius: 4px;
}

.track-time {
  color: rgba(255, 255, 255, 0.86);
  font-size: 0.9rem;
}

.track-time {
  font-variant-numeric: tabular-nums;
}

.track-play-btn {
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.9);
  width: 30px;
  height: 30px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
  transition: background 0.16s ease, color 0.16s ease;
}

.track-play-btn:hover {
  background: rgba(255, 255, 255, 0.14);
}

.track-play-btn.is-playing {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.track-play-wave {
  display: inline-flex;
  align-items: flex-end;
  justify-content: center;
  gap: 2px;
  width: 14px;
  height: 13px;
}

.track-play-wave span {
  width: 3px;
  border-radius: 999px;
  background: linear-gradient(180deg, #9ce7ff, #4dbbff);
  transform-origin: bottom;
  animation: track-wave 0.95s ease-in-out infinite;
}

.track-play-wave span:nth-child(1) {
  height: 44%;
  animation-duration: 0.82s;
}

.track-play-wave span:nth-child(2) {
  height: 100%;
  animation-duration: 1.08s;
}

.track-play-wave span:nth-child(3) {
  height: 66%;
  animation-duration: 0.9s;
}

@keyframes track-wave {
  0%,
  100% {
    transform: scaleY(0.55);
    opacity: 0.74;
  }
  50% {
    transform: scaleY(1);
    opacity: 1;
  }
}

.track-rating {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  width: 100%;
}

.player-star-picker {
  font-size: 1.12rem;
  letter-spacing: 0.05rem;
}

.star-picker {
  position: relative;
  display: inline-block;
  line-height: 1;
  font-size: 1.4rem;
  letter-spacing: 0.06rem;
  cursor: pointer;
  user-select: none;
  outline: none;
}

.star-base,
.star-fill {
  font-family: "Space Grotesk", sans-serif;
}

.star-base {
  color: rgba(255, 255, 255, 0.22);
}

.star-fill {
  position: absolute;
  left: 0;
  top: 0;
  color: var(--star-on);
  overflow: hidden;
  white-space: nowrap;
  text-shadow: 0 0 10px rgba(230, 173, 75, 0.28);
}

.star-picker:focus-visible {
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.24);
  border-radius: 6px;
}

.player-wrap {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  background: rgba(2, 5, 10, 0.94);
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  padding: 0 0.8rem 0.62rem;
  backdrop-filter: blur(12px);
  box-shadow: 0 -10px 28px rgba(0, 0, 0, 0.35);
  z-index: 20;
  border-radius: 0;
  margin: 0;
}

.player-inner {
  width: min(980px, 100%);
  margin: 0 auto;
  display: grid;
  gap: 0.38rem;
}

.player-top-row {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 2.62rem;
  padding-top: 0.12rem;
  padding-bottom: 0.06rem;
}

.player-track-name {
  margin: 0;
  color: rgba(255, 255, 255, 0.97);
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(1rem, 1.45vw, 1.3rem);
  font-weight: 700;
  letter-spacing: 0.02em;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-shadow: 0 4px 14px rgba(0, 0, 0, 0.36);
}

.player-track-name-text {
  display: inline-block;
  white-space: nowrap;
}

.player-track-name.is-scrolling .player-track-name-text {
  animation: player-title-marquee var(--marquee-duration, 9s) linear infinite alternate;
}

@keyframes player-title-marquee {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(calc(-1 * var(--marquee-shift, 0px)));
  }
}

.player-rating {
  position: absolute;
  right: 0;
  top: 0.08rem;
  min-width: 118px;
  display: flex;
  justify-content: flex-end;
  z-index: 4;
}

.player-buttons {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.28rem 0 0.3rem;
  z-index: 3;
}

.player-icon-btn {
  border: none;
  background: transparent;
  color: #7fd9ff;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 999px;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.16s ease, color 0.16s ease, opacity 0.16s ease;
}

.player-icon-btn[aria-label]::after {
  content: attr(aria-label);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 0.56rem);
  transform: translate(-50%, 4px);
  padding: 0.2rem 0.42rem;
  border-radius: 6px;
  font-size: 0.66rem;
  letter-spacing: 0.01em;
  color: #e7f8ff;
  background: rgba(8, 15, 24, 0.95);
  border: 1px solid rgba(151, 227, 255, 0.35);
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.14s ease, transform 0.14s ease;
  z-index: 8;
}

.player-icon-btn[aria-label]::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: calc(100% + 0.3rem);
  transform: translate(-50%, 4px);
  border: 5px solid transparent;
  border-top-color: rgba(151, 227, 255, 0.35);
  opacity: 0;
  transition: opacity 0.14s ease, transform 0.14s ease;
  pointer-events: none;
  z-index: 8;
}

.player-icon-btn:hover:not(:disabled)::after,
.player-icon-btn:hover:not(:disabled)::before,
.player-icon-btn:focus-visible::after,
.player-icon-btn:focus-visible::before {
  opacity: 1;
  transform: translate(-50%, 0);
}

.player-icon-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.1);
}

.player-icon-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.player-icon-btn-main {
  color: #d6f5ff;
  background: rgba(91, 190, 236, 0.24);
}

.player-icon-btn.is-active {
  color: #c7f1ff;
}

.player-icon-btn.is-track {
  color: #ffffff;
}

#player-loop {
  color: #aee9ff;
  background: rgba(129, 220, 255, 0.14);
}

#player-loop.is-active {
  color: #dff6ff;
  background: rgba(102, 202, 240, 0.28);
}

#player-loop.is-track {
  color: #ffd8ea;
  background: rgba(255, 78, 146, 0.34);
  box-shadow: 0 0 0 1px rgba(255, 128, 177, 0.38) inset;
}

.player-progress {
  order: -1;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 42px auto;
  grid-template-areas:
    "seek seek seek seek"
    "current . duration volume";
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 0;
  padding: 0 0 0.16rem;
  position: relative;
  border-radius: 0;
  margin: 0;
}

.player-progress .player-title-wrap {
  grid-column: 1 / -1;
  grid-row: 2;
  justify-self: center;
  align-self: center;
  width: min(700px, 70%);
  overflow: hidden;
  pointer-events: none;
  z-index: 1;
}

.player-progress .player-track-name {
  text-align: center;
}

.player-time {
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.75rem;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

#player-current {
  grid-area: current;
  position: relative;
  z-index: 2;
}

#player-duration {
  grid-area: duration;
  position: relative;
  z-index: 2;
}

#player-seek {
  grid-area: seek;
  width: 100%;
  height: 8px;
  border-radius: 0;
  margin: 0;
  appearance: none;
  -webkit-appearance: none;
  background:
    linear-gradient(
      to right,
      #00c6ff 0%,
      #0072ff var(--seek-progress, 0%),
      rgba(255, 255, 255, 0.14) var(--seek-progress, 0%),
      rgba(255, 255, 255, 0.14) 100%
    );
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

#player-seek::-webkit-slider-runnable-track {
  height: 8px;
  border-radius: 0;
  background: transparent;
}

#player-seek::-webkit-slider-thumb {
  -webkit-appearance: none;
  margin-top: -3px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #f0fbff;
  box-shadow: 0 0 0 2px rgba(11, 18, 28, 0.7), 0 0 10px rgba(111, 214, 255, 0.35);
}

#player-seek::-moz-range-track {
  height: 8px;
  border-radius: 0;
  background: transparent;
}

#player-seek::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border: 0;
  border-radius: 50%;
  background: #f0fbff;
  box-shadow: 0 0 0 2px rgba(11, 18, 28, 0.7), 0 0 10px rgba(111, 214, 255, 0.35);
}

#player-volume {
  accent-color: #72d5ff;
}

.player-volume-dock {
  grid-area: volume;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  position: relative;
  z-index: 2;
}

/* Invisible bridge keeps :hover active while moving from button to popup. */
.player-volume-dock::before {
  content: "";
  position: absolute;
  right: 0;
  bottom: 100%;
  width: 2.6rem;
  height: 0.72rem;
}

.player-volume-slider-wrap {
  position: absolute;
  right: 0;
  bottom: calc(100% + 0.06rem);
  width: 2.35rem;
  height: 128px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(7, 11, 20, 0.97);
  box-shadow: 0 14px 24px rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px) scale(0.94);
  transition: opacity 0.16s ease, transform 0.16s ease;
  z-index: 3;
}

.player-volume-dock:hover .player-volume-slider-wrap,
.player-volume-dock:focus-within .player-volume-slider-wrap {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

#player-volume {
  width: 102px;
  min-width: 102px;
  transform: rotate(-90deg);
  transform-origin: center;
}

#audio-player {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 1px;
  height: 1px;
}

.toast {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 40;
  padding: 0.66rem 0.86rem;
  border-radius: 10px;
  background: rgba(21, 26, 36, 0.94);
  color: #fff;
  transform: translateY(16px);
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
  font-size: 0.88rem;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

.is-hidden {
  display: none;
}

@media (max-width: 860px) {
  .track-row {
    grid-template-columns: 34px 1fr;
    grid-template-areas:
      "play title"
      "num title"
      "num time"
      "num rating";
    gap: 0.26rem 0.7rem;
    padding: 0.72rem 0.2rem;
  }

  .player-wrap {
    width: 100vw;
    left: 0;
    bottom: 0;
    padding: 0 0.65rem 0.62rem;
  }

  .brand-header {
    min-height: 38px;
  }

  .socials-wrap {
    right: 0;
  }

  .socials-list {
    gap: 0.26rem;
    max-width: 56vw;
  }

  .social-chip {
    min-width: 1.6rem;
    min-height: 1.6rem;
    padding: 0.16rem;
  }

  .social-icon {
    font-size: 1.06rem;
  }

  .player-inner {
    width: 100%;
    margin: 0;
    gap: 0.34rem;
  }

  .player-top-row {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 2.62rem;
    padding-top: 0.12rem;
  }

  .player-track-name {
    text-align: center;
    font-size: clamp(0.88rem, 3.8vw, 1.03rem);
  }

  .player-rating {
    top: 0.2rem;
    right: 0;
    justify-content: flex-end;
    min-width: auto;
  }

  .player-buttons {
    align-self: center;
    gap: 0.2rem;
  }

  .player-progress {
    grid-template-columns: 42px minmax(0, 1fr) 42px;
    grid-template-areas:
      "seek seek seek"
      "current . duration"
      "volume volume volume";
    padding-bottom: 0.16rem;
  }

  .player-progress .player-title-wrap {
    width: min(94vw, 72%);
  }

  .player-volume-dock {
    grid-column: 1 / -1;
    justify-content: flex-end;
  }

  .track-play-btn {
    grid-area: play;
  }

  .track-number {
    grid-area: num;
    align-self: start;
    padding-top: 0.24rem;
  }

  .track-title {
    grid-area: title;
  }

  .track-time {
    grid-area: time;
  }

  .track-rating {
    grid-area: rating;
  }
}

@media (prefers-reduced-motion: reduce) {
  .player-track-name.is-scrolling .player-track-name-text {
    animation: none;
  }

  .track-play-wave span {
    animation: none;
    opacity: 1;
  }
}
