/* ============================================================
   下载页在线预览（PDF/视频）— PC + 手机共用
   配色沿用站点主色：#0072C6（PC 按钮）/ #2c6fbb（手机）/ #19B4EA（点缀）
   播放器外壳用深色，突出内容本身。
   ============================================================ */

/* -- 详情页按钮区 -- */
.dl-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.btnPreview { background-color: #FFF; color: #0072C6; border: 1px solid #0072C6; }
.btnPreview:hover { background-color: #0072C6; color: #FFF; text-decoration: none; }
.dl-preview-tip { color: #999; font-size: 12px; margin-top: 6px; }

.m-dl-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.m-preview-btn { background: #FFF; color: #2c6fbb; border: 1px solid #2c6fbb; }
.m-preview-tip { text-align: center; color: #999; font-size: 12px; margin: -6px 0 12px; }

/* -- 播放器遮罩 -- */
.lkpv-overlay {
    position: fixed; inset: 0; z-index: 4000;
    background: rgba(10, 15, 22, .78);
    backdrop-filter: blur(3px);
    display: flex; align-items: center; justify-content: center;
    padding: 24px;
    opacity: 0; visibility: hidden;
    transition: opacity .18s ease, visibility .18s;
}
.lkpv-overlay.lkpv-open { opacity: 1; visibility: visible; }

/* -- 面板 -- */
.lkpv-panel {
    width: min(1100px, 100%); height: min(92vh, 100%);
    background: #10151C; border: 1px solid #2A3644; border-radius: 10px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, .5);
    display: flex; flex-direction: column; overflow: hidden;
    transform: scale(.96) translateY(8px);
    transition: transform .18s ease;
}
.lkpv-open .lkpv-panel { transform: none; }
.lkpv-panel.lkpv-video { width: min(960px, 100%); height: auto; max-height: 92vh; }

/* -- 顶栏 -- */
.lkpv-head {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 14px; flex: 0 0 auto;
    background: #1B2430; border-bottom: 1px solid #2A3644;
}
.lkpv-badge {
    flex: 0 0 auto; font-size: 12px; font-weight: bold;
    color: #19B4EA; background: rgba(25, 180, 234, .14);
    border: 1px solid rgba(25, 180, 234, .4);
    padding: 3px 10px; border-radius: 4px; letter-spacing: 1px;
}
.lkpv-title {
    flex: 1; min-width: 0; color: #E8EDF2;
    font-size: 14px; font-weight: bold;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.lkpv-actions { display: flex; gap: 8px; align-items: center; flex: 0 0 auto; }
.lkpv-act {
    color: #B8C4D0; font-size: 12px; padding: 5px 12px;
    border: 1px solid #3A4A5C; border-radius: 4px; text-decoration: none;
    transition: color .15s, border-color .15s, background .15s;
}
.lkpv-act:hover { color: #FFF; border-color: #19B4EA; background: rgba(25, 180, 234, .12); text-decoration: none; }
.lkpv-close {
    width: 32px; height: 32px; padding: 0;
    background: transparent; border: 1px solid #3A4A5C; border-radius: 4px;
    color: #B8C4D0; font-size: 15px; line-height: 1; cursor: pointer;
    transition: color .15s, border-color .15s, background .15s;
}
.lkpv-close:hover { color: #FFF; border-color: #E03131; background: rgba(224, 49, 49, .18); }

/* -- 内容区 -- */
.lkpv-body { position: relative; flex: 1; min-height: 0; background: #0B0F14; }
.lkpv-body iframe { width: 100%; height: 100%; border: 0; display: block; background: #FFF; }
.lkpv-body video { width: 100%; max-height: calc(92vh - 56px); display: block; background: #000; outline: none; }

/* -- 加载 / 错误态 -- */
.lkpv-loading {
    position: absolute; inset: 0; z-index: 1;
    display: flex; align-items: center; justify-content: center; gap: 10px;
    color: #8FA1B3; font-size: 13px; background: #0B0F14;
}
.lkpv-spin {
    width: 18px; height: 18px; border-radius: 50%;
    border: 2px solid #2A3644; border-top-color: #19B4EA;
    animation: lkpv-rot .8s linear infinite;
}
@keyframes lkpv-rot { to { transform: rotate(360deg); } }
.lkpv-error {
    position: absolute; inset: 0; z-index: 2;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
    color: #B8C4D0; font-size: 13px; background: #0B0F14; text-align: center; padding: 20px;
}
.lkpv-error a { color: #19B4EA; }

/* -- 手机：全屏播放 -- */
@media (max-width: 640px) {
    .lkpv-overlay { padding: 0; }
    .lkpv-panel, .lkpv-panel.lkpv-video {
        width: 100%; height: 100vh; height: 100dvh;
        max-height: none; border: 0; border-radius: 0;
    }
    .lkpv-body video { max-height: calc(100vh - 56px); max-height: calc(100dvh - 56px); }
    .lkpv-title { font-size: 13px; }
    .lkpv-act { padding: 5px 9px; }
}

/* -- 无障碍：减少动态效果 -- */
@media (prefers-reduced-motion: reduce) {
    .lkpv-overlay, .lkpv-panel, .lkpv-act, .lkpv-close { transition: none; }
    .lkpv-spin { animation: none; border-top-color: #19B4EA; }
}
