:root {
    --desktop-scale: 1;
    --app-height: 100dvh;
    color-scheme: dark;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    min-height: 100%;
    margin: 0;
    padding: 0;
}

html {
    background: #000;
    -moz-text-size-adjust: none;
    -webkit-text-size-adjust: none;
    text-size-adjust: none;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
    background: #000;
}

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

a {
    color: inherit;
    text-decoration: none;
}

button {
    font: inherit;
}

.landing-page {
    width: 100%;
    min-height: 100%;
}

.desktop-scene {
    position: fixed;
    inset: 0;
    overflow: hidden;
    background: #000;
}

.desktop-bleed,
.desktop-overlay {
    position: absolute;
    inset: 0;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    pointer-events: none;
}

.desktop-bleed {
    background-color: #12080a;
    background-image: linear-gradient(90deg, rgba(0, 0, 0, 0.14), transparent 38%, rgba(0, 0, 0, 0.2)), url("../images/scene-bg.webp");
    opacity: 0.74;
}

.desktop-overlay {
    background-image: url("../images/scene-overlay.webp");
    mix-blend-mode: soft-light;
    opacity: 0.5;
}

.desktop-stage {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 1920px;
    height: 1080px;
    overflow: hidden;
    transform: translate(-50%, -50%) scale(var(--desktop-scale));
    transform-origin: center;
}

.desktop-logo {
    position: absolute;
    z-index: 4;
    left: 78px;
    top: 36px;
    width: 339px;
    height: 127px;
    object-fit: contain;
}

.desktop-contact {
    position: absolute;
    z-index: 6;
    top: 56px;
    right: 54px;
    display: flex;
    gap: 58px;
}

.contact-link {
    display: flex;
    width: 96px;
    height: 117px;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    color: #fff;
    font-size: 24px;
    line-height: 29px;
    white-space: nowrap;
}

.contact-link img {
    width: 86px;
    height: 75px;
    object-fit: cover;
    object-position: top center;
    margin-bottom: 13px;
}

.desktop-title {
    position: absolute;
    z-index: 2;
    left: 78px;
    top: 216px;
    width: 1009px;
    height: 464px;
    object-fit: contain;
    transform: rotate(3.37deg);
}

.desktop-person {
    position: absolute;
    z-index: 2;
    left: 1124px;
    top: 99px;
    width: 643px;
    height: 1050px;
    object-fit: cover;
    object-position: top;
}

.scene-tag {
    position: absolute;
    z-index: 3;
    display: flex;
    width: 280px;
    height: 78px;
    align-items: center;
    justify-content: center;
    border-top: 2px solid transparent;
    border-bottom: 2px solid transparent;
    color: #fff;
    font-size: 40px;
    font-weight: 600;
    line-height: 1.3;
    white-space: nowrap;
}

