/* ---------- top bar ---------- */
html, body { overflow-x: clip; }
body { padding-bottom: calc(var(--dock-h) + 40px + env(safe-area-inset-bottom, 0px)); min-height: 100vh; }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); background: var(--bg); z-index: 41; }
.top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 40; background: color-mix(in srgb, var(--bg) 78%, transparent); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-bottom: 1px solid color-mix(in srgb, var(--line) 60%, transparent); }
.top .wrap { display: flex; align-items: center; gap: 20px; height: 64px; }
.mark { font-family: "Unbounded", var(--f-display); font-weight: 700; font-size: 20px; letter-spacing: -0.02em; direction: ltr; unicode-bidi: isolate; white-space: nowrap; }
.mark i { font-style: normal; color: var(--brand); }
.nav { display: flex; gap: 4px; margin-inline-start: 8px; }
.nav a { padding: 8px 14px; border-radius: 999px; color: var(--muted); font-weight: 500; font-size: 14px; transition: color .15s, background .15s; }
.nav a:hover { color: var(--ink); }
.nav a[aria-current="page"] { color: var(--ink); background: var(--surface); }
.lang { margin-inline-start: auto; min-width: 44px; height: 36px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--ink); font-weight: 600; cursor: pointer; padding: 0 14px; font-family: "Readex Pro", var(--f-body); }
.lang:hover { border-color: var(--muted); }
.demo-bar { background: color-mix(in srgb, var(--brand) 14%, var(--bg)); color: var(--ink); font-size: 13px; text-align: center; padding: 8px 16px; border-bottom: 1px solid color-mix(in srgb, var(--brand) 30%, transparent); }
@media (max-width: 560px) { .nav a { padding: 8px 10px; } .top .wrap { gap: 10px; } .mark { font-size: 18px; } }

