:root {
  --bg: #080b12;
  --panel: rgba(16, 22, 34, 0.82);
  --panel-strong: rgba(19, 26, 40, 0.94);
  --text: #f6f7fb;
  --muted: #aab2c5;
  --soft: #727b90;
  --line: rgba(255, 255, 255, 0.12);
  --accent: #eecf8f;
  --accent-2: #9ac7ff;
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.38);
  --radius: 30px;
}

:root[data-theme="light"] {
  --bg: #f8f5ef;
  --panel: rgba(255, 255, 255, 0.78);
  --panel-strong: rgba(255, 255, 255, 0.94);
  --text: #151922;
  --muted: #5c6474;
  --soft: #818899;
  --line: rgba(13, 20, 33, 0.12);
  --accent: #9e6832;
  --accent-2: #2e6fb4;
  --shadow: 0 26px 70px rgba(110, 93, 64, 0.18);
}

* {
  box-sizing: border-box;
}

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

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(238, 207, 143, 0.20), transparent 34rem),
    radial-gradient(circle at 85% 12%, rgba(154, 199, 255, 0.14), transparent 32rem),
    var(--bg);
  line-height: 1.5;
  overflow-x: hidden;
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

.skip-link {
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 20;
  transform: translateY(-160%);
  padding: 0.7rem 1rem;
  border-radius: 999px;
  background: var(--text);
  color: var(--bg);
  transition: transform 0.2s ease;
}

.skip-link:focus {
  transform: translateY(0);
}

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

.stage-orb {
  position: absolute;
  width: 22rem;
  height: 22rem;
  border-radius: 50%;
  filter: blur(38px);
  opacity: 0.32;
}

.stage-orb--one {
  top: 18%;
  left: -8rem;
  background: var(--accent);
}

.stage-orb--two {
  right: -7rem;
  bottom: 14%;
  background: var(--accent-2);
}

.stage-noise {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.022) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, black, transparent 80%);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(20px);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  border-bottom: 1px solid var(--line);
}

.site-nav {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand,
.nav-actions,
.theme-toggle,
.intro-meta,
.player-controls {
  display: flex;
  align-items: center;
}

.brand {
  gap: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.brand-mark {
  width: 2.4rem;
  height: 2.4rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #080b12;
  font-weight: 900;
}

.nav-actions {
  gap: 0.75rem;
}

.nav-link,
.theme-toggle {
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  border-radius: 999px;
  padding: 0.65rem 0.9rem;
}

.theme-toggle {
  gap: 0.45rem;
  cursor: pointer;
}

.page-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 52px 0 40px;
}

.intro {
  max-width: 760px;
  margin: 0 auto 36px;
  text-align: center;
}

.eyebrow {
  margin: 0 0 0.65rem;
  color: var(--accent);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.78rem;
}

.eyebrow--small {
  margin-bottom: 0.2rem;
  font-size: 0.7rem;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0.8rem;
  font-size: clamp(2.6rem, 7vw, 5.4rem);
  line-height: 0.96;
  letter-spacing: -0.07em;
}

.intro-copy {
  max-width: 620px;
  margin: 0 auto 1.2rem;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.18rem);
}

.intro-meta {
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.intro-meta span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.48rem 0.8rem;
  color: var(--muted);
  background: var(--panel);
}

.intro-meta strong {
  color: var(--text);
}

.music-stage {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(330px, 0.78fr);
  gap: 24px;
  align-items: start;
}

.player,
.playlist-card,
.about-card {
  border: 1px solid var(--line);
  background: var(--panel-strong);
  box-shadow: var(--shadow);
  border-radius: var(--radius);
  backdrop-filter: blur(22px);
}

.player {
  min-height: 620px;
  padding: clamp(1rem, 3vw, 1.6rem);
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.player__top {
  display: grid;
  grid-template-columns: minmax(220px, 0.9fr) minmax(0, 1fr);
  gap: 1.35rem;
  align-items: center;
}

.player-cover {
  position: relative;
  aspect-ratio: 1;
  min-width: 0;
  border-radius: 28px;
  overflow: hidden;
  isolation: isolate;
  background: rgba(255, 255, 255, 0.06);
}

.player-cover__bg {
  position: absolute;
  inset: -20%;
  background-position: center;
  background-size: cover;
  filter: blur(35px);
  transform: scale(1.12);
  opacity: 0.65;
  z-index: -1;
}

.player-cover__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 28px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
}

