:root{
  --bg: #060b1a;
  --bg-elevated: #0d1730;
  --surface: #101c3a;
  --surface-hover: #16264d;
  --accent: #3b82ff;
  --accent-2: #5eead4;
  --accent-dim: #1e3a6e;
  --text: #eaf1ff;
  --text-muted: #8298c2;
  --text-faint: #4c5f87;
  --line: rgba(255,255,255,0.06);
  --radius: 14px;
}
*{ box-sizing: border-box; }
html,body{ margin:0; padding:0; }
body{
  background: radial-gradient(120% 100% at 50% -10%, #0e1c40 0%, #060b1a 55%), var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
}
.display{ font-family: 'Space Grotesk', 'Inter', sans-serif; }

/* ---------- Splash ---------- */
#splash{
  position: fixed; inset: 0; z-index: 100;
  display:flex; flex-direction:column; align-items:center; justify-content:center;
  background: radial-gradient(120% 100% at 50% 20%, #0f2050 0%, #060b1a 60%);
  transition: opacity .6s ease, visibility .6s ease;
}
#splash.hide{ opacity:0; visibility:hidden; pointer-events:none; }
.splash-mark{
  display:flex; align-items:flex-end; gap:4px; height:34px; margin-bottom:22px;
}
.splash-mark span{
  width:6px; border-radius:3px;
  background: linear-gradient(180deg, var(--accent-2), var(--accent));
  animation: wave 1.1s ease-in-out infinite;
}
.splash-mark span:nth-child(1){ height:14px; animation-delay: 0s; }
.splash-mark span:nth-child(2){ height:30px; animation-delay: .15s; }
.splash-mark span:nth-child(3){ height:10px; animation-delay: .3s; }
.splash-mark span:nth-child(4){ height:24px; animation-delay: .45s; }
.splash-mark span:nth-child(5){ height:16px; animation-delay: .6s; }
@keyframes wave{
  0%,100%{ transform: scaleY(.4); }
  50%{ transform: scaleY(1); }
}
.splash-title{ font-size: 22px; font-weight: 700; letter-spacing: .01em; }
.splash-sub{ color: var(--text-muted); font-size: 13px; margin-top: 8px; }

/* ---------- App shell ---------- */
#app{ max-width: 460px; margin: 0 auto; padding: 0 18px 110px; min-height:100vh; }

header.top{
  position: sticky; top:0; z-index: 20;
  background: linear-gradient(180deg, var(--bg) 70%, rgba(6,11,26,0));
  padding: 18px 0 10px;
}
.top-row{ display:flex; align-items:center; justify-content:space-between; margin-bottom:14px; }
.brand{ display:flex; align-items:center; gap:9px; }
.brand-mark{ display:flex; align-items:flex-end; gap:2px; height:18px; }
.brand-mark span{ width:3.5px; border-radius:2px; background: linear-gradient(180deg, var(--accent-2), var(--accent)); }
.brand-mark span:nth-child(1){ height:8px; }
.brand-mark span:nth-child(2){ height:16px; }
.brand-mark span:nth-child(3){ height:11px; }
.brand-name{ font-family:'Space Grotesk'; font-weight:700; font-size:17px; letter-spacing: .01em; }
.avatar{
  width:32px; height:32px; border-radius:50%;
  background: linear-gradient(135deg, var(--accent), #1a3a8f);
  display:flex; align-items:center; justify-content:center;
  font-size:13px; font-weight:600;
}
.search{
  display:flex; align-items:center; gap:10px;
  background: var(--surface); border:1px solid var(--line);
  border-radius: 12px; padding: 11px 14px;
}
.search svg{ flex-shrink:0; color: var(--text-faint); }
.search input{
  background:none; border:none; outline:none; color:var(--text);
  font-family:'Inter'; font-size:14px; width:100%;
}
.search input::placeholder{ color: var(--text-faint); }

.section{ margin-top: 26px; }
.section-head{ display:flex; align-items:baseline; justify-content:space-between; margin-bottom: 12px; }
.section-head h2{ font-family:'Space Grotesk'; font-size:16px; font-weight:600; margin:0; }
.section-head .see-all{ font-size:12px; color: var(--text-muted); }

/* mood chips */
.chips{ display:flex; gap:8px; overflow-x:auto; padding-bottom:2px; scrollbar-width:none; }
.chips::-webkit-scrollbar{ display:none; }
.chip{
  flex-shrink:0; padding: 7px 14px; border-radius: 999px;
  background: var(--surface); border:1px solid var(--line);
  font-size: 12.5px; color: var(--text-muted); white-space:nowrap; cursor:pointer;
}
.chip.active{ background: var(--accent-dim); color: var(--accent-2); border-color: transparent; }

/* playlist cards */
.card-row{ display:flex; gap:14px; overflow-x:auto; padding-bottom:4px; scrollbar-width:none; }
.card-row::-webkit-scrollbar{ display:none; }
.p-card{ flex-shrink:0; width: 130px; cursor:pointer; }
.p-card .art{
  width:130px; height:130px; border-radius: var(--radius);
  position: relative; overflow:hidden; margin-bottom:9px;
  display:flex; align-items:center; justify-content:center;
}
.p-card .art svg{ opacity:.5; }
.p-card .name{ font-size:13px; font-weight:600; line-height:1.3; }
.p-card .sub{ font-size:11.5px; color: var(--text-faint); margin-top:2px; }

/* track list */
.track{
  display:flex; align-items:center; gap:12px;
  padding: 9px 6px; border-radius: 10px; cursor:pointer;
}
.track:hover, .track:active{ background: var(--surface); }
.track .art-sm{
  width:46px; height:46px; border-radius:9px; flex-shrink:0;
  display:flex; align-items:center; justify-content:center;
}
.track-info{ flex:1; min-width:0; }
.track-info .t-title{ font-size:14px; font-weight:600; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.track-info .t-artist{ font-size:12.5px; color: var(--text-muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; margin-top:1px; }
.track .t-dur{ font-size:12px; color: var(--text-faint); flex-shrink:0; }
.track.playing .t-title{ color: var(--accent-2); }
.track .eq{ display:flex; align-items:flex-end; gap:2px; height:12px; width:12px; flex-shrink:0; }
.track .eq span{ width:2.5px; background: var(--accent-2); border-radius:1px; animation: wave .9s ease-in-out infinite; }
.track .eq span:nth-child(1){ height:5px; animation-delay:0s; }
.track .eq span:nth-child(2){ height:11px; animation-delay:.2s; }
.track .eq span:nth-child(3){ height:7px; animation-delay:.4s; }

/* ---------- Player bar ---------- */
#player-bar{
  position: fixed; left:0; right:0; bottom:0; z-index: 40;
  display:flex; justify-content:center;
  transform: translateY(0);
  transition: transform .35s cubic-bezier(.4,0,.2,1);
}
#player-bar.expanded{ transform: translateY(-100vh); }
.bar-inner{
  width:100%; max-width: 460px; margin: 0 12px 12px;
  background: linear-gradient(135deg, #16264d, #0e1a38);
  border: 1px solid var(--line);
  border-radius: 16px; padding: 9px 12px;
  display:flex; align-items:center; gap:11px;
  box-shadow: 0 12px 30px rgba(0,0,0,.4);
  cursor:pointer;
}
.bar-art{ width:38px; height:38px; border-radius:8px; flex-shrink:0; display:flex; align-items:center; justify-content:center; }
.bar-info{ flex:1; min-width:0; }
.bar-info .b-title{ font-size:13px; font-weight:600; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.bar-info .b-artist{ font-size:11.5px; color: var(--text-muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.bar-controls{ display:flex; align-items:center; gap:4px; }
.icon-btn{
  background:none; border:none; color: var(--text); cursor:pointer;
  width:34px; height:34px; display:flex; align-items:center; justify-content:center;
  border-radius:50%; flex-shrink:0;
}
.icon-btn:active{ background: rgba(255,255,255,.08); }
.bar-progress{
  position:absolute; left:12px; right:12px; bottom:-1px; height:2px;
  background: rgba(255,255,255,.08); border-radius:2px; overflow:hidden;
}
.bar-progress-fill{ height:100%; background: var(--accent-2); width:0%; }

/* ---------- Full player ---------- */
#full-player{
  position: fixed; inset:0; z-index:30; transform: translateY(100%);
  background: radial-gradient(120% 90% at 50% 0%, #142a5c 0%, #060b1a 65%), var(--bg);
  transition: transform .35s cubic-bezier(.4,0,.2,1);
  display:flex; flex-direction:column; padding: 18px 22px 26px;
}
#full-player.open{ transform: translateY(0); }
.fp-top{ display:flex; align-items:center; justify-content:space-between; }
.fp-top button{ background:none; border:none; color:var(--text-muted); }
.fp-top .fp-label{ font-size:11.5px; color:var(--text-muted); letter-spacing:.04em; }
.fp-art-wrap{ flex:1; display:flex; align-items:center; justify-content:center; padding: 20px 0; }
.fp-art{
  width: min(76vw, 300px); height: min(76vw, 300px); border-radius: 22px;
  display:flex; align-items:center; justify-content:center;
  box-shadow: 0 20px 60px rgba(20,60,180,.35);
}
.fp-meta{ text-align:left; margin-bottom: 18px; }
.fp-meta .f-title{ font-family:'Space Grotesk'; font-size:21px; font-weight:700; }
.fp-meta .f-artist{ font-size:14px; color:var(--text-muted); margin-top:3px; }
.fp-seek{ width:100%; }
.fp-seek input[type=range]{
  width:100%; -webkit-appearance:none; appearance:none;
  height:4px; border-radius:2px; background: rgba(255,255,255,.1); outline:none;
}
.fp-seek input[type=range]::-webkit-slider-thumb{
  -webkit-appearance:none; width:13px; height:13px; border-radius:50%;
  background: var(--accent-2); cursor:pointer; box-shadow: 0 0 0 4px rgba(94,234,212,.15);
}
.fp-times{ display:flex; justify-content:space-between; font-size:11px; color:var(--text-faint); margin-top:6px; }
.fp-controls{ display:flex; align-items:center; justify-content:space-between; margin-top: 22px; }
.fp-controls .icon-btn{ width:48px; height:48px; }
.fp-play{
  width:64px; height:64px; border-radius:50%;
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  display:flex; align-items:center; justify-content:center; border:none; cursor:pointer;
  color:#04121f;
}
.fp-viz{ display:flex; align-items:flex-end; justify-content:center; gap:3px; height:26px; margin-top:22px; }
.fp-viz span{ width:3px; border-radius:2px; background: linear-gradient(180deg, var(--accent-2), var(--accent)); opacity:.85; }

::selection{ background: var(--accent-dim); }
