/**
 * Music Section — Soundtrack Universe / Liquid Glass
 *
 * @package Bargtunes
 */

.ms-section {
    --ms-bg: #050505;
    --ms-surface: rgba(255, 255, 255, 0.03);
    --ms-border: rgba(255, 255, 255, 0.08);
    --ms-text: #ffffff;
    --ms-muted: rgba(255, 255, 255, 0.55);
    --ms-hover: rgba(255, 255, 255, 0.06);
    --ms-active: rgba(255, 255, 255, 0.1);
    --ms-ease: cubic-bezier(0.22, 1, 0.36, 1);
    --ms-max: 1600px;
    --ms-gutter: clamp(20px, 4vw, 48px);
    --ms-nav-offset: var(--fn-dock-clearance, 88px);
}

.bargtunes-music.ms-section {
    position: relative;
    width: 100%;
    padding: 0 0 calc(clamp(72px, 10vw, 140px) + var(--ms-nav-offset) + env(safe-area-inset-bottom, 0px));
    background: var(--ms-bg);
    overflow: hidden;
    font-family: 'Poppins', sans-serif;
    color: var(--ms-text);
}

/* Background */
.ms-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

.ms-bg__grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
    background-size: 64px 64px;
    opacity: 0.35;
    mask-image: radial-gradient(ellipse at 50% 35%, black 15%, transparent 72%);
}

.ms-bg__noise {
    display: none;
}

.ms-bg__spotlight {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.35;
}

.ms-bg__spotlight--1 {
    width: 55vw;
    height: 55vw;
    max-width: 760px;
    max-height: 760px;
    top: 5%;
    left: 25%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.05) 0%, transparent 70%);
}

.ms-bg__spotlight--2 {
    width: 42vw;
    height: 42vw;
    max-width: 580px;
    max-height: 580px;
    bottom: 10%;
    right: 8%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.035) 0%, transparent 70%);
}

/* Marquee */
.ms-marquee {
    position: relative;
    z-index: 1;
    border-block: 1px solid var(--ms-border);
    background: rgba(255, 255, 255, 0.02);
    overflow: hidden;
    padding: 10px 0;
}

.ms-marquee__track {
    display: flex;
    width: max-content;
    animation: msMarquee 38s linear infinite;
}

.ms-marquee__text {
    flex-shrink: 0;
    padding-inline: 2rem;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: var(--ms-muted);
    white-space: nowrap;
}

@keyframes msMarquee {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

/* Container */
.ms-container {
    position: relative;
    z-index: 2;
    max-width: var(--ms-max);
    margin-inline: auto;
    padding: clamp(48px, 8vw, 88px) var(--ms-gutter) 0;
}

/* Header — base styles in section-headers.css */
.ms-header:not(.bt-section-head) {
    margin-bottom: clamp(36px, 5vw, 64px);
    max-width: 920px;
}

/* Toolbar — platforms + stats */
.ms-toolbar {
    margin-bottom: clamp(18px, 3vw, 28px);
    padding: 0;
    overflow: hidden;
    border-radius: 20px;
}

.ms-toolbar__head {
    padding: 12px 18px 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.ms-toolbar__label {
    margin: 0;
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--ms-muted);
}

.ms-toolbar__body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 1px minmax(220px, 0.42fr);
    align-items: stretch;
    gap: 0;
    min-height: 0;
}

.ms-toolbar__platforms {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    align-content: center;
    gap: 8px;
    padding: 14px 16px;
    min-width: 0;
}

.ms-toolbar__platform {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid var(--ms-border);
    background: rgba(255, 255, 255, 0.03);
    color: var(--ms-text);
    text-decoration: none;
    transition:
        background 0.25s var(--ms-ease),
        border-color 0.25s var(--ms-ease),
        transform 0.25s var(--ms-ease);
    -webkit-tap-highlight-color: transparent;
}

.ms-toolbar__platform:hover {
    background: var(--ms-hover);
    border-color: rgba(255, 255, 255, 0.14);
    transform: translateY(-1px);
}

.ms-toolbar__platform-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.ms-toolbar__platform-icon svg {
    width: 16px;
    height: 16px;
    color: var(--ms-muted);
    transition: color 0.25s ease;
}

.ms-toolbar__platform:hover .ms-toolbar__platform-icon svg {
    color: var(--ms-text);
}

.ms-toolbar__platform-name {
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0.08em;
    color: var(--ms-muted);
    white-space: nowrap;
    transition: color 0.25s ease;
}

.ms-toolbar__platform:hover .ms-toolbar__platform-name {
    color: var(--ms-text);
}

