/* 文档视频 · 点播播放器与 16:9 嵌入（与 style.css .pv-doc-video 配合） */
.pv-vod-list,
.pv-vod-ep,
.pv-vod-player-shell,
.pv-vod-player,
.pv-vod-player-inner {
    box-sizing: border-box;
    max-width: 100%;
    min-width: 0;
}

/* B 站式：左播放 + 右选集 */
.pv-vod-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(240px, 340px);
    gap: 1rem 1.25rem;
    align-items: start;
    width: 100%;
}

.pv-vod-layout__main {
    min-width: 0;
}

.pv-vod-layout__player-wrap {
    width: 100%;
}

.pv-vod-layout__playing-title {
    font-size: 1.125rem;
    font-weight: 600;
    line-height: 1.35;
    margin: 0 0 0.5rem;
    overflow-wrap: anywhere;
    color: var(--bs-body-color, #212529);
}

.pv-vod-layout__playing-title:empty {
    display: none;
}

.pv-vod-layout__sidebar {
    min-width: 0;
    border: 1px solid var(--bs-border-color, #dee2e6);
    border-radius: 0.5rem;
    background: var(--bs-body-bg, #fff);
    overflow: hidden;
}

.pv-vod-layout__sidebar-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.65rem 0.85rem;
    border-bottom: 1px solid var(--bs-border-color, #dee2e6);
    background: var(--bs-tertiary-bg, #f8f9fa);
}

.pv-vod-layout__sidebar-label {
    font-weight: 600;
    font-size: 0.9375rem;
}

.pv-vod-layout__sidebar-count {
    font-size: 0.75rem;
    color: var(--bs-secondary-color, #6c757d);
}

.pv-vod-layout__series-title {
    margin: 0;
    padding: 0.5rem 0.85rem 0;
    font-size: 0.8125rem;
    color: var(--bs-secondary-color, #6c757d);
    overflow-wrap: anywhere;
}

.pv-vod-ep-list {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    max-height: min(70vh, 560px);
    overflow-y: auto;
    padding: 0.5rem;
}

.pv-vod-list.pv-vod-list--legacy {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    width: 100%;
}

.pv-vod-ep {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.5rem 0.55rem;
    border: 1px solid transparent;
    border-radius: 0.375rem;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

.pv-vod-list--legacy .pv-vod-ep {
    flex-direction: column;
    border-color: var(--bs-border-color, #dee2e6);
    padding: 0.75rem;
}

.pv-vod-ep__num {
    flex: 0 0 1.75rem;
    font-size: 0.875rem;
    font-weight: 700;
    line-height: 1.4;
    color: var(--bs-secondary-color, #6c757d);
    text-align: center;
}

.pv-vod-ep--active .pv-vod-ep__num {
    color: var(--bs-primary, #0d6efd);
}

.pv-vod-ep__body {
    flex: 1;
    min-width: 0;
}

.pv-vod-ep__row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.35rem;
}

.pv-vod-ep__meta-line {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
    margin-top: 0.2rem;
}

.pv-vod-ep__price {
    font-size: 0.75rem;
    color: var(--bs-danger, #dc3545);
    font-weight: 500;
}

.pv-vod-ep__thumb-mini {
    flex: 0 0 72px;
    width: 72px;
    aspect-ratio: 16 / 9;
    border-radius: 0.25rem;
    overflow: hidden;
    background: #0f172a;
}

.pv-vod-ep__thumb-mini img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pv-vod-ep__card {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    margin-bottom: 0.5rem;
}

.pv-vod-ep__thumb {
    flex: 0 0 96px;
    width: 96px;
    aspect-ratio: 16 / 9;
    border-radius: 0.35rem;
    overflow: hidden;
    background: #0f172a;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pv-vod-ep__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pv-vod-ep__thumb-ph {
    color: #94a3b8;
    font-size: 1.5rem;
}

.pv-vod-ep__meta {
    flex: 1;
    min-width: 0;
}

.pv-vod-ep__title {
    overflow-wrap: anywhere;
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.35;
}

.pv-vod-ep__badge--free { background: #dcfce7; color: #166534; }
.pv-vod-ep__badge--trial { background: #fef9c3; color: #854d0e; }
.pv-vod-ep__badge--paid { background: #fee2e2; color: #991b1b; }
.pv-vod-ep__badge--login,
.pv-vod-ep__badge--level { background: #e0e7ff; color: #3730a3; }
.pv-vod-ep__badge--ok { background: #e2e8f0; color: #334155; }

.pv-vod-ep__progress {
    height: 4px;
    background: #e2e8f0;
    border-radius: 2px;
    margin-top: 0.35rem;
    position: relative;
    overflow: hidden;
}

.pv-vod-ep__progress::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: var(--pv-progress, 0%);
    background: var(--bs-primary, #0d6efd);
}

.pv-vod-ep__progress span {
    display: block;
    font-size: 0.75rem;
    color: var(--bs-secondary-color, #6c757d);
    margin-top: 0.25rem;
}

.pv-vod-ep__duration {
    font-size: 0.75rem;
    color: var(--bs-secondary-color, #6c757d);
}

.pv-vod-skeleton__bar {
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 0.375rem;
    background: linear-gradient(90deg, #e2e8f0 25%, #f1f5f9 50%, #e2e8f0 75%);
    background-size: 200% 100%;
    animation: pv-vod-shimmer 1.2s ease-in-out infinite;
}

@keyframes pv-vod-shimmer {
    0% { background-position: 100% 0; }
    100% { background-position: -100% 0; }
}

.pv-vod-unlock-toast {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 1080;
    max-width: min(320px, 90vw);
}

.pv-viewing-continue__cover {
    width: 80px;
    height: 45px;
    object-fit: cover;
    flex-shrink: 0;
}

.pv-vod-layout .pv-vod-ep--active {
    background: rgba(13, 110, 253, 0.08);
    border-color: rgba(13, 110, 253, 0.35);
}

.pv-vod-list--legacy .pv-vod-ep--active {
    border-color: var(--bs-primary, #0d6efd);
    box-shadow: 0 0 0 1px rgba(13, 110, 253, 0.25);
}

.pv-vod-ep__head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.pv-vod-ep__head strong {
    flex: 1 1 auto;
    min-width: 0;
    overflow-wrap: anywhere;
}

.pv-vod-ep__badge {
    font-size: 0.6875rem;
    line-height: 1.2;
    padding: 0.1rem 0.4rem;
    border-radius: 0.2rem;
    flex-shrink: 0;
}

.pv-vod-player-shell,
.pv-vod-player {
    position: relative;
    width: 100%;
}

/* 16:9 响应式容器（点播 / 嵌入共用 class） */
.pv-vod-embed-ratio {
    position: relative;
    width: 100%;
    max-width: 100%;
    aspect-ratio: 16 / 9;
    height: auto;
    padding-bottom: 0;
    overflow: hidden;
    border-radius: 0.375rem;
    background: #000;
}

@supports not (aspect-ratio: 16 / 9) {
    .pv-vod-embed-ratio {
        height: 0;
        padding-bottom: 56.25%;
    }
}

.pv-vod-embed-ratio iframe,
.pv-vod-embed-ratio video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
    max-width: 100%;
    border: 0;
}

.pv-vod-player-inner {
    width: 100%;
}

.pv-vod-layout .pv-vod-player-inner video.pv-video-native {
    max-height: min(72vh, 720px);
}

.pv-vod-player-inner video.pv-video-native {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    max-height: min(70vh, 720px);
    border-radius: 0.375rem;
    background: #000;
}

.pv-vod-layout__source-panel {
    border-top: 1px solid var(--bs-border-color, #dee2e6);
    padding: 0.65rem 0.85rem 0.75rem;
}

.pv-vod-layout__source-head {
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.pv-vod-layout__source-hint {
    font-size: 0.75rem;
    line-height: 1.35;
}

.pv-vod-ep__src-count {
    font-size: 0.6875rem;
    color: var(--bs-secondary-color, #6c757d);
    background: #f1f5f9;
    padding: 0.05rem 0.35rem;
    border-radius: 0.2rem;
}

.pv-vod-sources--sidebar {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.pv-vod-sources__btn {
    display: block;
    width: 100%;
    text-align: left;
    padding: 0.45rem 0.65rem;
    border: 1px solid var(--bs-border-color, #dee2e6);
    border-radius: 0.35rem;
    background: #fff;
    font-size: 0.8125rem;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.pv-vod-sources__btn:hover {
    border-color: var(--bs-primary, #0d6efd);
}

.pv-vod-sources__btn.active {
    border-color: var(--bs-primary, #0d6efd);
    background: rgba(13, 110, 253, 0.08);
    font-weight: 600;
    color: var(--bs-primary, #0d6efd);
}

.pv-vod-sources,
.pv-vod-quality {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    width: 100%;
}

.pv-vod-quality .btn.active {
    font-weight: 600;
}

.pv-vod-sources .btn {
    flex: 0 1 auto;
    max-width: 100%;
    white-space: normal;
    text-align: center;
}

.pv-vod-resume-hint {
    font-size: 0.8125rem;
    color: var(--bs-info, #0dcaf0);
    margin-bottom: 0.35rem;
}

.pv-vod-trial-banner {
    font-size: 0.8125rem;
    color: var(--bs-warning-emphasis, #664d03);
    background: var(--bs-warning-bg-subtle, #fff3cd);
    border-radius: 0.25rem;
    padding: 0.25rem 0.5rem;
    margin-bottom: 0.35rem;
}

.pv-vod-trial-overlay {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.72);
    color: #fff;
    text-align: center;
    border-radius: 0.375rem;
}

.pv-vod-trial-overlay .btn {
    min-width: 7rem;
    max-width: 100%;
}

.pv-vod-ad-cue {
    max-width: 100%;
    overflow: hidden;
}

.pv-vod-ad-cue img {
    max-width: 100%;
    height: auto;
}

.pv-vod-platform-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    min-height: 100%;
    padding: 1.25rem 1rem;
    text-align: center;
    color: #e2e8f0;
    background: linear-gradient(160deg, #0f172a 0%, #1e293b 100%);
}

.pv-vod-platform-card__icon {
    font-size: 2rem;
    color: #94a3b8;
}

.pv-vod-platform-card__cover {
    max-width: 100%;
    max-height: 40%;
    border-radius: 0.35rem;
    object-fit: cover;
}

.pv-vod-platform-card__title {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: #f8fafc;
}

.pv-vod-platform-card__hint {
    margin: 0;
    font-size: 0.8125rem;
    line-height: 1.45;
    color: #94a3b8;
    max-width: 28rem;
}

.pv-vod-platform-card__hint code {
    color: #cbd5e1;
}

.pv-vod-denied {
    margin-top: 0.5rem;
}

.pv-vod-denied .btn {
    margin-bottom: 0.25rem;
}

@media (max-width: 991.98px) {
    .pv-vod-layout {
        grid-template-columns: 1fr;
    }

    .pv-vod-layout__sidebar {
        order: 2;
    }

    .pv-vod-ep-list {
        max-height: 280px;
    }
}

@media (max-width: 576px) {
    .pv-vod-ep {
        padding: 0.45rem;
    }

    .pv-vod-ep__thumb-mini {
        flex: 0 0 56px;
        width: 56px;
    }

    .pv-vod-trial-overlay .btn {
        min-width: 5.5rem;
        font-size: 0.8125rem;
        padding: 0.35rem 0.65rem;
    }

    .pv-vod-sources .btn-group {
        display: flex;
        flex-direction: column;
        width: 100%;
    }

    .pv-vod-sources .btn {
        width: 100%;
    }
}

/* 剧集频道页 */
.pv-video-channel__hero {
    border-bottom: 1px solid var(--bs-border-color, #dee2e6);
    padding-bottom: 1rem;
}

.pv-video-channel__cover {
    object-fit: cover;
    width: 160px;
    height: 90px;
}

.pv-vod-layout__search input {
    width: 100%;
}

/* 剧集广场 */
.pv-video-plaza__card {
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.pv-video-plaza__card:hover {
    transform: translateY(-2px);
    box-shadow: 0 0.5rem 1.25rem rgba(0, 0, 0, 0.08) !important;
}

.pv-video-plaza__cover {
    aspect-ratio: 16 / 9;
    object-fit: cover;
    width: 100%;
}

.pv-video-plaza__cover--empty {
    background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
    min-height: 120px;
}

.pv-video-plaza__cover-link {
    display: block;
}
