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

@keyframes site-grid-drift {
    to {
        background-position: 32px 32px, 32px 32px;
    }
}

@keyframes site-scan-pass {
    0% {
        transform: translateX(-120%);
        opacity: 0;
    }
    14% {
        opacity: 1;
    }
    72% {
        opacity: 1;
    }
    100% {
        transform: translateX(120%);
        opacity: 0;
    }
}

@keyframes site-hook-drop {
    0%,
    100% {
        transform: translateY(-2px);
    }
    50% {
        transform: translateY(18px);
    }
}

@keyframes site-load-swing {
    0%,
    100% {
        transform: rotate(-4deg);
    }
    50% {
        transform: rotate(5deg);
    }
}

@keyframes site-module-lift {
    0%,
    100% {
        transform: translate(0, 0);
    }
    50% {
        transform: translate(18px, -12px);
    }
}

@keyframes site-window-light {
    0%,
    100% {
        opacity: 0.45;
    }
    50% {
        opacity: 1;
    }
}

@keyframes site-route-dash {
    to {
        stroke-dashoffset: -34;
    }
}

@keyframes site-card-rise {
    0%,
    100% {
        transform: translateY(0);
        opacity: 0.76;
    }
    50% {
        transform: translateY(-5px);
        opacity: 1;
    }
}

@keyframes site-beacon-pulse {
    0%,
    100% {
        transform: scale(0.86);
        opacity: 0.42;
    }
    50% {
        transform: scale(1.08);
        opacity: 1;
    }
}

@keyframes site-progress {
    0% {
        transform: translateX(-72%);
    }
    100% {
        transform: translateX(72%);
    }
}

#page-loading-mask.hide {
    opacity: 0;
    pointer-events: none;
}

#page-loading-mask {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
    color: #10213f;
    background: #ffffff;
    transition: opacity 0.42s ease;
}

