.now-playing-dimmer {
    display: none;
}

.now-playing {
    position: relative;
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    transition: filter 0.2s ease;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* iPad specific - seamless status bar integration */
@media only screen and (min-width: 768px) and (max-width: 1024px) {
    .now-playing {
        max-width: 500px;
        min-height: 100vh;
        padding-top: env(safe-area-inset-top, 0);
        margin-top: calc(-1 * env(safe-area-inset-top, 0));
    }
    
    /* Make the background extend into status bar area */
    .now-playing::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        height: env(safe-area-inset-top, 44px);
        background: inherit;
        z-index: -1;
        pointer-events: none;
    }
}


/* Playing interface */
.now-playing>.ui {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding-top: 0;
    padding-bottom: 0;
    flex: 1;
}

@media only screen and (min-width: 1024px) {
    .now-playing>.ui {
        padding-top: 64px;
    }
}

/* iPad specific - remove top padding */
@media only screen and (min-width: 768px) and (max-width: 1024px) {
    .now-playing>.ui {
        padding-top: 0;
    }
}


.now-playing>.ui>.playing-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 12px;
    margin-top: env(safe-area-inset-top, 5px);
    padding-top: env(safe-area-inset-top, 5px);
    margin-bottom: 10px;
}

/* iPad specific - move header closer to top */
@media only screen and (min-width: 768px) and (max-width: 1024px) {
    .now-playing>.ui>.playing-header {
        margin-top: env(safe-area-inset-top, 5px);
        padding-top: 5px;
    }
}

.now-playing>.ui>.playing-header>.primary {
    flex: 0 1 78px;
}

.queue-track {
    display: flex;
    align-items: center;
    padding: 8px 50px 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    gap: 12px;
    position: relative;
    user-select: none;
}

.queue-track.dragging {
    opacity: 0.5;
    transform: scale(0.95);
    z-index: 1000;
}

.queue-track.drag-over {
    background-color: rgba(var(--brand-color-rgb, 148, 123, 238), 0.1);
    border: 2px dashed var(--brand-color);
    transform: translateY(-2px);
}

.now-playing>.ui>.playing-header>.primary>.return_icon {
    cursor: pointer;
    width: 28px;
    padding: 6px;
    margin-right: 10px;
    border-radius: 20px;
    transition: background-color 0.2s ease-out;
}

.now-playing>.ui>.playing-header>.primary>.return_icon:hover {
    background-color: var(--playing-bg-color-secondary);
}

.now-playing>.ui>.playing-header>.secondary {
    max-width: calc(100% - 116px);
}

.now-playing>.ui>.playing-header>.secondary>.title {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--font-color-tertiary);
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

