.player-container {
    position: fixed;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    max-width: 1000px;
    width: calc(100% - 30px);
    background-color: var(--card);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: none;
    border-radius: 9999px;
    z-index: 1000;
    padding: 6px 16px 6px 6px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-family: var(--font-family);
    transition: bottom 0.3s ease-out, background-color 0.25s ease, border-color 0.25s ease;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.player-eq-bg {
    position: absolute;
    inset: -20%;
    z-index: 0;
    background-size: cover;
    background-position: center;
    filter: blur(40px);
    -webkit-filter: blur(40px);
    opacity: 0.45;
    pointer-events: none;
    transform-origin: center center;
}

.player-close {
    flex-shrink: 0;
    margin-left: 8px;
    background: none;
    border: none;
    color: var(--text);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.25s ease, color 0.25s ease;
}
.player-close:hover {
    background-color: var(--button-hover-bg);
}

.player-content {
    display: flex;
    align-items: center;
    width: 100%;
    min-width: 0;
    cursor: pointer;
    position: relative;
    z-index: 1;
}

.player-beat-link {
    display: flex;
    align-items: center;
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.player-beat-link:hover {
    text-decoration: none;
    color: inherit;
}

.player-cover {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 50%;
    margin-right: 12px;
    margin-left: 0;
    flex-shrink: 0;
    background-color: var(--bg-secondary);
    transition: background-color 0.25s ease;
}

.player-info {
    flex-grow: 1;
    margin-right: 20px;
    min-width: 0;
}

.player-title {
    font-size: 1em;
    font-weight: 500;
    margin: 0;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.25s ease;
}

.player-artist {
    font-size: 0.85em;
    color: #ffffff;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.25s ease;
}

.player-controls {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 0 0 auto;
    max-width: min(500px, 52vw);
    justify-content: flex-end;
}

.player-play-pause-button .player-icon-pause {
    display: none;
}

.player-play-pause-button.is-playing .player-icon-play {
    display: none;
}

.player-play-pause-button.is-playing .player-icon-pause {
    display: block;
}

.player-play-pause-button.is-playing .player-icon-pause[hidden] {
    display: block;
}

.player-play-pause-button .player-icon-play[hidden] {
    display: none;
}

.player-play-pause-button {
    background: var(--bg-secondary);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text);
    transition: background-color 0.25s ease, color 0.25s ease, transform 0.15s ease;
    flex-shrink: 0;
}

.player-play-pause-button:hover {
    background-color: var(--button-hover-bg);
}

.player-play-pause-button .material-symbols-outlined,
.player-play-pause-button svg.lucide {
    font-size: 22px;
}

.current-time, .duration {
    font-size: 0.9em;
    color: #ffffff;
    min-width: 40px;
    text-align: center;
    transition: color 0.25s ease;
}

.progress-bar {
    flex-grow: 1;
    -webkit-appearance: none;
    width: 100%;
    height: 6px;
    background: var(--fill-quaternary);
    border-radius: 5px;
    outline: none;
    cursor: pointer;
    margin: 0 10px;
    transition: background-color 0.25s ease;
}

.progress-bar::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--button-primary-bg);
    cursor: pointer;
    transition: background-color 0.25s ease;
}

.progress-bar::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--button-primary-bg);
    cursor: pointer;
    transition: background-color 0.25s ease;
}

.player-volume-button {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  transition: background-color 0.2s ease, color 0.25s ease;
}

.player-volume-button:hover {
    background-color: var(--button-hover-bg);
}

.player-volume-button .material-symbols-outlined,
.player-volume-button svg.lucide {
    font-size: 20px;
    color: var(--text);
    line-height: 1;
}

.volume-bar {
    width: 88px;
    height: 4px;
    -webkit-appearance: none;
    appearance: none;
    background: var(--fill-quaternary);
    border-radius: 999px;
    outline: none;
    cursor: pointer;
    margin-left: 4px;
    transition: background-color 0.25s ease;
}

.volume-bar::-webkit-slider-runnable-track {
    height: 4px;
    border-radius: 999px;
    background: var(--fill-quaternary);
}

.volume-bar::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 12px;
    height: 12px;
    margin-top: -4px;
    border-radius: 50%;
    background: var(--text);
    cursor: pointer;
    transition: transform 0.15s ease;
}

.volume-bar::-webkit-slider-thumb:hover {
    transform: scale(1.1);
}

.volume-bar::-moz-range-track {
    height: 4px;
    border-radius: 999px;
    background: var(--fill-quaternary);
}

.volume-bar::-moz-range-thumb {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: none;
    background: var(--text);
    cursor: pointer;
}

.volume-bar::-ms-thumb {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--button-primary-bg) !important;
    cursor: pointer;
    transition: background-color 0.25s ease;
}
.volume-bar::-ms-fill-lower {
    background: var(--button-primary-bg) !important;
}
.volume-bar::-ms-fill-upper {
    background: var(--button-primary-bg) !important;
}

@media (max-width: 768px) {
    .player-container {
        padding: 6px 10px;
        width: calc(100% - 48px);
        max-width: 360px;
        border-radius: 9999px;
    }

    .player-cover {
        width: 36px;
        height: 36px;
        margin-right: 10px;
        margin-left: 0;
        border-radius: 50%;
    }

    .player-info {
        margin-right: 8px;
    }

    .player-title {
        font-size: 0.9em;
    }

    .player-artist {
        font-size: 0.8em;
    }

    .player-controls {
        gap: 10px;
        width: auto;
        max-width: none;
    }

    .player-play-pause-button .material-symbols-outlined {
        font-size: 32px;
    }

    .current-time, .duration {
        font-size: 0.8em;
    }

    .progress-bar {
        height: 4px;
    }

    .progress-bar::-webkit-slider-thumb,
    .progress-bar::-moz-range-thumb {
        width: 12px;
        height: 12px;
    }

    .volume-bar {
        width: 60px;
    }

    .player-container .volume-bar {
        display: none;
    }
}

@media (max-width: 500px) {
    .player-info {
        display: none;
    }
    .player-controls {
        width: 100%;
        justify-content: center;
    }
}
