:root {
  color-scheme: dark;
  --bg: #050b0f;
  --ink: #f7f1e4;
  --muted: #aeb7bd;
  --faint: #68747c;
  --gold: #e7b761;
  --gold-strong: #f1c978;
  --line: rgba(255, 255, 255, 0.16);
  --panel: rgba(7, 18, 25, 0.68);
  --panel-strong: rgba(5, 14, 20, 0.86);
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.56);
  --radius: 8px;
  font-family: "Avenir Next", Avenir, "Segoe UI", Helvetica, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(3, 8, 11, 0.68), rgba(3, 9, 13, 0.26) 48%, rgba(3, 8, 11, 0.78)),
    linear-gradient(180deg, rgba(3, 7, 10, 0.08), rgba(3, 7, 10, 0.84)),
    url("./Glass Animal - Static Made of Stars/Glass Animal Back Cover.jpg") center / cover fixed;
  overflow-x: hidden;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  background:
    radial-gradient(circle at 26% 18%, rgba(82, 150, 169, 0.2), transparent 32%),
    radial-gradient(circle at 78% 72%, rgba(231, 183, 97, 0.13), transparent 28%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.045) 0 1px, transparent 1px 112px);
  mix-blend-mode: screen;
}

button,
a,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.album-shell {
  width: min(1480px, calc(100vw - 64px));
  min-height: calc(100vh - 136px);
  margin: 0 auto;
  padding: 70px 0 132px;
}

.album-stage {
  display: grid;
  grid-template-columns: minmax(340px, 0.95fr) minmax(420px, 0.8fr);
  gap: clamp(32px, 5vw, 76px);
  align-items: center;
}

.artwork-panel {
  position: relative;
  justify-self: start;
  width: min(100%, 700px, calc(100vh - 270px));
}

.artwork-panel::before {
  position: absolute;
  inset: 4% 5% -5% -4%;
  z-index: -1;
  content: "";
  background: rgba(2, 8, 12, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.12);
  filter: blur(1px);
}

