/* ==========================================================================
   Music archive page (/musics/) — music archive design 3 "track cards + now-playing panel"
   Markup: partials/archive/musics.php · playback & panel sync: public/js/animetv-music-player.js
   (.js-music-track-card.is-active/.is-playing, #atvMuaNow.is-idle/.is-playing/.is-op|.is-ed|.is-ost).
   Music accent rose; OP amber, ED violet, OST cyan (same as the home music section).
   ========================================================================== */

.atv-mua {
    --ma-ac: #ff8fc7;
    --ma-ac-2: #ff5fa8;
    --ma-ink: #2a0517;
    --ma-line: rgba(244, 63, 148, 0.45);
    --ma-glow: rgba(244, 63, 148, 0.65);
    --ma-soft: rgba(244, 63, 148, 0.13);
    --ma-surface: #1b1c24;
    --ma-panel: linear-gradient(180deg, #1f1d26, #17181f);
    --ma-field: #1c1d25;
    --ma-border: #2a2f3a;
    --ma-border-2: #3a404c;
    --ma-text: #eef0f4;
    --ma-text-2: #c3c8d2;
    --ma-muted: #8b92a1;
    --ma-hover: rgba(255, 255, 255, 0.05);
    --ma-chip: rgba(255, 255, 255, 0.04);
    --ma-chip-line: rgba(255, 255, 255, 0.08);
    --ma-drop: rgba(0, 0, 0, 0.9);

    width: calc(100% - 48px);
    max-width: 1320px;
    margin: 28px auto 40px;
    direction: rtl;
    color: var(--ma-text);
}
#animetvApp.day .atv-mua {
    --ma-ac: #be185d;
    --ma-ac-2: #db2777;
    --ma-ink: #ffffff;
    --ma-line: rgba(190, 24, 93, 0.35);
    --ma-glow: rgba(219, 39, 119, 0.35);
    --ma-soft: rgba(219, 39, 119, 0.08);
    --ma-surface: #ffffff;
    --ma-panel: linear-gradient(180deg, #ffffff, #f7f8fb);
    --ma-field: #ffffff;
    --ma-border: rgba(15, 23, 42, 0.1);
    --ma-border-2: rgba(15, 23, 42, 0.2);
    --ma-text: #0f172a;
    --ma-text-2: #334155;
    --ma-muted: #64748b;
    --ma-hover: rgba(15, 23, 42, 0.04);
    --ma-chip: #f1f3f8;
    --ma-chip-line: rgba(15, 23, 42, 0.08);
    --ma-drop: rgba(15, 23, 42, 0.35);
}
.atv-mua *,
.atv-mua *::before,
.atv-mua *::after {
    box-sizing: border-box;
}
.atv-mua .is-op {
    --ty: #f5b942;
    --ty-s: rgba(245, 185, 66, 0.12);
    --ty-l: rgba(245, 185, 66, 0.4);
    --ty-g: rgba(245, 185, 66, 0.55);
}
.atv-mua .is-ed {
    --ty: #c4b5fd;
    --ty-s: rgba(139, 92, 246, 0.14);
    --ty-l: rgba(139, 92, 246, 0.45);
    --ty-g: rgba(139, 92, 246, 0.6);
}
.atv-mua .is-ost {
    --ty: #67d4ff;
    --ty-s: rgba(56, 189, 248, 0.12);
    --ty-l: rgba(56, 189, 248, 0.4);
    --ty-g: rgba(56, 189, 248, 0.55);
}
#animetvApp.day .atv-mua .is-op {
    --ty: #a16207;
}
#animetvApp.day .atv-mua .is-ed {
    --ty: #6d28d9;
}
#animetvApp.day .atv-mua .is-ost {
    --ty: #0369a1;
}

.atv-mua__lay {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 28px;
    align-items: start;
}
.atv-mua__main {
    min-width: 0;
}