.now-playing>.ui>.playing-header>.secondary>.desc {
    font-size: 0.95rem;
    font-weight: 700;
    /* Help with CJK letter spacing */
    line-height: 1.1875rem;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

.now-playing>.ui>.playing-header>.tertiary {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: 10px;
    margin-right: 6px;
}

.now-playing>.ui>.playing-header>.tertiary>.favorite-state {
    cursor: pointer;
    padding: 6px;
    border-radius: 20px;
    transition: background-color 0.2s ease-out;
}

.now-playing>.ui>.playing-header>.tertiary>.favorite-state:hover {
    background-color: var(--playing-bg-color-secondary);
}

.now-playing>.ui>.playing-header>.tertiary>.favorite-state>svg {
    color: var(--brand-color);
}

.now-playing>.ui>.playing-header>.tertiary>.more {
    cursor: pointer;
    padding: 7px;
    border-radius: 20px;
    background-color: var(--playing-bg-color);
    transition: background-color 0.2s ease-out;
}

.now-playing>.ui>.playing-header>.tertiary>.more:hover {
    background-color: var(--playing-bg-color-secondary);
}

.now-playing>.ui>.playing-header>.tertiary>.more.active {
    background-color: var(--playing-bg-color-secondary);
}

.now-playing>.ui>.playing-header>.tertiary>.more>svg {
    fill: var(--brand-color);
}

.now-playing>.ui>.playing-content {
    flex: 1;
    padding: 0 20px;
    margin-top: 20px;
    margin-bottom: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 0;
}

/* Thumbnail artwork */
.now-playing>.ui>.playing-content>.playing-artwork {
    position: relative;
    pointer-events: none;
    margin-bottom: 30px;
    width: 100%;
    max-width: 500px;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Desktop-specific album cover - made smaller */
@media only screen and (min-width: 1024px) {
    .now-playing {
        max-width: 500px;
    }

    .now-playing>.ui>.playing-content>.playing-artwork {
        max-width: 450px;
    }

    .now-playing>.ui>.playing-content>.playing-artwork>.thumbnail>img {
        width: 450px !important;
    }

    .now-playing>.ui>.playing-content>.playing-artwork>.thumbnail>.fallback-thumbnail {
        width: 450px !important;
    }

    .now-playing>.ui>.playing-content>.playing-info {
        max-width: 450px;
    }

    .now-playing>.ui>.playing-content>.playing-progress {
        max-width: 450px;
    }
}

.now-playing>.ui>.playing-content>.playing-artwork>.thumbnail {
    position: relative;
    overflow: hidden;
    border-radius: 14px;
}

.now-playing>.ui>.playing-content>.playing-artwork>.thumbnail>img {
    display: block;
    width: 500px;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    border-radius: inherit;
    aspect-ratio: 1 / 1;
    object-fit: cover;
}

.now-playing>.ui>.playing-content>.playing-artwork>.thumbnail>.fallback-thumbnail {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 500px;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    border-radius: inherit;
    aspect-ratio: 1 / 1;
    background-color: var(--bg-color-tertiary);
}

.queue-track .track-info {
    flex: 1;
    min-width: 0;
}

.queue-track .track-number {
    font-size: 0.8rem;
    color: var(--font-color-tertiary);
    min-width: 20px;
    text-align: center;
}

.queue-track .drag-handle {
    font-size: 1.2rem;
    color: var(--font-color-tertiary);
    cursor: grab;
    padding: 8px;
    margin-left: auto;
    opacity: 0.6;
    transition: opacity 0.2s ease;
    user-select: none;
    touch-action: none;
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
}

.queue-track .drag-handle:hover {
    opacity: 1;
    color: var(--brand-color);
}

.queue-track .drag-handle:active {
    cursor: grabbing;
}

.queue-track:hover {
    background-color: var(--bg-color-tertiary);
}

.queue-track:hover .drag-handle {
    opacity: 1;
}

/* Mobile/tablet specific sizes (keep at 500px) */
@media only screen and (max-width: 1023px) {
    .now-playing>.ui>.playing-content>.playing-artwork>.thumbnail>img {
        width: 500px;
    }

    .now-playing>.ui>.playing-content>.playing-artwork>.thumbnail>.fallback-thumbnail {
        width: 500px;
    }
}

.now-playing>.ui>.playing-content>.playing-artwork>.thumbnail>.fallback-thumbnail>svg {
    fill: var(--font-color-tertiary);
    opacity: 0.4;
    margin-left: -4%;
}

.now-playing>.ui>.playing-content>.playing-artwork>.thumbnail>.shadow-border {
    position: absolute;
    top: 0px;
    left: 0px;
    width: 100%;
    height: 100%;
    border-radius: inherit;
    box-shadow: var(--playing-border-color) 0px 0px 0px 1px inset;
}

/* Track title and artist */
.now-playing>.ui>.playing-content>.playing-info {
    text-align: center;
    margin: 0 auto;
    overflow: hidden;
    max-width: 500px;
    width: 100%;
    margin-bottom: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.now-playing>.ui>.playing-content>.playing-info>.song-name {
    font-size: 1.1rem;
    font-weight: 700;
    /* Help with CJK letter spacing */
    line-height: 1.3rem;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
    margin-bottom: 4px;
}

.now-playing>.ui>.playing-content>.playing-info>.artist {
    font-size: 1rem;
    font-weight: 600;
    /* Help with CJK letter spacing */
    line-height: 1.25rem;
    color: var(--font-color-secondary);
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
    text-align: center !important;
    width: 100%;
    display: block;
}

/* Progress info */
.now-playing>.ui>.playing-content>.playing-progress {
    display: flex;
    flex-direction: column;
    margin-bottom: 30px;
    width: 100%;
    max-width: 500px;
}

.now-playing>.ui>.playing-content>.playing-progress>.info {
    display: flex;
    align-items: end;
    justify-content: space-between;
    margin: 0 2px;
    margin-bottom: 8px;
}

.now-playing>.ui>.playing-content>.playing-progress>.info>.duration {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--font-color-tertiary);
    font-variant-numeric: tabular-nums;
    opacity: 0.8;
}

.now-playing>.ui>.playing-content>.playing-progress>.info>.quality {
    font-size: 0.725rem;
    font-weight: 500;
    color: var(--font-color-secondary);
    display: flex;
    align-items: center;
    margin: 0 8px;
    margin-bottom: 2px;
    padding: 2px 8px;
    border-radius: 20px;
    background: var(--playing-bg-color-secondary);
}

.now-playing>.ui>.playing-content>.playing-progress>.info>.quality>.divider {
    width: 2px;
    height: 2px;
    margin: 0 4px;
    margin-left: 5px;
    border-radius: 50%;
    background-color: var(--font-color-secondary);
}

.now-playing>.ui>.playing-content>.playing-progress>.info>.quality>.bitrate>.number {
    font-variant-numeric: tabular-nums;
}

.now-playing>.ui>.playing-content>.playing-progress>.info>.quality>.download-state {
    fill: var(--font-color-secondary);
    margin-left: 6px;
    margin-right: -4px;
}

/* Progress bar */
.now-playing>.ui>.playing-content>.playing-progress>.progress {
    position: relative;
    display: flex;
    height: 12px;
    touch-action: none;
    margin: 0 -8px;
    padding: 0 8px;
}

/* Progress loading */
.now-playing>.ui>.playing-content>.playing-progress>.progress:has(input.loading)::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 8px;
    user-select: none;
    pointer-events: none;
    opacity: 0;
    transition: transform 0.1s linear;
    background-image: linear-gradient(90deg,
            var(--playing-bg-color-secondary) 0%,
            var(--playing-bg-color-quaternary) 20%,
            var(--playing-bg-color-secondary) 40%);
    background-size: 200%;
    animation: playing-loading-shimmer 1.4s infinite linear;
    animation-delay: 0.4s;
}

@keyframes playing-loading-shimmer {
    0% {
        opacity: 1;
        background-position: 100%;
    }

    60%,
    100% {
        opacity: 1;
        background-position: -100%;
    }
}

.now-playing>.ui>.playing-content>.playing-progress>.progress>input {
    position: relative;
    cursor: pointer;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0);
    --progress-width: 0%;
    --buffered-width: 0%;
    --transition-duration: 0s;
}