.cover-art {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.album-panel {
  min-width: 0;
}

.album-heading {
  display: flex;
  gap: 22px;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 20px;
}

h1,
.album-heading p {
  margin: 0;
  color: var(--gold);
  font-weight: 300;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

h1 {
  font-size: clamp(2.6rem, 5.2vw, 5.35rem);
  line-height: 0.95;
}

.album-heading p {
  margin-top: 12px;
  font-size: clamp(1.2rem, 2vw, 2rem);
  line-height: 1.1;
}

.artwork-actions {
  display: flex;
  gap: 14px;
  padding-top: 10px;
}

.artwork-button,
.ghost-button,
.play-button {
  display: inline-grid;
  place-items: center;
  color: var(--ink);
  background: rgba(7, 20, 28, 0.6);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, color 160ms ease;
}

.artwork-button {
  grid-auto-flow: column;
  gap: 10px;
  min-height: 48px;
  padding: 0 14px;
  appearance: none;
  color: var(--gold-strong);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-decoration: none;
  text-transform: uppercase;
}

.artwork-button.is-active {
  color: #061017;
  background: var(--gold-strong);
  border-color: rgba(247, 241, 228, 0.72);
}

.artwork-button svg {
  width: 21px;
  height: 21px;
}

.artwork-button:hover,
.ghost-button:hover,
.play-button:hover {
  color: var(--gold-strong);
  background: rgba(14, 34, 45, 0.74);
  border-color: rgba(231, 183, 97, 0.52);
  transform: translateY(-1px);
}

.artwork-button.is-active:hover {
  color: #061017;
  background: #ffd989;
}

.artwork-button:focus-visible,
.ghost-button:focus-visible,
.play-button:focus-visible,
.track-row:focus-visible,
input[type="range"]:focus-visible {
  outline: 2px solid var(--gold-strong);
  outline-offset: 3px;
}

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

.play-icon,
.pause-icon {
  fill: currentColor;
  stroke: none;
}

.album-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin-bottom: 16px;
  color: rgba(247, 241, 228, 0.84);
  font-size: 0.95rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.album-meta span + span::before {
  margin-right: 18px;
  color: var(--gold);
  content: "/";
}

.download-album {
  display: inline-grid;
  grid-template-columns: auto auto auto;
  gap: 10px;
  align-items: center;
  min-height: 46px;
  margin-bottom: 18px;
  padding: 0 14px;
  color: var(--gold-strong);
  background: rgba(7, 20, 28, 0.7);
  border: 1px solid rgba(231, 183, 97, 0.38);
  border-radius: var(--radius);
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-decoration: none;
  text-transform: uppercase;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, color 160ms ease;
}

.download-album svg {
  width: 21px;
  height: 21px;
}

.download-album small {
  color: rgba(247, 241, 228, 0.66);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
}

.download-album:hover {
  color: #061017;
  background: var(--gold-strong);
  border-color: rgba(247, 241, 228, 0.72);
  transform: translateY(-1px);
}

.download-album:hover small {
  color: rgba(6, 16, 23, 0.72);
}

.download-album:focus-visible {
  outline: 2px solid var(--gold-strong);
  outline-offset: 3px;
}

.track-list {
  min-width: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.38);
  backdrop-filter: blur(18px) saturate(125%);
}

.track-row {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  width: 100%;
  min-height: 48px;
  padding: 0 20px;
  color: var(--ink);
  text-align: left;
  background: transparent;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  cursor: pointer;
}

.track-row:last-child {
  border-bottom: 0;
}

.track-row:hover,
.track-row.is-active {
  background: linear-gradient(90deg, rgba(231, 183, 97, 0.13), rgba(255, 255, 255, 0.035));
}

.track-row.is-active {
  color: var(--gold-strong);
}

.track-number {
  color: rgba(247, 241, 228, 0.78);
  font-size: 1rem;
  font-variant-numeric: tabular-nums;
}

.track-row.is-active .track-number {
  color: var(--gold-strong);
}

.track-name {
  overflow: hidden;
  font-size: clamp(1rem, 1.35vw, 1.22rem);
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.track-duration {
  color: rgba(247, 241, 228, 0.7);
  font-size: 1rem;
  font-variant-numeric: tabular-nums;
}

.track-row.is-active .track-duration {
  color: var(--gold);
}

.player-bar {
  position: fixed;
  right: 32px;
  bottom: 26px;
  left: 32px;
  z-index: 20;
  display: grid;
  grid-template-columns: minmax(230px, 0.74fr) minmax(340px, 1.5fr) minmax(190px, 0.5fr);
  gap: 24px;
  align-items: center;
  min-height: 94px;
  padding: 14px 22px;
  background: var(--panel-strong);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 18px 70px rgba(0, 0, 0, 0.58);
  backdrop-filter: blur(22px) saturate(130%);
}

.now-playing {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr) 28px;
  gap: 16px;
  align-items: center;
  min-width: 0;
}

.now-playing img {
  width: 62px;
  height: 62px;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 6px;
}

.now-playing p,
.now-playing span {
  overflow: hidden;
  margin: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.now-playing p {
  color: var(--ink);
  font-size: 1.06rem;
  font-weight: 500;
}

.now-playing span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.94rem;
}

.playing-bars {
  display: flex;
  gap: 3px;
  align-items: end;
  height: 20px;
}

.playing-bars i {
  display: block;
  width: 3px;
  height: 9px;
  background: var(--gold);
  transform-origin: bottom;
}

body.is-playing .playing-bars i {
  animation: meter 820ms ease-in-out infinite;
}

body.is-playing .playing-bars i:nth-child(2) {
  animation-delay: 120ms;
}

body.is-playing .playing-bars i:nth-child(3) {
  animation-delay: 240ms;
}

@keyframes meter {
  0%, 100% {
    transform: scaleY(0.58);
  }
  45% {
    transform: scaleY(1.9);
  }
}

.transport {
  min-width: 0;
}

.transport-buttons {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 18px;
  margin-bottom: 10px;
}

.ghost-button {
  width: 44px;
  height: 44px;
  background: transparent;
  border-color: transparent;
}

.play-button {
  width: 64px;
  height: 64px;
  color: var(--gold-strong);
  background: rgba(8, 19, 25, 0.78);
  border-color: rgba(231, 183, 97, 0.74);
  border-radius: 999px;
}

.play-button .pause-icon,
body.is-playing .play-button .play-icon,
.mute-icon,
body.is-muted .volume-icon {
  display: none;
}

body.is-playing .play-button .pause-icon,
body.is-muted .mute-icon {
  display: block;
}

.timeline {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 48px;
  gap: 14px;
  align-items: center;
  color: rgba(247, 241, 228, 0.84);
  font-size: 0.9rem;
  font-variant-numeric: tabular-nums;
}

input[type="range"] {
  width: 100%;
  height: 18px;
  margin: 0;
  appearance: none;
  background: transparent;
  cursor: pointer;
}

input[type="range"]::-webkit-slider-runnable-track {
  height: 4px;
  background: linear-gradient(90deg, var(--gold) var(--progress, 0%), rgba(255, 255, 255, 0.25) var(--progress, 0%));
  border-radius: 999px;
}

input[type="range"]::-webkit-slider-thumb {
  width: 15px;
  height: 15px;
  margin-top: -5.5px;
  appearance: none;
  background: var(--gold-strong);
  border: 0;
  border-radius: 999px;
  box-shadow: 0 0 0 5px rgba(231, 183, 97, 0.12);
}

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

input[type="range"]::-moz-range-progress {
  height: 4px;
  background: var(--gold);
  border-radius: 999px;
}

input[type="range"]::-moz-range-thumb {
  width: 15px;
  height: 15px;
  background: var(--gold-strong);
  border: 0;
  border-radius: 999px;
}

.volume-control {
  display: grid;
  grid-template-columns: 42px minmax(84px, 1fr);
  gap: 12px;
  align-items: center;
}

.volume-control .ghost-button {
  width: 42px;
  height: 42px;
}

@media (max-width: 980px) {
  .album-shell {
    width: min(720px, calc(100vw - 32px));
    padding-top: 28px;
    padding-bottom: 220px;
  }

  .album-stage {
    grid-template-columns: 1fr;
    gap: 26px;
  }

  .cover-art {
    max-width: 620px;
    margin: 0 auto;
  }

  .album-heading {
    align-items: flex-end;
  }

  h1 {
    font-size: clamp(2.25rem, 13vw, 4.2rem);
  }

  .player-bar {
    right: 16px;
    bottom: 14px;
    left: 16px;
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .transport {
    order: 3;
  }

  .volume-control {
    order: 2;
    grid-template-columns: 42px minmax(0, 1fr);
  }
}

@media (max-width: 620px) {
  body {
    background-attachment: scroll;
  }

  .album-shell {
    width: min(100% - 24px, 520px);
    padding-top: 16px;
  }

  .album-heading {
    display: block;
  }

  .artwork-actions {
    padding-top: 18px;
  }

  .artwork-actions {
    flex-wrap: wrap;
  }

  .artwork-button {
    min-height: 46px;
    padding: 0 12px;
    font-size: 0.76rem;
  }

  .album-meta {
    font-size: 0.82rem;
    letter-spacing: 0.09em;
  }

  .download-album {
    grid-template-columns: auto minmax(0, auto);
    max-width: 100%;
  }

  .download-album small {
    grid-column: 2;
  }

  .track-row {
    grid-template-columns: 34px minmax(0, 1fr) auto;
    gap: 10px;
    min-height: 56px;
    padding: 0 14px;
  }

  .track-name {
    white-space: normal;
  }

  .player-bar {
    padding: 12px;
  }

  .transport-buttons {
    gap: 12px;
  }

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

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