/* ---------- sections ---------- */
main { display: block; }
.sec { padding-block: 34px 8px; display: flex; flex-direction: column; gap: 18px; }
.sec-head { display: flex; align-items: baseline; gap: 16px; }
.sec-head h2 { font-size: 22px; font-weight: 600; letter-spacing: -0.01em; }
.sec-head a { margin-inline-start: auto; color: var(--muted); font-size: 14px; font-weight: 500; }
.sec-head a:hover { color: var(--ink); }
.view-enter { animation: rise .35s ease-out both; }
@keyframes rise { from { opacity: .001; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- hero ---------- */
.hero { position: relative; overflow: hidden; padding-block: 48px 40px; isolation: isolate; }
.glow { position: absolute; inset: -20% -10% 0; z-index: -1; pointer-events: none;
  background: radial-gradient(60% 70% at 78% 30%, color-mix(in srgb, var(--accent) 38%, transparent), transparent 70%),
              radial-gradient(40% 50% at 10% 90%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 70%); }
[dir="rtl"] .glow { transform: scaleX(-1); }
.hero-in { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 48px; align-items: center; }
.hero-text { display: flex; flex-direction: column; gap: 22px; min-width: 0; }
.hero-name { font-family: var(--f-display); font-weight: 700; font-size: clamp(44px, 8.4vw, 116px); line-height: .98; letter-spacing: -0.035em; overflow-wrap: anywhere; }
[lang="ar"] .hero-name, [lang="ar"] .ah-name { letter-spacing: 0; line-height: 1.15; }
.hero-photo { position: relative; aspect-ratio: 4/5; max-height: 560px; border-radius: var(--r-l); overflow: hidden; box-shadow: 0 30px 80px -30px color-mix(in srgb, var(--accent) 60%, black); background: var(--surface); justify-self: end; width: 100%; max-width: 460px; }
[dir="rtl"] .hero-photo { justify-self: start; }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; }
.hero-latest { display: grid; grid-template-columns: 76px minmax(0, 1fr) auto; gap: 16px; align-items: center; background: color-mix(in srgb, var(--surface) 82%, transparent); border: 1px solid var(--line); border-radius: var(--r-m); padding: 12px; max-width: 520px; backdrop-filter: blur(8px); }
.hero-latest img { width: 76px; height: 76px; border-radius: var(--r-s); object-fit: cover; }
.hero-latest .t { font-weight: 600; font-size: 17px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hero-latest .m { color: var(--muted); font-size: 13px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.tagline { color: var(--muted); font-size: 17px; max-width: 46ch; }
@media (max-width: 820px) {
  .hero { padding-block: 24px 28px; }
  .hero-in { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .hero-photo { order: -1; aspect-ratio: 16/11; max-width: none; justify-self: stretch; }
}

/* ---------- cover grid ---------- */
.covers { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 26px 20px; }
@media (max-width: 560px) { .covers { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 14px; } }
.card { display: flex; flex-direction: column; gap: 10px; min-width: 0; position: relative; }
.card .art { position: relative; aspect-ratio: 1; border-radius: var(--r-s); overflow: hidden; background: var(--surface); box-shadow: 0 14px 34px -18px rgba(0,0,0,.9); }
.card .art img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.card:hover .art img { transform: scale(1.04); }
.card .art .play-btn { position: absolute; inset-inline-end: 10px; bottom: 10px; width: 46px; height: 46px; opacity: 0; transform: translateY(6px); transition: opacity .2s, transform .2s; }
.card:hover .art .play-btn, .card:focus-within .art .play-btn { opacity: 1; transform: none; }
@media (hover: none) { .card .art .play-btn { opacity: 1; transform: none; width: 40px; height: 40px; } }
.card .t { font-weight: 600; font-size: 15px; line-height: 1.35; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card .m { color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card a.cover-link::after { content: ""; position: absolute; inset: 0; }
.card .play-btn { z-index: 1; }

/* ---------- artists ---------- */
.people { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 26px 20px; }
@media (max-width: 560px) { .people { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.person { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; min-width: 0; }
.person .ph { width: 100%; aspect-ratio: 1; border-radius: 50%; overflow: hidden; background: var(--surface); box-shadow: 0 0 0 1px var(--line); transition: box-shadow .2s; }
.person:hover .ph { box-shadow: 0 0 0 3px var(--accent); }
.person .ph img { width: 100%; height: 100%; object-fit: cover; }
.person .n { font-weight: 600; font-size: 15px; }
.person .m { color: var(--muted); font-size: 13px; margin-top: -8px; }

/* ---------- track list ---------- */
.tracks { display: flex; flex-direction: column; }
.trk { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto auto 40px; gap: 14px; align-items: center; padding: 8px 10px; border-radius: var(--r-s); cursor: pointer; transition: background .15s; }
.trk.with-art { grid-template-columns: 30px 46px minmax(0, 1fr) auto auto 40px; }
.trk:hover { background: color-mix(in srgb, var(--ink) 6%, transparent); }
.trk .idx { color: var(--muted); text-align: center; font-variant-numeric: tabular-nums; font-size: 14px; position: relative; height: 22px; display: grid; place-items: center; }
.trk .idx .ic { display: none; }
.trk:hover .idx span { display: none; }
.trk:hover .idx .ic { display: block; color: var(--ink); }
.trk .art { width: 46px; height: 46px; border-radius: 4px; object-fit: cover; background: var(--surface); }
.trk .tt { min-width: 0; display: flex; flex-direction: column; }
.trk .tt b { font-weight: 500; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: flex; gap: 8px; align-items: center; }
.trk .tt b span { overflow: hidden; text-overflow: ellipsis; }
.trk .tt small { color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.trk .tt small a:hover { color: var(--ink); text-decoration: underline; }
.trk .pl, .trk .du { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.trk .du { min-width: 40px; text-align: end; }
.trk.now .tt b, .trk.now .idx { color: var(--accent); }
.trk .lk { opacity: .0; }
.trk:hover .lk, .trk .lk.on { opacity: 1; }
@media (hover: none) { .trk .lk { opacity: 1; } }
.eq { display: inline-flex; gap: 2px; align-items: flex-end; height: 14px; }
.eq i { width: 3px; background: var(--accent); border-radius: 1px; animation: eq 0.9s ease-in-out infinite; }
.eq i:nth-child(2) { animation-delay: -.3s; } .eq i:nth-child(3) { animation-delay: -.6s; }
.paused .eq i { animation-play-state: paused; }
@keyframes eq { 0%, 100% { height: 4px; } 50% { height: 14px; } }
.trk.now .idx span { display: none; }
@media (max-width: 640px) {
  .trk { grid-template-columns: 28px minmax(0, 1fr) auto 36px; gap: 10px; padding: 8px 4px; }
  .trk.with-art { grid-template-columns: 24px 44px minmax(0, 1fr) auto 36px; }
  .trk .pl { display: none; }
}

/* ---------- artist page ---------- */
.artist-head { position: relative; isolation: isolate; padding-top: 140px; overflow: hidden; padding-bottom: 8px; }
.ah-banner { position: absolute; inset: 0 0 auto; height: 360px; z-index: -2; background-size: cover; background-position: center; }
.ah-banner::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to bottom, color-mix(in srgb, var(--bg) 20%, transparent), var(--bg) 96%); }
.ah-banner.blur { filter: blur(40px) saturate(1.3); transform: scale(1.2); opacity: .7; }
.ah-in { display: flex; gap: 32px; align-items: flex-end; }
.ah-photo { width: 220px; height: 220px; border-radius: 50%; object-fit: cover; flex: none; background: var(--surface); box-shadow: 0 24px 60px -20px rgba(0,0,0,.9), 0 0 0 4px var(--bg); }
.ah-text { display: flex; flex-direction: column; gap: 14px; min-width: 0; padding-bottom: 6px; }
.ah-name { font-family: var(--f-display); font-weight: 700; font-size: clamp(40px, 7vw, 96px); line-height: 1; letter-spacing: -0.035em; overflow-wrap: anywhere; }
.links { display: flex; gap: 8px; flex-wrap: wrap; }
.links a { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px; font-size: 13px; font-weight: 500; color: var(--ink); background: color-mix(in srgb, var(--surface-2) 80%, transparent); box-shadow: inset 0 0 0 1px var(--line); transition: box-shadow .15s; }
.links a:hover { box-shadow: inset 0 0 0 1px var(--accent); }
.links a .ic { color: var(--muted); }
.split { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 40px; align-items: start; }
@media (max-width: 900px) { .split { grid-template-columns: minmax(0, 1fr); gap: 8px; } }
.about { background: var(--surface); border-radius: var(--r-m); padding: 22px; display: flex; flex-direction: column; gap: 12px; }
.about p { color: color-mix(in srgb, var(--ink) 86%, var(--muted)); white-space: pre-line; font-size: 15px; line-height: 1.75; }
.stat { display: flex; flex-direction: column; }
.stat b { font-size: 26px; font-weight: 600; font-variant-numeric: tabular-nums; }
.stat span { color: var(--muted); font-size: 13px; }
@media (max-width: 700px) {
  .artist-head { padding-top: 110px; }
  .ah-banner { height: 280px; }
  .ah-in { flex-direction: column; align-items: flex-start; gap: 18px; }
  .ah-photo { width: 150px; height: 150px; }
}

/* ---------- release + song page ---------- */
.rel-head { position: relative; isolation: isolate; padding-block: 44px 16px; overflow: hidden; }
.rel-in { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 36px; align-items: end; }
.rel-cover { width: 280px; aspect-ratio: 1; border-radius: var(--r-m); object-fit: cover; background: var(--surface); box-shadow: 0 30px 70px -24px rgba(0,0,0,.95); }
.rel-text { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.rel-title { font-family: var(--f-display); font-weight: 700; font-size: clamp(32px, 5.4vw, 68px); line-height: 1.02; letter-spacing: -0.03em; overflow-wrap: anywhere; }
[lang="ar"] .rel-title { letter-spacing: 0; line-height: 1.2; }
.byline { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; color: var(--muted); font-size: 14px; }
.byline img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; }
.byline a { color: var(--ink); font-weight: 600; }
.byline a:hover { text-decoration: underline; }
.dot::before { content: "·"; margin-inline-end: 10px; color: var(--faint); }
@media (max-width: 700px) {
  .rel-in { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .rel-cover { width: min(260px, 70vw); justify-self: center; }
}
.lyrics-static p, .lyr-lines p, .credits { unicode-bidi: plaintext; text-align: start; }
.lyrics-static { display: flex; flex-direction: column; gap: 4px; font-family: var(--f-lyric); font-size: 20px; line-height: 1.7; font-weight: 500; }
.lyrics-static .h { margin-top: 14px; font-size: 13px; color: var(--accent); font-weight: 600; }
.lyrics-static .gap { height: 10px; }
.empty { color: var(--muted); }
.like-count { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 14px; }
.credits { white-space: pre-line; color: var(--muted); font-size: 14px; line-height: 1.8; }

/* ---------- player dock ---------- */
.dock { position: fixed; z-index: 50; inset-inline: max(12px, env(safe-area-inset-left, 0px)); bottom: calc(12px + env(safe-area-inset-bottom, 0px)); height: var(--dock-h);
  max-width: 1280px; margin: 0 auto; border-radius: 18px; background: color-mix(in srgb, var(--bg-raise) 88%, transparent); backdrop-filter: blur(20px) saturate(1.4); -webkit-backdrop-filter: blur(20px) saturate(1.4);
  border: 1px solid var(--line); box-shadow: 0 20px 50px -20px rgba(0,0,0,.9); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr) minmax(0, 1fr); align-items: center; gap: 16px; padding: 0 14px;
  transform: translateY(140%); visibility: hidden; transition: transform .35s cubic-bezier(.2,.8,.2,1), visibility 0s .35s; }
.dock.on { transform: none; visibility: visible; transition: transform .35s cubic-bezier(.2,.8,.2,1); }
.d-now { display: flex; align-items: center; gap: 12px; min-width: 0; }
.d-now img { width: 52px; height: 52px; border-radius: 6px; object-fit: cover; background: var(--surface); cursor: pointer; }
.d-now .tt { min-width: 0; display: flex; flex-direction: column; }
.d-now .tt b { font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.d-now .tt a { color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.d-now .tt a:hover { color: var(--ink); text-decoration: underline; }
.d-mid { display: flex; flex-direction: column; align-items: center; gap: 4px; direction: ltr; }
.d-ctrl { display: flex; align-items: center; gap: 6px; }
.d-ctrl .play-btn { width: 40px; height: 40px; box-shadow: none; background: var(--ink); color: var(--bg); }
.d-bar { display: grid; grid-template-columns: 42px minmax(0, 1fr) 42px; align-items: center; gap: 8px; width: 100%; font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.d-bar span:last-child { text-align: start; }
.d-bar span:first-child { text-align: end; }
.seek { position: relative; height: 16px; display: flex; align-items: center; cursor: pointer; touch-action: none; }
.seek .rail { position: absolute; inset-inline: 0; height: 4px; border-radius: 2px; background: color-mix(in srgb, var(--ink) 18%, transparent); overflow: hidden; }
.seek .fill { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--ink); border-radius: 2px; }
.seek:hover .fill { background: var(--accent); }
.seek .knob { position: absolute; top: 50%; width: 12px; height: 12px; margin-left: -6px; margin-top: -6px; border-radius: 50%; background: var(--ink); opacity: 0; transition: opacity .15s; left: 0; }
.seek:hover .knob, .seek.drag .knob { opacity: 1; }
.d-end { display: flex; align-items: center; justify-content: flex-end; gap: 4px; }
.vol { width: 96px; accent-color: var(--ink); }
.d-mobile-bar { display: none; }
@media (max-width: 760px) {
  .dock { grid-template-columns: minmax(0, 1fr) auto; height: 66px; --dock-h: 66px; padding: 0 8px 0 8px; gap: 8px; }
  .d-mid { flex-direction: row; }
  .d-bar, .d-ctrl .prev, .d-end .vol, .d-end .vol-btn { display: none; }
  .d-end { display: none; }
  .d-now img { width: 46px; height: 46px; }
  .d-mobile-bar { display: block; position: absolute; inset-inline: 14px; bottom: 0; height: 2px; border-radius: 2px; background: color-mix(in srgb, var(--ink) 15%, transparent); overflow: hidden; direction: ltr; }
  .d-mobile-bar i { display: block; height: 100%; width: 0; background: var(--accent); }
  .d-ctrl .lyr-m { display: inline-grid; }
}
.d-ctrl .lyr-m { display: none; }

/* ---------- lyrics view ---------- */
.lyr { position: fixed; inset: 0; z-index: 60; background: var(--bg); display: flex; flex-direction: column; opacity: 0; pointer-events: none; transform: translateY(24px); transition: opacity .3s, transform .3s; isolation: isolate; }
.lyr.on { opacity: 1; pointer-events: auto; transform: none; }
.lyr-bg { position: absolute; inset: 0; z-index: -1; overflow: hidden; background: color-mix(in srgb, var(--accent) 30%, var(--bg)); }
.lyr-bg img { width: 100%; height: 100%; object-fit: cover; filter: blur(70px) saturate(1.5); transform: scale(1.4); opacity: .55; }
.lyr-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to bottom, color-mix(in srgb, var(--bg) 40%, transparent), color-mix(in srgb, var(--bg) 70%, transparent)); }
.lyr-top { display: flex; align-items: center; gap: 14px; padding: calc(16px + env(safe-area-inset-top, 0px)) max(20px, env(safe-area-inset-right, 0px)) 12px max(20px, env(safe-area-inset-left, 0px)); }
.lyr-top img { width: 52px; height: 52px; border-radius: 6px; object-fit: cover; }
.lyr-top .tt { min-width: 0; display: flex; flex-direction: column; }
.lyr-top .tt b { font-size: 16px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lyr-top .tt span { color: var(--muted); font-size: 14px; }
.lyr-top .icon-btn { margin-inline-start: auto; color: var(--ink); background: color-mix(in srgb, var(--ink) 10%, transparent); }
.lyr-body { flex: 1; overflow-y: auto; padding: 8vh max(20px, env(safe-area-inset-right, 0px)) 40vh max(20px, env(safe-area-inset-left, 0px)); scroll-behavior: smooth; mask-image: linear-gradient(to bottom, transparent, black 10%, black 80%, transparent); -webkit-mask-image: linear-gradient(to bottom, transparent, black 10%, black 80%, transparent); }
.lyr-lines { max-width: 900px; margin: 0 auto; display: flex; flex-direction: column; gap: 6px; }
.lyr-lines .l { font-family: var(--f-lyric); font-weight: 700; font-size: clamp(26px, 4.4vw, 46px); line-height: 1.3; color: var(--ink); opacity: .32; transition: opacity .35s, transform .35s; transform-origin: center left; cursor: default; padding: 4px 0; }
[dir="rtl"] .lyr-lines .l { transform-origin: center right; }
.lyr-lines.synced .l { cursor: pointer; }
.lyr-lines.synced .l:hover { opacity: .7; }
.lyr-lines .l.past { opacity: .5; }
.lyr-lines .l.on { opacity: 1; transform: scale(1.02); }
.lyr-lines.plain .l { opacity: .9; font-size: clamp(22px, 3.4vw, 34px); }
.lyr-lines .h { font-size: 14px; font-weight: 600; color: var(--accent); margin-top: 22px; }
.lyr-lines .gap { height: 18px; }
.lyr-foot { display: flex; align-items: center; gap: 16px; padding: 14px max(20px, env(safe-area-inset-right, 0px)) calc(18px + env(safe-area-inset-bottom, 0px)) max(20px, env(safe-area-inset-left, 0px)); direction: ltr; max-width: 900px; width: 100%; margin: 0 auto; }
.lyr-foot .seek { flex: 1; }
.lyr-foot .play-btn { width: 48px; height: 48px; background: var(--ink); color: var(--bg); box-shadow: none; }
.lyr-foot .tm { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; min-width: 84px; text-align: end; }

/* ---------- footer, states ---------- */
.foot { margin-top: 64px; border-top: 1px solid var(--line); }
.foot .wrap { padding-block: 28px; display: flex; gap: 16px; align-items: center; flex-wrap: wrap; color: var(--muted); font-size: 13px; }
.foot .mark { font-size: 16px; color: var(--ink); }
.state { padding-block: 90px; display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; }
.state h1 { font-family: var(--f-display); font-size: clamp(28px, 4vw, 44px); }
.state p { color: var(--muted); max-width: 46ch; }
.skel { background: linear-gradient(90deg, var(--surface) 0%, var(--surface-2) 50%, var(--surface) 100%); background-size: 200% 100%; animation: sk 1.4s linear infinite; border-radius: var(--r-s); }
@keyframes sk { to { background-position: -200% 0; } }