/* WebKit progress visuals */
.now-playing>.ui>.playing-content>.playing-progress>.progress>input::-webkit-slider-runnable-track {
    position: relative;
    width: 100%;
    height: 8px;
    border-radius: 8px;
    background: linear-gradient(var(--playing-bg-color-quaternary), var(--playing-bg-color-quaternary)) no-repeat 0 / var(--progress-width) 100%,
        linear-gradient(var(--playing-bg-color-tertiary), var(--playing-bg-color-tertiary)) no-repeat 0 / var(--buffered-width) 100%,
        var(--playing-bg-color-secondary);
    transition: background-size var(--transition-duration) linear;
}

/* Firefox progress visuals */
.now-playing>.ui>.playing-content>.playing-progress>.progress>input::-moz-range-track {
    width: 100%;
    height: 8px;
    border-radius: 8px;
    background: linear-gradient(var(--playing-bg-color-quaternary), var(--playing-bg-color-quaternary)) no-repeat 0 / var(--progress-width) 100%,
        linear-gradient(var(--playing-bg-color-tertiary), var(--playing-bg-color-tertiary)) no-repeat 0 / var(--buffered-width) 100%,
        var(--playing-bg-color-secondary);
    transition: background-size var(--transition-duration) linear;
}

/* Hiding the input slider thumbs for different browsers */
.now-playing>.ui>.playing-content>.playing-progress>.progress>input::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 0;
    height: 0;
}