.ms-toolbar__divider {
    width: 1px;
    background: linear-gradient(
        to bottom,
        transparent,
        rgba(255, 255, 255, 0.1) 18%,
        rgba(255, 255, 255, 0.1) 82%,
        transparent
    );
    margin-block: 12px;
}

.ms-toolbar__stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 14px 16px;
    align-content: center;
}

.ms-toolbar__stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 10px 8px;
    border-radius: 12px;
    border: 1px solid transparent;
    background: rgba(255, 255, 255, 0.02);
    text-align: center;
    transition: border-color 0.25s var(--ms-ease), background 0.25s var(--ms-ease);
}

.ms-toolbar__stat:hover {
    border-color: var(--ms-border);
    background: rgba(255, 255, 255, 0.04);
}

.ms-toolbar__stat-icon svg {
    width: 14px;
    height: 14px;
    color: var(--ms-muted);
}

.ms-toolbar__stat-value {
    font-size: 1rem;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.02em;
    color: var(--ms-text);
    font-variant-numeric: tabular-nums;
}

.ms-toolbar__stat-label {
    font-size: 7px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--ms-muted);
    line-height: 1.3;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Bento layout — album + tracklist */
.ms-body--bento,
.ms-body {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
    gap: clamp(16px, 2.5vw, 28px);
    align-items: start;
}

.ms-col--album {
    min-width: 0;
}

.ms-col--tracklist {
    min-width: 0;
    /* sticky + Lenis causes mid-page scroll jank — keep static */
    position: relative;
    top: auto;
}

.ms-album {
    position: relative;
    overflow: hidden;
}

.ms-album::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 50% 0%, rgba(255, 255, 255, 0.04) 0%, transparent 55%);
    pointer-events: none;
    z-index: 0;
}

.ms-album > * {
    position: relative;
    z-index: 1;
}

/* Glass base */
.ms-glass {
    background: var(--ms-surface);
    border: 1px solid var(--ms-border);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 20px;
}

.ms-card-title {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--ms-muted);
    margin: 0 0 16px;
}

/* Featured Album */
.ms-album {
    position: relative;
    padding: 24px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.ms-album__badge {
    display: inline-block;
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--ms-muted);
    margin-bottom: 20px;
}

.ms-album__visual {
    position: relative;
    width: min(100%, 380px);
    margin-inline: auto;
    margin-bottom: 28px;
}

.ms-album__stage {
    position: relative;
    width: 100%;
    aspect-ratio: 1.05 / 1;
    min-height: 260px;
    --ms-cover-size: 64%;
    --ms-vinyl-size: 44%;
}

.ms-vinyl {
    position: absolute;
    top: 50%;
    left: calc(var(--ms-cover-size) - var(--ms-vinyl-size) * 0.42);
    width: var(--ms-vinyl-size);
    aspect-ratio: 1;
    transform: translateY(-50%);
    z-index: 1;
    transition: transform 0.85s var(--ms-ease);
    /* drop-shadow removed — forces expensive paint on scroll */
    filter: none;
}

.ms-album__stage:hover .ms-vinyl,
.ms-section.is-playing .ms-album__stage .ms-vinyl {
    transform: translateY(-50%) translateX(18px);
}

.ms-vinyl__disc {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background:
        radial-gradient(circle at 50% 50%, #1a1a1a 0%, #0a0a0a 55%, #000 100%);
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.08),
        0 8px 24px rgba(0, 0, 0, 0.45);
    will-change: auto;
}

.ms-vinyl__disc.is-spinning {
    animation: msVinylSpin 8s linear infinite;
    will-change: transform;
}

@keyframes msVinylSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
    .ms-vinyl__disc.is-spinning {
        animation: none;
    }
}

.ms-vinyl__grooves {
    position: absolute;
    inset: 8%;
    border-radius: 50%;
    /* Simple rings instead of repeating-radial + mask */
    background:
        radial-gradient(circle, transparent 42%, rgba(255, 255, 255, 0.06) 43%, transparent 44%),
        radial-gradient(circle, transparent 58%, rgba(255, 255, 255, 0.05) 59%, transparent 60%),
        radial-gradient(circle, transparent 72%, rgba(255, 255, 255, 0.04) 73%, transparent 74%);
    opacity: 0.9;
    pointer-events: none;
    mask-image: none;
    -webkit-mask-image: none;
}

.ms-vinyl__grooves--fine {
    display: none;
}

.ms-vinyl__shine {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.12) 0%, transparent 42%);
    pointer-events: none;
}

