
#dl-wrap {
    position: relative;
    margin-left: 1.6vh;
    margin-right: auto;
    pointer-events: auto;
    display: flex;
    align-items: center;
}

#dl-btn {
    position: relative;
    width: 4.4vh;
    height: 4.4vh;
    min-width: 30px;
    min-height: 30px;
    max-width: 34px;
    max-height: 34px;
    border-radius: 50%;
    border: 0.0926vh solid rgba(255, 255, 255, 0.1);
    background: var(--aer-chip-bg, var(--glass-bg));
    backdrop-filter: blur(1vh);
    -webkit-backdrop-filter: blur(1vh);
    color: #fff;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

#dl-btn .dl-ring {
    position: absolute;
    inset: -2px;
    border-radius: 50%;
    background: conic-gradient(var(--apple-red, #24c8fa) calc(var(--dl-progress, 0) * 1%), rgba(255, 255, 255, 0.14) 0);
    -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 2.5px), #000 calc(100% - 1.5px));
    mask: radial-gradient(farthest-side, transparent calc(100% - 2.5px), #000 calc(100% - 1.5px));
    opacity: 0;
    transition: opacity 0.25s ease;
    pointer-events: none;
}

#dl-btn.dl-active .dl-ring {
    opacity: 1;
}

#dl-btn .dl-face {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-size: cover;
    background-position: center;
    overflow: hidden;
    transition: filter 0.24s ease, opacity 0.24s ease;
    font-size: 1.6vh;
}

#dl-btn .dl-count {
    font-size: 1.5vh;
    font-weight: 600;
    color: var(--apple-red, #24c8fa);
}

#dl-btn .dl-face svg {
    flex-shrink: 0;
}

#dl-btn .dl-face svg.dl-bounce {
    animation: dl-bounce 1.2s ease-in-out infinite;
}

@keyframes dl-bounce {
    0%, 100% { transform: translateY(-1px); }
    50% { transform: translateY(2px); }
}

.dl-dissolving {
    filter: blur(6px);
    opacity: 0;
}

#dl-toast {
    position: absolute;
    left: calc(100% + 1.1vh);
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    height: 4vh;
    min-height: 34px;
    padding: 0 1.6vh;
    box-sizing: border-box;
    background: var(--glass-bg, rgba(255, 255, 255, 0.08));
    backdrop-filter: blur(1vh);
    -webkit-backdrop-filter: blur(1vh);
    border: 0.0926vh solid rgba(255, 255, 255, 0.1);
    border-radius: 999px;
    color: #fff;
    font-size: 1.3vh;
    white-space: nowrap;
    overflow: hidden;
    clip-path: inset(0 100% 0 0 round 999px);
    opacity: 0;
    pointer-events: none;
    transition: clip-path 0.45s cubic-bezier(0.2, 1, 0.2, 1), opacity 0.3s ease;
}

#dl-toast.dl-open {
    clip-path: inset(0 0 0 0 round 999px);
    opacity: 1;
}

#dl-toast .dl-toast-name {
    display: inline-block;
    width: max-content;
    max-width: 360px;
    overflow: hidden;
    white-space: nowrap;
    vertical-align: bottom;
    transition: filter 0.24s ease, opacity 0.24s ease;
}

#dl-toast.dl-need-marquee .dl-toast-name {
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 12px, #000 calc(100% - 12px), transparent 100%);
    mask-image: linear-gradient(90deg, transparent 0, #000 12px, #000 calc(100% - 12px), transparent 100%);
}

#dl-toast .dl-toast-name.dl-marquee-on {
    text-overflow: clip;
    animation: dl-marquee 6.5s linear infinite;
}

@keyframes dl-marquee {
    0% { transform: translateX(0); }
    42% { transform: translateX(calc(-1 * var(--dl-shift, 0px))); }
    58% { transform: translateX(calc(-1 * var(--dl-shift, 0px))); }
    100% { transform: translateX(0); }
}

#dl-toast .dl-toast-suffix {
    color: rgba(255, 255, 255, 0.75);
}

.dl-row .dl-row-cover {
    width: 4vh;
    height: 4vh;
    min-width: 30px;
    min-height: 30px;
    border-radius: 0.8vh;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.06);
}

.dl-row .dl-row-cover .item-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0.8vh;
}

.dl-row .dl-row-status {
    font-size: 1.1vh;
    color: rgba(255, 255, 255, 0.55);
    white-space: nowrap;
}

@media (max-width: 768px) {
    #dl-toast .dl-toast-name {
        max-width: 42vw;
    }
}

#dl-panel {
    border-radius: 1.4vh;
    overflow: hidden;
}

#dl-panel .playlist-items {
    padding-bottom: 0.6vh;
}


@media (max-width: 768px) {
    #dl-wrap {
        display: none;
    }
}
