/* ============================================================
   Levelroute Music — Apple-style dark futuristic player
   ============================================================ */

:root {
  --bg: #050507;
  --bg-2: #0a0a0f;
  --surface: rgba(255, 255, 255, .055);
  --surface-2: rgba(255, 255, 255, .085);
  --line: rgba(255, 255, 255, .09);
  --text: #f5f5f7;
  --muted: #8e8e98;
  --muted-2: #5e5e68;
  --accent: #7b5cff;
  --accent-2: #b98cff;
  --danger: #ff5c7a;
  --green: #3ddc97;
  --ease: cubic-bezier(.32, .72, 0, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --top: env(safe-area-inset-top, 0px);
  --bottom: env(safe-area-inset-bottom, 0px);
  --left: env(safe-area-inset-left, 0px);
  --right: env(safe-area-inset-right, 0px);
  --tabh: calc(58px + var(--bottom));
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--bg); overscroll-behavior: none; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", Inter, system-ui, sans-serif;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  user-select: none;
  -webkit-user-select: none;
  overflow: hidden;
}
button, input { font: inherit; color: inherit; }
button { border: 0; background: none; cursor: pointer; padding: 0; }
img { display: block; }
.hidden, [hidden] { display: none !important; }

#app {
  position: fixed; inset: 0;
  display: flex; flex-direction: column;
  background:
    radial-gradient(120% 70% at 50% -10%, rgba(123, 92, 255, .13), transparent 60%),
    radial-gradient(90% 50% at 100% 0%, rgba(53, 224, 255, .06), transparent 55%),
    var(--bg);
  padding-top: var(--top);
}