.tag-one,
.tag-three {
    background: linear-gradient(90deg, transparent, #ffa464 50%, transparent);
}

.tag-two,
.tag-four,
.tag-five {
    background: linear-gradient(90deg, transparent, #ff3333 50%, transparent);
}

.tag-six {
    background: linear-gradient(90deg, transparent, #3ca7ff 50%, transparent);
}

.tag-one { left: 924px; top: 698px; }
.tag-two { left: 1042px; top: 420px; }
.tag-three { left: 1600px; top: 679px; }
.tag-four { left: 1399px; top: 823px; }
.tag-five { left: 1597px; top: 459px; }
.tag-six { left: 1064px; top: 877px; }

.desktop-download {
    position: absolute;
    z-index: 5;
    left: 129px;
    top: 776px;
    display: flex;
    align-items: flex-start;
    gap: 20px;
}

.desktop-qr {
    width: 190px;
    height: 221px;
    padding: 14px 12px 10px;
    border: 2px solid #f538fe;
    border-radius: 14px;
    color: #fff;
    background: #000;
    text-align: center;
}

.desktop-qr .qr {
    display: flex;
    width: 162px;
    height: 162px;
    padding: 9px;
    align-items: center;
    justify-content: center;
    border-radius: 9px;
    background: #fff;
}

.desktop-qr canvas {
    position: static !important;
    display: block !important;
    width: 144px !important;
    height: 144px !important;
    max-width: 144px !important;
    max-height: 144px !important;
}

.desktop-qr span {
    display: block;
    margin-top: 7px;
    font-size: 20px;
    line-height: 24px;
    text-transform: uppercase;
}

.desktop-copy {
    display: flex;
    width: 440px;
    padding-top: 4px;
    flex-direction: column;
    color: #fff;
}

.desktop-copy strong {
    color: #f8d917;
    font-size: 36px;
    font-weight: 500;
    line-height: 44px;
}

.desktop-copy > span {
    margin: 4px 0 14px;
    font-size: 20px;
    line-height: 24px;
}

.desktop-copy em {
    display: block;
    width: 413px;
    height: 40px;
    padding: 8px 12px;
    color: #000;
    background: #fff;
    font-size: 20px;
    font-style: normal;
    line-height: 24px;
    text-align: center;
    clip-path: polygon(0 0, 100% 7%, 97% 89%, 4% 100%);
}

.desktop-copy small {
    margin: 11px 0 0 4px;
    font-size: 16px;
    line-height: 22px;
}

.mobile-scene {
    display: none;
}

.spinner-container {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: rgba(0, 0, 0, 0.5);
}

.spinner {
    width: 50px;
    height: 50px;
    border: 9px solid rgba(0, 0, 0, 0.5);
    border-right-color: #cda081;
    border-radius: 50%;
    animation: spinner 1s infinite linear;
}

@keyframes spinner {
    to { transform: rotate(1turn); }
}

@media (max-width: 640px) {
    html {
        min-height: 100%;
        overflow-x: hidden;
        background: #141414;
    }

    body {
        width: 100%;
        min-height: var(--app-height, 100dvh);
        overflow-x: hidden;
        overflow-y: auto;
        background: #141414;
    }

    .desktop-scene {
        display: none;
    }

    .mobile-scene {
        position: relative;
        display: block;
        width: 100%;
        min-height: 100dvh;
        padding-bottom: calc(clamp(104px, 21.333vw, 160px) + env(safe-area-inset-bottom, 0px));
        overflow: hidden;
        background: #141414;
    }

    .mobile-topbar {
        position: relative;
        z-index: 2;
        width: 100%;
        height: 18.133vw;
        min-height: 72px;
        max-height: 136px;
        background: #141414;
    }

    .mobile-logo {
        position: absolute;
        left: 3.467vw;
        top: 3.067vw;
        width: 33.333vw;
        height: 12.4vw;
        object-fit: contain;
    }

    .mobile-contact {
        position: absolute;
        top: 2.533vw;
        right: 2.133vw;
        display: flex;
        gap: 2.933vw;
    }

    .mobile-contact a {
        display: flex;
        width: 12.8vw;
        flex-direction: column;
        align-items: center;
        color: #fff;
        font-size: 3.2vw;
        line-height: 3.867vw;
        white-space: nowrap;
    }

    .mobile-contact img {
        width: 9.6vw;
        height: 8.267vw;
        margin-bottom: 1.733vw;
        object-fit: cover;
        object-position: top center;
    }

    .mobile-hero {
        width: 100%;
        height: auto;
        aspect-ratio: 750 / 324;
        object-fit: cover;
    }

    .category-tabs {
        display: grid;
        width: calc(100% - 6.667vw);
        height: 10.667vw;
        min-height: 42px;
        margin: 3.333vw auto 0;
        padding: 1.067vw 1.36vw;
        grid-template-columns: repeat(6, 1fr);
        align-items: center;
        border-radius: 2.133vw;
        background: #2d2c2f;
    }

    .category-tabs button {
        display: flex;
        height: 8.533vw;
        min-height: 34px;
        padding: 0;
        align-items: center;
        justify-content: center;
        border: 0;
        border-radius: 1.6vw;
        color: #fff;
        background: transparent;
        font-family: inherit;
        font-size: clamp(12px, 3.2vw, 24px);
        font-weight: 600;
        line-height: 1;
    }

    .category-tabs .is-active {
        background: linear-gradient(90deg, #f40c60 6.883%, #dd0723 99.586%);
    }

    .mobile-grid {
        display: grid;
        width: calc(100% - 6.667vw);
        margin: 2.533vw auto 0;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        column-gap: 1.467vw;
        row-gap: 3.6vw;
    }

    .video-card {
        min-width: 0;
        padding: 0;
        overflow: hidden;
        border: 0;
        color: #fff;
        background: transparent;
        font-family: inherit;
        text-align: left;
    }

    .video-card img {
        width: 100%;
        aspect-ratio: 345 / 194;
        object-fit: cover;
    }

    .video-card > span {
        display: block;
        height: 4.533vw;
        margin: 0.933vw 0 0;
        overflow: hidden;
        font-size: 3.2vw;
        font-weight: 400;
        line-height: 4.533vw;
        text-overflow: clip;
        white-space: nowrap;
    }

    .content-download-trigger:focus-visible {
        outline: 2px solid #fff;
        outline-offset: 2px;
    }

    .mobile-install-help {
        display: flex;
        width: 100%;
        margin: 1.333vw 0 0;
        padding: 0;
        border: 0;
        flex: 0 0 100%;
        flex-direction: column;
        align-items: center;
        gap: 0.533vw;
        color: #f8d917;
        background: transparent;
        font-size: clamp(11px, 3.2vw, 24px);
        line-height: 1.25;
        text-decoration: underline;
    }

    .mobile-download-dock {
        position: fixed;
        z-index: 20;
        right: 0;
        bottom: 0;
        left: 0;
        display: flex;
        width: 100%;
        padding: 1.067vw 1.6vw calc(1.067vw + env(safe-area-inset-bottom, 0px));
        flex-wrap: wrap;
        align-items: center;
        justify-content: space-between;
        background: linear-gradient(180deg, rgba(20, 20, 20, 0), rgba(20, 20, 20, 0.94) 22%, #141414 100%);
    }

    .download-button {
        display: flex;
        width: 28.533vw;
        height: clamp(38px, 8.533vw, 64px);
        padding: 0 1.067vw;
        align-items: center;
        overflow: hidden;
        border: max(1px, 0.267vw) solid #fff;
        border-radius: 100px;
        color: #fff;
        background: linear-gradient(90deg, #f50c61, #dc0720);
        order: 1;
    }

    .mobile-download-dock .mobile-install-help {
        order: 2;
    }

    .download-button > img {
        width: 5.733vw;
        max-width: 43px;
        height: 5.733vw;
        max-height: 43px;
        flex: 0 0 auto;
        object-fit: contain;
    }

    .download-button > span {
        display: flex;
        min-width: 0;
        margin-left: 0.667vw;
        flex-direction: column;
        justify-content: center;
        white-space: nowrap;
    }

    .download-button strong,
    .download-button small {
        display: block;
        overflow: hidden;
        font-weight: 500;
        line-height: 1.1;
        text-overflow: clip;
    }

    .download-button strong {
        font-size: clamp(10px, 2.933vw, 22px);
        letter-spacing: 0.04em;
    }

    .download-button small {
        margin-top: 0.533vw;
        font-size: clamp(7px, 1.733vw, 13px);
        font-weight: 400;
        letter-spacing: -0.02em;
    }

    #appStore small {
        font-size: clamp(7px, 1.733vw, 13px);
    }
}

@media (max-width: 360px) {
    .mobile-topbar {
        min-height: 65px;
    }

    .download-button {
        padding-right: 0.533vw;
        padding-left: 0.533vw;
    }

    .download-button > span {
        margin-left: 0.267vw;
    }
}
