.audio-player {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 12px 16px;
    margin: 16px auto;
    max-width: 700px;
    font-family: sans-serif;
}

.ap-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.ap-btn {
    background: none;
    border: 1px solid var(--border);
    color: var(--link);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
    transition: background 0.15s, color 0.15s;
}

.ap-btn:hover {
    background: var(--hover-bg);
    color: var(--hover-text);
}

.ap-btn.active {
    background: var(--hover-bg);
    color: var(--hover-text);
}

.ap-btn svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.ap-progress-wrap {
    flex: 1;
    min-width: 120px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ap-progress {
    flex: 1;
    height: 6px;
    background: var(--border);
    border-radius: 3px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.ap-progress-fill {
    height: 100%;
    background: var(--link);
    border-radius: 3px;
    width: 0%;
    transition: width 0.1s linear;
}

.ap-time {
    font-size: 12px;
    color: var(--text-muted);
    white-space: nowrap;
    min-width: 40px;
    text-align: center;
}

.ap-volume-wrap {
    display: flex;
    align-items: center;
    gap: 4px;
}

.ap-volume {
    width: 70px;
    height: 4px;
    -webkit-appearance: none;
    appearance: none;
    background: var(--border);
    border-radius: 2px;
    outline: none;
    cursor: pointer;
}

.ap-volume::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--link);
    cursor: pointer;
}

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

.ap-info {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    font-size: 14px;
    color: var(--text-muted);
}

.ap-track-name {
    flex: 1;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    color: var(--text);
    font-weight: 500;
}

.ap-track-num {
    font-size: 12px;
    color: var(--text-muted);
    white-space: nowrap;
}

.ap-repeat-msg,
.ap-shuffle-msg {
    font-size: 12px;
    color: var(--text-muted);
}

/* Highlight active track in plist */
.plist a.ap-active {
    background-color: var(--hover-bg);
    color: var(--hover-text);
    font-weight: bold;
    border-color: var(--link);
}

.plist a.ap-active::before {
    content: "▶ ";
}

/* Responsive */
@media (max-width: 600px) {
    .audio-player {
        padding: 10px 12px;
        border-radius: 8px;
    }

    .ap-controls {
        gap: 6px;
    }

    .ap-btn {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }

    .ap-volume-wrap {
        display: none;
    }

    .ap-progress-wrap {
        min-width: 80px;
    }

    .ap-time {
        font-size: 11px;
    }
}

@media print {
    .audio-player {
        display: none;
    }
}
