/* VYBE web player: desktop streaming layout in the app's look. Sidebar · pages · now playing · player bar. */
body.player { height: 100vh; overflow: hidden; background: #000; }
.shell { display: grid; height: 100vh; padding: 8px; gap: 8px; grid-template-columns: 300px 1fr 340px; grid-template-rows: 1fr 84px; grid-template-areas: "side main np" "bar bar bar"; }
.shell.np-off { grid-template-columns: 300px 1fr; grid-template-areas: "side main" "bar bar"; }
.shell.np-off .np { display: none; }
.panel { background: #0B0C12; border-radius: 14px; overflow: hidden; min-height: 0; }
svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
svg .f, svg.f { fill: currentColor; stroke: none; }

/* sidebar */
.side { grid-area: side; display: flex; flex-direction: column; gap: 8px; min-height: 0; }
.nav-panel { padding: 18px 12px 10px; }
.nav-panel .brand { padding: 0 12px 14px; }
.nav-panel nav a { display: flex; align-items: center; gap: 16px; height: 44px; padding: 0 12px; border-radius: 10px; color: var(--muted); font-weight: 700; font-size: 15px; transition: color .2s, background .2s; }
.nav-panel nav a:hover { color: var(--ink); }
.nav-panel nav a.on { color: var(--ink); background: rgba(255,255,255,.06); }
.lib { flex: 1; display: flex; flex-direction: column; }
.lib-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px 10px; color: var(--muted); font-weight: 700; }
.lib-head span { display: flex; gap: 12px; align-items: center; }
.lib-list { overflow-y: auto; padding: 4px 8px 12px; flex: 1; }
.li { display: flex; align-items: center; gap: 12px; padding: 7px 10px; border-radius: 10px; cursor: pointer; transition: background .2s; }
.li:hover { background: rgba(255,255,255,.05); }
.li.on { background: rgba(255,255,255,.08); }
.li img, .li .cov { width: 48px; height: 48px; border-radius: 8px; object-fit: cover; flex: none; }
.li .round { border-radius: 50%; }
.li b { display: block; font-size: 14.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.li small { color: var(--dim); font-size: 12.5px; }
.li > div { min-width: 0; }
.liked-cov { display: grid; place-items: center; background: linear-gradient(135deg, #7B5CFF, #E0389B); }

/* main */
.main { grid-area: main; position: relative; display: flex; flex-direction: column; }
.topbar { position: absolute; top: 0; left: 0; right: 0; z-index: 5; display: flex; align-items: center; gap: 12px; padding: 14px 20px; transition: background .3s; }
.topbar.solid { background: rgba(11,12,18,.92); backdrop-filter: blur(12px); }
.hist { display: flex; gap: 8px; }
.circ { width: 34px; height: 34px; border-radius: 50%; border: 0; background: rgba(0,0,0,.6); color: var(--ink); display: grid; place-items: center; cursor: pointer; }
.circ svg { width: 18px; height: 18px; }
.search { display: none; align-items: center; gap: 10px; height: 46px; width: min(420px, 50%); padding: 0 16px; border-radius: 999px; background: rgba(255,255,255,.08); border: 1px solid transparent; }
.search:focus-within { border-color: rgba(255,255,255,.35); background: rgba(255,255,255,.1); }
.search.show { display: flex; }
.search input { flex: 1; background: none; border: 0; outline: 0; font-size: 15px; }
.me-area { margin-left: auto; display: flex; gap: 10px; align-items: center; }
.avbtn { width: 38px; height: 38px; border-radius: 50%; border: 3px solid rgba(0,0,0,.5); display: grid; place-items: center; font-weight: 800; color: #0B0B10; cursor: pointer; }
.view { overflow-y: auto; flex: 1; scroll-behavior: smooth; }
.view::-webkit-scrollbar, .lib-list::-webkit-scrollbar, .np::-webkit-scrollbar { width: 10px; }
.view::-webkit-scrollbar-thumb, .lib-list::-webkit-scrollbar-thumb, .np::-webkit-scrollbar-thumb { background: rgba(255,255,255,.12); border-radius: 10px; border: 3px solid transparent; background-clip: padding-box; }
.pad { padding: 0 28px 40px; }
.hdr { position: relative; padding: 110px 28px 30px; display: flex; align-items: flex-end; gap: 26px; min-height: 400px; background: linear-gradient(180deg, color-mix(in srgb, var(--c1, #333) 38%, transparent), transparent 92%); }
.hdr > div:last-child { max-width: 58%; }
.hdr h1 { text-shadow: 0 8px 50px rgba(0,0,0,.45); }
.hdr .art { width: 220px; height: 220px; border-radius: 14px; object-fit: cover; box-shadow: 0 20px 60px rgba(0,0,0,.55); flex: none; }
.hdr .art.round { border-radius: 50%; }
.hdr .k { font-size: 13px; font-weight: 700; }
.hdr h1 { font-size: clamp(42px, 6.2vw, 92px); letter-spacing: -.04em; margin: 8px 0 12px; line-height: .95; }
.hdr p { color: rgba(255,255,255,.75); font-size: 15px; max-width: 640px; }
.actions { display: flex; align-items: center; gap: 22px; padding: 24px 28px; }
.bigplay { width: 58px; height: 58px; border-radius: 50%; border: 0; display: grid; place-items: center; cursor: pointer; background: #fff; color: #0B0B10; transition: transform .2s; box-shadow: 0 10px 30px rgba(0,0,0,.35); }
.bigplay:hover { transform: scale(1.05); }
.bigplay svg { width: 26px; height: 26px; }
.iconbtn { background: none; border: 0; color: var(--muted); cursor: pointer; display: grid; place-items: center; }
.iconbtn:hover { color: var(--ink); }
.iconbtn.on { color: #3FD1A0; }
.iconbtn svg { width: 30px; height: 30px; }

/* home */
.greet { padding: 84px 28px 8px; background: linear-gradient(180deg, var(--c1, rgba(123,92,255,.35)), transparent 340px); transition: background 1s; }
.greet h1 { font-size: 34px; letter-spacing: -.03em; margin-bottom: 18px; }
.quick { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.qt { display: flex; align-items: center; gap: 14px; height: 64px; padding-right: 10px; border-radius: 8px; background: rgba(255,255,255,.07); overflow: hidden; cursor: pointer; position: relative; transition: background .25s; font-weight: 700; }
.qt:hover { background: rgba(255,255,255,.14); }
.qt img { width: 64px; height: 64px; object-fit: cover; }
.qt .mini { margin-left: auto; opacity: 0; transform: translateY(4px); transition: all .25s; width: 40px; height: 40px; }
.qt:hover .mini { opacity: 1; transform: none; }
.row-h { display: flex; align-items: baseline; justify-content: space-between; margin: 34px 0 14px; }
.row-h h2 { font-size: 23px; letter-spacing: -.02em; }
.row-h a { color: var(--dim); font-size: 13.5px; font-weight: 700; }
.row-h a:hover { color: var(--ink); text-decoration: underline; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(178px, 1fr)); gap: 8px; }
.card2 { padding: 12px; border-radius: 12px; cursor: pointer; transition: background .25s; position: relative; }
.card2:hover { background: rgba(255,255,255,.06); }
.card2 .img { position: relative; aspect-ratio: 1; margin-bottom: 12px; }
.card2 img { width: 100%; height: 100%; object-fit: cover; border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,.4); }
.card2.round img { border-radius: 50%; }
.card2 b { display: block; font-size: 15px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card2 small { color: var(--dim); font-size: 13px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-top: 4px; }
.mini { position: absolute; right: 8px; bottom: 8px; width: 46px; height: 46px; border-radius: 50%; border: 0; background: #fff; color: #0B0B10; display: grid; place-items: center; cursor: pointer; opacity: 0; transform: translateY(8px); transition: all .3s cubic-bezier(.2,.8,.2,1); box-shadow: 0 8px 20px rgba(0,0,0,.45); }
.mini svg { width: 20px; height: 20px; }
.card2:hover .mini, .card2 .mini.live { opacity: 1; transform: none; }
.feature { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 8px; }
.fcard { position: relative; height: 240px; border-radius: 16px; overflow: hidden; cursor: pointer; }
.fcard img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 1s cubic-bezier(.2,.8,.2,1); }
.fcard:hover img { transform: scale(1.05); }
.fcard::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0,0,0,.75), rgba(0,0,0,.05)); }
.fcard .in { position: absolute; left: 24px; bottom: 22px; right: 40%; z-index: 2; }
.fcard .k { font-size: 11.5px; font-weight: 800; letter-spacing: .16em; color: rgba(255,255,255,.75); }
.fcard h3 { font-size: 30px; letter-spacing: -.03em; margin: 6px 0 6px; }
.fcard p { font-size: 13.5px; color: rgba(255,255,255,.8); }

/* track table */
.tt { width: 100%; border-collapse: collapse; }
.tt th { text-align: left; font-size: 12.5px; color: var(--dim); font-weight: 600; padding: 8px 12px; border-bottom: 1px solid var(--line); letter-spacing: .04em; }
.tt td { padding: 8px 12px; font-size: 14px; color: var(--muted); }
.tt tr.row { cursor: pointer; }
.tt tr.row:hover td { background: rgba(255,255,255,.06); }
.tt tr.row td:first-child { border-radius: 8px 0 0 8px; width: 46px; text-align: right; } .tt tr.row td:last-child { border-radius: 0 8px 8px 0; text-align: right; width: 90px; }
.tt .t { display: flex; align-items: center; gap: 12px; }
.tt .t img { width: 42px; height: 42px; border-radius: 6px; object-fit: cover; }
.tt .t b { display: block; color: var(--ink); font-weight: 600; font-size: 15px; }
.tt tr.playing .t b, .tt tr.playing td:first-child { color: #3FD1A0; }
.tt .heart { opacity: 0; } .tt tr.row:hover .heart, .tt .heart.on { opacity: 1; }
.tt .num .pi { display: none; } .tt tr.row:hover .num .n { display: none; } .tt tr.row:hover .num .pi { display: inline; }
.eq { display: inline-flex; gap: 2px; align-items: flex-end; height: 14px; }
.eq i { width: 3px; background: #3FD1A0; animation: eq 1s ease-in-out infinite; } .eq i:nth-child(2) { animation-delay: .2s } .eq i:nth-child(3) { animation-delay: .4s }
.paused .eq i { animation-play-state: paused; }
@keyframes eq { 0%,100% { height: 4px } 50% { height: 14px } }

/* chips + search */
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 18px; }
.browse { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
.bt { position: relative; aspect-ratio: 1.55; border-radius: 12px; overflow: hidden; cursor: pointer; padding: 16px; }
.bt h3 { position: relative; z-index: 2; font-size: 24px; letter-spacing: -.02em; }
.bt img { position: absolute; width: 46%; aspect-ratio: 1; right: -8%; bottom: -6%; object-fit: cover; border-radius: 8px; transform: rotate(24deg); box-shadow: 0 8px 20px rgba(0,0,0,.4); transition: transform .4s; }
.bt:hover img { transform: rotate(18deg) scale(1.05); }

/* now playing panel */
.np { grid-area: np; overflow-y: auto; padding: 16px; }
.np h4 { font-size: 16px; margin-bottom: 14px; display: flex; justify-content: space-between; align-items: center; }
.np .cover { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 12px; box-shadow: 0 20px 50px rgba(0,0,0,.5); }
.np .ttl { display: flex; justify-content: space-between; align-items: center; margin: 16px 0 4px; gap: 10px; }
.np .ttl b { font-size: 22px; letter-spacing: -.02em; }
.np .sub2 { color: var(--muted); }
.np .box2 { margin-top: 18px; border-radius: 12px; background: rgba(255,255,255,.05); overflow: hidden; }
.np .box2 .pic { height: 170px; position: relative; }
.np .box2 .pic img { width: 100%; height: 100%; object-fit: cover; }
.np .box2 .pic span { position: absolute; left: 14px; top: 12px; font-weight: 800; font-size: 14px; text-shadow: 0 2px 10px rgba(0,0,0,.6); }
.np .box2 .in { padding: 14px; }
.np .box2 .in b { font-size: 16px; }
.np .box2 .in p { color: var(--muted); font-size: 13.5px; margin-top: 6px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.np .facts { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; margin-top: 12px; }
.np .facts div { padding: 10px; border-radius: 10px; background: rgba(255,255,255,.05); text-align: center; }
.np .facts b { display: block; font-size: 15px; } .np .facts small { color: var(--dim); font-size: 11px; letter-spacing: .08em; }
.np .empty { color: var(--dim); text-align: center; padding: 60px 10px; }

/* player bar */
.bar { grid-area: bar; display: grid; grid-template-columns: 1fr minmax(380px, 1.6fr) 1fr; align-items: center; padding: 0 12px; gap: 16px; }
.bar-l { display: flex; align-items: center; gap: 14px; min-width: 0; }
.bar-l img { width: 58px; height: 58px; border-radius: 8px; object-fit: cover; }
.bar-l b { display: block; color: var(--ink); font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
.bar-l b:hover, .bar-l small:hover { text-decoration: underline; }
.bar-l small { color: var(--dim); font-size: 12.5px; cursor: pointer; }
.bar-l > div { min-width: 0; }
.ctrls { display: flex; justify-content: center; align-items: center; gap: 18px; }
.ic { width: 34px; height: 34px; border: 0; background: none; color: var(--muted); cursor: pointer; display: grid; place-items: center; position: relative; transition: color .2s, transform .15s; }
.ic:hover { color: var(--ink); } .ic:active { transform: scale(.92); }
.ic svg { width: 20px; height: 20px; }
.ic.on { color: #3FD1A0; } .ic.on::after { content: ''; position: absolute; bottom: 0; width: 4px; height: 4px; border-radius: 50%; background: #3FD1A0; }
.play { width: 40px; height: 40px; border-radius: 50%; border: 0; background: #fff; color: #0B0B10; display: grid; place-items: center; cursor: pointer; transition: transform .15s; }
.play:hover { transform: scale(1.06); } .play svg { width: 20px; height: 20px; }
.prog { display: flex; align-items: center; gap: 10px; margin-top: 6px; font-size: 11.5px; color: var(--dim); font-variant-numeric: tabular-nums; }
.prog span { width: 38px; text-align: center; }
.track { position: relative; flex: 1; height: 4px; border-radius: 2px; background: rgba(255,255,255,.18); cursor: pointer; }
.track::before { content: ''; position: absolute; inset: -8px 0; }
.track .fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 2px; background: #fff; width: 0; }
.track:hover .fill { background: #3FD1A0; }
.track .knob { position: absolute; top: 50%; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%; background: #fff; opacity: 0; transition: opacity .2s; left: 0; box-shadow: 0 2px 6px rgba(0,0,0,.4); }
.track:hover .knob { opacity: 1; }
.bar-r { display: flex; justify-content: flex-end; align-items: center; gap: 6px; }
.vol { flex: 0 0 110px; }
.like { color: var(--muted); } .like.on { color: #3FD1A0; }

/* modal / account */
.modal { position: fixed; inset: 0; z-index: 90; display: none; place-items: center; background: rgba(0,0,0,.65); backdrop-filter: blur(8px); padding: 20px; }
.modal.on { display: grid; }
.modal .box { width: min(460px, 100%); padding: 28px; border-radius: 26px; background: #0E0F16; border: 1px solid var(--line2); position: relative; max-height: 90vh; overflow: auto; }
.toast { position: fixed; left: 50%; bottom: 110px; transform: translateX(-50%) translateY(30px); opacity: 0; z-index: 95; padding: 12px 18px; border-radius: 12px; background: #F4F3F1; color: #0B0B10; font-weight: 700; transition: all .35s cubic-bezier(.2,.8,.2,1); pointer-events: none; }
.toast.on { opacity: 1; transform: translateX(-50%); }
.acc { max-width: 760px; }
.acc .cardx { padding: 22px; border-radius: 18px; background: rgba(255,255,255,.05); border: 1px solid var(--line); margin-bottom: 14px; }
.acc .rowx { display: flex; justify-content: space-between; align-items: center; gap: 14px; }
.plans2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 14px; }
.plan2 { padding: 20px; border-radius: 16px; border: 1.5px solid var(--line2); cursor: pointer; }
.plan2.on { border-color: #fff; background: rgba(255,255,255,.06); }
.plan2 b { font-size: 26px; letter-spacing: -.03em; display: block; margin-top: 4px; }
.menu { position: absolute; right: 20px; top: 60px; z-index: 20; min-width: 200px; padding: 6px; border-radius: 12px; background: #1B1C24; box-shadow: 0 20px 50px rgba(0,0,0,.6); display: none; }
.menu.on { display: block; }
.menu a, .menu button { display: block; width: 100%; text-align: left; padding: 11px 12px; border-radius: 8px; border: 0; background: none; font-size: 14px; cursor: pointer; }
.menu a:hover, .menu button:hover { background: rgba(255,255,255,.08); }

/* responsive: tablet & phone */
@media (max-width: 1180px) { .shell { grid-template-columns: 240px 1fr; grid-template-areas: "side main" "bar bar"; } .np { display: none; } #npBtn { display: none; } }
@media (max-width: 760px) {
  .shell { grid-template-columns: 1fr; grid-template-rows: 1fr auto; grid-template-areas: "main" "bar"; padding: 0; gap: 0; }
  .side { display: none; } .panel { border-radius: 0; }
  .bar { grid-template-columns: 1fr auto; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); }
  .bar-c .prog, .bar-r, #shuf, #rep, #prev { display: none; }
  .hdr { flex-direction: column; align-items: flex-start; min-height: 0; } .hdr .art { width: 160px; height: 160px; }
  .feature { grid-template-columns: 1fr; } .tt .hide-m { display: none; }
  .search { width: 100%; }
}

/* ---------- 3D + motion layer ---------- */
@property --amb { syntax: '<color>'; inherits: true; initial-value: #5B3DF5; }
@property --lvl { syntax: '<number>'; inherits: true; initial-value: 0; }
body.player { --amb: #5B3DF5; transition: --amb 1.6s ease; }
.amb { position: fixed; inset: 0; pointer-events: none; z-index: 0; background: radial-gradient(60% 50% at 18% 110%, color-mix(in srgb, var(--amb) 40%, transparent), transparent 70%), radial-gradient(50% 40% at 95% -10%, color-mix(in srgb, var(--amb) 26%, transparent), transparent 70%); }
.shell { position: relative; z-index: 1; }
.panel { background: rgba(11,12,18,.86); backdrop-filter: blur(24px) saturate(1.2); -webkit-backdrop-filter: blur(24px) saturate(1.2); border: 1px solid rgba(255,255,255,.05); }
.bar { background: transparent; }
/* the main stage: a live world behind every page header */
#stage3d { position: absolute; left: 0; right: 0; top: 0; width: 100%; height: 560px; z-index: 0; pointer-events: none;
  -webkit-mask-image: linear-gradient(180deg, #000 55%, transparent); mask-image: linear-gradient(180deg, #000 55%, transparent); transition: opacity .8s ease; }
#stage3d.off { opacity: 0; }
.main .view { position: relative; z-index: 1; }
.greet { background: linear-gradient(180deg, color-mix(in srgb, var(--c1, #5B3DF5) 30%, transparent), transparent 380px); min-height: 380px; }
.greet .quick { position: relative; }
/* page transition: sections rise in, track rows follow one by one */
#page > * { animation: pageIn .7s cubic-bezier(.2,.8,.2,1) both; }
#page > *:nth-child(2) { animation-delay: .06s; } #page > *:nth-child(3) { animation-delay: .12s; } #page > *:nth-child(4) { animation-delay: .18s; }
@keyframes pageIn { from { opacity: 0; transform: translateY(18px); filter: blur(4px); } }
.tt tbody tr { animation: rowIn .55s cubic-bezier(.2,.8,.2,1) both; animation-delay: calc(min(var(--i, 0), 18) * 28ms + .15s); }
@keyframes rowIn { from { opacity: 0; transform: translateX(-12px); } }
.hdr h1, .greet h1 { animation: titleIn 1s cubic-bezier(.2,.8,.2,1) both; }
@keyframes titleIn { from { opacity: 0; transform: translateY(30px) scale(.98); letter-spacing: 0; filter: blur(10px); } }
/* cards lean toward the pointer */
.card2 .img, .fcard, .qt { transform-style: preserve-3d; transition: transform .6s cubic-bezier(.2,.8,.2,1), box-shadow .4s; will-change: transform; }
.cards, .feature, .quick { perspective: 1000px; }
.card2 .img::after, .fcard::before { content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: 3; opacity: 0; transition: opacity .3s;
  background: radial-gradient(300px circle at var(--gx, 50%) var(--gy, 0%), rgba(255,255,255,.22), transparent 50%); }
.card2.round .img::after { border-radius: 50%; } .card2 .img::after { border-radius: 10px; }
.card2:hover .img::after, .fcard:hover::before { opacity: 1; }
.card2:hover .img img { box-shadow: 0 24px 50px rgba(0,0,0,.55); }
/* now playing: the song as a planet */
.np { position: relative; }
.np3d { position: absolute; left: 16px; right: 16px; top: 46px; aspect-ratio: 1; border-radius: 16px; overflow: hidden; z-index: 0; transition: opacity .6s;
  background: radial-gradient(70% 70% at 50% 45%, color-mix(in srgb, var(--amb) 30%, transparent), transparent 75%); }
.np3d canvas { width: 100%; height: 100%; display: block; cursor: grab; }
.np3d.off { opacity: 0; pointer-events: none; }
#np { position: relative; z-index: 1; pointer-events: none; }
#np * { pointer-events: auto; }
#np .np-space { aspect-ratio: 1; pointer-events: none; }
/* play button breathes with the music */
.play { box-shadow: 0 0 calc(var(--lvl) * 34px) color-mix(in srgb, var(--amb) 80%, transparent); transform: scale(calc(1 + var(--lvl) * .05)); transition: transform .08s linear; }
.bigplay { box-shadow: 0 10px 40px color-mix(in srgb, var(--amb) 45%, transparent); transition: transform .3s cubic-bezier(.2,.8,.2,1), box-shadow .3s; }
.bigplay:hover { transform: scale(1.06); }
.bar .fill, .vol .fill { background: linear-gradient(90deg, #fff, color-mix(in srgb, var(--amb) 60%, #fff)); }
.bar-l img { transition: transform .5s cubic-bezier(.2,.8,.2,1); }
body:not(.paused) .bar-l img { animation: breathe 4s ease-in-out infinite; }
@keyframes breathe { 50% { transform: scale(1.04); } }
@media (prefers-reduced-motion: reduce) { #page > *, .tt tbody tr, .hdr h1, .greet h1 { animation: none; } body:not(.paused) .bar-l img { animation: none; } }