.ms-vinyl__label {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 36%;
    height: 36%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.2);
    box-shadow:
        0 0 0 4px rgba(0, 0, 0, 0.6),
        inset 0 0 16px rgba(0, 0, 0, 0.4);
    z-index: 2;
}

.ms-vinyl__label img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transform: scale(1.08);
}

.ms-vinyl__hole {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 9%;
    height: 9%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background: radial-gradient(circle, #0a0a0a 0%, #000 100%);
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 1);
    z-index: 3;
}

.ms-album__cover {
    position: absolute;
    top: 50%;
    left: 0;
    width: var(--ms-cover-size);
    aspect-ratio: 1;
    transform: translateY(-50%);
    z-index: 3;
    border-radius: 2px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow:
        0 20px 50px rgba(0, 0, 0, 0.65),
        0 4px 12px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    transition: transform 0.85s var(--ms-ease), box-shadow 0.85s var(--ms-ease);
}

.ms-album__stage:hover .ms-album__cover {
    transform: translateY(calc(-50% - 6px)) scale(1.015);
    box-shadow:
        0 28px 60px rgba(0, 0, 0, 0.7),
        0 8px 20px rgba(0, 0, 0, 0.45);
}

.ms-album__cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.ms-album__advisory {
    position: absolute;
    right: 6px;
    bottom: 6px;
    z-index: 2;
    pointer-events: none;
    transform: scale(0.42);
    transform-origin: bottom right;
    opacity: 0.92;
}

.ms-album__advisory .ft-advisory {
    margin: 0;
}

.ms-album__advisory .ft-advisory__badge--sm,
.ms-album__advisory .ft-advisory__badge {
    padding: 0;
    background: transparent;
    border: none;
    box-shadow: none;
}

.ms-album__title {
    font-size: clamp(1.25rem, 2.5vw, 1.75rem);
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin: 0 0 8px;
}

.ms-album__info {
    font-size: 12px;
    color: var(--ms-muted);
    margin: 0 0 20px;
}

.ms-meta-sep {
    margin: 0 6px;
    opacity: 0.5;
}

.ms-album__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    width: 100%;
    margin-bottom: 20px;
}

.ms-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    cursor: pointer;
    border: 1px solid transparent;
    text-decoration: none;
    transition: transform 0.3s var(--ms-ease), background 0.3s, border-color 0.3s;
    -webkit-tap-highlight-color: transparent;
}

.ms-btn svg {
    width: 14px;
    height: 14px;
}

.ms-btn--primary {
    background: #fff;
    color: #050505;
    border-color: #fff;
}

.ms-btn--primary:hover {
    transform: translateY(-2px) scale(1.02);
}

.ms-btn--ghost {
    background: transparent;
    color: var(--ms-text);
    border-color: var(--ms-border);
}

.ms-btn--ghost:hover {
    background: var(--ms-hover);
    border-color: rgba(255, 255, 255, 0.16);
    transform: translateY(-2px);
}

/* Waveform */
.ms-waveform {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 3px;
    width: 100%;
    height: 28px;
    opacity: 0.45;
}

.ms-waveform__bar {
    width: 2px;
    height: 6px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 1px;
    transform-origin: bottom;
    animation: msWave 1.2s ease-in-out infinite;
    animation-delay: calc(var(--wi) * 0.04s);
    animation-play-state: paused;
}

.ms-section.is-playing .ms-waveform__bar {
    animation-play-state: running;
}

@keyframes msWave {
    0%, 100% { transform: scaleY(0.35); opacity: 0.4; }
    50% { transform: scaleY(1); opacity: 1; }
}

/* Tracklist */
.ms-tracklist {
    display: flex;
    flex-direction: column;
    padding: 18px;
    padding-bottom: 14px;
    min-height: 480px;
    max-height: 640px;
    border-radius: 22px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.ms-tracklist .ms-card-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--ms-border);
}

.ms-tracklist .ms-card-title::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 0 12px rgba(255, 255, 255, 0.45);
}

.ms-tracks {
    flex: 1;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
    margin-bottom: 12px;
    padding-right: 4px;
}

.ms-tracks::-webkit-scrollbar {
    width: 4px;
}

.ms-tracks::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
}

.ms-track {
    display: grid;
    grid-template-columns: 32px 1fr auto auto;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 11px 12px;
    border: 1px solid transparent;
    border-radius: 10px;
    background: transparent;
    color: var(--ms-text);
    text-align: start;
    cursor: pointer;
    transition: background 0.3s, border-color 0.3s, transform 0.3s var(--ms-ease), box-shadow 0.3s;
    -webkit-tap-highlight-color: transparent;
    position: relative;
}

