@media screen and (min-width: 1024px) {
    :root {
        --md-frame-max: 550px;
        --md-frame-min: 320px;
        --md-frame-gutter: clamp(12px, 2vw, 24px);
        --md-scrollbar: calc(100vw - 100%);
        --md-frame-w: clamp(
            var(--md-frame-min),
            calc(100vw - var(--md-frame-gutter) * 2 - var(--md-scrollbar)),
            var(--md-frame-max)
        );
        --md-frame-half: calc(var(--md-frame-w) / 2);
        --md-frame-left: calc(50% - var(--md-frame-w) / 2);
    }

    html {
        background: #000 !important;
    }

    body {
        background: #000 !important;
    }

    body.page-user {
        overflow-x: hidden;
    }

    .tx-wide {
        container-type: inline-size;
        container-name: md-frame;
        box-sizing: border-box;
        width: var(--md-frame-w) !important;
        max-width: var(--md-frame-max) !important;
        margin-left: var(--md-frame-left) !important;
        margin-right: 0 !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        background: #1e1e1e;
        box-shadow:
            -1px 0 0 rgba(255, 255, 255, 0.05),
            1px 0 0 rgba(255, 255, 255, 0.05),
            0 0 60px rgba(0, 0, 0, 0.65);
        min-height: 100vh;
        position: relative;
        overflow-x: hidden;
        font-size: clamp(14px, 3.75cqw, 20px);
    }

    .tx-wide .row[class*="row-space"] {
        margin-left: 0;
        margin-right: 0;
    }

    body.fuliapp-page-body .fuliapp-fullscreen {
        width: var(--md-frame-w);
        max-width: var(--md-frame-max);
        margin-left: auto;
        margin-right: auto;
        box-shadow:
            -1px 0 0 rgba(255, 255, 255, 0.05),
            1px 0 0 rgba(255, 255, 255, 0.05);
    }

    .tx-wide .col-m-1 { width: 4.1666%; }
    .tx-wide .col-m-2 { width: 8.3333%; }
    .tx-wide .col-m-3 { width: 12.4999%; }
    .tx-wide .col-m-4 { width: 16.6666%; }
    .tx-wide .col-m-5 { width: 20.8333%; }
    .tx-wide .col-m-6 { width: 24.9999%; }
    .tx-wide .col-m-7 { width: 29.1666%; }
    .tx-wide .col-m-8 { width: 33.3333%; }
    .tx-wide .col-m-9 { width: 37.4999%; }
    .tx-wide .col-m-10 { width: 41.6666%; }
    .tx-wide .col-m-11 { width: 45.8333%; }
    .tx-wide .col-m-12 { width: 50%; }
    .tx-wide .col-m-13 { width: 54.1666%; }
    .tx-wide .col-m-14 { width: 58.3333%; }
    .tx-wide .col-m-15 { width: 62.4999%; }
    .tx-wide .col-m-16 { width: 66.6666%; }
    .tx-wide .col-m-17 { width: 70.8333%; }
    .tx-wide .col-m-18 { width: 75%; }
    .tx-wide .col-m-19 { width: 79.1666%; }
    .tx-wide .col-m-20 { width: 83.3333%; }
    .tx-wide .col-m-21 { width: 87.4999%; }
    .tx-wide .col-m-22 { width: 91.6666%; }
    .tx-wide .col-m-23 { width: 95.8333%; }
    .tx-wide .col-m-24 { width: 100%; }
    .tx-wide .col-m-25 { width: 20%; }
    .tx-wide .col-m-26 { width: 33.333333%; }

    .tx-wide .row-m-space0 { margin-left: 0; margin-right: 0; }
    .tx-wide .row-m-space0 > * { padding-left: 0 !important; padding-right: 0 !important; }
    .tx-wide .row-m-space5 { margin-left: -0.79cqw; margin-right: -0.79cqw; }
    .tx-wide .row-m-space5 > * { padding-left: 0.79cqw; padding-right: 0.79cqw; }
    .tx-wide .row-m-space7 { margin-left: -1.11cqw; margin-right: -1.11cqw; }
    .tx-wide .row-m-space7 > * { padding-left: 1.11cqw; padding-right: 1.11cqw; }
    .tx-wide .row-m-space8 { margin-left: -1.28cqw; margin-right: -1.28cqw; }
    .tx-wide .row-m-space8 > * { padding-left: 1.28cqw; padding-right: 1.28cqw; }
    .tx-wide .row-m-space20 { margin-left: 0; margin-right: 0; }
    .tx-wide .row-m-space20 > * { padding-left: 0; padding-right: 0; }

    .tx-wide .waphide { display: none !important; }
    .tx-wide .pchide { display: block !important; }

    .tx-wide .md-sticky-header .header-row1 {
        padding: 2.4cqw 2.4cqw;
        flex-wrap: wrap;
        justify-content: space-between;
        gap: 2cqw;
        box-sizing: border-box;
    }

    .tx-wide .header,
    .tx-wide .header-row1 {
        flex-wrap: wrap;
        justify-content: space-between;
    }

    .tx-wide .logo * {
        height: 9cqw;
        max-height: 42px;
    }

    .tx-wide .md-search-trigger {
        flex: 1;
        min-width: 0;
        max-width: none;
        font-size: clamp(12px, 3.2cqw, 14px);
        padding: 1.6cqw 3.2cqw;
        border-radius: 20px;
    }

    .tx-wide .app-download-img {
        height: 9cqw;
        max-height: 42px;
        width: auto;
    }

    .tx-wide .nav-scroll-list {
        padding-left: 0;
        padding-right: 0;
    }

    .tx-wide .nav-scroll-list li a {
        padding: 2.5cqw 3cqw;
        font-size: clamp(12px, 3.2cqw, 14px);
    }

    .tx-wide .md-home-cate-header {
        padding-left: 2.4cqw;
        padding-right: 2.4cqw;
        box-sizing: border-box;
    }

    .tx-wide .footer {
        padding: 2cqw 2.4cqw;
        box-sizing: border-box;
    }

    .tx-wide .footer > * {
        display: flex;
        flex-wrap: wrap;
        flex-direction: column;
    }

    .tx-wide .footer .md-footer-brand {
        align-items: center;
        text-align: center;
    }

    .tx-wide .footer .md-footer-biz-wrap .md-biz-pill {
        white-space: normal;
        width: 100%;
        max-width: 320px;
        text-align: center;
        padding: 10px 14px;
        font-size: 12px;
        line-height: 1.4;
    }

    .tx-wide .info-thumbnail,
    .tx-wide .wap-100 {
        margin-left: 0;
        margin-right: 0;
    }

    .tx-wide .home-flash,
    .tx-wide .ads-grid,
    .tx-wide .md-home-banner-ad,
    .tx-wide .login-ads-wrap {
        width: 100%;
        max-width: 100%;
    }

    .tx-wide .ads-grid {
        grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
        gap: 14px 6px !important;
    }

    .tx-wide .fuliapp-home-grid.ads-grid {
        grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
        gap: 14px 6px !important;
    }

    .tx-wide .ads-grid.ads-grid--vod-play {
        grid-template-columns: repeat(auto-fill, minmax(min(3.35rem, 100%), 1fr)) !important;
        gap: 7px 5px !important;
    }

    .tx-wide .ads-card-name {
        font-size: 12px;
        letter-spacing: -0.5px;
        transform: scale(0.95);
        transform-origin: center top;
    }

    .tx-wide .fuliapp-home-grid .ads-card-name {
        font-size: 12px;
        transform: scale(0.95);
        letter-spacing: -0.5px;
        margin-top: 5px;
    }

    .tx-wide .play-page-ads-wrap .ads-card-name {
        font-size: 10px;
        line-height: 1.25;
        margin-top: 3px;
        letter-spacing: -0.6px;
        transform: scale(0.9);
    }

    .tx-wide .fed-part-case {
        width: 100% !important;
        max-width: 100% !important;
    }

    .tx-wide .fed-min-width {
        min-width: 0;
        max-width: 100%;
    }

    .tx-wide .fuliapp-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }

    .tx-wide .md-home-cate-title {
        font-size: clamp(14px, 4cqw, 17px);
    }

    .tx-wide .md-home-cate-more {
        font-size: clamp(13px, 3.6cqw, 16px);
    }

    /* ===== 4. 固定层：与 .tx-wide 同宽同 left，calc 居中 ===== */
    .md-tabbar {
        position: fixed !important;
        bottom: 0 !important;
        left: var(--md-frame-left) !important;
        right: auto !important;
        width: var(--md-frame-w) !important;
        max-width: var(--md-frame-max) !important;
        margin: 0 !important;
        transform: none !important;
        border-radius: 0 !important;
        box-sizing: border-box !important;
        z-index: 10001 !important;
    }

    .md-search-overlay {
        position: fixed !important;
        top: 0 !important;
        bottom: 0 !important;
        left: var(--md-frame-left) !important;
        right: auto !important;
        width: var(--md-frame-w) !important;
        max-width: var(--md-frame-max) !important;
        margin: 0 !important;
        transform: translateY(-100%) !important;
        box-sizing: border-box !important;
    }

    .md-search-overlay.active {
        transform: translateY(0) !important;
    }

    #md-splash-wrap,
    #md-sp-ad,
    #mpModal,
    body.has-tabbar:not(.md-tabbar-ready)::after,
    #mdTabNavLoading {
        left: var(--md-frame-left) !important;
        right: auto !important;
        width: var(--md-frame-w) !important;
        max-width: var(--md-frame-max) !important;
        margin: 0 !important;
        transform: none !important;
        box-sizing: border-box !important;
    }

    #md-splash-wrap,
    #md-sp-ad,
    #mpModal {
        top: 0;
        bottom: 0;
    }
    .md-search-overlay-bar,
    .md-search-body,
    .md-search-overlay-input-wrap {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    .mp-box,
    .mp-image {
        max-width: 92%;
    }

    .md-float-ad {
        right: calc((100vw - var(--md-frame-w)) / 2 + var(--md-float-ad-edge, 20px));
        left: auto;
        transform: translateY(-50%);
    }

    body.md-page-svfeed {
        background: #000 !important;
    }

    body.md-page-svfeed .sv-device-outer {
        width: var(--md-frame-w);
        max-width: var(--md-frame-max);
        margin-left: auto;
        margin-right: auto;
        box-shadow:
            -1px 0 0 rgba(255, 255, 255, 0.05),
            1px 0 0 rgba(255, 255, 255, 0.05);
    }

    body.md-page-svfeed .sv-feed-shell {
        max-width: 100%;
    }

    .tx-wide .fed-part-case,
    .tx-wide .fed-min-width {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    .tx-wide .fed-user-head > .fed-padding.fed-hide-md {
        display: block !important;
    }

    .tx-wide .fed-main-left > .fed-part-layout.fed-show-md-block:first-child,
    .tx-wide .fed-part-layout.fed-hide-xs.fed-hide-sm.fed-show-md-block {
        display: none !important;
    }

    .tx-wide .fed-user-list li.fed-hide-md {
        display: block !important;
    }

    .tx-wide .fed-user-list li.fed-show-md-block,
    .tx-wide .fed-user-list li.fed-hide.fed-show-md-block {
        display: none !important;
    }

    .tx-wide .fed-part-layout.fed-margin-right {
        margin-right: 0 !important;
    }

    .tx-wide .fed-main-left,
    .tx-wide .fed-main-right {
        width: 100% !important;
        float: none !important;
    }

    .tx-wide .fed-main-left {
        display: none !important;
    }

    .tx-wide .fed-main-right {
        display: block !important;
    }

    .tx-wide .fed-part-rows > .fed-main-left:not(:has(+ .fed-main-right)),
    body.page-user-panel .tx-wide .fed-main-left {
        display: block !important;
    }

    .tx-wide .fed-part-rows > .fed-main-left:has(+ .fed-main-right) {
        display: none !important;
    }

    body.page-user .tx-wide .fed-part-rows > .fed-main-left:has(+ .fed-main-right) {
        display: block !important;
    }

    body.page-user .tx-wide .fed-main-right {
        display: none !important;
    }

    .tx-wide .fed-col-md4,
    .tx-wide .fed-col-md8,
    .tx-wide .fed-col-lg3,
    .tx-wide .fed-col-lg9 {
        width: 100% !important;
        float: none !important;
    }

    .tx-wide .fed-col-xs3,
    .tx-wide .fed-col-md1 {
        width: 25% !important;
        float: left !important;
    }

    .tx-wide .fed-col-xs4 { width: 33.33333333% !important; float: left !important; }
    .tx-wide .fed-col-xs6 { width: 50% !important; float: left !important; }
    .tx-wide .fed-col-xs7 { width: 58.33333333% !important; float: left !important; }
    .tx-wide .fed-col-xs8 { width: 66.66666667% !important; float: left !important; }
    .tx-wide .fed-col-xs9 { width: 75% !important; float: left !important; }
    .tx-wide .fed-col-xs12 { width: 100% !important; float: none !important; }
    .tx-wide .fed-col-sm3 { width: 25% !important; float: left !important; }
    .tx-wide .fed-col-sm6 { width: 75% !important; float: left !important; }
    .tx-wide .fed-col-sm9 { width: 66.66666667% !important; float: left !important; }

    .tx-wide .fed-hide-xs {
        display: none !important;
    }

    .tx-wide .fed-user-head .fed-list-pics {
        border-radius: 0;
    }

    body.has-tabbar:not(.md-tabbar-ready)::after {
        content: '';
        position: fixed;
        z-index: 10000;
        bottom: 0;
        height: calc(60px + env(safe-area-inset-bottom, 0px));
        background: linear-gradient(180deg, #2a2a2a 0%, #1e1e1e 100%);
        border-top: 1px solid rgba(255, 255, 255, 0.08);
        pointer-events: none;
    }

    html.md-tab-nav-loading #mdTabbar {
        z-index: 10001;
    }
}

#mdTabNavLoading {
    display: none;
    position: fixed;
    z-index: 9998;
    top: 0;
    left: 0;
    right: 0;
    bottom: calc(60px + env(safe-area-inset-bottom, 0px));
    background: rgba(30, 30, 30, 0.9);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    pointer-events: none;
}

