/* =========================================================
   MARMES PLAYER V3
========================================================= */

.marmes-player-outer {
    width: 100%;
    margin: 40px 0;
}

/* =========================================================
   PLAYER SHELL
========================================================= */

.marmes-player {
    position: relative;
    width: 100%;

    padding: 28px;
    border-radius: 34px;

    background: #f7f7f9;

    border: 1px solid rgba(0,0,0,0.05);

    box-shadow:
        0 12px 40px rgba(0,0,0,0.08),
        0 30px 80px rgba(0,0,0,0.10);

    overflow: hidden;
}

/* =========================================================
   LAYOUT
========================================================= */

.marmes-player-layout {
    display: grid;
    grid-template-columns: minmax(0,1fr) 340px;
    gap: 36px;
    align-items: start;
}

.marmes-main-side {
    display: flex;
    flex-direction: column;
}

.marmes-playlist-side {
    background: rgba(255,255,255,0.72);

    border-radius: 24px;

    padding:
        16px
        18px
        18px
        22px;

    min-width: 0;

    display: flex;
    flex-direction: column;

    justify-content: space-between;
}

/* =========================================================
   PLAYER LABEL
========================================================= */

.marmes-player-label {

    margin-bottom: 14px;

    text-align: center;

    font-size: 15px;

    letter-spacing: .22em;

    text-transform: uppercase;

    color: rgba(29,29,31,0.48);

    font-weight: 700;
}

/* =========================================================
   COVER
========================================================= */

.marmes-cover-box {
    position: relative;

    overflow: hidden;

    border-radius: 26px;

    margin-bottom: 16px;

    box-shadow:
        0 10px 30px rgba(0,0,0,0.12);
}

.marmes-cover-box img {
    width: 100%;

    aspect-ratio: 1 / 1;

    object-fit: cover;

    display: block;
}

/* =========================================================
   WAVEFORM
========================================================= */

.marmes-waveform-box {
    position: relative;

    border-radius: 18px;

    background: rgba(255,255,255,0.62);

    padding: 10px 14px;

    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.7),
        0 4px 14px rgba(0,0,0,0.04);

    margin-top: 10px;
    margin-bottom: 14px;
}

#marmes-waveform {
    height: 42px !important;

    overflow: hidden;

    filter:
        drop-shadow(
            0 3px 8px rgba(110,92,246,0.12)
        );
}

/* =========================================================
   NOW PLAYING
========================================================= */

.marmes-now-playing {
    margin-bottom: 12px;

    text-align: center;
}

.marmes-now-playing-time {

    display: flex;

    justify-content: space-between;

    align-items: center;

    margin-top: 10px;

    padding:
        0 4px;

    font-size: 13px;

    color: #8e8e93;
}

/* =========================================================
   CONTROLS
========================================================= */

.marmes-controls-wrap {
    display: flex;
    justify-content: center;
    align-items: center;

    margin-top: 8px;
}

.marmes-controls {
    display: flex;
    align-items: center;
    gap: 18px;
}

.marmes-controls button {
    border: none;
    outline: none;

    background: transparent;

    color: #1d1d1f;

    display: flex;
    align-items: center;
    justify-content: center;

    cursor: pointer;

    transition:
        transform .18s ease,
        opacity .18s ease,
        filter .18s ease;
}

.marmes-controls button:hover {
    transform: translateY(-1px);

    filter:
        drop-shadow(
            0 6px 18px rgba(110,92,246,0.18)
        );
}

.marmes-controls button:active {
    transform: scale(.94);
}

.marmes-controls button::before,
.marmes-controls button::after {
    display: none !important;
    content: none !important;
}

/* PREV / NEXT */

.marmes-btn-prev,
.marmes-btn-next,
.marmes-btn-play {

    font-family:
        -apple-system,
        BlinkMacSystemFont,
        "SF Pro Display",
        sans-serif;

    font-weight: 600;

    -webkit-font-smoothing: antialiased;

    text-rendering: geometricPrecision;
}

/* PLAY */

.marmes-btn-play {

    all: unset;

    cursor: pointer;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 56px;

    line-height: 1;

    color: #6e5cf6;

    filter:
        blur(.55px)
        drop-shadow(
        0 0 18px rgba(110,92,246,0.22)
    );

    transition:
        transform .18s ease,
        filter .24s ease,
        opacity .18s ease;
}