.ms-track-row {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 4px;
}

.ms-track-row .ms-track {
    width: auto;
    min-width: 0;
}

.ms-track__page {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-height: 34px;
    padding: 0 10px;
    border-radius: 999px;
    color: rgba(255, 255, 255, 0.78);
    text-decoration: none;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    white-space: nowrap;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.05);
    transition: color 0.25s, background 0.25s, border-color 0.25s;
}

.ms-track__page-icon {
    display: grid;
    place-items: center;
    width: 14px;
    height: 14px;
}

.ms-track__page-icon svg {
    width: 12px;
    height: 12px;
}

.ms-track__page:hover,
.ms-track__page:focus-visible {
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.28);
}

.ms-release-card__page {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 10px;
    padding: 7px 12px;
    border-radius: 999px;
    color: #fff;
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.06);
    transition: background 0.25s, border-color 0.25s, transform 0.25s;
}

.ms-release-card__page svg {
    width: 13px;
    height: 13px;
}

.ms-release-card__page:hover,
.ms-release-card__page:focus-visible {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

.ms-track::before {
    content: '';
    position: absolute;
    inset-inline-start: 0;
    top: 50%;
    width: 2px;
    height: 0;
    border-radius: 2px;
    background: #fff;
    transform: translateY(-50%);
    transition: height 0.3s var(--ms-ease);
}

.ms-track:hover::before,
.ms-track.is-active::before {
    height: 60%;
}

.ms-track:hover {
    background: var(--ms-hover);
    border-color: var(--ms-border);
    transform: translateY(-2px);
}

.ms-track.is-active {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.ms-track__num {
    font-size: 11px;
    font-weight: 600;
    color: var(--ms-muted);
    font-variant-numeric: tabular-nums;
}

.ms-track__name {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ms-track__play {
    opacity: 0;
    transition: opacity 0.25s;
}

.ms-track__play svg {
    width: 14px;
    height: 14px;
}

.ms-track:hover .ms-track__play,
.ms-track.is-active .ms-track__play {
    opacity: 1;
}

.ms-track__dur {
    font-size: 11px;
    color: var(--ms-muted);
    font-variant-numeric: tabular-nums;
}

/* Mini player */
.ms-section.has-playback-error .ms-mini-player {
    border-color: rgba(255, 90, 90, 0.45);
}

.ms-section.is-buffering .ms-mini-btn--play {
    animation: ms-buffer-pulse 1s ease-in-out infinite;
}

@keyframes ms-buffer-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.45; }
}

.ms-mini-player {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: auto;
    padding: 16px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    box-shadow:
        0 -8px 32px rgba(0, 0, 0, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
    flex-shrink: 0;
}

.ms-mini-player__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.ms-mini-player__info {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    flex: 1;
}

.ms-mini-player__cover {
    flex-shrink: 0;
    width: 52px;
    height: 52px;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--ms-border);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}

.ms-mini-player__cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.ms-mini-player__meta {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.ms-mini-player__label {
    font-size: 8px;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.4);
}

.ms-mini-player__title {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.03em;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ms-mini-player__artist {
    font-size: 10px;
    color: var(--ms-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ms-mini-player__counter {
    flex-shrink: 0;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.08em;
    color: var(--ms-muted);
    font-variant-numeric: tabular-nums;
    padding-top: 2px;
}

.ms-mini-player__progress {
    display: grid;
    grid-template-columns: 36px 1fr 36px;
    align-items: center;
    gap: 10px;
}

.ms-mini-player__time {
    font-size: 10px;
    font-weight: 500;
    color: var(--ms-muted);
    font-variant-numeric: tabular-nums;
    text-align: center;
}

.ms-mini-player__bar {
    position: relative;
    height: 4px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    cursor: pointer;
    overflow: visible;
    appearance: none;
}

.ms-mini-player__fill {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: #fff;
    pointer-events: none;
    transition: width 0.1s linear;
    position: relative;
}

.ms-mini-player__fill::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 0;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #fff;
    transform: translate(50%, -50%);
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.4);
    opacity: 0;
    transition: opacity 0.2s;
}

.ms-mini-player.is-playing .ms-mini-player__fill::after,
.ms-mini-player__bar:hover .ms-mini-player__fill::after {
    opacity: 1;
}

.ms-mini-player__foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.ms-mini-player__controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex: 1;
}

.ms-mini-player__extras {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.ms-mini-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 1px solid var(--ms-border);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.04);
    color: var(--ms-text);
    cursor: pointer;
    transition: background 0.25s, border-color 0.25s, transform 0.25s var(--ms-ease);
    -webkit-tap-highlight-color: transparent;
}

