:root {
  color-scheme: dark;
  --bg: #101113;
  --panel: #181b1f;
  --panel-strong: #20252a;
  --text: #f4f6f2;
  --muted: #a9b1a7;
  --line: #31373d;
  --green: #39d879;
  --coral: #ef7a63;
  --gold: #dfbd5c;
  --violet: #9d8df1;
  --blue: #5fb4d4;
  --shadow: 0 20px 70px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

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

button,
input {
  font: inherit;
}

.shell {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  border-right: 1px solid var(--line);
  background: #0b0c0e;
  padding: 24px 18px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 36px;
  font-weight: 800;
}

.brand-mark {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 35%, var(--green) 0 24%, transparent 25%),
    linear-gradient(135deg, var(--coral), var(--violet));
  box-shadow: 0 0 0 3px rgba(57, 216, 121, 0.12);
}

.playlist-nav {
  display: grid;
  gap: 8px;
  margin-top: 28px;
}

.playlist-tab {
  width: 100%;
  min-height: 44px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  text-align: left;
  padding: 10px 12px;
  cursor: pointer;
}

.playlist-tab:hover,
.playlist-tab.active {
  border-color: var(--line);
  background: var(--panel);
  color: var(--text);
}

.workspace {
  padding: 28px;
  overflow: hidden;
}

.topbar,
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 8px;
  font-size: clamp(2rem, 3.6vw, 4.2rem);
  line-height: 1;
}

h2 {
  margin-bottom: 8px;
}

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

.icon-button,
.round-button {
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--panel);
  color: var(--text);
  cursor: pointer;
}

.icon-button {
  width: 44px;
  height: 44px;
}

.round-button {
  width: 48px;
  height: 48px;
}

.refresh-icon,
.previous-icon,
.next-icon {
  display: block;
  position: relative;
}

.refresh-icon {
  width: 18px;
  height: 18px;
  border: 2px solid var(--text);
  border-right-color: transparent;
  border-radius: 50%;
}

.refresh-icon::after {
  content: "";
  position: absolute;
  right: -2px;
  top: 0;
  border: 5px solid transparent;
  border-left-color: var(--text);
  transform: rotate(-35deg);
}

.previous-icon,
.next-icon {
  width: 18px;
  height: 18px;
}

.previous-icon::before,
.previous-icon::after,
.next-icon::before,
.next-icon::after {
  content: "";
  position: absolute;
  top: 2px;
  width: 0;
  height: 0;
  border-top: 7px solid transparent;
  border-bottom: 7px solid transparent;
}

.previous-icon::before,
.previous-icon::after {
  border-right: 9px solid var(--text);
}

.previous-icon::before {
  left: 0;
}

.previous-icon::after {
  left: 7px;
}

.next-icon::before,
.next-icon::after {
  border-left: 9px solid var(--text);
}

.next-icon::before {
  right: 7px;
}

.next-icon::after {
  right: 0;
}

.hero {
  display: grid;
  grid-template-columns: minmax(180px, 340px) minmax(0, 1fr);
  gap: 28px;
  align-items: end;
  margin: 28px 0;
  padding: 24px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: linear-gradient(135deg, rgba(57, 216, 121, 0.14), rgba(239, 122, 99, 0.08) 48%, rgba(95, 180, 212, 0.12));
}

.cover {
  aspect-ratio: 1;
  min-height: 180px;
  border-radius: 8px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.cover::before,
.cover::after {
  content: "";
  position: absolute;
  inset: 18%;
  border: 2px solid rgba(255, 255, 255, 0.55);
}

.cover::after {
  inset: 30%;
  transform: rotate(45deg);
}

.cover-kotlin {
  background: linear-gradient(135deg, var(--green), var(--violet));
}

.cover-compose {
  background: linear-gradient(135deg, var(--coral), var(--gold));
}

.cover-routes {
  background: linear-gradient(135deg, var(--blue), var(--green));
}

.cover-cloud {
  background: linear-gradient(135deg, var(--violet), var(--coral));
}

.now {
  min-width: 0;
}

.lyric {
  min-height: 48px;
  color: var(--text);
  font-size: 1.05rem;
  line-height: 1.5;
}

.progress-row {
  display: grid;
  grid-template-columns: 44px minmax(120px, 1fr) 44px;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 0.9rem;
}

input[type="range"] {
  width: 100%;
  accent-color: var(--green);
}

.controls {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
}

.play-button {
  min-width: 112px;
  min-height: 48px;
  border: 0;
  border-radius: 999px;
  background: var(--green);
  color: #07100b;
  font-weight: 900;
  cursor: pointer;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.8fr);
  gap: 24px;
}

.section-head {
  min-height: 36px;
  margin-bottom: 12px;
}

.section-head h2 {
  margin: 0;
  font-size: 1.15rem;
}

.section-head span {
  color: var(--muted);
  font-size: 0.9rem;
}

.song-list,
.feed {
  display: grid;
  gap: 10px;
}

.song-row,
.feed-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 64px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 12px;
}

.song-row {
  cursor: pointer;
}

.song-row:hover,
.song-row.active {
  background: var(--panel-strong);
  border-color: rgba(57, 216, 121, 0.55);
}

.track-index {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #0f1114;
  color: var(--muted);
}

.song-meta,
.feed-meta {
  min-width: 0;
}

.song-meta strong,
.feed-meta strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.song-meta span,
.feed-meta span {
  color: var(--muted);
  font-size: 0.92rem;
}

.duration {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.error {
  border: 1px solid rgba(239, 122, 99, 0.6);
  border-radius: 8px;
  background: rgba(239, 122, 99, 0.1);
  padding: 12px;
  color: #ffd8d0;
}

@media (max-width: 860px) {
  .shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .playlist-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .workspace {
    padding: 20px;
  }

  .hero,
  .content-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .playlist-nav {
    grid-template-columns: 1fr;
  }

  .topbar {
    align-items: flex-start;
  }

  .hero {
    padding: 18px 0;
    background: transparent;
  }

  .song-row,
  .feed-row {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .duration {
    grid-column: 2;
  }
}