/* ---------- Head & tools ---------- */
.atv-mua__kick {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 12.5px;
    font-weight: 800;
    color: var(--ma-ac);
}
.atv-mua .atv-mua__title {
    margin: 6px 0 4px;
    font-family: 'IRANYekanX', 'Vazirmatn', sans-serif;
    font-size: 30px;
    font-weight: 900;
    line-height: 1.35;
    color: var(--ma-text);
}
.atv-mua .atv-mua__sub {
    margin: 0;
    font-size: 13px;
    color: var(--ma-muted);
}
.atv-mua__tools {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin: 20px 0 16px;
}
.atv-mua__tabs {
    display: flex;
    gap: 6px;
    padding: 4px;
    border-radius: 999px;
    background: var(--ma-chip);
    border: 1px solid var(--ma-chip-line);
}
.atv-mua .atv-mua__tabs a {
    height: 38px;
    padding: 0 14px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 800;
    color: var(--ma-text-2);
    text-decoration: none;
    transition: background 0.25s, color 0.25s;
}
.atv-mua .atv-mua__tabs a small {
    font-size: 11px;
    font-weight: 700;
    opacity: 0.75;
}
.atv-mua .atv-mua__tabs a:hover {
    color: var(--ma-text);
}
.atv-mua .atv-mua__tabs a.is-on {
    color: var(--ma-ink);
    background: var(--ma-ac);
    box-shadow: 0 8px 20px -10px var(--ma-glow);
}
.atv-mua__search {
    position: relative;
    margin: 0 auto 0 0;
    width: 280px;
    max-width: 100%;
    height: 44px;
    padding: 0 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-radius: 14px;
    color: var(--ma-muted);
    background: var(--ma-field);
    border: 1px solid var(--ma-border);
    transition: border-color 0.2s, box-shadow 0.2s;
}
.atv-mua__search:focus-within {
    border-color: var(--ma-line);
    box-shadow: 0 0 0 4px var(--ma-soft);
}
.atv-mua .atv-mua__search input {
    flex: 1;
    min-width: 0;
    height: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    outline: 0;
    background: transparent;
    box-shadow: none;
    color: var(--ma-text);
    font: inherit;
    font-size: 13px;
}
.atv-mua .atv-mua__clear {
    color: var(--ma-muted);
    text-decoration: none;
}

