/* player.css — the mini player bar pinned to the bottom, and the mobile
   layout where it stacks. The full-screen player is in overlays.css.
   --mu-player-h (set in layout.css) must track .mu-player's real height. */

/* ---- Player bar ---- */

.mu-player {
    flex: none;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 2fr) minmax(0, 1fr);
    align-items: center;
    gap: 18px;
    padding: 10px clamp(12px, 2vw, 22px) calc(10px + env(safe-area-inset-bottom, 0px));
    background: #08080a;
    border-top: 1px solid var(--rule);
}

.mu-now { display: flex; align-items: center; gap: 8px; min-width: 0; }
.mu-now__main {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    flex: 1;
    border: 0;
    background: none;
    text-align: left;
    cursor: pointer;
    padding: 0;
}
.mu-now__actions { display: flex; align-items: center; gap: 2px; flex: none; }
.mu-now__meta { min-width: 0; display: flex; flex-direction: column; }
.mu-now__title { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); }
.mu-now__artist { font-size: 11px; color: var(--label); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mu-now__expand {
    display: grid;
    place-items: center;
    flex: none;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    color: var(--label);
    opacity: 0.55;
    transition: opacity 140ms var(--ease), background-color 140ms var(--ease), color 140ms var(--ease);
}
.mu-now__main:hover .mu-now__expand,
.mu-now__main:focus-visible .mu-now__expand { opacity: 1; background: rgba(232, 234, 237, 0.08); color: var(--text); }

.mu-viz { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; opacity: 0.9; }

.mu-lyrics-panel {
    position: fixed;
    left: 0;
    right: 0;
    bottom: calc(var(--mu-player-h) + 12px + env(safe-area-inset-bottom, 0px));
    max-height: 42vh;
    display: flex;
    flex-direction: column;
    background: #0c0c10;
    border-top: 1px solid var(--rule);
    z-index: 5;
}
.mu-lyrics-panel[hidden] { display: none; }
.mu-lyrics-panel__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 600;
    border-bottom: 1px solid var(--rule);
    cursor: pointer;
    flex: none;
}
.mu-lyrics-panel__body {
    margin: 0;
    padding: 16px;
    overflow-y: auto;
    font-family: inherit;
    font-size: 13px;
    line-height: 1.6;
    white-space: pre-wrap;
    color: var(--text);
}
.mu-lyrics-panel.is-collapsed .mu-lyrics-panel__body { display: none; }
.mu-lyrics-panel.is-collapsed { max-height: none; }

.mu-transport { display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; }
.mu-transport__row { display: flex; align-items: center; gap: 14px; }

.mu-iconbtn {
    display: grid;
    place-items: center;
    width: var(--tap);
    height: var(--tap);
    border: 0;
    border-radius: 50%;
    background: none;
    color: var(--text);
    cursor: pointer;
    transition: color 140ms var(--ease), background-color 140ms var(--ease);
}
.mu-iconbtn:hover { background: rgba(232, 234, 237, 0.08); }
.mu-iconbtn.is-on { color: var(--mu-accent); }

.mu-playbtn {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 50%;
    background: var(--text);
    color: #08080a;
    cursor: pointer;
    transition: transform 140ms var(--ease), background-color 140ms var(--ease);
}
.mu-playbtn:hover { transform: scale(1.05); background: #ffffff; }

.mu-seek { display: flex; align-items: center; gap: 10px; width: 100%; max-width: 620px; }
.mu-time { font-size: 11px; color: var(--label); font-variant-numeric: tabular-nums; min-width: 34px; text-align: center; }

.mu-vol { display: flex; align-items: center; gap: 8px; justify-content: flex-end; }

/* Range inputs — one look across the seek and volume controls. */
.mu-range {
    -webkit-appearance: none;
    appearance: none;
    flex: 1;
    height: 4px;
    border-radius: 999px;
    background: rgba(232, 234, 237, 0.18);
    cursor: pointer;
}
.mu-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 13px;
    height: 13px;
    border: 0;
    border-radius: 50%;
    background: var(--text);
}
.mu-range::-moz-range-thumb {
    width: 13px;
    height: 13px;
    border: 0;
    border-radius: 50%;
    background: var(--text);
}
.mu-range:disabled { opacity: 0.4; cursor: default; }
.mu-range--vol { max-width: 110px; }

/* ---- Mobile: nav becomes a top strip, player stacks ---- */

@media (max-width: 760px) {
    .mu-body { --mu-player-h: 140px; }
    .mu-layout { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }

    .mu-sidebar {
        flex-direction: row;
        align-items: center;
        gap: 4px;
        padding: 6px 10px;
        border-right: 0;
        border-bottom: 1px solid var(--rule);
        overflow-x: auto;
    }
    .mu-nav { flex-direction: row; }
    .mu-nav__item { min-height: 38px; padding: 0 12px; font-size: 11px; }
    .mu-side-section { display: none; }

    .mu-navbar { gap: 10px; padding: 0 12px; }
    .mu-navbar__search { max-width: none; }

    .mu-auth { grid-template-columns: 1fr; min-height: auto; gap: 26px; padding: 28px 0 46px; }
    .mu-auth__intro h1 { max-width: 13ch; font-size: clamp(38px, 12vw, 52px); }
    .mu-auth__intro .mu-auth__aside { display: none; }
    .mu-auth__orbit { width: 92vw; left: -25%; top: 30%; }

    .mu-player {
        grid-template-columns: minmax(0, 1fr);
        grid-template-areas: "now" "transport" "seek";
        gap: 8px 12px;
    }
    .mu-now { grid-area: now; }
    .mu-transport { grid-area: transport; }
    .mu-transport__row { gap: 6px; }
    .mu-seek { grid-area: seek; max-width: none; }
    .mu-vol { display: none; }

    .mu-track { grid-template-columns: 40px minmax(0, 1fr) auto 32px; gap: 8px; }
    .mu-track__index, .mu-track__mood, .mu-track__dur, .mu-track .mu-stars { display: none; }
    .mu-track__play { opacity: 1; }
    .mu-track:hover .mu-track__index { opacity: 1; }
}

@media (max-width: 420px) {
    .mu-hero, .mu-album-head { align-items: center; }
    .mu-cover--hero { width: 120px; }
}
