* {
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    min-height: 100%;
    margin: 0;
    font-family: Arial, "Microsoft YaHei", sans-serif;
    background: #f6d84a;
    color: #111;
    overflow-x: hidden;
}

a {
    text-decoration: none;
}

button {
    border: 0;
    padding: 0;
    background: transparent;
    cursor: pointer;
}

img {
    display: block;
    max-width: 100%;
}

.site3-page,
.hero-shell {
    position: relative;
    width: 100%;
    height: 100vh;
    min-height: 100vh;
    overflow: hidden;
    background: #0a0610;
}

/* PC 设计画布：锁定 1920×1080，前景等比居中（不留黑边，背景另铺满） */
.pc-stage {
    --pc-scale: 1;
    position: absolute;
    left: 50%;
    top: 50%;
    width: 1920px;
    height: 1080px;
    margin-left: -960px;
    margin-top: -540px;
    transform: scale(var(--pc-scale));
    transform-origin: center center;
    z-index: 1;
}

/* 背景层：铺满整个视口，黑边区由背景填充 */
.bg-carousel {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
}

.bg-slide {
    position: absolute;
    inset: 0;
}

.bg-slide {
    background-image: var(--pc-bg);
    background-position: center;
    background-size: cover;
    opacity: 0;
    transform: scale(1.03);
    transition: opacity 800ms ease, transform 1800ms ease;
}

.bg-slide.active {
    opacity: 1;
    transform: scale(1);
}

.topbar {
    position: relative;
    z-index: 5;
    width: 1832px;
    margin: 0 auto;
    padding: 22px 0 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.h5-topbar {
    display: none;
}

.brand img {
    width: 243px;
    height: 88px;
    object-fit: contain;
}

.contact-nav {
    display: flex;
    align-items: center;
    gap: 16px;
}

.contact-nav a {
    position: relative;
    display: block;
    transition: transform 160ms ease, filter 160ms ease;
}

.contact-nav a:hover {
    transform: translateY(-2px);
    filter: brightness(1.06);
}

.pc-nav-stack {
    position: relative;
    display: block;
    width: 283px;
    height: 74px;
}

.business-img,
.group-img {
    position: absolute;
    left: 0;
    top: 0;
    width: 283px;
    height: 74px;
    object-fit: contain;
    opacity: 0;
    transition: opacity 420ms ease;
    pointer-events: none;
}

.business-img.active,
.group-img.active {
    opacity: 1;
}

.h5-nav-btn {
    display: none;
    width: 70px;
}

.hero-stage {
    position: relative;
    z-index: 3;
    width: 1832px;
    height: 970px;
    margin: 0 auto;
}

/* 左侧：标题 + phone-frame（二维码/按钮叠在框内） */
.left-panel {
    position: relative;
    z-index: 4;
    width: 715px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 8px 20px 48px;
}

.pc-titles {
    position: relative;
    width: 715px;
    height: 350px;
}

.title-img {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: auto;
    object-fit: contain;
    object-position: left top;
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 520ms ease, transform 520ms ease;
    pointer-events: none;
}

.title-img.active {
    opacity: 1;
    transform: translateY(0);
}

.phone-frame-wrap {
    position: relative;
    width: 715px;
    margin-top: 20px;
}

.phone-frame {
    width: 100%;
    height: auto;
    filter: drop-shadow(0 18px 36px rgba(0, 0, 0, 0.18));
}

.frame-qr {
    position: absolute;
    left: 4.6%;
    top: 30.2%;
    width: 27.8%;
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.6%;
    box-sizing: border-box;
}

#qr {
    width: 100%;
    height: 100%;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
}

#qr img,
#qr canvas {
    width: 100% !important;
    height: 100% !important;
    display: block;
}

