.audio-player {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.5rem 0.75rem;
    border-radius: 999px;
    transition: background 0.2s ease;
}

.audio-player:hover {
    background: rgba(255, 255, 255, 0.08);
}

.ap-play-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: var(--accent-primary, #5865f2);
    color: white;
    cursor: pointer;
    padding: 0;
    flex-shrink: 0;
    transition: transform 0.1s ease, background 0.2s ease;
}

.ap-play-btn:hover {
    background: var(--accent-hover, #4752c4);
    transform: scale(1.05);
}

.ap-play-btn:active {
    transform: scale(0.95);
}

.ap-play-btn svg {
    width: 16px;
    height: 16px;
}

/* Icon visibility - show play by default, pause when playing */
.ap-icon-pause {
    display: none;
}

.audio-player.playing .ap-icon-play {
    display: none;
}

.audio-player.playing .ap-icon-pause {
    display: block;
}

.ap-waveform {
    display: flex;
    align-items: center;
    gap: 2px;
    height: 24px;
}

.ap-bar {
    width: 3px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    height: 100%;
    animation: none;
}

/* Create a fake waveform pattern */
.ap-bar:nth-child(odd) { height: 60%; }
.ap-bar:nth-child(2n) { height: 40%; }
.ap-bar:nth-child(3n) { height: 80%; }
.ap-bar:nth-child(4n) { height: 50%; }
.ap-bar:nth-child(5n) { height: 90%; }

.audio-player.playing .ap-bar {
    animation: waveform 1s ease-in-out infinite;
    background: var(--accent-primary, #5865f2);
}

.audio-player.playing .ap-bar:nth-child(odd) { animation-duration: 0.8s; }
.audio-player.playing .ap-bar:nth-child(2n) { animation-duration: 1.1s; }
.audio-player.playing .ap-bar:nth-child(3n) { animation-duration: 1.3s; }
.audio-player.playing .ap-bar:nth-child(4n) { animation-duration: 0.9s; }

@keyframes waveform {
    0%, 100% { transform: scaleY(1); }
    50% { transform: scaleY(0.5); }
}