/* ---------------- topbar ---------------- */
.topbar {
  height: 56px; flex: 0 0 56px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 calc(20px + var(--right)) 0 calc(20px + var(--left));
  z-index: 5;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 11px;
  background: linear-gradient(145deg, #1b1630, #0c0b14);
  border: 1px solid rgba(255,255,255,.14);
  display: grid; place-items: center;
  box-shadow: 0 6px 20px rgba(123,92,255,.25), inset 0 1px 0 rgba(255,255,255,.1);
}
.brand-eq { display: flex; align-items: flex-end; gap: 2.5px; height: 15px; }
.brand-eq i { width: 2.5px; border-radius: 2px; background: linear-gradient(180deg, #c4a5ff, #7b5cff); animation: eq 1s ease-in-out infinite alternate; }
.brand-eq i:nth-child(1) { height: 7px; animation-delay: -.2s; }
.brand-eq i:nth-child(2) { height: 14px; animation-delay: -.6s; }
.brand-eq i:nth-child(3) { height: 10px; animation-delay: -.4s; }
.brand-eq i:nth-child(4) { height: 5px; animation-delay: -.8s; }
.brand-text { display: flex; flex-direction: column; line-height: 1; letter-spacing: -.3px; }
.brand-text b { font-size: 14px; font-weight: 700; }
.brand-text small { font-size: 8px; letter-spacing: 2.6px; color: var(--muted); margin-top: 3px; font-weight: 700; }
.topbar-actions { display: flex; align-items: center; gap: 8px; }
.chip {
  display: flex; align-items: center; gap: 6px;
  height: 30px; padding: 0 11px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line);
  font-size: 9px; font-weight: 800; letter-spacing: 1px; color: var(--muted);
}
.chip-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 8px var(--green); }
.chip.off { color: var(--danger); }
.chip.off .chip-dot { background: var(--danger); box-shadow: 0 0 8px var(--danger); }
.icon-btn {
  width: 38px; height: 38px; display: grid; place-items: center;
  border-radius: 50%; background: var(--surface); border: 1px solid var(--line);
  transition: transform .2s var(--ease), background .2s;
}
.icon-btn:active { transform: scale(.9); background: var(--surface-2); }
.icon-btn svg { width: 18px; height: 18px; }

/* ---------------- views ---------------- */
#view { position: relative; flex: 1; min-height: 0; overflow: hidden; }
.screen {
  position: absolute; inset: 0; overflow-y: auto; overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding: 6px calc(20px + var(--right)) calc(var(--tabh) + 118px) calc(20px + var(--left));
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: opacity .28s var(--ease), transform .38s var(--ease), visibility .28s;
}
.screen.active { opacity: 1; visibility: visible; transform: none; }
.screen::-webkit-scrollbar, .hscroll::-webkit-scrollbar, .panel-body::-webkit-scrollbar, .sheet-body::-webkit-scrollbar, .lyrics-scroll::-webkit-scrollbar { display: none; }

.greeting { margin: 14px 0 20px; }
.eyebrow { margin: 0 0 6px; font-size: 11px; font-weight: 700; letter-spacing: 1.4px; text-transform: uppercase; color: var(--muted); }
.greeting h1 { margin: 0; font-size: 30px; line-height: 1.05; letter-spacing: -1.2px; font-weight: 750; }

/* ---------------- wave card ---------------- */
.wave-card {
  position: relative; width: 100%; min-height: 176px; border-radius: 28px;
  padding: 22px; text-align: left; overflow: hidden; isolation: isolate;
  background: linear-gradient(135deg, #17102e, #0a0a14 65%);
  border: 1px solid rgba(255,255,255,.12);
  box-shadow: 0 18px 50px rgba(0,0,0,.5), inset 0 1px 0 rgba(255,255,255,.08);
  transition: transform .35s var(--ease), box-shadow .35s;
}
.wave-card:active { transform: scale(.975); }
.wave-aura {
  position: absolute; inset: -40% -10% auto auto; width: 260px; height: 260px; border-radius: 50%;
  background: radial-gradient(circle, rgba(123,92,255,.6), rgba(123,92,255,0) 68%);
  filter: blur(18px); animation: breathe 6s ease-in-out infinite; z-index: -1;
}
.wave-orbit { position: absolute; border-radius: 50%; border: 1px solid rgba(180,150,255,.22); z-index: -1; }
.wave-orbit-1 { width: 230px; height: 230px; right: -70px; top: -80px; border-style: dashed; animation: spin 26s linear infinite; }
.wave-orbit-2 { width: 150px; height: 150px; right: -30px; top: -40px; border-color: rgba(53,224,255,.25); animation: spin 18s linear infinite reverse; }
.wave-content { display: flex; flex-direction: column; position: relative; z-index: 2; }
.wave-badge { font-size: 9px; font-weight: 800; letter-spacing: 1.8px; color: #c6b2ff; }
.wave-title { font-size: 27px; font-weight: 780; letter-spacing: -1px; margin: 8px 0 3px; }
.wave-desc { font-size: 12px; color: rgba(255,255,255,.6); max-width: 200px; line-height: 1.35; }
.wave-cta { display: inline-flex; align-items: center; gap: 8px; margin-top: 18px; font-size: 13px; font-weight: 700; }
.wave-play { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: #fff; color: #0b0716; box-shadow: 0 6px 18px rgba(0,0,0,.4); }
.wave-play svg { width: 16px; height: 16px; }
.wave-eq { position: absolute; right: 18px; bottom: 20px; display: flex; align-items: flex-end; gap: 3px; height: 42px; opacity: .75; }
.wave-eq i { width: 3px; border-radius: 3px; background: linear-gradient(180deg, #b98cff, #35e0ff); height: 8px; }
.wave-card.playing .wave-eq i { animation: eq 0.8s ease-in-out infinite alternate; }
.wave-eq i:nth-child(3n) { animation-delay: -.3s; }
.wave-eq i:nth-child(3n+1) { animation-delay: -.6s; }

/* ---------------- sections ---------------- */
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin: 30px 2px 14px; }
.section-head h2 { margin: 0; font-size: 20px; font-weight: 730; letter-spacing: -.6px; }
.link-btn { font-size: 12px; font-weight: 650; color: var(--muted); }
.link-btn:active { color: var(--text); }
.count { font-size: 11px; color: var(--muted-2); }

.hscroll { display: flex; gap: 12px; overflow-x: auto; margin: 0 calc(-20px - var(--right)) 0 calc(-20px - var(--left)); padding: 0 calc(20px + var(--left)) 4px calc(20px + var(--left)); scroll-snap-type: x mandatory; }
.recent-card { flex: 0 0 132px; scroll-snap-align: start; text-align: left; }
.recent-card .thumb { width: 132px; height: 132px; border-radius: 18px; overflow: hidden; background: #14141c; box-shadow: 0 10px 24px rgba(0,0,0,.4); position: relative; border: 1px solid rgba(255,255,255,.07); }
.recent-card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease-out); }
.recent-card:active .thumb img { transform: scale(1.08); }
.recent-card .thumb .play-over { position: absolute; right: 9px; bottom: 9px; width: 32px; height: 32px; border-radius: 50%; background: rgba(0,0,0,.55); backdrop-filter: blur(8px); display: grid; place-items: center; color: #fff; }
.recent-card .play-over svg { width: 14px; height: 14px; }
.recent-card .rt { font-size: 12px; font-weight: 650; margin: 9px 2px 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.recent-card .ra { font-size: 10px; color: var(--muted); margin: 0 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.pl-card { text-align: left; padding: 10px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); transition: transform .25s var(--ease), background .25s; }
.pl-card:active { transform: scale(.96); background: var(--surface-2); }
.pl-art { width: 100%; aspect-ratio: 1; border-radius: 13px; overflow: hidden; background: #14141c; position: relative; box-shadow: 0 8px 20px rgba(0,0,0,.35); }
.pl-art img { width: 100%; height: 100%; object-fit: cover; }
.pl-art .pl-count { position: absolute; left: 8px; bottom: 7px; font-size: 10px; font-weight: 700; padding: 3px 7px; border-radius: 99px; background: rgba(0,0,0,.55); backdrop-filter: blur(8px); }
.pl-card h4 { margin: 10px 2px 2px; font-size: 13px; font-weight: 680; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-card p { margin: 0 2px; font-size: 10px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------------- track list ---------------- */
.track-list { display: flex; flex-direction: column; gap: 2px; }
.track {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 9px 8px; border-radius: 14px; text-align: left;
  transition: background .2s, transform .2s var(--ease);
}
.track:active { background: var(--surface); transform: scale(.99); }
.track.current { background: rgba(123,92,255,.14); }
.track-art { width: 46px; height: 46px; flex: 0 0 46px; border-radius: 10px; overflow: hidden; background: #16161e; position: relative; }
.track-art img { width: 100%; height: 100%; object-fit: cover; }
.track-art .playing-ind { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(0,0,0,.5); }
.track-art .playing-ind i { width: 3px; height: 14px; background: #fff; border-radius: 2px; animation: eq .7s ease-in-out infinite alternate; margin: 0 1.5px; }
.track-main { flex: 1; min-width: 0; }
.track-title { font-size: 13.5px; font-weight: 640; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.track.current .track-title { color: var(--accent-2); }
.track-sub { font-size: 11px; color: var(--muted); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.track-sub .badge-preview, .track-sub .badge-off { font-size: 8px; font-weight: 800; letter-spacing: .5px; padding: 1px 5px; border-radius: 4px; margin-right: 5px; vertical-align: 1px; }
.badge-preview { background: rgba(255,200,87,.15); color: #ffc857; }
.badge-off { background: rgba(61,220,151,.15); color: var(--green); }
.track-more { width: 34px; height: 34px; display: grid; place-items: center; color: var(--muted); border-radius: 50%; }
.track-more:active { background: var(--surface-2); color: var(--text); }
.track-more svg { width: 18px; height: 18px; }

/* ---------------- empty ---------------- */
.empty-state { text-align: center; padding: 40px 16px 20px; }
.empty-orb { width: 110px; height: 110px; margin: 0 auto 24px; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(circle at 35% 30%, #2a1b50, #0a0912 70%); border: 1px solid rgba(255,255,255,.12); box-shadow: 0 0 60px rgba(123,92,255,.28), inset 0 0 30px rgba(123,92,255,.12); animation: breathe 5s ease-in-out infinite; }
.empty-note { font-size: 46px; color: #b9a2ff; text-shadow: 0 0 24px rgba(123,92,255,.8); }
.empty-state h3 { margin: 0 0 10px; font-size: 21px; letter-spacing: -.5px; }
.empty-state p { margin: 0 auto 24px; max-width: 300px; font-size: 13px; line-height: 1.5; color: var(--muted); }
.empty-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.btn { height: 44px; padding: 0 20px; border-radius: 14px; font-size: 13px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; gap: 8px; transition: transform .2s var(--ease), opacity .2s; }
.btn:active { transform: scale(.95); }
.btn-primary { background: linear-gradient(135deg, #a77bff, #6b4bff); color: #fff; box-shadow: 0 10px 26px rgba(123,92,255,.35); }
.btn-ghost { background: var(--surface); border: 1px solid var(--line); }
.btn-danger { background: rgba(255,92,122,.12); color: var(--danger); border: 1px solid rgba(255,92,122,.25); }

/* ---------------- search ---------------- */
.search-head { padding: 10px 0 6px; }
.search-field { display: flex; align-items: center; gap: 10px; height: 46px; border-radius: 15px; background: var(--surface); border: 1px solid var(--line); padding: 0 14px; }
.search-icon { display: grid; place-items: center; color: var(--muted); }
.search-icon svg { width: 18px; height: 18px; }
.search-field input { flex: 1; min-width: 0; background: none; border: 0; outline: none; font-size: 14px; -webkit-user-select: text; user-select: text; }
.search-field input::placeholder { color: var(--muted-2); }
.search-clear { font-size: 22px; color: var(--muted); line-height: 1; }
.search-hint { text-align: center; padding: 60px 20px; color: var(--muted); font-size: 13px; line-height: 1.6; }
.search-hint p { margin: 0 0 12px; }
.spinner { width: 26px; height: 26px; border-radius: 50%; border: 2px solid rgba(255,255,255,.15); border-top-color: var(--accent); animation: spin .8s linear infinite; margin: 40px auto; }

/* ---------------- segmented / library ---------------- */
.segmented { display: flex; gap: 4px; padding: 4px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); margin: 0 0 18px; overflow-x: auto; }
.seg { flex: 1; min-width: max-content; height: 34px; padding: 0 12px; border-radius: 10px; font-size: 11.5px; font-weight: 650; color: var(--muted); transition: .25s var(--ease); }
.seg.active { background: rgba(255,255,255,.12); color: var(--text); box-shadow: 0 2px 10px rgba(0,0,0,.25); }

/* ---------------- mini player ---------------- */
.mini {
  position: absolute; left: calc(10px + var(--left)); right: calc(10px + var(--right));
  bottom: calc(var(--tabh) + 6px); height: 62px; z-index: 20;
  display: flex; align-items: center; gap: 10px; padding: 0 10px;
  border-radius: 18px; border: 1px solid rgba(255,255,255,.13);
  background: rgba(24, 22, 34, .82); backdrop-filter: blur(26px) saturate(180%);
  -webkit-backdrop-filter: blur(26px) saturate(180%);
  box-shadow: 0 14px 36px rgba(0,0,0,.55), inset 0 1px 0 rgba(255,255,255,.08);
  overflow: hidden; cursor: pointer;
  animation: miniIn .5s var(--ease) both;
}
.mini-progress { position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: rgba(255,255,255,.08); }
.mini-progress span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
.mini-cover { width: 44px; height: 44px; flex: 0 0 44px; border-radius: 11px; overflow: hidden; background: #14141c; }
.mini-cover img { width: 100%; height: 100%; object-fit: cover; }
.mini-info { flex: 1; min-width: 0; text-align: left; }
.mini-title { display: block; font-size: 12.5px; font-weight: 680; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-artist { display: block; font-size: 10.5px; color: var(--muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-like svg { width: 17px; height: 17px; }
.mini-like.liked { color: var(--danger); }
.play-btn { width: 40px; height: 40px; flex: 0 0 40px; border-radius: 50%; display: grid; place-items: center; background: #fff; color: #08060f; box-shadow: 0 4px 14px rgba(0,0,0,.4); transition: transform .2s var(--ease); }
.play-btn:active { transform: scale(.9); }
.play-btn svg { width: 17px; height: 17px; }

/* ---------------- tabbar ---------------- */
.tabbar {
  position: absolute; left: 0; right: 0; bottom: 0; height: var(--tabh);
  padding-bottom: var(--bottom); z-index: 25;
  display: flex; align-items: stretch;
  background: rgba(10, 9, 15, .78); backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  border-top: 1px solid rgba(255,255,255,.08);
}
.tab { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-size: 9.5px; font-weight: 650; color: var(--muted-2); transition: color .2s; }
.tab.active { color: var(--text); }
.tab-ico { height: 23px; display: grid; place-items: center; }
.tab-ico svg { width: 21px; height: 21px; transition: transform .3s var(--ease); }
.tab.active .tab-ico svg { transform: translateY(-1px) scale(1.07); }
.tab.active .tab-ico::after { content: ''; position: absolute; width: 4px; height: 4px; border-radius: 50%; background: var(--accent); margin-top: 22px; box-shadow: 0 0 8px var(--accent); }

/* ============================================================
   Full-screen now playing
   ============================================================ */
.np {
  position: fixed; inset: 0; z-index: 60; visibility: hidden; pointer-events: none;
  background: #06060b; opacity: 0;
  transform: translateY(100%);
  transition: transform .58s var(--ease), opacity .4s, visibility .58s;
  overflow: hidden;
}
.np.open { visibility: visible; pointer-events: auto; opacity: 1; transform: none; }
.np-bg { position: absolute; inset: -20%; filter: blur(60px) saturate(160%); opacity: .5; transform: scale(1.2); transition: background .8s ease; }
.np-glow { position: absolute; width: 130%; height: 60%; left: -15%; top: -10%; background: radial-gradient(ellipse at 50% 0%, var(--accent), transparent 65%); opacity: .22; filter: blur(30px); transition: background .8s; }
.np-inner { position: relative; z-index: 2; height: 100%; display: flex; flex-direction: column; padding: calc(var(--top) + 12px) calc(22px + var(--right)) calc(var(--bottom) + 22px) calc(22px + var(--left)); }
.np-head { display: flex; align-items: center; justify-content: space-between; flex: 0 0 auto; }
.np-head .icon-btn { background: rgba(255,255,255,.07); }
.np-context { display: flex; flex-direction: column; align-items: center; gap: 3px; }
.np-context small { font-size: 9px; font-weight: 800; letter-spacing: 1.6px; color: var(--muted); }
.np-context span { font-size: 12px; font-weight: 650; }
.np-context span.accent { color: var(--accent-2); }

.np-stage { flex: 1; min-height: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 26px; padding: 10px 0; }
.np-cover-wrap { position: relative; width: min(70vw, 320px); aspect-ratio: 1; flex-shrink: 1; min-height: 0; }
.np-cover {
  position: absolute; inset: 0; border-radius: 22px; overflow: hidden;
  box-shadow: 0 30px 70px rgba(0,0,0,.65), 0 0 0 1px rgba(255,255,255,.1), 0 0 60px var(--accent)22;
  background: #111;
  transition: transform .5s var(--ease), opacity .4s;
}
.np-cover img { width: 100%; height: 100%; object-fit: cover; }
.np-cover.spin { animation: coverSpin 24s linear infinite; border-radius: 50%; }
.np-cover-wrap.playing .np-cover:not(.spin) { transform: scale(1.02); }
.np-vinyl { position: absolute; inset: 8%; border-radius: 50%; border: 1px solid rgba(255,255,255,.08); pointer-events: none; opacity: 0; }
.np-vinyl.on { opacity: 1; animation: spin 12s linear infinite; }
.np-vinyl::after { content: ''; position: absolute; inset: 38%; border-radius: 50%; background: rgba(0,0,0,.5); border: 1px solid rgba(255,255,255,.1); }
.np-meta { width: min(84vw, 380px); }
.np-title-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.np-title-row h2 { margin: 0; font-size: 23px; font-weight: 760; letter-spacing: -.7px; line-height: 1.15; }
.np-title-row p { margin: 5px 0 0; font-size: 14px; color: var(--muted); }
.np-heart svg { width: 24px; height: 24px; }
.np-heart.liked { color: var(--danger); }
.np-badges { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
.pill { font-size: 9px; font-weight: 800; letter-spacing: .6px; padding: 4px 9px; border-radius: 99px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.1); color: var(--muted); }
.pill.hot { color: #ffc857; background: rgba(255,200,87,.12); border-color: rgba(255,200,87,.25); }
.pill.ok { color: var(--green); background: rgba(61,220,151,.1); border-color: rgba(61,220,151,.2); }

/* lyrics overlay */
.np-lyrics { position: absolute; inset: 76px 0 210px; z-index: 4; background: linear-gradient(180deg, rgba(6,6,11,.4), rgba(6,6,11,.96) 25%); backdrop-filter: blur(14px); opacity: 0; transition: opacity .35s; overflow: hidden; }
.np-lyrics.show { opacity: 1; }
.lyrics-scroll { height: 100%; overflow-y: auto; padding: 40% 30px 50%; text-align: center; scroll-behavior: smooth; }
.lyric-line { font-size: 20px; font-weight: 700; letter-spacing: -.4px; line-height: 1.3; padding: 9px 0; color: rgba(255,255,255,.28); transition: color .35s, transform .35s var(--ease), opacity .35s; transform: scale(.94); }
.lyric-line.active { color: #fff; transform: scale(1.04); text-shadow: 0 0 24px var(--accent); }
.lyric-line.past { opacity: .45; }
.lyrics-empty { color: var(--muted); font-size: 13px; padding-top: 40%; line-height: 1.6; }

.np-controls { flex: 0 0 auto; }
.progress { margin-bottom: 14px; }
.progress-track { position: relative; height: 22px; display: flex; align-items: center; touch-action: none; }
.progress-track::before { content: ''; position: absolute; left: 0; right: 0; height: 4px; border-radius: 4px; background: rgba(255,255,255,.16); }
.progress-track span#progressFill { position: relative; height: 4px; width: 0; border-radius: 4px; background: linear-gradient(90deg, var(--accent-2), var(--accent)); box-shadow: 0 0 12px var(--accent); }
.progress-knob { position: absolute; top: 50%; left: 0; width: 12px; height: 12px; border-radius: 50%; background: #fff; transform: translate(-50%, -50%); box-shadow: 0 2px 8px rgba(0,0,0,.5); transition: width .2s, height .2s; }
.progress-track.dragging .progress-knob { width: 18px; height: 18px; }
.progress-times { display: flex; justify-content: space-between; font-size: 10px; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; margin-top: 4px; }
.controls-row { display: flex; align-items: center; justify-content: space-between; }
.ctrl { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 50%; color: rgba(255,255,255,.7); transition: transform .2s var(--ease), color .2s, background .2s; }
.ctrl:active { transform: scale(.86); background: rgba(255,255,255,.08); }
.ctrl svg { width: 23px; height: 23px; }
.ctrl.on { color: var(--accent-2); }
.ctrl.on::after { content: ''; position: absolute; width: 4px; height: 4px; border-radius: 50%; background: var(--accent-2); margin-top: 34px; }
.big-play { width: 74px; height: 74px; border-radius: 50%; display: grid; place-items: center; background: #fff; color: #08060f; box-shadow: 0 12px 34px rgba(0,0,0,.5), 0 0 0 0 var(--accent); transition: transform .2s var(--ease), box-shadow .4s; }
.big-play:active { transform: scale(.92); }
.big-play.playing { box-shadow: 0 12px 34px rgba(0,0,0,.5), 0 0 0 2px var(--accent), 0 0 34px var(--accent); }
.big-play svg { width: 30px; height: 30px; }
.np-tools { display: flex; justify-content: space-around; margin-top: 26px; }
.tool { display: flex; flex-direction: column; align-items: center; gap: 5px; color: var(--muted); min-width: 54px; }
.tool:active { color: var(--text); }
.tool.active { color: var(--accent-2); }
.tool > span:first-child { height: 20px; display: grid; place-items: center; }
.tool svg { width: 19px; height: 19px; }
.tool small { font-size: 9px; font-weight: 600; }
.speed-value { font-size: 13px; font-weight: 800; }
.np-handle { position: absolute; top: 6px; left: 50%; transform: translateX(-50%); width: 38px; height: 4px; border-radius: 4px; background: rgba(255,255,255,.25); }

/* ---------------- queue panel ---------------- */
.panel { position: fixed; left: 0; right: 0; bottom: 0; height: 62%; z-index: 70; background: rgba(14,13,20,.96); backdrop-filter: blur(30px); border-radius: 26px 26px 0 0; border-top: 1px solid var(--line); transform: translateY(105%); transition: transform .5s var(--ease); display: flex; flex-direction: column; padding-bottom: var(--bottom); }
.panel.open { transform: none; }
.panel-head { display: flex; align-items: center; justify-content: space-between; padding: 20px 22px 12px; }
.panel-head h3 { margin: 0; font-size: 18px; letter-spacing: -.4px; }
.panel-body { flex: 1; overflow-y: auto; padding: 0 14px 20px; }

/* ---------------- sheet ---------------- */
.scrim { position: fixed; inset: 0; z-index: 75; background: rgba(0,0,0,.55); backdrop-filter: blur(3px); opacity: 0; visibility: hidden; transition: .35s; }
.scrim.show { opacity: 1; visibility: visible; }
.sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 80; max-height: 86%; background: rgba(18,17,25,.97); backdrop-filter: blur(30px) saturate(180%); border-radius: 28px 28px 0 0; border-top: 1px solid rgba(255,255,255,.12); transform: translateY(105%); transition: transform .55s var(--ease); display: flex; flex-direction: column; padding-bottom: var(--bottom); box-shadow: 0 -20px 60px rgba(0,0,0,.6); }
.sheet.open { transform: none; }
.sheet-grip { width: 38px; height: 4px; border-radius: 4px; background: rgba(255,255,255,.22); margin: 10px auto 2px; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 20px 8px; }
.sheet-head h3 { margin: 0; font-size: 19px; letter-spacing: -.4px; }
.sheet-body { overflow-y: auto; padding: 8px 20px 28px; -webkit-user-select: text; user-select: text; }
.field-label { display: block; font-size: 11px; font-weight: 700; color: var(--muted); margin: 18px 0 7px; letter-spacing: .4px; }
.input { width: 100%; height: 46px; border-radius: 13px; background: rgba(255,255,255,.05); border: 1px solid var(--line); padding: 0 14px; font-size: 14px; outline: none; -webkit-user-select: text; user-select: text; }
.input:focus { border-color: var(--accent); }
.input::placeholder { color: var(--muted-2); }
.hint { font-size: 11px; line-height: 1.5; color: var(--muted); margin: 10px 0 0; }
.hint a { color: var(--accent-2); }
.sheet-actions { display: flex; gap: 10px; margin-top: 22px; }
.sheet-actions .btn { flex: 1; }
.divider { height: 1px; background: var(--line); margin: 24px 0; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 0; border-bottom: 1px solid rgba(255,255,255,.06); }
.row:last-child { border-bottom: 0; }
.row-title { font-size: 13px; font-weight: 620; }
.row-sub { font-size: 11px; color: var(--muted); margin-top: 3px; line-height: 1.4; }
.toggle { width: 48px; height: 29px; border-radius: 99px; background: rgba(255,255,255,.13); position: relative; transition: background .3s; flex: 0 0 48px; }
.toggle::after { content: ''; position: absolute; top: 3px; left: 3px; width: 23px; height: 23px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.4); transition: transform .3s var(--ease); }
.toggle.on { background: var(--accent); }
.toggle.on::after { transform: translateX(19px); }
.menu-item { display: flex; align-items: center; gap: 13px; width: 100%; padding: 14px 4px; border-radius: 12px; font-size: 13.5px; font-weight: 600; text-align: left; }
.menu-item:active { background: var(--surface); }
.menu-item svg { width: 19px; height: 19px; color: var(--muted); }
.menu-item.danger { color: var(--danger); }
.menu-item.danger svg { color: var(--danger); }
.status-line { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); padding: 12px; background: var(--surface); border-radius: 13px; margin-top: 12px; }
.status-line b { color: var(--text); }
.file-input { display: none; }

/* ---------------- toast / boot ---------------- */
.toast { position: fixed; left: 50%; bottom: calc(var(--tabh) + 90px); transform: translate(-50%, 20px); z-index: 100; background: rgba(30,28,40,.94); backdrop-filter: blur(20px); border: 1px solid rgba(255,255,255,.14); color: #fff; font-size: 12.5px; font-weight: 600; padding: 12px 18px; border-radius: 14px; box-shadow: 0 12px 30px rgba(0,0,0,.5); opacity: 0; visibility: hidden; transition: .35s var(--ease); max-width: 86%; text-align: center; }
.toast.show { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
.boot { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; background: var(--bg); transition: opacity .5s, visibility .5s; }
.boot.gone { opacity: 0; visibility: hidden; }
.boot-eq { display: flex; align-items: flex-end; gap: 5px; height: 40px; }
.boot-eq i { width: 6px; border-radius: 4px; background: linear-gradient(180deg, #b98cff, #7b5cff); height: 12px; animation: eq .8s ease-in-out infinite alternate; }
.boot-eq i:nth-child(2) { animation-delay: -.2s; height: 34px; }
.boot-eq i:nth-child(3) { animation-delay: -.4s; height: 22px; }
.boot-eq i:nth-child(4) { animation-delay: -.6s; height: 30px; }

/* ---------------- keyframes ---------------- */
@keyframes eq { from { height: 15%; } to { height: 100%; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes coverSpin { to { transform: rotate(360deg); } }
@keyframes breathe { 0%, 100% { transform: scale(1); opacity: .8; } 50% { transform: scale(1.14); opacity: 1; } }
@keyframes miniIn { from { opacity: 0; transform: translateY(20px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.fade-up { animation: fadeUp .45s var(--ease-out) both; }

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