@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Space+Grotesk:wght@500;600;700&display=swap');

:root {
  color-scheme: dark;
  font-family: 'DM Sans', sans-serif;
  color: #f3f2f6;
  background: #111117;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  --panel: #1b1b24;
  --panel-soft: #20202a;
  --muted: #a3a2ad;
  --line: rgb(243 242 246 / 10%);
  --lime: #d5f568;
  --pink: #ef68c7;
}

* { box-sizing: border-box; }
body { min-width: 320px; min-height: 100vh; margin: 0; }
button, input, select { font: inherit; }
.sidebar { position: fixed; inset: 0 auto 90px 0; z-index: 2; display: flex; width: 248px; flex-direction: column; padding: 30px 20px; background: #0c0c10; }
.logo { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 0 0 48px; color: #f2f1f5; font: 700 24px 'Space Grotesk', sans-serif; letter-spacing: 0; text-align: center; text-decoration: none; }
.logo img { width: 32px; height: 32px; border-radius: 5px; object-fit: cover; }
.logo span { color: var(--pink); }
.navigation { display: grid; gap: 7px; }
.nav-button { display: flex; min-height: 45px; align-items: center; gap: 13px; padding: 0 13px; border: 0; border-radius: 5px; background: transparent; color: #aaa9b4; cursor: pointer; text-align: left; }
.nav-button span { width: 19px; color: #c3c1cd; font-size: 19px; text-align: center; }
.nav-button:hover, .nav-button.active { background: #22212a; color: white; }
.nav-button.active span { color: var(--lime); }
.sidebar-note { display: flex; align-items: center; gap: 9px; margin: auto 0 0; color: var(--muted); font-size: 12px; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--lime); }
.main { width: min(100% - 248px, 1170px); min-height: calc(100vh - 90px); margin-left: 248px; padding: 38px clamp(24px, 5vw, 68px) 125px; }
.page-header { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 32px; }
.eyebrow { margin: 0 0 8px; color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: 1.5px; }
h1, h2 { margin: 0; font-family: 'Space Grotesk', sans-serif; letter-spacing: 0; }
h1 { font-size: 32px; }
h2 { font-size: 23px; }
.search-wrap { display: flex; width: min(100%, 310px); min-height: 43px; align-items: center; gap: 9px; padding: 0 12px; border: 1px solid var(--line); border-radius: 5px; background: #191920; color: var(--muted); }
.search-wrap[hidden] { display: none; }
.search-wrap > span:first-child { font-size: 21px; }
.search-wrap input { width: 100%; border: 0; outline: 0; background: transparent; color: white; font-size: 13px; }
.search-wrap input::placeholder { color: #85848e; }
.ai-panel { position: relative; display: flex; min-height: 230px; align-items: center; justify-content: space-between; overflow: hidden; padding: 32px 38px; border: 1px solid rgb(239 104 199 / 17%); border-radius: 8px; background: linear-gradient(115deg, #302034 0%, #28202f 45%, #202229 100%); }
.ai-copy { position: relative; z-index: 1; max-width: 430px; }
.ai-panel .eyebrow { color: #e795d0; }
.ai-panel h2 { font-size: 31px; }
.ai-panel h2 span { color: var(--pink); }
#aiText { min-height: 22px; margin: 9px 0 17px; color: #c0bbc6; font-size: 13px; }
.mood-actions { display: flex; gap: 9px; }
.mood-button, .add-button { display: inline-flex; min-height: 38px; align-items: center; justify-content: center; gap: 7px; padding: 0 15px; border: 0; border-radius: 5px; background: var(--lime); color: #171a10; cursor: pointer; font-size: 12px; font-weight: 700; }
.mood-button:hover, .add-button:hover { filter: brightness(1.08); }
.mood-button.secondary { border: 1px solid rgb(255 255 255 / 25%); background: transparent; color: white; }
.sound-art { display: flex; height: 120px; align-items: center; gap: 7px; margin: 0 5%; transform: rotate(7deg); }
.sound-art span { width: 7px; height: 45%; border-radius: 8px; background: linear-gradient(var(--pink), #9a77ed); opacity: .75; }
.sound-art span:nth-child(3n) { height: 86%; }
.sound-art span:nth-child(3n + 1) { height: 60%; }
.sound-art span:nth-child(4n) { height: 100%; }
.library-section { margin-top: 38px; }
.playlists-section { margin-top: 38px; }
.discovery-section { margin-top: 38px; }
.discovery-form { display: grid; grid-template-columns: 150px minmax(180px, 1fr) minmax(180px, 1fr) auto; align-items: end; gap: 12px; margin-top: 26px; }
.discovery-form label { display: grid; gap: 7px; color: var(--muted); font-size: 11px; }
.discovery-form input, .discovery-form select { width: 100%; min-height: 40px; padding: 0 12px; border: 1px solid var(--line); border-radius: 5px; outline: 0; background: #191920; color: white; font-size: 13px; }
.discovery-form input:focus, .discovery-form select:focus { border-color: var(--lime); }
.discovery-form [hidden] { display: none; }
.discovery-form .mood-button { min-height: 40px; }
.discovery-status { min-height: 20px; margin: 18px 0 10px; color: var(--muted); font-size: 12px; }
.playlist-create-form, .playlist-add-form { display: flex; flex-wrap: wrap; align-items: end; gap: 10px; margin-top: 22px; }
.playlist-create-form input, .playlist-add-form select { min-width: min(100%, 240px); min-height: 40px; padding: 0 12px; border: 1px solid var(--line); border-radius: 5px; outline: 0; background: #191920; color: white; font-size: 13px; }
.playlist-create-form input:focus, .playlist-add-form select:focus { border-color: var(--lime); }
.playlist-layout { display: grid; grid-template-columns: minmax(200px, 0.7fr) minmax(0, 1.5fr); gap: 30px; margin-top: 18px; }
.playlist-list { display: grid; align-content: start; gap: 5px; }
.playlist-list-item { display: flex; align-items: center; gap: 5px; }
.playlist-select { min-width: 0; flex: 1; padding: 10px 12px; border: 1px solid transparent; border-radius: 5px; background: transparent; color: var(--muted); cursor: pointer; text-align: left; }
.playlist-select:hover, .playlist-select.active { border-color: var(--line); background: var(--panel); color: white; }
.playlist-detail { min-width: 0; }
.playlist-detail h3 { margin: 0; font: 600 18px 'Space Grotesk', sans-serif; }
.playlist-add-form[hidden] { display: none; }
.track-copy { display: grid; min-width: 0; gap: 4px; }
.track-artist { overflow: hidden; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.spotify-cover { width: 38px; height: 38px; flex: 0 0 38px; border-radius: 5px; object-fit: cover; }
.spotify-link { color: var(--lime); text-decoration: none; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; }
.section-heading h2 { display: flex; align-items: center; gap: 10px; }
.count { display: inline-grid; min-width: 24px; height: 22px; place-items: center; border-radius: 4px; background: #292832; color: var(--muted); font: 500 11px 'DM Sans', sans-serif; }
.add-button span { font-size: 20px; line-height: 1; }
.track-heading { display: flex; justify-content: space-between; margin-top: 26px; padding: 0 12px 10px; border-bottom: 1px solid var(--line); color: #85848e; font-size: 9px; font-weight: 700; letter-spacing: 1px; }
.songs { display: grid; }
.track { display: flex; min-height: 62px; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 12px; border-bottom: 1px solid var(--line); }
.track:hover { background: rgb(255 255 255 / 2%); }
.track-info { display: flex; min-width: 0; align-items: center; gap: 12px; }
.track-name { overflow: hidden; color: #ecebf0; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.cover-mark { display: grid; width: 38px; height: 38px; flex: 0 0 38px; place-items: center; border-radius: 5px; background: #34283a; color: var(--pink); font-size: 17px; }
.track-actions { display: flex; flex: 0 0 auto; gap: 5px; }
.icon-button { display: grid; width: 34px; height: 34px; place-items: center; border: 0; border-radius: 5px; background: transparent; color: #aaa9b4; cursor: pointer; font-size: 17px; }
.icon-button:hover { background: #292832; color: white; }
.icon-button.favorite.active { color: var(--pink); }
.empty-state { padding: 28px 12px; color: var(--muted); font-size: 13px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; clip-path: inset(50%); }