/* ============================================================
   Elite 主题 · 移动端/平板响应式适配（补丁层）
   本文件加载于 mobile-style.css 与 custom.css 之后，仅针对
   手机(<=767px)/平板(<=1024px) 下仍溢出的固定宽度做覆盖。
   既有抽屉式导航（.btnm 汉堡按钮 + .topPanel-left 侧滑菜单，由
   custom.js 切换 .active）保持不动；不改桌面布局与外观。
   新增日期：2026-10-11
   ============================================================ */

/* ---------------- 平板 (max-width: 1024px) ---------------- */
@media (max-width: 1024px) {
    /* 1300px 顶栏 / 1200px 骨架 → 流式兜底 */
    .topPanel-wrapper {
        width: auto;
        max-width: 100%;
        padding-left: 15px;
        padding-right: 15px;
        box-sizing: border-box;
    }
    .wrapper {
        width: auto;
        max-width: 100%;
        padding-left: 12px;
        padding-right: 12px;
        box-sizing: border-box;
    }
}

/* ---------------- 手机 (max-width: 767px) ---------------- */
@media (max-width: 767px) {
    /* 1. 全局防横向溢出 */
    html, body { overflow-x: hidden; }
    img, video { max-width: 100%; height: auto; }
    iframe { max-width: 100%; }
    table { max-width: 100%; }
    input, select, textarea { max-width: 100%; box-sizing: border-box; }

    /* 2. 骨架容器兜底（不覆盖 mobile-style 的 590px 间距） */
    .wrapper {
        width: auto;
        max-width: 100%;
        padding-left: 10px;
        padding-right: 10px;
        box-sizing: border-box;
    }
    .topPanel-wrapper {
        width: auto;
        max-width: 100%;
        padding-left: 10px;
        padding-right: 10px;
        box-sizing: border-box;
    }

    /* 3. 下载按钮：447px 固定精灵图在 390px 屏溢出 → 等比缩放并居中 */
    .download {
        position: relative;
        right: auto;
        bottom: auto;
        width: 100%;
        text-align: center;
        margin: 8px 0 18px;
    }
    .download-button {
        position: relative;
        left: auto;
        margin: 0 auto;
        width: 280px;
        max-width: 92vw;
        height: 209px;
        padding: 72px 0 0 115px;
        background-size: 100% 100%;
        background-position: center center;
        font-size: 16px;
        line-height: 1.3;
        box-sizing: border-box;
    }
    .download-button span { margin-top: 6px; }

    /* 4. 侧栏模块固定宽 364/365 → 100% 自适应（aside 已在 993px 转 flex wrap） */
    aside .blockHome,
    aside .socHome {
        width: 100%;
        max-width: 365px;
        margin-left: auto;
        margin-right: auto;
        padding-left: 15px;
        padding-right: 15px;
        box-sizing: border-box;
    }
    .socButton {
        width: 100%;
        max-width: 365px;
        margin-left: auto;
        margin-right: auto;
        padding-left: 100px;
        box-sizing: border-box;
    }

    /* 5. 排行行 50px 左右内边距过大 → 收窄，标题栏同步 */
    .tableBlock-content { padding: 0 12px; }
    .tableBlock-title { padding: 0 12px; }
    .tableBlock { width: 100%; }

    /* 6. 在线统计区：300px / 107px 固定块允许换行不溢出 */
    .online {
        width: 100%;
        padding: 0 10px;
        box-sizing: border-box;
    }
    .onlineBlock {
        width: 100%;
        max-width: 300px;
        height: auto;
        margin: 0 auto;
    }
    .onlineReg { flex-wrap: wrap; }

    /* 7. 登录弹窗：固定 480px + margin-left:-240px → 居中自适应 */
    .modal_div {
        position: fixed;
        top: 5%;
        left: 50%;
        transform: translateX(-50%);
        margin-left: 0;
        width: calc(100% - 24px);
        max-width: 480px;
        min-height: 0;
        max-height: 90vh;
        overflow-y: auto;
        padding: 24px 16px;
        box-sizing: border-box;
    }
    .modal_div .modal_close {
        top: -14px;
        right: -10px;
    }

    /* 8. 页脚：压缩大 padding，菜单块自适应堆叠 */
    footer { padding: 26px 0; }
    .footerMenu-block {
        width: 50%;
        margin-bottom: 16px;
        box-sizing: border-box;
    }
    .copy {
        font-size: 12px;
        line-height: 1.6;
        padding: 0 10px;
    }

    /* 9. 返回顶部按钮：取消旋转，缩小并贴右下 */
    .toTop {
        transform: none;
        min-width: 0;
        width: 44px;
        height: 44px;
        padding-left: 0;
        left: auto;
        right: 10px;
        bottom: 15px;
        background-size: contain;
    }
    .toTop span { display: none; }
}