.ms-mini-btn svg {
    width: 15px;
    height: 15px;
}

.ms-mini-btn--play {
    width: 44px;
    height: 44px;
    background: #fff;
    color: #050505;
    border-color: #fff;
}

.ms-mini-btn--play:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: scale(1.04);
}

.ms-mini-btn--play .ms-mini-btn__icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.ms-mini-btn--play .ms-mini-btn__icon--pause {
    display: none;
}

.ms-section.is-playing .ms-mini-btn--play .ms-mini-btn__icon--play {
    display: none;
}

.ms-section.is-playing .ms-mini-btn--play .ms-mini-btn__icon--pause {
    display: flex;
}

.ms-mini-btn--ghost {
    width: 32px;
    height: 32px;
    border-color: transparent;
    background: transparent;
}

.ms-mini-btn--ghost:hover {
    background: var(--ms-hover);
    border-color: var(--ms-border);
}

.ms-mini-btn:hover:not(.ms-mini-btn--play) {
    background: var(--ms-hover);
    border-color: rgba(255, 255, 255, 0.14);
}

.ms-mini-player__volume {
    display: flex;
    align-items: center;
    gap: 4px;
}

.ms-volume {
    width: 56px;
    height: 3px;
    appearance: none;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    cursor: pointer;
    accent-color: #fff;
}

.ms-volume::-webkit-slider-thumb {
    appearance: none;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #fff;
    border: none;
    box-shadow: 0 0 6px rgba(255, 255, 255, 0.3);
}

.ms-volume::-moz-range-thumb {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #fff;
    border: none;
}

body.lang-persian .ms-mini-player__title,
body.rtl .ms-mini-player__title,
.ms-section[lang="fa-IR"] .ms-mini-player__title {
    letter-spacing: 0;
    text-transform: none;
}

/* Releases */
.ms-releases {
    margin-top: clamp(40px, 6vw, 72px);
}

.ms-releases__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.ms-releases__title {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--ms-muted);
    margin: 0;
}

.ms-releases__nav {
    display: flex;
    gap: 8px;
    direction: ltr;
}

.ms-releases__arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--ms-border);
    background: var(--ms-surface);
    color: var(--ms-text);
    cursor: pointer;
    backdrop-filter: blur(12px);
    transition: background 0.3s, transform 0.3s;
}

.ms-releases__arrow svg {
    width: 18px;
    height: 18px;
}

.ms-releases__arrow:hover {
    background: var(--ms-hover);
    transform: scale(1.05);
}

.ms-releases__track {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    padding-bottom: 8px;
    -webkit-overflow-scrolling: touch;
}

.ms-releases__track::-webkit-scrollbar {
    display: none;
}

.ms-release-card {
    flex: 0 0 clamp(220px, 28vw, 280px);
    scroll-snap-align: start;
    border-radius: 18px;
    overflow: hidden;
    background: var(--ms-surface);
    border: 1px solid var(--ms-border);
    cursor: pointer;
    transition: transform 0.3s var(--ms-ease), border-color 0.3s, box-shadow 0.3s;
}

.ms-release-card:hover {
    transform: translateY(-4px) scale(1.02);
    border-color: rgba(255, 255, 255, 0.16);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

.ms-release-card__cover {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
}

.ms-release-card__cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s var(--ms-ease);
}

.ms-release-card:hover .ms-release-card__cover img {
    transform: scale(1.06);
}

.ms-release-card__year {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0.12em;
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.55);
    border: 1px solid var(--ms-border);
}

.ms-release-card__play {
    position: absolute;
    bottom: 10px;
    right: 10px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid var(--ms-border);
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.3s, transform 0.3s;
}

.ms-release-card__play svg {
    width: 14px;
    height: 14px;
}

.ms-release-card:hover .ms-release-card__play {
    opacity: 1;
    transform: scale(1);
}

.ms-release-card__body {
    padding: 14px 16px 16px;
}

.ms-release-card__title {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin: 0 0 4px;
}

.ms-release-card__meta {
    font-size: 10px;
    color: var(--ms-muted);
    margin: 0;
}

.ms-releases__dots {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 16px;
}

.ms-releases__dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transition: background 0.3s, transform 0.3s;
}

.ms-releases__dot.is-active {
    background: rgba(255, 255, 255, 0.75);
    transform: scale(1.2);
}

/* Empty state */
.ms-empty {
    text-align: center;
    padding: clamp(48px, 8vw, 80px) 24px;
    border-radius: 20px;
    background: var(--ms-surface);
    border: 1px solid var(--ms-border);
}