.now-playing>.ui>.playing-content>.playing-progress>.progress>input::-moz-range-thumb {
    width: 0;
    height: 0;
    border: none;
}

.now-playing>.ui>.playing-content>.playing-progress>.progress>input::-ms-thumb {
    width: 0;
    height: 0;
}

/* Player controls */
.now-playing>.ui>.playing-content>.playing-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 36px;
    margin: 10px 4px 10px 4px;
    width: 100%;
}

.now-playing>.ui>.playing-content>.playing-controls>.shuffle {
    cursor: pointer;
    position: relative;
    top: -18px;
}

.now-playing>.ui>.playing-content>.playing-controls>.shuffle>.shuffle-icon {
    display: block;
    width: 32px;
    height: 28px;
    background-color: var(--font-color-secondary);
    mask-repeat: no-repeat;
    mask-image: url(/player-shuffle.svg);
    transition: background-color 0.2s ease-out;
}

.now-playing>.ui>.playing-content>.playing-controls>.shuffle:hover>.shuffle-icon {
    background-color: var(--font-color);
}

.now-playing>.ui>.playing-content>.playing-controls>.shuffle.active>.shuffle-icon {
    background-color: var(--brand-color);
}

/* Primary controls */
.now-playing>.ui>.playing-content>.playing-controls>.primary {
    display: flex;
    align-items: center;
    gap: 24px;
    position: relative;
    top: -18px;
}

.now-playing>.ui>.playing-content>.playing-controls>.primary>.previous {
    cursor: pointer;
    padding: 2px 0;
    transform: rotate(180deg);
}

.now-playing>.ui>.playing-content>.playing-controls>.primary>.previous>.previous-icon {
    display: block;
    width: 32px;
    height: 28px;
    background-color: var(--font-color-secondary);
    mask-size: cover;
    mask-repeat: no-repeat;
    mask-image: url(/player-next.svg);
    transition: opacity 0.2s ease-out;
    transition: background-color 0.2s ease-out;
}

.now-playing>.ui>.playing-content>.playing-controls>.primary>.previous:hover>.previous-icon {
    background-color: var(--font-color);
}

.now-playing>.ui>.playing-content>.playing-controls>.primary>.container {
    position: relative;
    width: 46px;
    height: 40px;
}

.now-playing>.ui>.playing-content>.playing-controls>.primary>.container>.play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    cursor: pointer;
    transition: opacity 0.2s ease-out, visibility 0.2s ease-out;
}

/* Hide play button when a track is playing */
.now-playing.playing>.ui>.playing-content>.playing-controls>.primary>.container>.play {
    opacity: 0;
    visibility: hidden;
}

.now-playing>.ui>.playing-content>.playing-controls>.primary>.container>.play>.play-icon {
    display: block;
    width: 46px;
    height: 40px;
    background-color: var(--font-color-secondary);
    mask-repeat: no-repeat;
    mask-image: url(/play.svg);
    transition: background-color 0.2s ease-out;
}

.now-playing>.ui>.playing-content>.playing-controls>.primary>.container>.play:hover>.play-icon {
    background-color: var(--font-color);
}

/* Hide pause button by default */
.now-playing>.ui>.playing-content>.playing-controls>.primary>.container>.pause {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    visibility: hidden;
    cursor: pointer;
    transition: opacity 0.2s ease-out, visibility 0.2s ease-out;
}

