/* =============================================================================
   Muzik Freddie (fred.my/music) — v4.0
   Ceria, cerah & selari dengan laman utama fred.my (token warna sama seperti
   assets/css/site.css). Tema gelap ikut html[data-theme="dark"] (shared/theme.js).
   Header/footer: shared/chrome.css (.fm-*). Semua gaya pemain diskop .mx / .mp.
   ========================================================================== */

:root {
    color-scheme: light dark;
    --bg: light-dark(#f5f7fb, #070b16);
    --surface: light-dark(#ffffff, #0f1729);
    --surface-2: light-dark(#f1f5f9, rgba(255, 255, 255, .05));
    --surface-3: light-dark(#e9eef6, rgba(255, 255, 255, .09));
    --border: light-dark(rgba(15, 23, 42, .09), rgba(255, 255, 255, .09));
    --border-strong: light-dark(rgba(15, 23, 42, .16), rgba(255, 255, 255, .18));
    --text: light-dark(#0b1220, #e9eef9);
    --text-muted: light-dark(#475569, #a7b2c7);
    --text-faint: light-dark(#64748b, #8391ab);
    --brand: light-dark(#2563eb, #4f8bff);
    --violet: light-dark(#7c3aed, #a78bfa);
    --pink: light-dark(#db2777, #f472b6);
    --fuchsia: light-dark(#c026d3, #e879f9);
    --amber: light-dark(#d97706, #fbbf24);
    --green: light-dark(#059669, #34d399);
    --sky: light-dark(#0284c7, #38bdf8);
    --ink-on: #fff;
    --grad: linear-gradient(120deg, #db2777 0%, #c026d3 38%, #7c3aed 72%, #2563eb 100%);
    --grad-warm: linear-gradient(120deg, #f59e0b, #ec4899);
    --shadow-1: light-dark(0 1px 2px rgba(8, 12, 30, .06), 0 1px 2px rgba(0, 0, 0, .5));
    --shadow-2: light-dark(0 14px 34px -18px rgba(8, 12, 30, .28), 0 14px 34px -16px rgba(0, 0, 0, .7));
    --shadow-3: light-dark(0 30px 70px -30px rgba(8, 12, 30, .38), 0 30px 70px -24px rgba(0, 0, 0, .8));
    --r-sm: 12px;
    --r-md: 18px;
    --r-lg: 26px;
    --ease: cubic-bezier(.22, 1, .36, 1);
    --font-display: var(--fm-display, "Outfit", system-ui, sans-serif);
    --font-body: var(--fm-font, "Jakarta", system-ui, sans-serif);
}
:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; background: var(--bg); color: var(--text); font: 16px/1.6 var(--font-body); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
:where(.mx, .mp) button, :where(.mx, .mp) input, :where(.mx, .mp) select { font: inherit; color: inherit; }
:where(.mx, .mp) :is(h1, h2, h3, h4, p, ul) { margin: 0; padding: 0; }
.mx ::selection { background: color-mix(in srgb, var(--fuchsia) 28%, transparent); }
.mx :focus-visible, .mp :focus-visible { outline: 2px solid var(--fuchsia); outline-offset: 2px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.mx-wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 20px; }
@media (max-width: 480px) { .mx-wrap { padding: 0 14px; } }

/* ---- Hero: sama gaya dengan laman utama (pill + tajuk gradien) ------------ */
.mx { position: relative; isolation: isolate; padding-bottom: 56px; }
.mx::before { content: ""; position: absolute; inset: -40px 0 auto; height: 620px; z-index: -1; pointer-events: none; background:
    radial-gradient(38% 46% at 12% 22%, light-dark(rgba(236, 72, 153, .14), rgba(244, 114, 182, .14)), transparent 70%),
    radial-gradient(34% 42% at 88% 12%, light-dark(rgba(124, 58, 237, .13), rgba(167, 139, 250, .15)), transparent 70%),
    radial-gradient(30% 40% at 55% 70%, light-dark(rgba(245, 158, 11, .10), rgba(251, 191, 36, .07)), transparent 70%); }
.mx-hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; padding: 26px 0 20px; }
.mx-pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 13px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-1); font-size: 13px; font-weight: 650; color: var(--text-muted); }
.mx-pill__dot { width: 8px; height: 8px; border-radius: 50%; background: #10b981; box-shadow: 0 0 0 4px rgba(16, 185, 129, .18); }
body.mp-on .mx-pill__dot { background: #ec4899; box-shadow: 0 0 0 4px rgba(236, 72, 153, .2); animation: mxPulse 1.4s ease-in-out infinite; }
@keyframes mxPulse { 50% { box-shadow: 0 0 0 7px rgba(236, 72, 153, .08); } }
.mx-title { margin-top: 14px !important; font: 800 clamp(2.1rem, 1.5rem + 2.6vw, 3.2rem)/1.02 var(--font-display); letter-spacing: -.035em; }
.mx-title span { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; padding-bottom: .06em; }
.mx-lead { margin-top: 12px !important; max-width: 560px; font-size: 16.5px; color: var(--text-muted); }
.mx-cta { display: flex; flex-wrap: wrap; gap: 10px; flex: none; }
.mx-btn { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 46px; padding: 0 20px; border-radius: 12px; border: 1px solid transparent; font: 650 15px/1.1 var(--font-body); cursor: pointer; text-decoration: none; white-space: nowrap; transition: transform .15s, box-shadow .15s, background .15s, border-color .15s; }
.mx-btn:hover { transform: translateY(-1px); }
.mx-btn--primary { background: var(--grad); color: #fff; box-shadow: 0 12px 26px -12px #c026d3; }
.mx-btn--outline { background: var(--surface); color: var(--text); border-color: var(--border-strong); }
.mx-btn--outline:hover { border-color: var(--fuchsia); color: var(--fuchsia); }

/* ---- Grid utama --------------------------------------------------------- */
.mx-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 22px; align-items: start; }
.mx-card { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow-2); }

/* ---- Kad "Sedang dimainkan" -------------------------------------------- */
.player { overflow: hidden; padding: 20px 28px 22px; display: flex; flex-direction: column; align-items: center; text-align: center; position: sticky; top: calc(var(--fm-bar-h, 64px) + 70px); }
.player::before { content: ""; position: absolute; inset: 0 0 auto; height: 230px; z-index: 0; pointer-events: none; background:
    radial-gradient(60% 80% at 20% 0%, light-dark(rgba(236, 72, 153, .16), rgba(236, 72, 153, .20)), transparent 70%),
    radial-gradient(60% 80% at 85% 10%, light-dark(rgba(124, 58, 237, .14), rgba(124, 58, 237, .22)), transparent 70%),
    radial-gradient(50% 70% at 50% 0%, light-dark(rgba(245, 158, 11, .12), rgba(245, 158, 11, .10)), transparent 70%); }
.player > * { position: relative; z-index: 1; }
/* Aurora reaktif — lukisan resolusi rendah, dikaburkan CSS (hanya dalam kad) */
#bgCanvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; filter: blur(38px) saturate(140%); opacity: 0; transition: opacity .6s; pointer-events: none; }
body.mp-on #bgCanvas { opacity: .45; }
:root[data-theme="dark"] body.mp-on #bgCanvas { opacity: .6; }
.mx-now { display: inline-flex; align-items: center; gap: 7px; margin-bottom: 14px; padding: 5px 12px; border-radius: 999px; background: color-mix(in srgb, var(--surface) 80%, transparent); border: 1px solid var(--border); font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--fuchsia); backdrop-filter: blur(8px); }
.mx-now i { font-size: 11px; }

/* Seni album / piring */
.art-wrap { position: relative; width: 190px; height: 190px; margin-bottom: 18px; }
.art-glow { position: absolute; inset: -16px; border-radius: 34px; background: conic-gradient(from 0deg, #ec4899, #a855f7, #3b82f6, #f59e0b, #ec4899); filter: blur(22px); opacity: 0; transform: scale(.9); transition: opacity .4s ease, border-radius .6s var(--ease); }
.art-wrap.playing .art-glow { opacity: .45; border-radius: 50%; }
.album-art { position: relative; width: 100%; height: 100%; border-radius: 28px; overflow: hidden; display: grid; place-items: center; background: var(--grad); box-shadow: 0 26px 50px -22px rgba(124, 58, 237, .65), inset 0 0 0 1px rgba(255, 255, 255, .25); transition: transform .5s var(--ease), border-radius .6s var(--ease); }
.art-wrap.playing .album-art { transform: scale(1.03); border-radius: 50%; }
.disc { position: absolute; inset: 0; display: grid; place-items: center; background-size: cover; background-position: center; transition: border-radius .6s var(--ease); }
.disc i { font-size: 78px; color: rgba(255, 255, 255, .92); text-shadow: 0 8px 22px rgba(0, 0, 0, .18); }
.disc.has-cover i { display: none; }
.art-wrap.playing .disc { animation: mxSpin 14s linear infinite; }
.art-wrap.playing .album-art::after { content: ""; position: absolute; width: 34px; height: 34px; border-radius: 50%; background: var(--surface); box-shadow: 0 0 0 5px rgba(255, 255, 255, .35), inset 0 0 0 1px var(--border); z-index: 2; }
@keyframes mxSpin { to { transform: rotate(360deg); } }

.song-info { width: 100%; margin-bottom: 8px; }
.song-title { font: 750 clamp(1.3rem, 1.1rem + .9vw, 1.65rem)/1.2 var(--font-display); letter-spacing: -.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.song-artist { margin-top: 4px; font-size: 14px; font-weight: 600; color: var(--text-faint); }

/* Lirik segerak — 3 baris bergolek */
.lyrics { position: relative; height: 90px; overflow: hidden; width: 100%; margin-top: 12px; display: none; border-radius: 14px; background: var(--surface-2);
    -webkit-mask-image: linear-gradient(to bottom, transparent, #000 30%, #000 70%, transparent); mask-image: linear-gradient(to bottom, transparent, #000 30%, #000 70%, transparent); }
.lyrics.on { display: block; }
.lyrics-inner { transition: transform .45s cubic-bezier(.22, .61, .36, 1); will-change: transform; }
.lyrics-inner .ln { height: 30px; line-height: 30px; padding: 0 16px; font-size: 14.5px; color: var(--text-faint); opacity: .55; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: opacity .3s, color .3s, font-size .3s; }
.lyrics-inner .ln.active { opacity: 1; font-weight: 750; font-size: 16px; color: var(--fuchsia); }

.eq-strip { width: 100%; max-width: 420px; height: 30px; margin: 10px 0 8px; }
#eqCanvas { width: 100%; height: 100%; display: block; }

/* Kemajuan */
.progress-wrap { width: 100%; max-width: 440px; margin-bottom: 14px; }
.bar-track { position: relative; width: 100%; height: 8px; border-radius: 99px; background: var(--surface-3); cursor: pointer; touch-action: none; }
.bar-track::before { content: ""; position: absolute; inset: -10px 0; }   /* sasaran sentuh lebih besar */
.bar-fill { position: relative; height: 100%; width: 0%; border-radius: 99px; background: var(--grad); pointer-events: none; }
.bar-fill::after { content: ""; position: absolute; right: -8px; top: 50%; width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 3px solid #c026d3; transform: translateY(-50%) scale(0); transition: transform .2s var(--ease); box-shadow: 0 4px 10px rgba(192, 38, 211, .35); }
.bar-track:hover .bar-fill::after, .bar-track.seeking .bar-fill::after { transform: translateY(-50%) scale(1); }
.time { display: flex; justify-content: space-between; margin-top: 8px; font-size: 12.5px; font-weight: 600; color: var(--text-faint); font-variant-numeric: tabular-nums; }

/* Kawalan utama */
.controls { display: flex; align-items: center; justify-content: center; gap: 14px; margin-bottom: 16px; }
.controls button, .volume button { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; border: 0; background: transparent; color: var(--text-muted); font-size: 17px; cursor: pointer; transition: background .2s, color .2s, transform .2s var(--ease); }
.controls button:hover, .volume button:hover { background: var(--surface-2); color: var(--text); }
.controls button:active { transform: scale(.92); }
.controls .play-btn { width: 72px; height: 72px; font-size: 24px; color: #fff; background: var(--grad); box-shadow: 0 14px 30px -10px rgba(192, 38, 211, .7), inset 0 1px 0 rgba(255, 255, 255, .3); }
.controls .play-btn:hover { background: var(--grad); color: #fff; transform: scale(1.06); }
.play-btn i { color: #fff; }
.active-mode { color: var(--fuchsia) !important; background: color-mix(in srgb, var(--fuchsia) 12%, transparent) !important; }

/* Volum + alat */
.volume { display: flex; align-items: center; gap: 6px; width: 100%; max-width: 440px; padding: 6px 8px; border-radius: 16px; background: var(--surface-2); }
.volume button { width: 40px; height: 40px; font-size: 15px; flex: none; }
.vol-slider { flex: 1; min-width: 60px; height: 6px; border-radius: 99px; background: var(--surface-3); -webkit-appearance: none; appearance: none; outline: none; cursor: pointer; accent-color: #c026d3; }
.vol-slider::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; border-radius: 50%; background: #fff; border: 3px solid #c026d3; }
.vol-slider::-moz-range-thumb { width: 12px; height: 12px; border-radius: 50%; background: #fff; border: 3px solid #c026d3; }

/* Pilihan bunyi (EQ) — cip */
.eq-row { display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.eq-row > span { font-size: 12.5px; font-weight: 700; color: var(--text-faint); margin-right: 2px; }
.eq-presets { display: contents; }
.eq-presets button, .chip { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text-muted); font-size: 13px; font-weight: 650; cursor: pointer; transition: all .18s; }
.eq-presets button:hover, .chip:hover { border-color: var(--border-strong); color: var(--text); }
.eq-presets button.active, .chip.is-on { color: #fff; border-color: transparent; background: var(--grad); box-shadow: 0 8px 18px -10px #c026d3; }

/* ---- Kad senarai lagu --------------------------------------------------- */
.playlist-panel { display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.pl-head { padding: 22px 22px 12px; border-bottom: 1px solid var(--border); background: var(--surface); }
.pl-head .row1 { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.pl-head h2 { font: 750 20px/1.2 var(--font-display); letter-spacing: -.02em; display: flex; align-items: center; gap: 10px; }
.pl-head h2 i { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-size: 15px; color: #fff; background: var(--grad-warm); }
.pl-meta { font-size: 12.5px; font-weight: 700; color: var(--text-muted); background: var(--surface-2); padding: 5px 11px; border-radius: 999px; white-space: nowrap; }
.search { display: flex; align-items: center; gap: 10px; padding: 0 14px; height: 46px; border-radius: 14px; background: var(--surface-2); border: 1px solid transparent; transition: border-color .2s, background .2s, box-shadow .2s; cursor: text; }
.search:focus-within { border-color: var(--fuchsia); background: var(--surface); box-shadow: 0 0 0 4px color-mix(in srgb, var(--fuchsia) 14%, transparent); }
.search i { color: var(--text-faint); font-size: 14px; }
.search input { flex: 1; min-width: 0; border: 0; outline: none; background: none; font-size: 16px; -webkit-appearance: none; appearance: none; }
.search input::placeholder { color: var(--text-faint); }
.search input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }
.pl-tools { display: flex; align-items: center; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.pl-tools .sp { flex: 1; }
.pl-tools .ibtn, .pl-tools a.ibtn { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; border: 1px solid var(--border); background: var(--surface); color: var(--text-muted); font-size: 14px; cursor: pointer; text-decoration: none; transition: all .18s; }
.pl-tools .ibtn:hover { color: var(--text); border-color: var(--border-strong); }
.pl-tools select { height: 38px; max-width: 170px; padding: 0 10px; border-radius: 11px; border: 1px solid var(--border); background: var(--surface); font-size: 13px; cursor: pointer; }
.sleep-wrap { position: relative; }
.sleep-menu { position: absolute; top: 44px; right: 0; z-index: 40; display: none; min-width: 150px; padding: 6px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-3); }
.sleep-menu.show { display: block; }
.sleep-menu button { display: block; width: 100%; padding: 9px 12px; border: 0; border-radius: 9px; background: none; text-align: left; font-size: 14px; color: var(--text-muted); cursor: pointer; }
.sleep-menu button:hover { background: var(--surface-2); color: var(--text); }
.sleep-menu button.off { color: var(--pink); border-top: 1px solid var(--border); border-radius: 0 0 9px 9px; margin-top: 4px; }

.playlist { list-style: none; margin: 0; padding: 10px 12px 14px; overflow-y: auto; max-height: calc(100vh - var(--fm-bar-h, 64px) - 300px); min-height: 360px; overscroll-behavior: contain; scroll-padding: 12px; }
.playlist::-webkit-scrollbar { width: 6px; }
.playlist::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: 10px; }

.track { position: relative; display: flex; align-items: center; gap: 12px; padding: 8px 10px; margin-bottom: 4px; border-radius: 16px; border: 1px solid transparent; cursor: pointer; transition: background .18s, border-color .18s, transform .18s var(--ease); animation: mxIn .45s var(--ease) both; }
@keyframes mxIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.track:hover { background: var(--surface-2); }
.track.playing { background: light-dark(linear-gradient(90deg, rgba(236, 72, 153, .09), rgba(124, 58, 237, .07)), linear-gradient(90deg, rgba(236, 72, 153, .16), rgba(124, 58, 237, .12))); border-color: color-mix(in srgb, var(--fuchsia) 30%, transparent); }
.handle { color: var(--text-faint); opacity: 0; font-size: 12px; cursor: grab; width: 10px; transition: opacity .2s; }
.track:hover .handle { opacity: .6; }
.drag-over { border: 2px dashed var(--fuchsia) !important; }

.thumb { --h: 300; position: relative; flex: none; width: 48px; height: 48px; border-radius: 13px; overflow: hidden; display: grid; place-items: center; color: #fff; font-size: 17px;
    background: linear-gradient(135deg, hsl(var(--h) 85% 62%), hsl(calc(var(--h) + 50) 80% 55%)); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .2); }
.thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.thumb .idx { position: absolute; right: 3px; bottom: 2px; font-size: 10px; font-weight: 800; color: #fff; text-shadow: 0 1px 3px rgba(0, 0, 0, .45); }
.thumb .viz { position: absolute; inset: 0; display: none; align-items: flex-end; justify-content: center; gap: 3px; padding-bottom: 12px; background: rgba(15, 23, 42, .45); }
.track.playing .thumb .viz { display: flex; }
.track.playing .thumb .idx { display: none; }
.viz span { width: 4px; height: 18px; border-radius: 3px; background: #fff; transform-origin: bottom; animation: mxJump .9s ease-in-out infinite; }
.viz span:nth-child(2) { animation-delay: .2s; } .viz span:nth-child(3) { animation-delay: .4s; } .viz span:nth-child(4) { animation-delay: .6s; }
@keyframes mxJump { 0%, 100% { transform: scaleY(.3); } 50% { transform: scaleY(1); } }
.paused .viz span { animation-play-state: paused; }

.track .info { flex: 1; min-width: 0; }
.track .info h4 { font-size: 15px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.track.playing .info h4 { color: var(--fuchsia); }
.track .info p { margin-top: 1px !important; font-size: 13px; color: var(--text-faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.plays { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px; background: var(--surface-2); font-size: 11.5px; font-weight: 700; color: var(--text-faint); font-variant-numeric: tabular-nums; flex: none; }
.plays i { font-size: 10px; }
.tbtn { flex: none; width: 36px; height: 36px; border-radius: 10px; border: 0; background: none; color: var(--text-faint); font-size: 14px; cursor: pointer; transition: all .18s; }
.tbtn:hover { background: var(--surface-3); color: var(--text); }
.tbtn.fav.on { color: #ec4899; }
.tbtn.pop i { animation: mxPop .35s var(--ease); }
@keyframes mxPop { 40% { transform: scale(1.45); } }

.empty { padding: 56px 20px; text-align: center; color: var(--text-faint); }
.empty i { font-size: 36px; margin-bottom: 14px; color: var(--fuchsia); opacity: .6; }
.empty p { font-size: 14.5px; line-height: 1.6; }

/* ---- Tip mesra pengguna -------------------------------------------------- */
.mx-tips { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 22px; }
.mx-tip { display: flex; gap: 14px; padding: 18px; }
.mx-tip__ico { flex: none; width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; color: #fff; font-size: 17px; }
.mx-tip:nth-child(1) .mx-tip__ico { background: linear-gradient(135deg, #ec4899, #c026d3); }
.mx-tip:nth-child(2) .mx-tip__ico { background: linear-gradient(135deg, #f59e0b, #ef4444); }
.mx-tip:nth-child(3) .mx-tip__ico { background: linear-gradient(135deg, #3b82f6, #7c3aed); }
.mx-tip h3 { font: 750 16px/1.3 var(--font-display); }
.mx-tip p { margin-top: 4px !important; font-size: 14px; color: var(--text-muted); }
.mx-keys { margin-top: 16px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; font-size: 13px; color: var(--text-faint); }
.mx-keys b { font-weight: 700; color: var(--text-muted); }
.mx-keys kbd { display: inline-block; min-width: 24px; padding: 2px 7px; margin-right: 4px; border-radius: 7px; border: 1px solid var(--border-strong); border-bottom-width: 2px; background: var(--surface); font: 700 12px/1.4 var(--font-body); color: var(--text); text-align: center; }

/* ---- Toast, bar mini, modal kongsi ------------------------------------- */
.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); z-index: 2000; max-width: calc(100vw - 32px); padding: 11px 18px; border-radius: 14px; background: light-dark(#0b1220, #f1f5f9); color: light-dark(#fff, #0b1220); font-size: 14px; font-weight: 600; box-shadow: var(--shadow-3); opacity: 0; pointer-events: none; transform: translate(-50%, 16px); transition: opacity .25s, transform .3s var(--ease); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
body.mp-mini-on .toast { bottom: calc(96px + env(safe-area-inset-bottom)); }

.mp-mini { position: fixed; left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom)); z-index: 1500; display: flex; align-items: center; gap: 10px; padding: 8px 8px 10px 10px; border-radius: 20px; background: color-mix(in srgb, var(--surface) 94%, transparent); border: 1px solid var(--border); box-shadow: var(--shadow-3); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); transform: translateY(140%); opacity: 0; pointer-events: none; transition: transform .35s var(--ease), opacity .25s; }
.mp-mini.show { transform: none; opacity: 1; pointer-events: auto; }
.mp-mini__ico { flex: none; width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; color: #fff; background: var(--grad); font-size: 16px; }
.mp-mini__txt { flex: 1; min-width: 0; cursor: pointer; }
.mp-mini__txt b { display: block; font-size: 14px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mp-mini__txt small { display: block; font-size: 12px; color: var(--text-faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mp-mini button { flex: none; width: 44px; height: 44px; border-radius: 50%; border: 0; display: grid; place-items: center; background: var(--surface-2); color: var(--text); font-size: 15px; cursor: pointer; }
.mp-mini button.pp { background: var(--grad); color: #fff; }
.mp-mini__bar { position: absolute; left: 16px; right: 16px; bottom: 4px; height: 3px; border-radius: 3px; background: var(--surface-3); overflow: hidden; }
.mp-mini__bar i { display: block; height: 100%; width: 0; background: var(--grad); }
@media (min-width: 901px) { .mp-mini { display: none; } }

.share-modal { position: fixed; inset: 0; z-index: 2100; display: none; align-items: center; justify-content: center; padding: 20px; background: rgba(15, 23, 42, .45); backdrop-filter: blur(6px); }
.share-modal.show { display: flex; }
.share-box { position: relative; width: 100%; max-width: 340px; padding: 26px; border-radius: 22px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-3); text-align: center; }
.share-box h3 { font: 750 19px/1.2 var(--font-display); margin-bottom: 6px !important; }
.share-box p { font-size: 14px; color: var(--text-muted); margin-bottom: 16px !important; }
.share-box img { display: block; margin: 0 auto 16px; border-radius: 14px; background: #fff; padding: 8px; border: 1px solid var(--border); }
.share-x { position: absolute; top: 10px; right: 10px; width: 38px; height: 38px; border-radius: 50%; border: 0; background: var(--surface-2); color: var(--text-muted); cursor: pointer; }
.share-row { display: flex; gap: 8px; }
.share-row input { flex: 1; min-width: 0; height: 42px; padding: 0 12px; border-radius: 11px; border: 1px solid var(--border); background: var(--surface-2); font-size: 13px; }
.share-row button { height: 42px; padding: 0 16px; border-radius: 11px; border: 0; background: var(--grad); color: #fff; font-weight: 700; cursor: pointer; }

/* ---- Responsif ---------------------------------------------------------- */
@media (max-width: 1080px) { .mx-hero { flex-direction: column; align-items: flex-start; } }
@media (max-width: 900px) {
    .mx-grid { grid-template-columns: 1fr; }
    .player { position: relative; top: auto; }
    .playlist { max-height: none; min-height: 0; overflow: visible; }
    .pl-head { position: sticky; top: var(--fm-bar-h, 64px); z-index: 20; border-radius: var(--r-lg) var(--r-lg) 0 0; }
    .playlist-panel { overflow: visible; }
    .mx-tips { grid-template-columns: 1fr; }
    body.mp-mini-on .fm-chat { bottom: 92px; }
    .mx { padding-bottom: 96px; }
}
@media (max-width: 560px) {
    .mx-hero { padding: 22px 0 16px; }
    .mx-lead { font-size: 15.5px; }
    .mx-cta { width: 100%; }
    .mx-cta .mx-btn { flex: 1; }
    .player { padding: 22px 16px 18px; border-radius: 22px; }
    .art-wrap { width: 170px; height: 170px; }
    .disc i { font-size: 60px; }
    .controls { gap: 6px; }
    .controls .play-btn { width: 66px; height: 66px; }
    .pl-head { padding: 16px 14px 10px; }
    .playlist { padding: 8px 6px 12px; }
    .track { gap: 10px; padding: 8px; }
    .plays { display: none; }
    .handle { display: none; }
    .pl-tools { gap: 6px; }
    .pl-tools .chip { padding: 0 11px; }
    .pl-tools .ibtn { width: 36px; height: 36px; }
    .pl-tools select { order: 9; flex: 1 1 100%; max-width: none; }
    .mx-keys { display: none; }
}
@media (min-width: 901px) and (max-height: 960px) {
    .art-wrap { width: 160px; height: 160px; margin-bottom: 14px; }
    .disc i { font-size: 58px; }
    .player { padding-top: 20px; padding-bottom: 18px; }
    .lyrics { height: 60px; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .001s !important; animation-iteration-count: 1 !important; transition-duration: .1s !important; }
}