.site-loading-mask {
    background:
        radial-gradient(circle at 68% 28%, rgba(24, 144, 255, 0.16) 0, transparent 30%),
        radial-gradient(circle at 24% 74%, rgba(12, 179, 147, 0.14) 0, transparent 28%),
        linear-gradient(180deg, #ffffff 0%, #f6faff 58%, #edf5ff 100%);
}

.site-loading-mask::before,
.site-loading-mask::after {
    position: absolute;
    inset: 0;
    content: "";
    pointer-events: none;
}

.site-loading-mask::before {
    background:
        linear-gradient(rgba(9, 96, 189, 0.055) 1px, transparent 1px),
        linear-gradient(90deg, rgba(9, 96, 189, 0.055) 1px, transparent 1px);
    background-size: 36px 36px;
    animation: site-grid-drift 7s linear infinite;
}

.site-loading-mask::after {
    background: linear-gradient(115deg, transparent 0%, transparent 44%, rgba(24, 144, 255, 0.12) 50%, transparent 56%, transparent 100%);
    transform: translateX(-120%);
    animation: site-scan-pass 3.2s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

.site-loading-mask.hide .site-loading {
    opacity: 0;
    transform: translateY(-8px) scale(0.98);
}

.site-loading {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
    width: min(480px, calc(100vw - 48px));
    color: #10213f;
    text-align: center;
    transition: opacity 0.32s ease, transform 0.32s ease;
}

.site-loading-stage {
    position: relative;
    width: min(420px, calc(100vw - 44px));
    height: 244px;
    overflow: hidden;
    border: 1px solid rgba(9, 96, 189, 0.16);
    border-radius: 8px;
    background:
        linear-gradient(rgba(255, 255, 255, 0.68), rgba(255, 255, 255, 0.74)),
        linear-gradient(135deg, rgba(9, 96, 189, 0.08) 0%, rgba(12, 179, 147, 0.09) 100%);
    box-shadow: 0 22px 52px rgba(23, 43, 77, 0.12);
}

.site-loading-stage::before,
.site-loading-stage::after {
    position: absolute;
    content: "";
    pointer-events: none;
}

.site-loading-stage::before {
    inset: 0;
    background:
        linear-gradient(rgba(9, 96, 189, 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(9, 96, 189, 0.08) 1px, transparent 1px);
    background-size: 24px 24px;
    mask-image: linear-gradient(180deg, transparent 0, #000 14%, #000 86%, transparent 100%);
}

.site-loading-stage::after {
    left: -22%;
    top: 0;
    width: 28%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(33, 168, 255, 0.24), transparent);
    transform: skewX(-14deg);
    animation: site-scan-pass 2.6s ease-in-out infinite;
}

.site-loading-ground {
    position: absolute;
    right: 28px;
    bottom: 43px;
    left: 28px;
    height: 38px;
    border: 1px solid rgba(9, 96, 189, 0.18);
    border-radius: 8px;
    background:
        linear-gradient(90deg, rgba(9, 96, 189, 0.1) 0 8px, transparent 8px 20px),
        linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(218, 236, 255, 0.58));
    background-size: 28px 100%, auto;
}

.site-loading-route {
    position: absolute;
    right: 42px;
    bottom: 88px;
    width: 202px;
    height: 64px;
}

.site-loading-route path {
    fill: none;
    stroke: rgba(9, 96, 189, 0.42);
    stroke-width: 2;
    stroke-linecap: round;
    stroke-dasharray: 9 8;
    animation: site-route-dash 1.35s linear infinite;
}

.site-loading-route circle {
    fill: #21a8ff;
    filter: drop-shadow(0 0 8px rgba(33, 168, 255, 0.58));
}

.site-loading-crane {
    position: absolute;
    left: 42px;
    bottom: 68px;
    width: 148px;
    height: 134px;
}

.site-loading-crane::before {
    position: absolute;
    left: 40px;
    bottom: 0;
    width: 10px;
    height: 112px;
    border-radius: 2px;
    background: linear-gradient(180deg, #0f6fd1, #0958ad);
    box-shadow:
        21px 0 0 -3px rgba(9, 96, 189, 0.58),
        -12px 84px 0 -3px rgba(9, 96, 189, 0.42);
    content: "";
}

.site-loading-crane::after {
    position: absolute;
    left: 24px;
    top: 17px;
    width: 118px;
    height: 9px;
    border-radius: 2px;
    background: linear-gradient(90deg, #0958ad, #21a8ff 62%, rgba(33, 168, 255, 0.32));
    box-shadow: 0 10px 0 -7px rgba(9, 96, 189, 0.5);
    content: "";
}

.site-loading-hook {
    position: absolute;
    top: 28px;
    right: 26px;
    width: 2px;
    height: 52px;
    background: rgba(9, 96, 189, 0.46);
    animation: site-hook-drop 2.4s ease-in-out infinite;
}

.site-loading-hook::after {
    position: absolute;
    left: -6px;
    bottom: -9px;
    width: 14px;
    height: 14px;
    border-right: 2px solid #0958ad;
    border-bottom: 2px solid #0958ad;
    border-radius: 0 0 8px 0;
    content: "";
    transform: rotate(45deg);
}

.site-loading-module {
    position: absolute;
    right: -12px;
    bottom: 31px;
    width: 34px;
    height: 22px;
    border: 1px solid rgba(9, 96, 189, 0.28);
    border-radius: 4px;
    background:
        linear-gradient(90deg, rgba(255, 255, 255, 0.34) 1px, transparent 1px),
        linear-gradient(180deg, #f8fbff, #9bd7ff);
    background-size: 8px 100%, auto;
    box-shadow: 0 10px 18px rgba(9, 96, 189, 0.18);
    transform-origin: 50% -28px;
    animation: site-load-swing 2.4s ease-in-out infinite, site-module-lift 4.8s ease-in-out infinite;
}

.site-loading-building {
    position: absolute;
    bottom: 76px;
    width: 56px;
    border: 1px solid rgba(9, 96, 189, 0.2);
    border-radius: 5px 5px 2px 2px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(195, 226, 255, 0.88));
    box-shadow: 0 18px 28px rgba(23, 43, 77, 0.12);
}

.building-a {
    right: 124px;
    height: 74px;
}

.building-b {
    right: 66px;
    height: 104px;
}

.site-loading-building i {
    display: block;
    width: 34px;
    height: 5px;
    margin: 12px auto 0;
    border-radius: 999px;
    background: linear-gradient(90deg, #21a8ff, #0cb393);
    animation: site-window-light 2s ease-in-out infinite;
}

.site-loading-building i:nth-child(2) {
    width: 26px;
    animation-delay: -0.55s;
}

.site-loading-building i:nth-child(3) {
    width: 38px;
    animation-delay: -1.1s;
}

.site-loading-data {
    position: absolute;
    display: block;
    width: 70px;
    height: 38px;
    border: 1px solid rgba(9, 96, 189, 0.14);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.78);
    box-shadow: 0 12px 28px rgba(23, 43, 77, 0.09);
    animation: site-card-rise 2.4s ease-in-out infinite;
}

.site-loading-data::before,
.site-loading-data::after {
    position: absolute;
    left: 12px;
    height: 4px;
    border-radius: 999px;
    content: "";
}

.site-loading-data::before {
    top: 11px;
    width: 34px;
    background: rgba(9, 96, 189, 0.28);
}

.site-loading-data::after {
    top: 22px;
    width: 48px;
    background: linear-gradient(90deg, #21a8ff, rgba(33, 168, 255, 0.12));
}

.data-a {
    top: 32px;
    left: 222px;
}

.data-b {
    top: 76px;
    right: 24px;
    width: 84px;
    animation-delay: -0.8s;
}

.site-loading-beacon {
    position: absolute;
    display: block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #0cb393;
    box-shadow: 0 0 0 10px rgba(12, 179, 147, 0.12);
    animation: site-beacon-pulse 1.7s ease-in-out infinite;
}

.beacon-a {
    right: 177px;
    bottom: 111px;
}

.beacon-b {
    right: 82px;
    bottom: 168px;
    background: #21a8ff;
    box-shadow: 0 0 0 10px rgba(33, 168, 255, 0.12);
    animation-delay: -0.7s;
}

.site-loading-progress {
    position: absolute;
    right: 58px;
    bottom: 22px;
    left: 58px;
    height: 5px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(9, 96, 189, 0.12);
}

.site-loading-progress::after {
    display: block;
    width: 62%;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, transparent, #21a8ff, #0cb393, transparent);
    content: "";
    animation: site-progress 1.65s ease-in-out infinite alternate;
}

.site-loading-copy {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.site-loading-copy strong {
    color: #10213f;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.25;
}

.site-loading-copy span {
    color: #5e6c84;
    font-size: 14px;
    line-height: 1.6;
}

.loading-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 60px;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    margin-bottom: 15px;
    border: 4px solid #e0e0e0;
    border-top: 6px solid #1890ff;
    border-radius: 50%;
    animation: load-spin 1s linear infinite;
}

.loading-text-cn,
.loading-text-us {
    color: #0960bd;
    font-size: 23px;
    font-weight: 600;
}

@media (max-width: 520px) {
    .site-loading {
        width: min(340px, calc(100vw - 32px));
        gap: 14px;
    }

    .site-loading-stage {
        width: min(320px, calc(100vw - 36px));
        height: 214px;
    }

    .site-loading-crane {
        left: 24px;
        transform: scale(0.88);
        transform-origin: left bottom;
    }

    .site-loading-route,
    .data-a {
        display: none;
    }

    .building-a {
        right: 102px;
    }

    .building-b {
        right: 44px;
    }

    .data-b {
        right: 18px;
        top: 62px;
    }

    .site-loading-copy strong {
        font-size: 18px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .site-loading-mask,
    .site-loading-mask *,
    .site-loading-mask::before,
    .site-loading-mask::after,
    .site-loading-mask *::before,
    .site-loading-mask *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }

    .site-loading-stage::after {
        opacity: 0.36;
        transform: translateX(0) skewX(-14deg);
    }
}