/* Show pause button when a track is playing */
.now-playing.playing>.ui>.playing-content>.playing-controls>.primary>.container>.pause {
    opacity: 1;
    visibility: visible;
}

.now-playing>.ui>.playing-content>.playing-controls>.primary>.container>.pause>.pause-icon {
    display: block;
    width: 46px;
    height: 40px;
    background-color: var(--font-color-secondary);
    mask-repeat: no-repeat;
    mask-image: url(/pause.svg);
    transition: background-color 0.2s ease-out;
}

.now-playing>.ui>.playing-content>.playing-controls>.primary>.container>.pause:hover>.pause-icon {
    background-color: var(--font-color);
}

.now-playing>.ui>.playing-content>.playing-controls>.primary>.next {
    cursor: pointer;
    padding: 2px 0;
}

.now-playing>.ui>.playing-content>.playing-controls>.primary>.next>.next-icon {
    display: block;
    width: 32px;
    height: 28px;
    background-color: var(--font-color-secondary);
    mask-size: cover;
    mask-repeat: no-repeat;
    mask-image: url(/player-next.svg);
    transition: background-color 0.2s ease-out;
}

.now-playing>.ui>.playing-content>.playing-controls>.primary>.next:hover>.next-icon {
    background-color: var(--font-color);
}

.now-playing>.ui>.playing-content>.playing-controls>.repeat {
    cursor: pointer;
    position: relative;
    top: -18px;
}

.now-playing>.ui>.playing-content>.playing-controls>.repeat>.repeat-icon {
    display: block;
    width: 32px;
    height: 28px;
    background-color: var(--font-color-secondary);
    mask-repeat: no-repeat;
    mask-image: url(/player-repeat.svg);
    transition: background-color 0.2s ease-out;
}

.now-playing>.ui>.playing-content>.playing-controls>.repeat>.repeat-icon-one {
    display: block;
    width: 32px;
    height: 28px;
    background-color: var(--font-color-secondary);
    mask-repeat: no-repeat;
    mask-image: url(/player-repeat-one.svg);
    transition: background-color 0.2s ease-out;
}

.now-playing>.ui>.playing-content>.playing-controls>.repeat:hover>.repeat-icon,
.now-playing>.ui>.playing-content>.playing-controls>.repeat:hover>.repeat-icon-one {
    background-color: var(--font-color);
}

.now-playing>.ui>.playing-content>.playing-controls>.repeat.active>.repeat-icon,
.now-playing>.ui>.playing-content>.playing-controls>.repeat.active>.repeat-icon-one {
    background-color: var(--brand-color);
}

/* Volume control */
.now-playing>.ui>.playing-footer {
    padding-bottom: env(safe-area-inset-bottom, 20px);
    display: flex;
    align-items: center;
    flex-direction: column;
    margin-top: 5px;
    margin-bottom: 20px;
}



.now-playing>.ui>.playing-content {
    flex: 1;
}

.now-playing>.ui>.playing-footer>.actions {
    display: flex !important;
    flex-direction: row !important;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 0px;
}

.now-playing>.ui>.playing-footer>.actions>.action {
    cursor: pointer;
    padding: 6px;
    border-radius: 20px;
    background: none !important;
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
    fill: var(--font-color-secondary);
    color: var(--font-color-secondary);
    transition: all 0.2s ease-out;
    display: flex;
    align-items: center;
    justify-content: center;
    width: auto;
    height: auto;
}

.now-playing>.ui>.playing-footer>.actions>.action:hover {
    fill: var(--font-color);
    color: var(--font-color);
    background: var(--playing-bg-color-secondary) !important;
    background-color: var(--playing-bg-color-secondary) !important;
}

.now-playing>.ui>.playing-footer>.actions>.action.active {
    fill: var(--brand-color);
    color: var(--brand-color);
    background: var(--playing-bg-color-secondary) !important;
    background-color: var(--playing-bg-color-secondary) !important;
}

