.apwp-player-shell {
    width: 100%;
    max-width: var(--apwp-max-width, 100%);
    margin: 1.25rem auto;
}

.apwp-player {
    width: 100%;
    aspect-ratio: var(--apwp-ratio, 16 / 9);
    background: #000;
    overflow: hidden;
}

/*
 * ArtPlayer 的 CSS 会随核心 JS 注入。下面仅预置首屏所需的最小结构，
 * 让服务端直接输出的封面在 JS 执行前就能按与播放器完全相同的尺寸绘制。
 */
.apwp-player > .art-video-player {
    position: relative;
    width: 100%;
    height: 100%;
    margin: 0 auto;
    background: #000;
}

.apwp-player > .art-video-player > .art-video {
    position: absolute;
    inset: 0;
    z-index: 10;
    width: 100%;
    height: 100%;
}

.apwp-player > .art-video-player > .art-poster {
    position: absolute;
    inset: 0;
    z-index: 11;
    width: 100%;
    height: 100%;
    background-position: center center;
    background-repeat: no-repeat;
    background-size: cover;
    pointer-events: none;
}

.apwp-player .art-control-apwpPlaylist .art-selector-value {
    min-width: 44px;
    text-align: center;
    white-space: nowrap;
}

.apwp-player .art-control-apwpPlaylist .art-selector-list {
    max-height: min(55vh, 360px);
    overflow-y: auto;
}

.apwp-error {
    padding: 12px 14px;
    border-left: 4px solid #d63638;
    background: #fff2f2;
    color: #8a2424;
}

@media (max-width: 480px) {
    .apwp-player .art-control-apwpPlaylist .art-selector-value {
        min-width: 38px;
        font-size: 12px;
    }
}
