/* ================================================================
 *  WordPress 视频审核插件 - 播放器样式
 * ================================================================ */

/* ============ 播放器外框 ============ */
.vm-player-wrap {
    position: relative !important;
    display: block !important;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    margin: 0 0 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,.12);
    width: 100%;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
                 "PingFang SC", "Microsoft YaHei", sans-serif;
    user-select: none;
    isolation: isolate;
    z-index: 0;
}

@supports not (aspect-ratio: 16 / 9) {
    .vm-player-wrap {
        height: 0;
        padding-bottom: 56.25%;
    }
}

.vm-player-wrap:fullscreen,
.vm-player-wrap:-webkit-full-screen {
    border-radius: 0;
    aspect-ratio: auto;
    height: 100% !important;
    padding-bottom: 0 !important;
    margin: 0;
}

/* ============ 视频元素 ============ */
.vm-player-video {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    display: block;
    object-fit: contain;
    background: #000;
    cursor: pointer;
    z-index: 1 !important;
}

/* ============ 水印层 ============ */
.vm-player-watermark-layer {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    pointer-events: none;
    overflow: hidden;
    z-index: 5 !important;
}

.vm-watermark {
    position: absolute;
    pointer-events: none;
    user-select: none;
    will-change: top, left, right, bottom;
}

.vm-watermark img {
    display: block;
    max-width: 120px;
    max-height: 60px;
    width: auto;
    height: auto;
    object-fit: contain;
}

.vm-watermark-text {
    font-size: 14px;
    font-weight: 600;
    color: #ffffff;
    text-shadow: 0 1px 4px rgba(0,0,0,.7);
    letter-spacing: .5px;
    white-space: nowrap;
}

/* ============ 控制栏 ============ */
.vm-player-controls {
    position: absolute !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    top: auto !important;
    padding: 24px 12px 8px;
    background: linear-gradient(transparent, rgba(0,0,0,.75));
    z-index: 10 !important;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition: opacity .2s, visibility .2s;
    box-sizing: border-box;
}

/* 隐藏状态：完全消失 */
.vm-player-wrap.controls-hidden .vm-player-controls {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

.vm-player-wrap.controls-hidden .vm-player-video {
    cursor: none;
}

/* ---- 进度条 ---- */
.vm-progress {
    position: relative;
    height: 4px;
    margin: 0 0 8px;
    cursor: pointer;
    padding: 8px 0;
    background-clip: content-box;
    box-sizing: content-box;
}

.vm-progress::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 4px;
    background: rgba(255,255,255,.25);
    border-radius: 2px;
    transition: height .15s;
}

.vm-progress:hover::before {
    height: 6px;
}

.vm-progress-buffer,
.vm-progress-played {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 4px;
    border-radius: 2px;
    transition: height .15s;
    pointer-events: none;
}

.vm-progress-buffer {
    background: rgba(255,255,255,.4);
    width: 0;
    z-index: 1;
}

.vm-progress-played {
    background: #3b82f6;
    width: 0;
    z-index: 2;
}

.vm-progress:hover .vm-progress-buffer,
.vm-progress:hover .vm-progress-played {
    height: 6px;
}

.vm-progress-handle {
    position: absolute;
    top: 50%;
    left: 0;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #fff;
    transform: translate(-50%, -50%) scale(0);
    transition: transform .15s;
    z-index: 3;
    box-shadow: 0 1px 4px rgba(0,0,0,.4);
    pointer-events: none;
}

.vm-progress:hover .vm-progress-handle {
    transform: translate(-50%, -50%) scale(1);
}

.vm-progress-tooltip {
    position: absolute;
    bottom: 22px;
    transform: translateX(-50%);
    background: rgba(0,0,0,.85);
    color: #fff;
    font-size: 11px;
    padding: 3px 7px;
    border-radius: 4px;
    opacity: 0;
    transition: opacity .15s;
    pointer-events: none;
    white-space: nowrap;
    z-index: 4;
    font-variant-numeric: tabular-nums;
}

/* ---- 控制行 ---- */
.vm-controls-row {
    display: flex !important;
    align-items: center;
    gap: 6px;
    color: #fff;
    height: 32px;
}

.vm-spacer { flex: 1; }

/* 通用按钮 */
.vm-btn {
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    padding: 6px;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: background .15s;
    line-height: 1;
    box-shadow: none !important;
    outline: none;
    text-decoration: none;
    -webkit-appearance: none;
    appearance: none;
}

.vm-btn:hover {
    background: rgba(255,255,255,.15);
}

.vm-btn:focus {
    outline: none;
}

.vm-btn svg {
    display: block;
    pointer-events: none;
}

/* 播放/暂停图标显隐 —— 关键修复，不再依赖内联样式 */
.vm-player-wrap .vm-icon-play  { display: block !important; }
.vm-player-wrap .vm-icon-pause { display: none  !important; }

.vm-player-wrap.is-playing .vm-icon-play  { display: none  !important; }
.vm-player-wrap.is-playing .vm-icon-pause { display: block !important; }

/* ---- 时间 ---- */
.vm-time {
    font-size: 12px;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    margin-left: 4px;
    letter-spacing: .3px;
}

.vm-time-sep {
    margin: 0 3px;
    opacity: .6;
}

/* ---- 中央大播放按钮 ---- */
.vm-big-play {
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: rgba(0,0,0,.55);
    border: 2px solid rgba(255,255,255,.85);
    color: #fff;
    cursor: pointer;
    display: flex !important;
    align-items: center;
    justify-content: center;
    z-index: 8 !important;
    transition: transform .2s, background .2s, opacity .2s;
    padding: 0;
    box-shadow: none;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.vm-big-play:hover {
    transform: translate(-50%, -50%) scale(1.1) !important;
    background: rgba(0,0,0,.75);
}

.vm-big-play svg {
    display: block;
    margin-left: 4px;
    pointer-events: none;
}

/* ★ 播放中隐藏中央大按钮 —— 关键修复 */
.vm-player-wrap.is-playing .vm-big-play {
    display: none !important;
}

/* ---- 加载指示 ---- */
.vm-spinner {
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    z-index: 9 !important;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.vm-spinner-circle {
    width: 44px;
    height: 44px;
    border: 3px solid rgba(255,255,255,.25);
    border-top-color: #fff;
    border-radius: 50%;
    animation: vmSpin .8s linear infinite;
}

@keyframes vmSpin {
    to { transform: rotate(360deg); }
}

/* ================================================================
 *  兼容保留：即使 HTML 里没删除倍速/音量，也被强制隐藏
 * ================================================================ */
.vm-volume-group,
.vm-speed-group {
    display: none !important;
}

/* ================================================================
 *  移动端适配
 * ================================================================ */
@media (max-width: 600px) {
    .vm-player-wrap { border-radius: 8px; }

    .vm-controls-row {
        gap: 2px;
        height: 30px;
    }

    .vm-time {
        font-size: 11px;
        margin-left: 2px;
    }

    .vm-big-play {
        width: 56px;
        height: 56px;
    }

    .vm-big-play svg {
        width: 40px;
        height: 40px;
    }

    .vm-watermark-text { font-size: 12px; }
    .vm-watermark img { max-width: 80px; max-height: 40px; }
}






.vm-player-canvas {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    display: block !important;
    pointer-events: none !important;
    user-select: none !important;
    z-index: 4 !important; 
}