.ms-empty__icon svg {
    width: 48px;
    height: 48px;
    color: var(--ms-muted);
    margin-bottom: 16px;
}

.ms-empty__title {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0 0 8px;
}

.ms-empty__text {
    font-size: 0.95rem;
    color: var(--ms-muted);
    margin: 0;
}

body.lang-persian .ms-toolbar__label,
body.rtl .ms-toolbar__label,
.ms-section[lang="fa-IR"] .ms-toolbar__label {
    letter-spacing: 0.1em;
    text-transform: none;
}

body.lang-persian .ms-toolbar__platform-name,
body.rtl .ms-toolbar__platform-name,
.ms-section[lang="fa-IR"] .ms-toolbar__platform-name {
    letter-spacing: 0;
    font-size: 10px;
}

body.lang-persian .ms-toolbar__stat-label,
body.rtl .ms-toolbar__stat-label,
.ms-section[lang="fa-IR"] .ms-toolbar__stat-label {
    letter-spacing: 0;
    text-transform: none;
    font-size: 8px;
}

/* RTL */
body.lang-persian .ms-headline,
body.rtl .ms-headline,
.ms-section[lang="fa-IR"] .ms-headline {
    font-family: 'ModamWeb', 'Vazirmatn', sans-serif;
}

body.lang-persian .ms-release-card__year,
body.rtl .ms-release-card__year,
.ms-section[lang="fa-IR"] .ms-release-card__year {
    right: auto;
    left: 10px;
}

body.lang-persian .ms-vinyl,
body.rtl .ms-vinyl,
.ms-section[lang="fa-IR"] .ms-vinyl {
    left: auto;
    right: calc(var(--ms-cover-size) - var(--ms-vinyl-size) * 0.42);
}

body.lang-persian .ms-album__stage:hover .ms-vinyl,
body.rtl .ms-album__stage:hover .ms-vinyl,
.ms-section[lang="fa-IR"] .ms-album__stage:hover .ms-vinyl,
body.lang-persian .ms-section.is-playing .ms-album__stage .ms-vinyl,
body.rtl .ms-section.is-playing .ms-album__stage .ms-vinyl,
.ms-section[lang="fa-IR"] .ms-section.is-playing .ms-album__stage .ms-vinyl {
    transform: translateY(-50%) translateX(-18px);
}

body.lang-persian .ms-album__cover,
body.rtl .ms-album__cover,
.ms-section[lang="fa-IR"] .ms-album__cover {
    left: auto;
    right: 0;
}

body.lang-persian .ms-album__advisory,
body.rtl .ms-album__advisory,
.ms-section[lang="fa-IR"] .ms-album__advisory {
    right: auto;
    left: 6px;
    transform-origin: bottom left;
}

@media (max-width: 768px) {
    body.lang-persian .ms-header,
    body.rtl .ms-header,
    .ms-section[lang="fa-IR"] .ms-header {
        text-align: center;
    }

    body.lang-persian .ms-desc,
    body.rtl .ms-desc,
    .ms-section[lang="fa-IR"] .ms-desc {
        margin-inline: auto;
    }

    body.lang-persian .ms-headline,
    body.rtl .ms-headline,
    .ms-section[lang="fa-IR"] .ms-headline {
        letter-spacing: 0;
        line-height: 0.95;
    }

    body.lang-persian .ms-album__title,
    body.rtl .ms-album__title,
    .ms-section[lang="fa-IR"] .ms-album__title {
        letter-spacing: 0;
        text-transform: none;
    }

    body.lang-persian .ms-track__name,
    body.rtl .ms-track__name,
    .ms-section[lang="fa-IR"] .ms-track__name {
        letter-spacing: 0;
        text-transform: none;
    }
}

/* ========================================
   RESPONSIVE — advanced breakpoints
======================================== */

/* Large desktop */
@media (min-width: 1400px) {
    .ms-body {
        gap: clamp(20px, 2.2vw, 32px);
    }

    .ms-album__visual {
        width: min(100%, 400px);
    }

    .ms-tracklist {
        min-height: 540px;
        max-height: 720px;
    }
}

/* Desktop / laptop */
@media (max-width: 1280px) {
    .ms-album {
        padding: 20px;
    }
}

@media (max-width: 1200px) {
    .ms-body--bento,
    .ms-body {
        grid-template-columns: minmax(0, 1fr) minmax(260px, 0.9fr);
    }
}