/* ---------- Track cards ---------- */
.atv-mua__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}
.atv-mua-card {
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 96px;
    padding: 10px 12px 10px 14px;
    border-radius: 20px;
    background: var(--ma-surface);
    border: 1px solid var(--ma-border);
    cursor: pointer;
    transition: border-color 0.25s, box-shadow 0.25s, transform 0.25s;
}
.atv-mua-card.is-active {
    border-color: var(--ma-line);
    background: linear-gradient(270deg, var(--ma-soft), rgba(255, 255, 255, 0.01)), var(--ma-surface);
    box-shadow: 0 18px 36px -24px var(--ma-glow);
}
.atv-mua .atv-mua-card__cv {
    position: relative;
    width: 76px;
    height: 76px;
    flex-shrink: 0;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 16px;
    overflow: hidden;
    background: #16181f;
    cursor: pointer;
    box-shadow: 0 10px 20px -10px var(--ma-drop);
}
.atv-mua-card__cv img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.atv-mua-card__ov {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: #ffffff;
    background: rgba(8, 9, 12, 0.45);
    opacity: 0;
    transition: opacity 0.25s;
}
.atv-mua-card__play {
    font-size: 20px;
}
.atv-mua-card.is-active .atv-mua-card__ov {
    opacity: 1;
}
.atv-mua-eq {
    display: none;
    align-items: flex-end;
    gap: 3px;
    height: 20px;
}
.atv-mua-eq i {
    width: 4px;
    height: 6px;
    border-radius: 2px;
    background: #ff8fc7;
}
.atv-mua-card.is-playing .atv-mua-eq {
    display: flex;
}
.atv-mua-card.is-playing .atv-mua-eq i {
    animation: atvMuaEq 0.9s ease-in-out infinite;
}
.atv-mua-card.is-playing .atv-mua-eq i:nth-child(2) {
    animation-delay: 0.2s;
}
.atv-mua-card.is-playing .atv-mua-eq i:nth-child(3) {
    animation-delay: 0.4s;
}
.atv-mua-card.is-playing .atv-mua-card__play {
    display: none;
}
@keyframes atvMuaEq {
    0%,
    100% {
        height: 5px;
    }
    50% {
        height: 20px;
    }
}
.atv-mua-card__tx {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
    line-height: 1.4;
}
.atv-mua .atv-mua-card__name {
    font-family: 'AtvKalameh', 'Vazirmatn', sans-serif;
    font-size: 15px;
    font-weight: 700;
    color: var(--ma-text);
    text-align: right;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.atv-mua-card.is-active .atv-mua-card__name {
    color: var(--ma-ac);
}
.atv-mua .atv-mua-card__work {
    font-family: 'AtvKalameh', 'Vazirmatn', sans-serif;
    font-size: 12.5px;
    color: var(--ma-text-2);
    text-align: right;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.atv-mua .atv-mua-card__work:hover {
    color: var(--ma-text);
    text-decoration: underline;
}
.atv-mua-card__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--ma-muted);
}
.atv-mua-tp {
    height: 24px;
    padding: 0 9px;
    display: inline-flex;
    align-items: center;
    border-radius: 7px;
    font-size: 11.5px;
    font-weight: 800;
    letter-spacing: 0.3px;
    color: var(--ty);
    background: var(--ty-s);
    box-shadow: inset 0 0 0 1px var(--ty-l);
}
.atv-mua-card__ac {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.atv-mua .atv-mua-ib {
    width: 36px;
    height: 36px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 11px;
    display: grid;
    place-items: center;
    font-size: 14px;
    color: var(--ma-muted);
    background: transparent;
    text-decoration: none;
    cursor: pointer;
    transition: color 0.2s, background 0.2s;
}
.atv-mua .atv-mua-ib:hover {
    color: var(--ma-text);
    background: var(--ma-hover);
}
.atv-mua .atv-mua-ib.is-on {
    color: var(--ma-ac-2);
}

.atv-mua__pages {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: 22px;
}
.atv-mua .atv-mua__pages a {
    min-width: 44px;
    height: 44px;
    padding: 0 12px;
    display: grid;
    place-items: center;
    border-radius: 13px;
    font-size: 14px;
    font-weight: 800;
    color: var(--ma-text-2);
    background: var(--ma-field);
    border: 1px solid var(--ma-border);
    text-decoration: none;
}
.atv-mua .atv-mua__pages a.is-on {
    color: var(--ma-ink);
    background: var(--ma-ac);
    border-color: transparent;
    box-shadow: 0 10px 24px -10px var(--ma-glow);
}
.atv-mua__empty {
    padding: 60px 20px;
    text-align: center;
    border-radius: 22px;
    background: var(--ma-chip);
    border: 1px dashed var(--ma-border-2);
    color: var(--ma-muted);
}
.atv-mua__empty i {
    font-size: 34px;
    color: var(--ma-ac);
}
.atv-mua .atv-mua__empty h3 {
    margin: 12px 0 6px;
    font-size: 16px;
    color: var(--ma-text);
}
.atv-mua .atv-mua__empty a {
    color: var(--ma-ac);
    font-weight: 700;
}

/* ---------- Now-playing panel ---------- */
.atv-mua-np {
    position: sticky;
    top: 96px;
    padding: 22px;
    border-radius: 28px;
    overflow: hidden;
    color: var(--ma-text);
    background: radial-gradient(420px 320px at 50% 0%, var(--ty-g), transparent 70%), var(--ma-panel);
    border: 1px solid var(--ma-chip-line);
    box-shadow: 0 40px 80px -30px var(--ma-drop), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.atv-mua-np__label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
    font-size: 12.5px;
    font-weight: 800;
    color: var(--ma-text-2);
}
.atv-mua-np__label > span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.atv-mua-np__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--ma-muted);
}
.atv-mua-np.is-playing .atv-mua-np__dot {
    background: var(--ma-ac-2);
    animation: atvMuaPulse 1.6s ease-out infinite;
}
@keyframes atvMuaPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(244, 63, 148, 0.7);
    }
    100% {
        box-shadow: 0 0 0 10px rgba(244, 63, 148, 0);
    }
}
.atv-mua-np__cover {
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 24px;
    overflow: hidden;
    background: #16181f;
    box-shadow: 0 30px 60px -20px var(--ma-drop), 0 0 80px -20px var(--ty-g), 0 0 0 1px rgba(255, 255, 255, 0.1);
}
.atv-mua-np__cover.is-swap {
    animation: atvMuaSwap 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
@keyframes atvMuaSwap {
    from {
        opacity: 0.4;
        transform: scale(0.97);
    }
    to {
        opacity: 1;
        transform: none;
    }
}
.atv-mua-np__cover img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.atv-mua-np__title {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 18px;
}
.atv-mua-np__title > div {
    flex: 1;
    min-width: 0;
}
.atv-mua .atv-mua-np__title strong {
    display: block;
    font-family: 'AtvKalameh', 'Vazirmatn', sans-serif;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.35;
    color: var(--ma-text);
    text-align: right;
    overflow-wrap: anywhere;
}
.atv-mua .atv-mua-np__title a {
    display: block;
    font-family: 'AtvKalameh', 'Vazirmatn', sans-serif;
    font-size: 13px;
    color: var(--ma-text-2);
    text-align: right;
    text-decoration: none;
}
.atv-mua .atv-mua-np__title a:hover {
    color: var(--ma-text);
}
.atv-mua-np__prog {
    margin-top: 16px;
    direction: ltr;
}
.atv-mua-np__track {
    position: relative;
    height: 6px;
    border-radius: 6px;
    background: rgba(128, 128, 140, 0.25);
    cursor: pointer;
}
.atv-mua-np__track span {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 0;
    border-radius: 6px;
    background: linear-gradient(90deg, var(--ma-ac-2), #ffb3d6);
    box-shadow: 0 0 12px var(--ma-glow);
}
.atv-mua-np__track span::after {
    content: "";
    position: absolute;
    right: -7px;
    top: -4px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 0 10px var(--ma-glow);
}
.atv-mua-np.is-idle .atv-mua-np__track span::after {
    display: none;
}
.atv-mua-np__time {
    display: flex;
    justify-content: space-between;
    margin-top: 6px;
    font-size: 11.5px;
    color: var(--ma-muted);
}
.atv-mua-np__ctrl {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin-top: 10px;
    direction: ltr;
}
.atv-mua .atv-mua-cb {
    width: 42px;
    height: 42px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 16px;
    color: var(--ma-text-2);
    background: transparent;
    text-decoration: none;
    cursor: pointer;
    transition: color 0.2s, background 0.2s;
}
.atv-mua .atv-mua-cb:hover {
    color: var(--ma-text);
    background: var(--ma-hover);
}
.atv-mua .atv-mua-cb.is-on {
    color: var(--ma-ac);
}
.atv-mua .atv-mua-pp {
    width: 62px;
    height: 62px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 22px;
    color: #2a0517;
    background: linear-gradient(180deg, #ffb3d6, #ff5fa8);
    cursor: pointer;
    box-shadow: 0 16px 34px -12px rgba(244, 63, 148, 0.95), inset 0 1px 0 rgba(255, 255, 255, 0.5);
    transition: transform 0.2s;
}
.atv-mua .atv-mua-pp:hover {
    transform: scale(1.05);
}
.atv-mua-np__acts {
    display: flex;
    gap: 8px;
    margin-top: 14px;
}
.atv-mua .atv-mua-np__acts > * {
    flex: 1;
    height: 42px;
    margin: 0;
    border-radius: 13px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    font: inherit;
    font-size: 12.5px;
    font-weight: 800;
    color: var(--ma-text);
    background: var(--ma-chip);
    border: 1px solid var(--ma-chip-line);
    text-decoration: none;
    cursor: pointer;
}
.atv-mua .atv-mua-np__acts > *:hover {
    border-color: var(--ma-line);
}
.atv-mua .atv-mua-np__acts .is-on {
    color: var(--ma-ac);
    border-color: var(--ma-line);
}
.atv-mua-np__qh {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 20px 0 8px;
    padding-top: 16px;
    border-top: 1px solid var(--ma-chip-line);
    font-size: 13px;
    font-weight: 800;
}
.atv-mua-np__qh small {
    font-size: 11.5px;
    font-weight: 500;
    color: var(--ma-muted);
}
.atv-mua .atv-mua-np__qi {
    width: 100%;
    height: 54px;
    margin: 0;
    padding: 0 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 0;
    border-radius: 13px;
    background: transparent;
    color: var(--ma-text);
    font: inherit;
    text-align: right;
    cursor: pointer;
}
.atv-mua .atv-mua-np__qi:hover {
    background: var(--ma-hover);
}
.atv-mua-np__qi img {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    border-radius: 10px;
    object-fit: cover;
}
.atv-mua-np__qi span {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    line-height: 1.4;
}
.atv-mua-np__qi b {
    font-family: 'AtvKalameh', 'Vazirmatn', sans-serif;
    font-size: 13px;
    text-align: right;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.atv-mua-np__qi small {
    font-size: 11px;
    color: var(--ma-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.atv-mua-np__qi em {
    font-style: normal;
    font-size: 11.5px;
    color: var(--ma-muted);
    direction: ltr;
}

.atv-mua a:focus-visible,
.atv-mua button:focus-visible,
.atv-mua [tabindex]:focus-visible {
    outline: 2px solid var(--ma-ac);
    outline-offset: 2px;
}

@media (hover: hover) {
    .atv-mua-card:hover {
        transform: translateY(-2px);
        border-color: var(--ma-border-2);
    }
    .atv-mua-card:hover .atv-mua-card__ov {
        opacity: 1;
    }
}

/* On wide screens the panel replaces the site-wide player bar on this page. */
@media (min-width: 1101px) {
    body:has(#atvMuaNow) #animetvMusicPlayerBar {
        display: none !important;
    }
}

@media (max-width: 1100px) {
    .atv-mua__lay {
        grid-template-columns: minmax(0, 1fr);
    }
    .atv-mua-np {
        display: none;
    }
}
@media (max-width: 760px) {
    .atv-mua {
        width: calc(100% - 32px);
        margin-top: 20px;
    }
    .atv-mua .atv-mua__title {
        font-size: 24px;
    }
    .atv-mua__grid {
        grid-template-columns: minmax(0, 1fr);
    }
    .atv-mua__tabs {
        width: 100%;
        overflow-x: auto;
    }
    .atv-mua__search {
        width: 100%;
    }
    .atv-mua-card {
        min-height: 84px;
        gap: 12px;
    }
    .atv-mua .atv-mua-card__cv {
        width: 64px;
        height: 64px;
        border-radius: 14px;
    }
}
@media (prefers-reduced-motion: reduce) {
    .atv-mua-card,
    .atv-mua-np__cover.is-swap,
    .atv-mua-card.is-playing .atv-mua-eq i,
    .atv-mua-np.is-playing .atv-mua-np__dot {
        animation: none;
        transition: none;
    }
}
