/* ==============================================
   Calik X - Music Player  v5
   ONE pill. Song title scrolls inside via JS RAF.
   No separate row below.
   ============================================== */
#cx-music {
    position: fixed;
    top: 110px;
    right: 40px;
    left: auto;
    transform: none;
    z-index: 9200;
    width: 240px;
    user-select: none;
}
#cx-music.cx-music--hidden {
    display: none;
}

/* ── The single pill ──────────────────────────── */
.cx-music__bar {
    position: relative;
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(8,8,12,0.38);
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 999px;
    padding: 5px 10px 5px 7px;
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

/* play / pause */
.cx-music__toggle {
    width: 26px; height: 26px;
    border-radius: 50%;
    background: rgba(10,132,255,0.15);
    border: 1px solid rgba(10,132,255,0.4);
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; flex-shrink: 0;
    color: #0a84ff;
    transition: background 0.2s, transform 0.15s;
    animation: cxMusicPulse 2.8s ease-in-out infinite;
}
.cx-music__toggle:hover { background: rgba(10,132,255,0.28); transform: scale(1.1); }
.cx-music__toggle svg  { width: 11px; height: 11px; fill: currentColor; }
@keyframes cxMusicPulse {
    0%,100% { box-shadow: 0 0 4px rgba(10,132,255,0.3); }
    50%      { box-shadow: 0 0 10px rgba(10,132,255,0.65); }
}

/* prev / next */
.cx-music__prev,
.cx-music__next {
    width: 18px; height: 18px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; color: rgba(255,255,255,0.35);
    flex-shrink: 0;
    transition: color 0.2s, transform 0.15s;
}
.cx-music__prev:hover,
.cx-music__next:hover { color: #fff; transform: scale(1.12); }
.cx-music__prev svg,
.cx-music__next svg { width: 12px; height: 12px; }

/* ── Song title marquee (inside pill, flex:1) ── */
.cx-music__title-wrap {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    height: 18px;
    position: relative;
    /* soft fade edges */
    -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 12%, #000 88%, transparent 100%);
            mask-image: linear-gradient(90deg, transparent 0%, #000 12%, #000 88%, transparent 100%);
}
.cx-music__title {
    position: absolute;
    top: 50%;
    left: 0;
    white-space: nowrap;
    font-family: 'Century Gothic', 'CenturyGothic', 'AppleGothic', Futura, sans-serif;
    font-size: 9px;
    font-weight: 400;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.85);
    will-change: transform;
    /* JS sets: transform: translateX(Xpx) translateY(-50%) */
}

/* volume */
.cx-music__vol {
    display: flex; align-items: center; gap: 3px;
    flex-shrink: 0;
}
.cx-music__vol svg {
    width: 10px; height: 10px;
    stroke: rgba(255,255,255,0.22); fill: none; stroke-width: 2;
    flex-shrink: 0;
}
.cx-music__slider {
    -webkit-appearance: none; appearance: none;
    width: 44px; height: 3px;
    border-radius: 999px;
    background: rgba(255,255,255,0.10);
    outline: none; cursor: pointer;
    flex-shrink: 0;
}
.cx-music__slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 9px; height: 9px; border-radius: 50%;
    background: #0a84ff; cursor: pointer;
}
.cx-music__slider::-moz-range-thumb {
    width: 9px; height: 9px; border-radius: 50%;
    background: #0a84ff; border: none;
}

/* ── Mobile responsive ───────────────────────── */
@media (max-width: 640px) {
    #cx-music {
        top: 80px;
        right: 10px;
        width: calc(100vw - 20px);
        max-width: 260px;
    }
    .cx-music__slider {
        width: 36px;
    }
}