.marmes-btn-prev,
.marmes-btn-next {
    font-family:
        -apple-system,
        BlinkMacSystemFont,
        "SF Pro Display",
        sans-serif;

    font-weight: 600;
    -webkit-font-smoothing: antialiased;
    text-rendering: geometricPrecision;

    font-size: 30px;
    line-height: 1;

    color: rgba(29,29,31,0.34);
    opacity: .82;

    filter:
        blur(.12px)
        drop-shadow(0 0 6px rgba(0,0,0,0.05));

    transition:
        transform .18s ease,
        opacity .18s ease,
        filter .22s ease,
        color .18s ease;
}

.marmes-btn-prev:hover,
.marmes-btn-next:hover {
    color: rgba(29,29,31,0.52);
    opacity: 1;
    transform: scale(1.06);
    filter:
        blur(.08px)
        drop-shadow(0 0 10px rgba(110,92,246,0.10));
}
.marmes-btn-play i {

    transition:
        opacity .22s ease,
        transform .22s cubic-bezier(.22,.8,.32,1),
        filter .22s ease;

    will-change:
        transform,
        opacity,
        filter;
}

.marmes-btn-prev:hover,
.marmes-btn-next:hover,
.marmes-btn-play:hover {

    transform: scale(1.03);

    opacity: 1;
}

.marmes-btn-play:hover {

    transform: scale(1.04);

    filter:
        drop-shadow(
            0 0 18px rgba(110,92,246,0.36)
        );
}

/* ICONS */

.marmes-btn-prev i,
.marmes-btn-next i {
    font-size: 22px;
}

.marmes-btn-play i {

    font-size: inherit !important;

    color: inherit !important;

    line-height: 1;
}


/* =========================================================
   PLAYLIST
========================================================= */

.marmes-playlist-header {
    font-size: 11px;

    text-transform: uppercase;
    letter-spacing: .14em;

    color: #6e6e73;

    margin-bottom: 12px;
}

.marmes-tracklist {
    overflow-y: auto;

    padding-right: 10px;

    max-height: 510px;
}

.marmes-tracklist ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.marmes-track {
    display: flex;
    justify-content: space-between;
    align-items: center;

    padding: 14px 0;

    border-bottom:
        1px solid rgba(0,0,0,0.06);

    cursor: pointer;

    transition:
        transform .2s ease,
        background .2s ease;
}

.marmes-track:hover {
    transform: translateX(4px);

    background: rgba(110,92,246,0.04);
}

.marmes-track-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.marmes-track-number {
    position: relative;

    min-width: 24px;

    font-size: 13px;

    color: #8e8e93;
}

.marmes-track-number::after {
    content: "▶";

    position: absolute;
    left: 0;
    top: 0;

    opacity: 0;

    transition: opacity .18s ease;
}

.marmes-track:hover .marmes-track-number {
    color: transparent;
}

.marmes-track:hover .marmes-track-number::after {
    opacity: 1;

    color: #6e5cf6;
}

.marmes-track.active .marmes-track-number {
    color: transparent;
}

.marmes-track.active .marmes-track-number::before {
    content: "▶";

    position: absolute;
    left: 0;
    top: -1px;

    color: #6e5cf6;

    animation:
    marmesPulsePlay 2.2s infinite cubic-bezier(.22,.8,.32,1);
}

.marmes-track.active .marmes-track-title {
    color: #6e5cf6;
}

.marmes-track-title {
    font-size: 14px;
    font-weight: 600;
    color: #1d1d1f;
}

.marmes-track-right {
    font-size: 11px;

    letter-spacing: .12em;
    text-transform: uppercase;

    color: #8e8e93;
}

.marmes-track.active {

    background:
        rgba(110,92,246,0.045);

    border-radius: 14px;

    padding-left: 12px;

    padding-right: 12px;

    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.45);
}

.marmes-track.active .marmes-track-title {

    color: #6e5cf6;

    text-shadow:
        0 0 10px rgba(110,92,246,0.10);
}

/* =========================================================
   PLAY ANIMATION
========================================================= */

@keyframes marmesPulsePlay {

    0% {

        opacity: .62;

        transform:
            scale(1);

        filter:
            blur(.15px);
    }

    50% {

        opacity: 1;

        transform:
            scale(1.34);

        filter:
            blur(.4px);
    }

    100% {

        opacity: .62;

        transform:
            scale(1);

        filter:
            blur(.15px);
    }
}

/* =========================================================
   SCROLLBAR
========================================================= */

.marmes-tracklist::-webkit-scrollbar {
    width: 6px;
}

.marmes-tracklist::-webkit-scrollbar-thumb {
    background: rgba(110,92,246,0.25);

    border-radius: 999px;
}

/* =========================================================
   SIDEPANELS
========================================================= */

.marmes-sidepanels {
    display: none;
}

/* =========================================================
   TABLET
========================================================= */

@media (max-width: 1100px) {

    .marmes-player-layout {
        grid-template-columns: 1fr;
    }

    .marmes-tracklist {
        max-height: 320px;
    }
}