.player-cover__img.is-broken {
  visibility: hidden;
}

.player-info {
  min-width: 0;
}

.album-info__name {
  margin-bottom: 0.45rem;
  color: var(--accent);
  font-weight: 800;
}

.album-info__track {
  margin-bottom: 0.85rem;
  font-size: clamp(1.9rem, 5vw, 3.8rem);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.small-note {
  color: var(--muted);
  margin-bottom: 0;
}

.progress {
  margin-top: auto;
}

.progress__top,
.progress__time {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  margin-bottom: 0.65rem;
}

.progress__bar {
  width: 100%;
  height: 16px;
  border: 0;
  padding: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.13);
  overflow: hidden;
  cursor: pointer;
  touch-action: none;
}

.progress__current {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

.player-controls {
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.control-btn,
.favorite-btn {
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--panel) 74%, var(--text) 6%);
  color: var(--text);
  cursor: pointer;
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.control-btn:hover,
.favorite-btn:hover,
.theme-toggle:hover,
.nav-link:hover,
.track-item:hover {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--accent) 68%, var(--line));
}

.control-btn {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 50%;
}

.control-btn--play {
  width: 74px;
  height: 74px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #080b12;
  border-color: transparent;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.24);
}

.icon {
  width: 1.45rem;
  height: 1.45rem;
  fill: currentColor;
}

.control-btn--play .icon {
  width: 1.8rem;
  height: 1.8rem;
}

.favorite-btn {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  border-radius: 999px;
  padding: 0 1rem;
  color: var(--muted);
}

.favorite-btn.active {
  color: #ff8fa3;
  border-color: rgba(255, 143, 163, 0.5);
}

.player-status {
  min-height: 2.7rem;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.16);
  color: var(--muted);
  border-radius: 18px;
  padding: 0.72rem 0.9rem;
}

.playlist-card {
  padding: 1rem;
  max-height: 620px;
  display: flex;
  flex-direction: column;
}

.playlist-card__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.9rem;
}

.playlist-card__head h2,
.about-card h2 {
  margin-bottom: 0;
  font-size: 1.55rem;
  letter-spacing: -0.04em;
}

.playlist-count {
  display: grid;
  place-items: center;
  min-width: 2.45rem;
  height: 2.45rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.09);
  color: var(--accent);
  font-weight: 800;
}

.search-label {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.track-search {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  padding: 0.85rem 0.95rem;
  outline: none;
}

.track-search:focus {
  border-color: var(--accent);
}

.tracklist {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
  overflow: auto;
  scrollbar-width: thin;
}

.tracklist li + li {
  margin-top: 0.55rem;
}

.track-item {
  width: 100%;
  min-height: 72px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text);
  border-radius: 20px;
  padding: 0.55rem;
  display: grid;
  grid-template-columns: 2.2rem 3.2rem minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 0.7rem;
  text-align: left;
  cursor: pointer;
}

.track-item.active {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--line);
}

.track-num {
  color: var(--soft);
  font-variant-numeric: tabular-nums;
}

.track-thumb {
  width: 3.2rem;
  height: 3.2rem;
  object-fit: cover;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
}

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