/* Tablet landscape */
@media (max-width: 1100px) {
    .ms-body--bento,
    .ms-body {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .ms-col--tracklist {
        position: static;
    }

    .ms-album {
        max-width: 540px;
        margin-inline: auto;
        width: 100%;
    }

    .ms-tracklist {
        min-height: 420px;
        max-height: 520px;
    }

    .ms-mini-player__extras {
        display: none;
    }
}

/* Tablet portrait */
@media (max-width: 900px) {
    .ms-section {
        --ms-nav-offset: var(--fn-dock-clearance, 96px);
        --ms-gutter: clamp(18px, 4vw, 32px);
    }

    .ms-toolbar__body {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto;
    }

    .ms-toolbar__divider {
        width: auto;
        height: 1px;
        margin: 0 16px;
        background: linear-gradient(
            to right,
            transparent,
            rgba(255, 255, 255, 0.1) 15%,
            rgba(255, 255, 255, 0.1) 85%,
            transparent
        );
    }

    .ms-toolbar__platforms {
        justify-content: center;
        padding: 12px 14px;
    }

    .ms-toolbar__stats {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        padding: 12px 14px 14px;
        gap: 6px;
    }

    .ms-toolbar__stat {
        padding: 8px 4px;
    }

    .ms-toolbar__stat-value {
        font-size: 0.9rem;
    }

    .ms-desc {
        max-width: none;
    }

    .ms-tracklist {
        min-height: 380px;
        max-height: 460px;
    }

    .ms-releases {
        margin-top: clamp(32px, 5vw, 48px);
    }
}

/* Mobile */
@media (max-width: 768px) {
    .ms-section {
        --ms-gutter: clamp(16px, 4.5vw, 24px);
        --ms-nav-offset: var(--fn-dock-clearance, 104px);
    }

    .ms-marquee {
        padding: 8px 0;
    }

    .ms-marquee__text {
        font-size: 9px;
        letter-spacing: 0.22em;
        padding-inline: 1.25rem;
    }

    .ms-container {
        padding-top: clamp(32px, 8vw, 48px);
    }

    .ms-header,
    .ms-toolbar {
        width: 100%;
    }

    .ms-toolbar__head {
        padding: 10px 14px 8px;
        text-align: center;
    }

    .ms-toolbar__platforms {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 6px;
        padding: 10px 12px;
    }

    .ms-toolbar__platform {
        justify-content: center;
        width: 100%;
        min-width: 0;
        padding: 8px 10px;
        gap: 6px;
    }

    .ms-toolbar__platform-name {
        font-size: 7px;
        letter-spacing: 0.05em;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 100%;
    }

    .ms-toolbar__divider {
        margin: 0 12px;
    }

    .ms-toolbar__stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 6px;
        padding: 10px 12px 12px;
    }

    .ms-toolbar__stat-label {
        font-size: 6px;
        letter-spacing: 0.08em;
        white-space: normal;
        line-height: 1.25;
    }

    .ms-body,
    .ms-body--bento {
        display: flex;
        flex-direction: column;
        gap: 18px;
        align-items: center;
    }

    .ms-col--album { order: 1; width: 100%; }
    .ms-col--tracklist { order: 2; width: 100%; }

    .ms-album {
        max-width: min(100%, 440px);
        padding: 18px;
        border-radius: 18px;
    }

    .ms-album__visual {
        width: 100%;
        max-width: 360px;
        margin-bottom: 20px;
    }

    .ms-album__stage {
        --ms-cover-size: 62%;
        --ms-vinyl-size: 42%;
        min-height: 220px;
    }

    .ms-album__title {
        font-size: clamp(1.1rem, 4.5vw, 1.4rem);
    }

    .ms-album__actions {
        gap: 8px;
    }

    .ms-tracklist {
        min-height: auto;
        max-height: none;
        padding: 16px;
        border-radius: 18px;
        max-width: min(100%, 440px);
        margin-inline: auto;
    }

    .ms-tracks {
        max-height: min(52vh, 360px);
        margin-bottom: 10px;
        padding-inline-end: 2px;
    }

    .ms-track {
        padding: 11px 12px;
        border-radius: 10px;
    }

    .ms-track__name {
        font-size: 11px;
    }

    .ms-mini-player {
        padding: 12px;
        gap: 10px;
        border-radius: 14px;
    }

    .ms-mini-player__cover {
        width: 46px;
        height: 46px;
    }

    .ms-mini-player__progress {
        gap: 8px;
    }

    .ms-mini-player__extras {
        display: none;
    }

    .ms-mini-player__foot {
        justify-content: center;
    }

    .ms-mini-player__controls {
        flex: none;
        gap: 6px;
    }

    .ms-mini-btn--play {
        width: 42px;
        height: 42px;
    }

    .ms-releases {
        margin-top: clamp(28px, 6vw, 40px);
        width: 100%;
    }

    .ms-releases__head {
        margin-bottom: 14px;
        padding-inline: 2px;
    }

    .ms-releases__track {
        gap: 12px;
        padding-inline: var(--ms-gutter);
        margin-inline: calc(var(--ms-gutter) * -1);
        scroll-padding-inline: var(--ms-gutter);
        mask-image: linear-gradient(to right, transparent, #000 16px, #000 calc(100% - 16px), transparent);
        -webkit-mask-image: linear-gradient(to right, transparent, #000 16px, #000 calc(100% - 16px), transparent);
    }

    .ms-release-card {
        flex-basis: min(76vw, 240px);
        border-radius: 16px;
    }

    .ms-release-card__body {
        padding: 12px 14px 14px;
    }

    .ms-releases__arrow {
        width: 44px;
        height: 44px;
    }
}

/* Small mobile */
@media (max-width: 480px) {
    .ms-section {
        --ms-gutter: clamp(14px, 4vw, 20px);
    }

    .ms-album {
        padding: 14px;
    }

    .ms-album__stage {
        --ms-cover-size: 64%;
        --ms-vinyl-size: 40%;
        min-height: 200px;
    }

    .ms-album__actions {
        flex-direction: column;
    }

    .ms-btn {
        width: 100%;
        padding: 13px 18px;
    }

    .ms-track {
        grid-template-columns: 28px 1fr auto;
        gap: 6px;
    }

    .ms-track__play {
        display: none;
    }

    .ms-tracks {
        max-height: min(48vh, 300px);
    }

    .ms-mini-player__head {
        gap: 8px;
    }

    .ms-mini-player__title {
        font-size: 11px;
    }

    .ms-mini-player__time {
        font-size: 9px;
    }

    .ms-mini-player__progress {
        grid-template-columns: 32px 1fr 32px;
    }

    .ms-release-card {
        flex-basis: min(84vw, 220px);
    }

    .ms-releases__dots {
        margin-top: 12px;
    }
}

/* Very small screens */
@media (max-width: 480px) {
    .ms-toolbar__platforms {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 380px) {
    .ms-toolbar__stat-value {
        font-size: 0.88rem;
    }

    .ms-toolbar__stat {
        padding: 8px 4px;
    }

    .ms-album__visual {
        max-width: 100%;
    }

    .ms-mini-btn {
        width: 32px;
        height: 32px;
    }

    .ms-mini-btn--play {
        width: 38px;
        height: 38px;
    }
}

/* Landscape phones */
@media (max-height: 520px) and (orientation: landscape) {
    .ms-section {
        --ms-nav-offset: var(--fn-dock-clearance, 72px);
    }

    .ms-body,
    .ms-body--bento {
        display: grid;
        grid-template-columns: 1fr 1fr;
        align-items: start;
        gap: 14px;
    }

    .ms-col--tracklist {
        position: static;
    }

    .ms-tracklist {
        max-width: none;
        min-height: 280px;
        max-height: calc(100vh - 180px);
    }

    .ms-toolbar__stats {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .ms-tracks {
        max-height: calc(100vh - 320px);
    }

    .ms-album__visual {
        margin-bottom: 12px;
    }

    .ms-releases {
        margin-top: 24px;
    }
}

/* Tablet mini-player — show volume in wider mobile/tablet */
@media (min-width: 600px) and (max-width: 1100px) {
    .ms-mini-player__extras {
        display: flex;
    }

    .ms-mini-player__foot {
        justify-content: space-between;
    }
}

@media (hover: none) and (pointer: coarse) {
    .ms-toolbar__platform:hover,
    .ms-toolbar__stat:hover,
    .ms-track:hover,
    .ms-release-card:hover,
    .ms-btn:hover,
    .ms-mini-btn:hover,
    .ms-releases__arrow:hover {
        transform: none;
    }

    .ms-release-card__play {
        opacity: 1;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ms-marquee__track,
    .ms-waveform__bar {
        animation: none !important;
    }

    .ms-album__stage:hover .ms-vinyl,
    .ms-album__stage:hover .ms-album__cover,
    .ms-section.is-playing .ms-album__stage .ms-vinyl {
        transform: none !important;
    }

    .ms-album__stage:hover .ms-album__cover {
        transform: translateY(-50%) !important;
    }

    .ms-release-card:hover .ms-release-card__cover img {
        transform: none !important;
    }
}
