.audio-player-container {
    display: flex;
    /*flex-direction: column;*/
    align-items: stretch;
    justify-content: center;
    gap: 3em;
    margin-top: 1em;
    margin-bottom: 1em;
}

.audio-player {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 2em;
    cursor: default;

    border: 1px solid var(--glass-border);
    border-radius: 24px;

    padding: 2em;

    transition: all 0.4s ease;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.08);

    background-color: var(--white);
}

.audio-player:hover {
    border-color: var(--primary);
    transform: translateY(-5px)
}

.audio-player-circle {
    background: rgba(255, 170, 168, 0.8);
    height: 4em;
    width: 4em;
    border-radius: 50%;
    cursor: pointer;

    display: flex;
    align-items: center;
    justify-content: center;

    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
}

.audio-player-circle:hover {
    background: rgba(255, 170, 168, 1);
}

.audio-player-transport-container {
    display: flex;
    flex-direction: column;
    gap: 1em;
    width: 100%;
}

.audio-player-transport {
    display: flex;
}

.audio-player-transport-background {
    margin-top: 0.6em;
    width: 100%;
    height: 5px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 24px;

    position: relative;
    /* so children can absolutely position */
    cursor: pointer;
    /*overflow: hidden;*/
}

.audio-player-transport-progress {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 0%;
    /* JS updates this */
    background: var(--primary);
    border-radius: inherit;
}

.audio-player-transport-thumb {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translate(50%, -50%);
    /* sit on the edge of the filled bar */
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .25);
    pointer-events: none;
    /* we drag by bar, not by thumb */
    border: 1px solid var(--text-muted);
}

.audio-player-description-artist {
    font-family: 'Archivo Black', sans-serif;
    font-size: 24px;
    color: var(--text-muted);
}

.audio-player-description-title {
    font-family: 'Archivo Black', sans-serif;
    font-size: 36px;
}

.audio-time-current {
    margin-right: 1em;
}

.audio-time-total {
    margin-left: 0.5em;
}

.audio-player-times {
    display: flex;
    justify-content: space-between;
    font-size: 0.875rem;
    color: var(--text-muted);
    user-select: none;
}

.audio-nav {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    position: relative;
    width: 44px;
    height: 44px;
    z-index: 0;

    border-radius: 9999px;
    border: 1px solid var(--glass-border);

    background: rgba(255, 255, 255, 0.75);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);

    cursor: pointer;

    transition: transform .2s ease, border-color .2s ease, background .2s ease;

    color: var(--text);
    /* svg inherits */

    margin-top: auto;
    margin-bottom: auto;

    overflow: hidden;
}

.audio-nav::after {
    content: '';
    position: absolute;
    z-index: -1;
    inset: 0;

    border-radius: 50%;
    background: rgba(255, 170, 168, 0);

    transform: scale(0);
    transition:
        transform 0.4s ease,
        background 0.4s ease;
}

.audio-nav:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.95);
}

.audio-nav:active {
    transform: translateY(0);
}

.audio-nav svg {
    transition: fill 0.4s ease;
}

.audio-nav.animate::after {
    animation: fillPulse 0.5s ease;
}

.audio-nav.animate svg {
    animation: iconFlash 0.45s ease;
}

/* Ensure the player flexes while arrows stay compact */
.audio-player-container .audio-player {
    flex: 1 1 auto;
}

@keyframes playerBounce {
    0% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(6px);
    }

    /* small downward push */
    100% {
        transform: translateY(0);
    }
}

@keyframes fillPulse {
    0% {
        background: rgba(255, 170, 168, 0);
        transform: scale(0);
    }

    35% {
        background: rgba(255, 170, 168, 1);
        transform: scale(1.4);
    }

    100% {
        background: rgba(255, 170, 168, 0);
        transform: scale(0);
    }
}

@keyframes iconFlash {
    0% {
        color: white;
    }

    70% {
        color: white;
    }

    /* stays white during the main fill */
    100% {
        color: var(--text);
    }

    /* fades back early */
}

.audio-player.bounce {
    animation: playerBounce 0.3s ease;
}

@media (max-width: 1200px) {
    .audio-player-description-title {
        font-size: 24px;
    }

    .audio-player-description-artist {
        font-size: 20px;
    }

    .audio-player-container {
        align-items: space-between;
        gap: 1em;
    }
}