.track-title,
.track-artist {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.track-title {
  font-weight: 800;
}

.track-artist {
  color: var(--muted);
  font-size: 0.9rem;
}

.track-heart {
  color: #ff8fa3;
}

.playing-indicator {
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: end;
  gap: 3px;
  opacity: 0;
}

.track-item.active .playing-indicator {
  opacity: 1;
}

.playing-indicator span {
  width: 4px;
  height: 8px;
  border-radius: 999px;
  background: var(--accent);
}

.is-playing .track-item.active .playing-indicator span:nth-child(1) {
  animation: equalize 0.72s ease-in-out infinite;
}

.is-playing .track-item.active .playing-indicator span:nth-child(2) {
  animation: equalize 0.72s ease-in-out 0.14s infinite;
}

.is-playing .track-item.active .playing-indicator span:nth-child(3) {
  animation: equalize 0.72s ease-in-out 0.28s infinite;
}

@keyframes equalize {
  0%, 100% { height: 7px; }
  50% { height: 20px; }
}

.empty-state {
  color: var(--muted);
  padding: 1rem;
}

.about-card {
  margin-top: 24px;
  padding: clamp(1.2rem, 3vw, 1.6rem);
}

.about-card p {
  margin: 0.7rem 0 0;
  color: var(--muted);
  max-width: 760px;
}

.site-footer {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 20px 0 36px;
  color: var(--soft);
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

@media (max-width: 900px) {
  .music-stage {
    grid-template-columns: 1fr;
  }

  .player,
  .playlist-card {
    min-height: auto;
    max-height: none;
  }

  .playlist-card {
    max-height: 680px;
  }
}

@media (max-width: 640px) {
  .site-nav,
  .page-shell,
  .site-footer {
    width: min(100% - 20px, 1180px);
  }

  .site-nav {
    min-height: 64px;
  }

  .brand-text,
  .nav-link {
    display: none;
  }

  .page-shell {
    padding-top: 34px;
  }

  .player__top {
    grid-template-columns: 1fr;
  }

  .player-cover {
    max-width: 340px;
    width: 100%;
    margin: 0 auto;
  }

  .player-info {
    text-align: center;
  }

  .track-item {
    grid-template-columns: 1.8rem 3rem minmax(0, 1fr) auto;
  }

  .track-item .playing-indicator {
    display: none;
  }
}

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


/* Final light theme polish — listener-focused, soft, readable */
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f7efe4;
  --bg-soft: #fff8ef;
  --surface: rgba(255, 252, 246, 0.88);
  --surface-strong: rgba(255, 255, 255, 0.96);
  --surface-muted: rgba(245, 233, 219, 0.82);
  --text: #251910;
  --muted: #7b6655;
  --muted-strong: #5d4a3c;
  --line: rgba(92, 64, 42, 0.16);
  --accent: #b85d2c;
  --accent-2: #d58a47;
  --accent-soft: rgba(184, 93, 44, 0.13);
  --danger: #b44848;
  --shadow: 0 24px 70px rgba(98, 65, 32, 0.18);
  --shadow-soft: 0 14px 36px rgba(98, 65, 32, 0.12);
}

:root[data-theme="light"] body {
  background:
    radial-gradient(circle at 10% 0%, rgba(213, 138, 71, 0.22), transparent 36rem),
    radial-gradient(circle at 90% 16%, rgba(184, 93, 44, 0.14), transparent 34rem),
    linear-gradient(135deg, #fff9f2 0%, #f4eadf 48%, #efe0d0 100%);
  color: var(--text);
}

:root[data-theme="light"] .stage-noise {
  opacity: 0.08;
}

:root[data-theme="light"] .stage-orb--one {
  background: rgba(213, 138, 71, 0.28);
}

:root[data-theme="light"] .stage-orb--two {
  background: rgba(184, 93, 44, 0.18);
}

:root[data-theme="light"] .stage-orb--three {
  background: rgba(255, 255, 255, 0.55);
}

:root[data-theme="light"] .site-header,
:root[data-theme="light"] .player,
:root[data-theme="light"] .playlist-card,
:root[data-theme="light"] .content-note {
  background: linear-gradient(180deg, var(--surface-strong), var(--surface));
  border-color: var(--line);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(18px);
}

:root[data-theme="light"] .brand,
:root[data-theme="light"] .nav-link,
:root[data-theme="light"] .theme-toggle {
  color: var(--text);
}

:root[data-theme="light"] .nav-link,
:root[data-theme="light"] .theme-toggle,
:root[data-theme="light"] .track-search {
  background: rgba(255, 255, 255, 0.58);
  border-color: rgba(92, 64, 42, 0.14);
}

:root[data-theme="light"] .nav-link:hover,
:root[data-theme="light"] .theme-toggle:hover,
:root[data-theme="light"] .track-search:focus {
  background: rgba(255, 255, 255, 0.86);
  border-color: rgba(184, 93, 44, 0.32);
}

:root[data-theme="light"] .hero {
  color: var(--text);
}

:root[data-theme="light"] .hero h1,
:root[data-theme="light"] .album-info__track,
:root[data-theme="light"] .playlist-card h2,
:root[data-theme="light"] .content-note h2 {
  color: #21150e;
}

:root[data-theme="light"] .hero-copy,
:root[data-theme="light"] .track-artist,
:root[data-theme="light"] .album-info__name,
:root[data-theme="light"] .player-status,
:root[data-theme="light"] .content-note p,
:root[data-theme="light"] .site-footer {
  color: var(--muted);
}

:root[data-theme="light"] .eyebrow,
:root[data-theme="light"] .hero-meta span,
:root[data-theme="light"] .playlist-count {
  color: var(--accent);
  background: var(--accent-soft);
  border-color: rgba(184, 93, 44, 0.18);
}

:root[data-theme="light"] .player-cover {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(244, 225, 207, 0.84));
  border-color: rgba(92, 64, 42, 0.16);
  box-shadow: 0 22px 56px rgba(98, 65, 32, 0.2);
}

:root[data-theme="light"] .player-cover__item {
  opacity: 0.28;
  filter: blur(18px) saturate(1.08);
}

:root[data-theme="light"] .player-cover__img {
  box-shadow: 0 20px 50px rgba(73, 45, 24, 0.22);
}

:root[data-theme="light"] .vinyl-ring {
  border-color: rgba(45, 28, 18, 0.12);
}

:root[data-theme="light"] .progress__bar {
  background: rgba(96, 64, 42, 0.14);
  box-shadow: inset 0 1px 2px rgba(36, 24, 18, 0.06);
}

:root[data-theme="light"] .progress__current {
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 18px rgba(184, 93, 44, 0.22);
}

:root[data-theme="light"] .player-controls__item {
  background: rgba(255, 255, 255, 0.74);
  border-color: rgba(92, 64, 42, 0.14);
  color: var(--text);
  box-shadow: 0 10px 24px rgba(98, 65, 32, 0.12);
}

:root[data-theme="light"] .player-controls__item:hover {
  background: #ffffff;
  border-color: rgba(184, 93, 44, 0.35);
}

:root[data-theme="light"] .player-controls__item.-xl {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fffdf9;
  border-color: transparent;
}

:root[data-theme="light"] .player-controls__item.-favorite.active,
:root[data-theme="light"] .track-fav {
  color: var(--danger);
}

:root[data-theme="light"] .track-item {
  background: rgba(255, 255, 255, 0.52);
  border-color: transparent;
  color: var(--text);
}

:root[data-theme="light"] .track-item:hover {
  background: rgba(255, 255, 255, 0.82);
  border-color: rgba(184, 93, 44, 0.20);
}

:root[data-theme="light"] .track-item.active {
  background: linear-gradient(135deg, rgba(184, 93, 44, 0.13), rgba(255, 255, 255, 0.86));
  border-color: rgba(184, 93, 44, 0.34);
  box-shadow: 0 14px 32px rgba(98, 65, 32, 0.13);
}

:root[data-theme="light"] .track-num {
  color: rgba(37, 25, 16, 0.48);
}

:root[data-theme="light"] .track-title {
  color: var(--text);
}

:root[data-theme="light"] .track-thumb {
  box-shadow: 0 8px 18px rgba(67, 43, 25, 0.16);
}

:root[data-theme="light"] .playing-indicator span {
  background: var(--accent);
}

@media (max-width: 720px) {
  :root[data-theme="light"] .site-header,
  :root[data-theme="light"] .player,
  :root[data-theme="light"] .playlist-card,
  :root[data-theme="light"] .content-note {
    box-shadow: 0 12px 30px rgba(98, 65, 32, 0.12);
  }
}