.now-playing>.ui>.playing-footer>.actions>.action svg,
.now-playing>.ui>.playing-footer>.actions>.action svg * {
    background: none !important;
    background-color: transparent !important;
    fill: inherit !important;
    color: inherit !important;
    border: none !important;
    box-shadow: none !important;
}

/* Force horizontal layout for actions */
.now-playing .playing-footer .actions {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 20px !important;
    width: 100% !important;
    background: none !important;
    background-color: transparent !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
}

.now-playing .playing-footer .actions .action {
    display: inline-flex !important;
    flex-direction: row !important;
    background: none !important;
    background-color: transparent !important;
    background-image: none !important;
    border: 0 !important;
    box-shadow: none !important;
    outline: none !important;
    padding: 6px !important;
    border-radius: 0 !important;
    cursor: pointer !important;
    transition: all 0.2s ease-out !important;
    -webkit-appearance: none !important;
    appearance: none !important;
}

.now-playing .playing-footer .actions .action::before,
.now-playing .playing-footer .actions .action::after {
    display: none !important;
    content: none !important;
}

.now-playing .playing-footer .actions .action *,
.now-playing .playing-footer .actions .action *::before,
.now-playing .playing-footer .actions .action *::after {
    background: none !important;
    background-color: transparent !important;
    background-image: none !important;
    border: none !important;
    box-shadow: none !important;
}

.now-playing .playing-footer .actions .action:hover {
    background-color: var(--playing-bg-color-secondary) !important;
}

.now-playing .playing-footer .actions .action.active {
    background-color: var(--playing-bg-color-secondary) !important;
}

.now-playing .playing-footer .actions .action svg {
    fill: var(--font-color-secondary) !important;
    background: none !important;
    background-color: transparent !important;
    border: none !important;
    width: 20px !important;
    height: 20px !important;
}

.now-playing .playing-footer .actions .action:hover svg {
    fill: var(--font-color) !important;
}

.now-playing .playing-footer .actions .action.active svg {
    fill: var(--brand-color) !important;
}

/* Player volume */
.now-playing>.ui>.playing-footer>.playing-volume {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 15px;
    animation: fadeIn 0.2s ease-in-out;
    background: none !important;
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

.now-playing>.ui>.playing-footer>.playing-volume * {
    background: none !important;
    background-color: transparent !important;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.now-playing>.ui>.playing-footer>.playing-volume>.indicator {
    font-size: 0.75rem;
    font-variant-numeric: tabular-nums;
    color: var(--font-color-tertiary);
    margin-bottom: 6px;
    background: none !important;
    background-color: transparent !important;
    border: none !important;
    padding: 0 !important;
}

.now-playing>.ui>.playing-footer>.playing-volume>.control {
    display: flex;
    background: none !important;
    background-color: transparent !important;
    border: none !important;
    padding: 0 !important;
}

.now-playing>.ui>.playing-footer>.playing-volume>.control>input {
    cursor: pointer;
    width: 160px;
    height: 8px;
    border-radius: 20px;
    background-color: var(--playing-bg-color);
    border: 1px solid var(--playing-border-color);
}

.now-playing>.ui>.playing-footer>.playing-volume>.control>input::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 100%;
    background-color: var(--volume-dot-color);
    box-shadow: 0 0 2px rgba(0, 0, 0, 0.15);
    transition: background-color 0.2s ease-out;
}

.now-playing>.ui>.playing-footer>.playing-volume>.control>input::-webkit-slider-thumb:active {
    background-color: var(--volume-dot-color-active);
}

.now-playing>.ui>.playing-footer>.playing-volume>.control>input::-moz-range-thumb {
    appearance: none;
    border: none;
    width: 14px;
    height: 14px;
    border-radius: 100%;
    background-color: var(--volume-dot-color);
    box-shadow: 0 0 2px rgba(0, 0, 0, 0.15);
    transition: background-color 0.2s ease-out;
}

.now-playing>.ui>.playing-footer>.playing-volume>.control>input::-moz-range-thumb:active {
    background-color: var(--volume-dot-color-active);
}

/* Background blurred artwork toggle option? */
.now-playing>.background-artwork {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    filter: blur(25px) saturate(1.0) contrast(200%);
    opacity: var(--playing-artwork-opacity);
    pointer-events: none;
}

/* iPad specific - extend background into status bar */
@media only screen and (min-width: 768px) and (max-width: 1024px) {
    .now-playing>.background-artwork {
        top: calc(-1 * env(safe-area-inset-top, 0));
        height: calc(100% + env(safe-area-inset-top, 0));
    }
}

.now-playing>.background-artwork>img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transform: scale(1.2);
}

