.audio-player {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(216, 225, 237, 0.08);
    border: 1px solid rgba(186, 198, 216, 0.24);
    padding: 0.5rem 0.75rem;
    border-radius: 10px;
    transition: background 0.2s ease;
}

.audio-player:hover {
    background: rgba(216, 225, 237, 0.12);
}

.ap-play-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 9px;
    border: none;
    background: var(--button-gradient);
    color: var(--button-text);
    cursor: pointer;
    padding: 0;
    flex-shrink: 0;
    box-shadow: 0 4px 10px rgba(217, 119, 6, 0.28);
    transition: transform 0.15s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.ap-play-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(217, 119, 6, 0.38);
    filter: brightness(1.05);
}

.ap-play-btn:active {
    transform: translateY(0);
}

.ap-play-btn img {
    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(205, 214, 229, 0.45);
    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, #d97706);
}

.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); }
}