html.md-tab-nav-loading #mdTabNavLoading {
    display: flex;
}

.md-tab-nav-loading__spin {
    width: 34px;
    height: 34px;
    border: 3px solid rgba(255, 91, 130, 0.22);
    border-top-color: #ff5b82;
    border-radius: 50%;
    animation: md-tab-nav-spin 0.65s linear infinite;
}

.md-tab-nav-loading__txt {
    margin: 0;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.78);
    letter-spacing: 0.06em;
}


@keyframes md-tab-nav-spin {
    to { transform: rotate(360deg); }
}

@supports not (width: 1cqw) {
    @media screen and (min-width: 1024px) {
        .tx-wide {
            padding-left: 0 !important;
            padding-right: 0 !important;
            font-size: clamp(14px, calc(var(--md-frame-w) * 0.0375), 20px);
        }

        .tx-wide .md-sticky-header .header-row1 {
            padding: calc(var(--md-frame-w) * 0.024);
        }

        .tx-wide .md-home-cate-header,
        .tx-wide .footer {
            padding-left: calc(var(--md-frame-w) * 0.024);
            padding-right: calc(var(--md-frame-w) * 0.024);
        }

        .tx-wide .logo *,
        .tx-wide .app-download-img {
            height: calc(var(--md-frame-w) * 0.09);
            max-height: 42px;
        }
    }
}
