/* 极简重置，让播放器在MD文章里看起来舒适，无额外边框 */
body {
    margin: 0;
    padding: 0;
    background: transparent;
}

.md-music-player {
    max-width: 100%;
    margin: 1.2rem 0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    transition: all 0.2s ease;
    background-color: #fafafa;
    border: 1px solid #eaeef2;
}

@media (prefers-color-scheme: dark) {
    .md-music-player {
        background-color: #2d2f31;
        border-color: #444;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    }
}

/* 完全重写播放器结构 */
.aplayer {
    margin: 0 !important;
    box-shadow: none !important;
    border-radius: 8px !important;
    background: transparent !important;
    display: flex !important;
    flex-direction: column !important;
}

/* 上半部分：封面和信息区域 */
.aplayer-body {
    display: flex !important;
    flex-direction: row !important;
    width: 100% !important;
}

/* 封面图 */
.aplayer-pic {
    float: none !important;
    flex-shrink: 0 !important;
}

/* 信息区域 */
.aplayer-info {
    flex: 1 !important;
    margin-left: 0 !important;
    padding: 10px 10px 0 10px !important;
    height: auto !important;
    min-height: 66px !important;
    background: transparent !important;
    display: flex !important;
    flex-direction: column !important;
}

/* 歌曲信息 */
.aplayer .aplayer-info .aplayer-music {
    padding: 0 5px 5px 5px !important;
    margin: 0 !important;
    height: auto !important;
}

/* 控制区域 */
.aplayer .aplayer-info .aplayer-controller {
    position: relative !important;
    display: flex !important;
    align-items: center !important;
    padding: 5px 5px 10px 5px !important;
    width: 100% !important;
}

/* 进度条容器 */
.aplayer .aplayer-info .aplayer-controller .aplayer-bar-wrap {
    flex: 1 !important;
    margin: 0 5px !important;
    padding: 4px 0 !important;
    cursor: pointer !important;
}

/* 进度条 - 关键修复 */
.aplayer .aplayer-info .aplayer-controller .aplayer-bar-wrap .aplayer-bar {
    position: relative !important;
    height: 2px !important;
    width: 100% !important;
    background: #cdcdcd !important;
}

.aplayer .aplayer-info .aplayer-controller .aplayer-bar-wrap .aplayer-bar .aplayer-loaded,
.aplayer .aplayer-info .aplayer-controller .aplayer-bar-wrap .aplayer-bar .aplayer-played {
    position: absolute !important;
    top: 0 !important;
    bottom: 0 !important;
    height: 2px !important;
}

/* 时间显示 */
.aplayer .aplayer-info .aplayer-controller .aplayer-time {
    position: relative !important;
    right: 0 !important;
    bottom: 0 !important;
    height: auto !important;
    color: #999;
    font-size: 11px;
    min-width: 70px;
    text-align: right;
    display: inline-flex !important;
    align-items: center;
    justify-content: flex-end;
}

/* 音量控制 */
.aplayer .aplayer-info .aplayer-controller .aplayer-volume-wrap {
    margin-left: 3px;
    display: inline-flex !important;
    align-items: center;
}

/* 列表区域 - 关键修改：让列表作为独立的块级元素显示在下方 */
.aplayer .aplayer-list {
    display: none !important;
    width: 100% !important;
    position: relative !important;
    top: auto !important;
    bottom: auto !important;
    left: auto !important;
    right: auto !important;
    max-height: 150px !important;
    overflow-y: auto !important;
    border-top: 1px solid rgba(0, 0, 0, 0.1) !important;
    margin-top: 0 !important;
    background-color: rgba(0, 0, 0, 0.02) !important;
    z-index: 5 !important;
}

/* 当有列表时显示 */
.aplayer.aplayer-withlist .aplayer-list {
    display: block !important;
}

/* 当有列表时，调整信息区域的下边框 */
.aplayer.aplayer-withlist .aplayer-info {
    border-bottom: 1px solid rgba(0, 0, 0, 0.1) !important;
}

/* 列表项样式 */
.aplayer .aplayer-list ol {
    padding: 0 !important;
    margin: 0 !important;
}

.aplayer .aplayer-list li {
    padding: 8px 15px !important;
    border-top: 1px solid rgba(0, 0, 0, 0.05) !important;
    line-height: normal !important;
    height: auto !important;
    min-height: 32px !important;
}

.aplayer .aplayer-list li:first-child {
    border-top: none !important;
}

/* 确保整个播放器高度自适应 */
.md-music-player {
    overflow: visible !important;
}