/* @added 智唯网络 2026-11-03 视频嵌入播放器容器 */
.bfm-video {
    position: relative;
    width: 100%;
    max-width: 880px;
    margin: 18px auto;
    padding-top: 56.25%; /* 16:9 */
    background: #000;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 6px 22px rgba(0, 0, 0, 0.12);
}
.bfm-video__el {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
    background: #000;
    object-fit: contain;
}
.bfm-video--iframe {
    background: #000;
}
/* 源站跳转兜底（无法嵌入的第三方链接） */
.bfm-video--src {
    background: #f4f7f6;
    box-shadow: 0 6px 22px rgba(0, 0, 0, 0.06);
}
.bfm-video__src {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 18px;
    box-sizing: border-box;
    color: #0f6b5c;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    background: linear-gradient(180deg, #ffffff, #f4f7f6);
    transition: background .15s ease;
}
.bfm-video__src:hover {
    background: linear-gradient(180deg, #f4f7f6, #e9f1ee);
}
.bfm-video__src-ico {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #0f6b5c;
    color: #fff;
    font-size: 13px;
    flex: 0 0 auto;
}

/* ---------- 自定义控制条（直链/原生视频） ---------- */
.bfm-video__bar {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 3;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    box-sizing: border-box;
    background: linear-gradient(to top, rgba(0, 0, 0, .7), rgba(0, 0, 0, 0));
    pointer-events: none; /* 默认不挡画面点击；子元素再单独开启 */
}
.bfm-video__bar > * { pointer-events: auto; }

.bfm-video__btn {
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .16);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .15s ease;
}
.bfm-video__btn:hover { background: rgba(255, 255, 255, .32); }
.bfm-video__btn svg { display: block; }

.bfm-video__progress {
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}
.bfm-video__track {
    position: relative;
    flex: 1 1 auto;
    height: 5px;
    border-radius: 3px;
    background: rgba(255, 255, 255, .25);
    cursor: pointer;
    overflow: hidden;
}
.bfm-video__buffered,
.bfm-video__played {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0;
}
.bfm-video__buffered { background: rgba(255, 255, 255, .35); }
.bfm-video__played { background: #0f6b5c; }
.bfm-video__time {
    flex: 0 0 auto;
    color: #fff;
    font-size: 12px;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

/* 播放按钮：按后台开关隐藏（控制条按钮 + 中央大按钮） */
.bfm-video[data-play="0"] .bfm-video__play,
.bfm-video[data-play="0"] .bfm-video__center { display: none; }

/* 进度条显示模式 */
.bfm-video[data-progress="none"] .bfm-video__progress { display: none; }
.bfm-video[data-progress="fullscreen"] .bfm-video__progress { display: none; }
.bfm-video[data-progress="fullscreen"].bfm-video--fs .bfm-video__progress { display: flex; }

/* 全屏时容器铺满并居中视频（flex 居中，避免非 16:9 屏偏移） */
.bfm-video--fs {
    padding-top: 0 !important;
    width: 100%;
    height: 100%;
    max-width: none;
    margin: 0;
    border-radius: 0;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
}
.bfm-video--fs .bfm-video__el {
    position: static;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* 中央大播放按钮：暂停时居中显示，全屏时移到右上角 */
.bfm-video__center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 4;
    width: 74px;
    height: 74px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(15, 107, 92, .9);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .38);
    transition: background .15s ease, transform .15s ease;
}
.bfm-video__center:hover { background: #0f6b5c; }
.bfm-video__center svg { display: block; margin-left: 5px; }
/* 播放中隐藏中央按钮 */
.bfm-video--playing .bfm-video__center { display: none; }
/* 全屏：中央按钮移到右上角 */
.bfm-video--fs .bfm-video__center {
    top: 18px;
    left: auto;
    right: 18px;
    transform: none;
}