.frame-downloads {
    position: absolute;
    left: 43%;
    top: 23.2%;
    width: 42%;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.download-btn {
    display: block;
    transition: transform 160ms ease, filter 160ms ease;
}

.download-btn:hover {
    transform: translateY(-2px);
    filter: brightness(1.05);
}

.frame-downloads .download-btn img {
    width: 100%;
    height: auto;
}

/* 右侧人物：相对设计画布满高 */
.right-panel {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 980px;
    height: 1080px;
    z-index: 2;
    pointer-events: none;
    overflow: visible;
}

.hero-stack {
    position: absolute;
    inset: 0;
}

.hero-img {
    position: absolute;
    right: 0;
    bottom: 0;
    height: 90%;
    width: auto;
    max-width: none;
    object-fit: contain;
    object-position: right bottom;
    opacity: 0;
    transform: translateX(20px);
    transition: opacity 560ms ease, transform 560ms ease;
    pointer-events: none;
}

.hero-img.active {
    opacity: 1;
    transform: translateX(0);
}

.hero-img-3 {
    right: 0;
    height: 100%;
}

.float-stack {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.float-icon {
    position: absolute;
    opacity: 0;
    transform: translateY(14px) scale(0.98);
    transition: opacity 560ms ease, transform 560ms ease;
}

.float-icon.active {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.float-icon-1 {
    left: 30%;
    top: 20%;
    width: 600px;
}

.float-icon-2 {
    left: 10%;
    top: 15%;
    width: 820px;
}

.float-icon-3 {
    left: 15%;
    bottom: 28%;
    width: 640px;
    z-index: 100;
}

.float-icon-4 {
    right: 0;
    top: 10%;
    width: 760px;
}

.h5-panel {
    display: none;
}

.carousel-dots {
    position: absolute;
    z-index: 6;
    left: 50%;
    bottom: 22px;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 10px;
}

.carousel-dots button {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.28);
    transition: width 200ms ease, background 200ms ease;
}

.carousel-dots button.active {
    width: 32px;
    background: #111;
}

.spinner-container {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.55);
}

.spinner {
    width: 44px;
    height: 44px;
    border: 4px solid rgba(255, 255, 255, 0.28);
    border-top-color: #ff4dcc;
    border-radius: 50%;
    animation: spin 900ms linear infinite;
}

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

.android-modal {
    position: fixed;
    inset: 0;
    z-index: 110;
    overflow: hidden;
    background-color: #fff;
    color: #000;
    display: flex;
    flex-direction: column;
}

.android-modal.two {
    z-index: 120;
}

.android-modal .header {
    width: 100vw;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 2vw 1vw;
    box-shadow: 0 3px 5px rgba(57, 63, 72, 0.1);
    position: relative;
    z-index: 9;
}

.android-modal .header .android-modal-arrow img {
    height: 6vw;
}

.android-modal .header .title {
    flex: 1;
    display: flex;
    justify-content: center;
}

.android-modal .header .title img {
    max-width: 68vw;
    max-height: 12vw;
    object-fit: contain;
}

.android-modal .content {
    flex: 1;
    overflow-y: auto;
    padding: 0.5rem 0.4rem 3rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.android-modal .content .platform-item {
    width: 90%;
}

.android-modal .content .platform-item img,
.android-modal .content .modal-common-img,
.android-modal .content .modal-common-img-2 {
    width: 100%;
}

#platform-list,
#platform-detail,
#ios-detail {
    display: none;
}

@media (max-width: 768px) {
    html,
    body {
        min-height: 100%;
        background-color: #ffd6e8;
        color: #111;
    }

    .site3-page {
        min-height: 100svh;
        background: #ffd6e8 url('/assets_site3/image/h5/bg.webp') center top / 100% 100% no-repeat;
    }

    .site3-page,
    .hero-shell {
        height: auto;
        min-height: 100%;
        overflow: visible;
    }

    .hero-shell {
        padding-bottom: 24px;
        background: transparent;
    }

    body {
        background: #ffd6e8;
    }

    /* H5 隐藏 PC 画布及 PC 背景轮播（bg1~bg4.png） */
    .pc-stage,
    .bg-carousel {
        display: none;
    }

    /* 手机点击会粘住 :hover，禁止上移，避免按钮跳动 */
    .h5-topbar .contact-nav a:hover,
    .h5-topbar .contact-nav a:active,
    .h5-topbar .contact-nav a:focus {
        transform: none;
        filter: none;
    }

    /* 头部高度锁定，不被轮播动画视觉挤压 */
    .h5-topbar {
        display: flex;
        position: relative;
        z-index: auto;
        width: 100%;
        min-height: 52px;
        margin: 0;
        padding: 6px 10px;
        background: #fff;
        box-sizing: border-box;
        align-items: center;
    }

    .h5-topbar .brand {
        position: relative;
        z-index: 1;
    }

    .h5-topbar .brand img {
        width: 108px;
        height: auto;
    }

    /* 商务合作 / 官方群组：与人物同级比较，压在人物之上可点 */
    .h5-topbar .contact-nav {
        position: relative;
        z-index: 30;
        gap: 8px;
        pointer-events: auto;
    }

    .h5-nav-btn {
        display: block;
        width: 70px;
        pointer-events: auto;
    }

    .h5-panel {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0;
        width: 100%;
    }

    /* 人物叠在头部上层（盖住一点点），不挤压头部高度 */
    .h5-visual {
        position: relative;
        z-index: 10;
        width: 100%;
        aspect-ratio: 629 / 745;
        overflow: visible;
        background: transparent;
        margin-top: 0;
    }

    .h5-hero {
        position: absolute;
        inset: 0;
        opacity: 0;
        pointer-events: none;
        transition: opacity 620ms ease;
        z-index: 0;
        will-change: opacity;
    }

    .h5-hero.active {
        opacity: 1;
        z-index: 1;
    }

    .h5-layer {
        position: absolute;
        display: block;
        pointer-events: none;
    }

    /* 背景层：铺满画框（不超出头部） */
    .h5-bg {
        inset: 0;
        background-position: center top;
        background-size: cover;
        background-repeat: no-repeat;
        z-index: 0;
        /* 背景裁进画框，人物可探出头部 */
        clip-path: inset(0);
    }

    /* 人物：负 top 略叠头部（不要盖太多） */
    .h5-char {
        left: 50%;
        top: -14px;
        bottom: auto;
        width: 100%;
        transform: translateX(-50%);
        z-index: 2;
        pointer-events: none;
    }

    /* 爆炸贴：跟随人物上半身 */
    .h5-badge {
        left: 50%;
        top: 4%;
        width: 98%;
        transform: translateX(-50%);
        z-index: 3;
        pointer-events: none;
    }

    .h5-badge-narrow {
        width: 74%;
        top: 2%;
    }

    /* 标题：紧挨轮播指示器下方 */
    .h5-title {
        left: 50%;
        top: 56%;
        bottom: auto;
        width: 86%;
        transform: translateX(-50%);
        z-index: 4;
        filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.28));
        pointer-events: none;
    }

    /* 入场动画 */
    .h5-hero.active .h5-bg {
        animation: h5-bg-zoom 6s ease-out forwards;
    }

    .h5-hero.active .h5-title {
        animation: h5-title-in 700ms cubic-bezier(0.22, 1, 0.36, 1);
    }

    .h5-hero.active .h5-char {
        animation: h5-char-in 700ms cubic-bezier(0.22, 1, 0.36, 1);
    }

    .h5-hero.active .h5-badge {
        animation: h5-pop 620ms cubic-bezier(0.34, 1.56, 0.64, 1);
    }

    @keyframes h5-bg-zoom {
        from { transform: scale(1); }
        to { transform: scale(1.06); }
    }

    @keyframes h5-char-in {
        from { opacity: 0; }
        to { opacity: 1; }
    }

    @keyframes h5-title-in {
        from { opacity: 0; transform: translateX(-50%) translateY(8px); }
        to { opacity: 1; transform: translateX(-50%) translateY(0); }
    }

    @keyframes h5-pop {
        from { opacity: 0; transform: translateX(-50%) scale(0.86); }
        to { opacity: 1; transform: translateX(-50%) scale(1); }
    }

    .h5-carousel-dots {
        position: absolute;
        left: 50%;
        top: 52%;
        bottom: auto;
        z-index: 4;
        transform: translateX(-50%);
        display: flex;
        align-items: center;
        gap: 6px;
        padding: 2px 2px;
        border-radius: 10px;
        pointer-events: auto;
        background: rgba(0, 0, 0, 0.8);
    }

    .h5-carousel-dots span {
        width: 7px;
        height: 7px;
        border-radius: 999px;
        background: #9a9a9a;
        cursor: pointer;
        transition: width 200ms ease, background 200ms ease, transform 200ms ease;
    }

    .h5-carousel-dots span.active {
        width: 18px;
        background: #ffd24a;
        transform: scale(1.05);
    }

    /* 下载区叠在轮播底部；按钮叠在 tips.png 空白区 */
    .h5-download-card {
        position: relative;
        z-index: 4;
        width: calc(100% - 24px);
        max-width: 420px;
        margin: -12% auto 0;
        box-sizing: border-box;
    }

    .setup-tips {
        display: block;
        width: 100%;
    }

    .setup-tips img {
        width: 100%;
    }

    .h5-downloads {
        position: absolute;
        left: 7%;
        right: 7%;
        top: 13%;
        height: 58%;
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 2.2%;
        pointer-events: auto;
    }

    .h5-downloads .download-btn {
        display: block;
        width: 100%;
    }

    .h5-downloads .download-btn img {
        width: 100%;
    }

    .h5-notice {
        width: calc(100% - 24px);
        max-width: 420px;
        margin: 12px auto 0;
        cursor: pointer;
    }

    /* 底部圆点隐藏，改用轮播图内指示点 */
    .carousel-dots {
        display: none;
    }
}