/* Responsive */
@media only screen and (max-width: 480px),
(pointer: coarse) {
    .now-playing-dimmer {
        display: block;
        position: fixed;
        z-index: 4;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        overflow: visible;
        opacity: 0;
        visibility: hidden;
        background-color: var(--bg-color-dimmer);
        transition: opacity 0.2s ease, visibility 0.2s ease;
    }

    .music-app:has(.now-playing):has(.dropdown.active)>.now-playing-dimmer {
        opacity: 1;
        visibility: visible;
    }

    .music-app:has(.now-playing):has(.dropdown.active)>.now-playing>.ui {
        filter: blur(12px);
    }
}

@media only screen and (max-width: 500px) {
    .now-playing>.ui>.playing-header {
        /* Comfortable spacing closer to dynamic island but not cramped */
        margin-top: calc(env(safe-area-inset-top, 44px) + 8px);
        padding-top: 0px;
        margin-bottom: 15px;
    }

    .now-playing>.ui>.playing-content {
        /* Bring content up to create more balanced spacing */
        margin-top: 8px;
        margin-bottom: 10px;
    }

    .now-playing>.ui>.playing-content>.playing-artwork {
        /* Reduce spacing around artwork on mobile */
        margin-bottom: 20px;
    }

    .now-playing>.ui>.playing-content>.playing-info {
        /* Reduce spacing around track info on mobile */
        margin-bottom: 20px;
    }

    .now-playing>.ui>.playing-content>.playing-progress {
        /* Reduce spacing around progress bar on mobile */
        margin-bottom: 20px;
    }

    .now-playing>.ui>.playing-footer {
        /* Match desktop/iPad feel while fitting iPhone */
        margin-bottom: max(15px, env(safe-area-inset-bottom, 15px));
        margin-top: 20px;
    }
}

@media only screen and (max-width: 260px) {
    .now-playing>.ui>.playing-content>.playing-controls {
        gap: 14px;
    }

    .now-playing>.ui>.playing-content>.playing-controls>.primary {
        gap: 6px;
    }
}

/* Clickable song title and artist */
.marquee-text.clickable {
    transition: opacity 0.2s ease, color 0.2s ease;
    border-radius: 4px;
    padding: 2px 4px;
    margin: -2px -4px;
    /* Ensure proper touch handling on iOS */
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
    /* Force cursor on all devices */
    cursor: pointer !important;
}

.marquee-text.clickable:hover {
    opacity: 0.8;
    color: var(--accent-color, #947bee);
    background-color: rgba(var(--accent-color-rgb, 148, 123, 238), 0.1);
}

.marquee-text.clickable:active {
    transform: scale(0.98);
    /* iOS feedback */
    background-color: rgba(var(--accent-color-rgb, 148, 123, 238), 0.2);
}

.artist.clickable {
    transition: opacity 0.2s ease, color 0.2s ease;
    border-radius: 4px;
    padding: 2px 4px;
    margin: -2px -4px;
    /* Ensure proper touch handling on iOS */
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
    /* Force cursor on all devices */
    cursor: pointer !important;
}

.artist.clickable:hover {
    opacity: 0.8;
    color: var(--accent-color, #947bee);
    background-color: rgba(var(--accent-color-rgb, 148, 123, 238), 0.1);
}

.artist.clickable:active {
    transform: scale(0.98);
    /* iOS feedback */
    background-color: rgba(var(--accent-color-rgb, 148, 123, 238), 0.2);
}