.dre-audio-player {
    --primary-accent: #800080;
    --secondary-accent: #6a006a;
    --light-purple-bg: #f2e6f2;
    --text-color-light-bg: #333;
    --text-color-dark-bg: #fff;
    --icon-color-light-bg: var(--primary-accent);
    --icon-color-dark-bg: #fff;

    display: flex;
    align-items: center;
    background-color: var(--light-purple-bg);
    border-radius: 25px;
    padding: 4px 10px;
    max-width: 350px;
    margin-left: auto;
    margin-right: 20px;
    transition: background-color 0.3s ease;
}

.dre-audio-player.is-playing {
    background-color: var(--primary-accent);
}

.dre-play-pause-btn {
    background-color: var(--primary-accent);
    border: none;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin-right: 10px;
    flex-shrink: 0;
}

.dre-audio-player.is-playing .dre-play-pause-btn {
    background-color: var(--light-purple-bg);
}

.dre-play-pause-btn:hover {
    background-color: var(--secondary-accent);
}

.dre-audio-player.is-playing .dre-play-pause-btn:hover {
    background-color: #eee;
}

.dre-play-pause-btn svg {
    width: 16px;
    height: 16px;
    fill: #fff;
}

.dre-audio-player.is-playing .dre-play-pause-btn svg {
    fill: var(--primary-accent);
}

.dre-progress-container {
    flex-grow: 1;
    height: 8px;
    background-color: rgba(0,0,0,0.1);
    border-radius: 4px;
    cursor: pointer;
    margin: 0 10px;
}

.dre-progress-bar {
    height: 100%;
    width: 0%;
    background-color: var(--primary-accent);
    border-radius: 5px;
}

.dre-audio-player.is-playing .dre-progress-bar {
    background-color: #fff;
}

.dre-timestamp,
.dre-speed-btn {
    color: var(--text-color-light-bg);
    transition: color 0.3s ease;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.dre-audio-player.is-playing .dre-timestamp,
.dre-audio-player.is-playing .dre-speed-btn {
    color: var(--text-color-dark-bg);
}

.dre-speed-btn {
    background-color: transparent;
    border: 1px solid var(--icon-color-light-bg);
    border-radius: 5px;
    padding: 2px 6px;
    cursor: pointer;
    font-size: 0.75rem;
    margin: 0 10px;
    transition: color 0.3s ease, border-color 0.3s ease;
}

.dre-audio-player.is-playing .dre-speed-btn {
    border-color: var(--icon-color-dark-bg);
}

.dre-volume-container {
    position: relative;
    display: flex;
    align-items: center;
}

.dre-volume-btn {
    background-color: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
}

.dre-volume-btn svg {
    width: 22px;
    height: 22px;
    fill: var(--icon-color-light-bg);
    transition: fill 0.3s ease;
}

.dre-audio-player.is-playing .dre-volume-btn svg {
    fill: var(--icon-color-dark-bg);
}

.dre-volume-slider-container {
    position: absolute;
    bottom: 125%; /* Position above the volume icon */
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--light-purple-bg);
    padding: 15px 0;
    width: 30px;
    border-radius: 15px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    visibility: hidden;
    opacity: 0;
    transition: visibility 0s 0.2s, opacity 0.2s ease;
    height: 110px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.dre-volume-container:hover .dre-volume-slider-container {
    visibility: visible;
    opacity: 1;
    transition-delay: 0s;
}

.dre-volume-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 80px;
    height: 6px;
    background: #ddd;
    outline: none;
    border-radius: 3px;
    transform: rotate(-90deg);
}

.dre-volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    background: var(--primary-accent);
    cursor: pointer;
    border-radius: 50%;
}

.dre-volume-slider::-moz-range-thumb {
    width: 14px;
    height: 14px;
    background: var(--primary-accent);
    cursor: pointer;
    border-radius: 50%;
}

#dre-original-audio-player-container {
    position: relative;
    height: 50px; /* Adjust as needed */
}

.dre-sticky-player {
    position: fixed;
    top: 100px;
    right: 20px;
    z-index: 1001;
    max-width: 350px;
    width: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.dre-sticky-player.visible {
    opacity: 1;
    visibility: visible;
}

.dre-close-sticky-player-btn {
    background: transparent;
    border: none;
    color: var(--text-color-light-bg);
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
    margin-left: 10px;
    opacity: 0.7;
    padding: 0;
    display: none; /* Hide by default */
}

/* Show the close button only when the player is NOT playing */
.dre-audio-player:not(.is-playing) .dre-close-sticky-player-btn {
    display: block;
}

.dre-close-sticky-player-btn:hover {
    opacity: 1;
}

.dre-audio-player.is-playing .dre-close-sticky-player-btn {
    color: var(--text-color-dark-bg);
}

@media (max-width: 768px) {
    .dre-sticky-player {
        top: 20px;
        right: 10px;
        max-width: 250px;
    }

    .dre-volume-slider-container {
        bottom: auto;
        top: 110%; /* Position below the player */
        left: -80px; /* Adjust to center it */
        width: 120px;
        height: auto;
        padding: 5px 15px;
    }

    .dre-volume-slider {
        transform: none; /* Remove the rotation */
        width: 100%;
        height: 6px;
    }
}
