/* ===== 内容推荐位样式（全站通用，含移动端适配） =====
   说明：class 全部避开 ad/ads/advert/banner/popup 等关键词，防止被浏览器去广告插件屏蔽 */
.recbox { margin: 0 auto; text-align: center; max-width: 100%; position: relative; }
.recbox img { border: 0; }
.recbox a { display: inline-block; }

/* 广告位标识标签（仅供后台对照位置使用，上线后可删除此段） */
.slotcap { display: inline-block; margin-top: 4px; padding: 2px 8px; font-size: 12px; line-height: 1.5;
    color: #c00; background: #fff3cd; border: 1px dashed #f0ad4e; border-radius: 4px; }
.rail .slotcap, .mbar .slotcap { position: absolute; bottom: 2px; left: 50%; transform: translateX(-50%); margin: 0; }
.tlink { display: inline-block; padding: 6px 14px; color: #fff; background: #007bff; border-radius: 4px; text-decoration: none; font-size: 14px; }

/* 通栏/卡片类（导航下/标题下/输入框下/信息流/侧栏/友链上/页脚/相关推荐） */
.recbox-nav,
.recbox-head,
.recbox-tool,
.recbox-link,
.recbox-foot,
.recbox-feed,
.recbox-side,
.recbox-related {
    margin: 10px auto;
    overflow: hidden;
}
.recbox-foot { margin: 0 auto; }
.recbox-head,
.recbox-tool { text-align: center; }
.recbox-side { text-align: center; }

/* 侧边悬浮（桌面），外观像内容推荐卡 */
.rail {
    position: fixed;
    top: 120px;
    z-index: 99980;
    width: 120px;
}
.rail-left { left: 5px; }
.rail-right { right: 5px; }

/* 关闭按钮（悬浮/开屏/移动条/播放结束 共用） */
.xclose {
    position: absolute;
    top: -2px;
    right: 2px;
    cursor: pointer;
    width: 20px;
    height: 20px;
    line-height: 18px;
    text-align: center;
    color: #fff;
    background: rgba(0, 0, 0, .55);
    border-radius: 50%;
    font-size: 16px;
    z-index: 2;
}
.rail-left .xclose { right: auto; left: 2px; }

/* 开屏插屏（每会话一次），外观像推荐弹层 */
.layerbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(0, 0, 0, .75);
    align-items: center;
    justify-content: center;
}
.layerbox.show { display: flex; }
.layerbox-inner {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    background: #fff;
    padding: 10px;
    border-radius: 8px;
}
.ltip {
    font-size: 12px;
    color: #999;
    text-align: center;
    margin-top: 4px;
}

/* 移动端固定条（手机） */
.mbar {
    display: none;
    position: fixed;
    left: 0;
    right: 0;
    z-index: 99985;
    text-align: center;
    background: rgba(0, 0, 0, .7);
    padding: 4px;
}
.mbar-top { top: 0; }
.mbar-bottom { bottom: 0; }

/* 播放页 */
.pstrip {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 99990;
    text-align: center;
    background: rgba(0, 0, 0, .65);
    padding: 4px;
}
.prail {
    position: fixed;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 99990;
}
.pendlayer {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 99995;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, .85);
}
.pendlayer.show { display: flex; }

/* ===== 移动端适配 ===== */
@media screen and (max-width: 768px) {
    .rail { display: none !important; }
    .mbar { display: block; }
    .recbox-nav,
    .recbox-head,
    .recbox-tool,
    .recbox-link,
    .recbox-foot,
    .recbox-feed,
    .recbox-side,
    .recbox-related { margin: 8px auto; }
    .prail { display: none !important; }
    .pstrip { padding: 2px; }
    .recbox img { max-width: 100% !important; height: auto !important; }
}
@media screen and (min-width: 769px) {
    .mbar { display: none !important; }
}
.recbox-m3u8 { margin: 14px auto; text-align: center; max-width: 720px; }
.recbox-m3u8 img { max-width: 100%; height: auto; }

/* ===== 播放器左上角"下载到本地"按钮（neutral class，避开 ad 关键词） ===== */
.dlbtn {
    position: absolute;
    left: 10px;
    top: 10px;
    z-index: 99990;
    display: none; /* 默认隐藏，加载成功后才显示 */
    align-items: center;
    gap: 4px;
    padding: 5px 10px;
    font-size: 13px;
    line-height: 1.2;
    color: #fff;
    background: rgba(0, 0, 0, .55);
    border: 1px solid rgba(255, 255, 255, .25);
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    user-select: none;
    backdrop-filter: blur(2px);
}
.dlbtn:hover { background: rgba(0, 0, 0, .75); }
.dlbtn.show { display: inline-flex; }
/* 旋转图标（下载/慢速提示共用） */
.dlbtn .ico { font-size: 14px; line-height: 1; }