/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 768px) {

    .marmes-player {
        padding: 20px;

        border-radius: 28px;
    }

    .marmes-player-layout {
        grid-template-columns: 1fr;

        gap: 24px;
    }

    .marmes-controls-wrap {
        flex-direction: column;
        align-items: stretch;
    }

    .marmes-controls {
        justify-content: center;
    }

    .marmes-tracklist {
        max-height: 300px;
    }

    .marmes-now-playing {
        flex-direction: column;
        align-items: flex-start;

        gap: 6px;

        margin-bottom: 12px;
        text-align: center;
    }
}

/* =========================================
   PLAY / PAUSE MICRO ANIMATION
========================================= */

.marmes-icon-pop {

    animation:
    marmesIconPop .78s cubic-bezier(.22,.8,.32,1);
}

@keyframes marmesIconPop {

    0% {

        opacity: 1;

        transform:
            scale(1);

        filter:
            blur(.2px);
    }

    52% {

        opacity: 0;

        transform:
            scale(.68);

        filter:
            blur(4px);
    }

    68% {

        opacity: 0;

        transform:
            scale(1.18);

        filter:
            blur(4px);
    }

    100% {

        opacity: 1;

        transform:
            scale(1);

        filter:
            blur(.25px);
    }
}

.marmes-btn-play i {
    display: inline-block;
    transform-origin: center center;
    transition:
        opacity .28s ease,
        transform .28s ease,
        filter .28s ease;
    will-change: transform, opacity, filter;
}

.marmes-icon-pop {
    animation: marmesIconPop .78s cubic-bezier(.22,.8,.32,1);
}

@keyframes marmesIconPop {
    0% {
        opacity: 1;
        transform: scale(1);
        filter: blur(.2px);
    }
    52% {
        opacity: 0;
        transform: scale(.68);
        filter: blur(4px);
    }
    68% {
        opacity: 0;
        transform: scale(1.18);
        filter: blur(4px);
    }
    100% {
        opacity: 1;
        transform: scale(1);
        filter: blur(.25px);
    }
}

.marmes-now-playing-track {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 18px;

    width: 100%;
    box-sizing: border-box;

    padding: 8px 14px;
    border-radius: 999px;

    background: rgba(255,255,255,0.48);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);

    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.72),
        0 4px 14px rgba(0,0,0,0.03);
}

.marmes-playing-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
    position: relative;
    transform: translateY(1px);

    background: #6e5cf6;

    box-shadow:
        0 0 0 4px rgba(110,92,246,0.10),
        0 0 14px rgba(110,92,246,0.52),
        0 0 28px rgba(110,92,246,0.30);

    filter: drop-shadow(0 0 10px rgba(110,92,246,0.34));

    animation: marmesNowPlayingPulse 2.2s infinite ease-in-out;
}.marmes-playing-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
    position: relative;
    transform: translateY(1px);

    background: #6e5cf6;

    box-shadow:
        0 0 0 4px rgba(110,92,246,0.10),
        0 0 14px rgba(110,92,246,0.52),
        0 0 28px rgba(110,92,246,0.30);

    filter: drop-shadow(0 0 10px rgba(110,92,246,0.34));

    animation: marmesNowPlayingPulse 2.2s infinite ease-in-out;
}

.marmes-playing-dot::after {
    content: "";
    position: absolute;
    inset: -12px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(110,92,246,0.28) 0%, rgba(110,92,246,0) 70%);
    z-index: -1;
}

.js-now-playing-title {
    min-width: 0;
    text-align: left;

    font-size: 16px;
    line-height: 1.34;
    font-weight: 700;
    color: #1d1d1f;
    letter-spacing: -0.01em;
}

@keyframes marmesNowPlayingPulse {

    0% {

        transform:
            translateY(1px)
            scale(1);

        opacity: .72;

        box-shadow:
            0 0 0 4px rgba(110,92,246,0.08),
            0 0 10px rgba(110,92,246,0.22),
            0 0 18px rgba(110,92,246,0.12);
    }

    50% {

        transform:
            translateY(1px)
            scale(1.28);

        opacity: 1;

        box-shadow:
            0 0 0 6px rgba(110,92,246,0.14),
            0 0 20px rgba(110,92,246,0.52),
            0 0 34px rgba(110,92,246,0.26);
    }

    100% {

        transform:
            translateY(1px)
            scale(1);

        opacity: .72;

        box-shadow:
            0 0 0 4px rgba(110,92,246,0.08),
            0 0 10px rgba(110,92,246,0.22),
            0 0 18px rgba(110,92,246,0.12);
    }
}