:root {
    --guide-bg: #f6f8fc;
    --guide-panel: rgba(255, 255, 255, 0.9);
    --guide-panel-solid: #ffffff;
    --guide-panel-soft: #edf4ff;
    --guide-text: #101828;
    --guide-muted: #667085;
    --guide-line: #e3e9f3;
    --guide-blue: #4169d8;
    --guide-blue-strong: #2555c7;
    --guide-cyan: #43b7e8;
    --guide-orange: #ff9f43;
    --guide-pink: #f75d8f;
    --guide-green: #58c98b;
    --guide-shadow: 0 24px 70px rgba(31, 52, 92, 0.14);
}

html,
body {
    min-height: 100%;
    overflow-x: hidden;
}

body {
    color: var(--guide-text);
    background:
        linear-gradient(115deg, rgba(65, 105, 216, 0.10) 0%, transparent 24%, rgba(88, 201, 139, 0.10) 48%, transparent 74%, rgba(67, 183, 232, 0.12) 100%),
        linear-gradient(135deg, #f8fbff 0%, #edf4ff 45%, #f6f8fc 100%);
    background-size: 240% 240%, auto;
    font-family: Inter, "PingFang SC", "Microsoft YaHei", "Noto Sans SC", Arial, sans-serif;
    letter-spacing: 0;
    animation: guideBgDrift 16s ease-in-out infinite alternate;
}

body.bj {
    height: 100vh;
    height: 100dvh;
    min-height: 100vh;
    min-height: 100dvh;
    padding: 34px 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-image: none !important;
}

body.bj::before {
    content: "";
    position: fixed;
    inset: 18px;
    border: 1px solid rgba(65, 105, 216, 0.13);
    border-radius: 8px;
    background:
        linear-gradient(90deg, rgba(65, 105, 216, 0.08) 1px, transparent 1px),
        linear-gradient(0deg, rgba(65, 105, 216, 0.08) 1px, transparent 1px);
    background-size: 28px 28px;
    opacity: 0.45;
    pointer-events: none;
    animation: guideGridFlow 12s linear infinite;
}

body.bj::after {
    content: "";
    position: fixed;
    inset: -20%;
    background:
        linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, 0.62) 45%, transparent 60%),
        linear-gradient(18deg, transparent 42%, rgba(67, 183, 232, 0.12) 50%, transparent 62%);
    opacity: 0.78;
    pointer-events: none;
    animation: guideSweep 10s ease-in-out infinite alternate;
}

.guide-shell {
    width: min(560px, calc(100vw - 32px));
    position: relative;
    z-index: 1;
    flex: 0 0 auto;
}

.popup {
    width: 100% !important;
    max-height: calc(100vh - 36px);
    padding: 0;
    border: 1px solid rgba(227, 233, 243, 0.92);
    border-radius: 8px;
    position: relative;
    top: auto;
    left: auto;
    right: auto;
    bottom: auto;
    transform: none !important;
    overflow: hidden;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(255, 255, 255, 0.86)),
        radial-gradient(circle at 80% 0%, rgba(65, 105, 216, 0.12), transparent 35%);
    box-shadow: var(--guide-shadow) !important;
    backdrop-filter: blur(18px);
}

.popup::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 5px;
    background: linear-gradient(90deg, var(--guide-blue), var(--guide-cyan), var(--guide-green), var(--guide-blue));
    background-size: 220% 100%;
    animation: guideStripe 6s ease-in-out infinite;
}

.popup::after {
    content: none;
}

.popup-header {
    padding: 34px 34px 14px;
    text-align: left;
}

.popup-title {
    display: inline-block;
    margin: 0;
    color: var(--guide-text);
    font-size: 24px;
    line-height: 1.25;
    font-weight: 900;
}

.popup-title::before {
    content: "";
    position: absolute;
    left: -2px;
    bottom: 0;
    right: -6px;
    width: auto;
    height: 12px;
    border-radius: 8px;
    background: linear-gradient(90deg, rgba(65, 105, 216, 0.18), rgba(88, 201, 139, 0.18));
    z-index: -1;
}

.popup-main {
    padding: 0 34px 8px;
}

.popup-main p {
    margin: 0;
    padding: 10px 0;
    color: var(--guide-muted);
    font-size: 15px;
    line-height: 1.7;
}

.popup-main p.popup-domain {
    min-height: 78px;
    margin: 14px 0 16px;
    padding: 16px 42px 16px 76px;
    border: 1px solid var(--guide-line);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    text-align: left;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(248, 251, 255, 0.9)),
        linear-gradient(90deg, rgba(65, 105, 216, 0.05), transparent);
    box-shadow: 0 12px 30px rgba(31, 52, 92, 0.08);
    overflow: visible;
    isolation: isolate;
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.popup-main p.popup-domain:nth-child(2) {
    margin-top: 18px;
}

.popup-main p.popup-domain::before {
    content: "🔗";
    position: absolute;
    left: 18px;
    top: 50%;
    width: 42px;
    height: 42px;
    border-radius: 8px;
    display: grid;
    place-items: center;
    color: #fff;
    background: linear-gradient(135deg, var(--guide-blue), var(--guide-cyan));
    box-shadow: 0 12px 24px rgba(65, 105, 216, 0.22);
    transform: translateY(-50%);
    font-size: 20px;
    z-index: 1;
}

.popup-main p.popup-domain::after {
    content: "进入";
    position: absolute;
    right: 16px;
    top: 50%;
    width: 38px;
    height: 26px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--guide-blue-strong);
    background: #e8efff;
    font-size: 12px;
    font-weight: 850;
    transform: translateY(-50%);
    transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease;
    z-index: 1;
}

.popup-main p.popup-domain:hover {
    border-color: rgba(65, 105, 216, 0.35);
    background:
        linear-gradient(180deg, #ffffff, #f8fbff),
        linear-gradient(90deg, rgba(65, 105, 216, 0.08), transparent);
    box-shadow: 0 18px 38px rgba(31, 52, 92, 0.14);
    transform: translateY(-2px);
}

.popup-main p.popup-domain:hover::after {
    color: #fff;
    background: var(--guide-blue);
    transform: translate(3px, -50%);
}

.popup-main p.popup-domain span {
    display: none;
}

.popup-main p.popup-domain strong {
    color: var(--guide-text);
    font-size: 16px;
    line-height: 1.35;
}

.popup-main p.icon-site::before {
    content: "🚀";
    background: linear-gradient(135deg, var(--guide-blue), #5f7fff);
}

.popup-main p.icon-client::before,
.popup-main p.icon-windows::before {
    content: "💻";
    background: linear-gradient(135deg, var(--guide-cyan), var(--guide-blue));
}

.popup-main p.icon-chat::before {
    content: "💬";
    background: linear-gradient(135deg, var(--guide-green), #2fbf9b);
}

.popup-main p.icon-android::before {
    content: "🤖";
    background: linear-gradient(135deg, var(--guide-green), #7ed957);
}

.popup-main p.icon-macos::before,
.popup-main p.icon-ios::before {
    content: "🍎";
    background: linear-gradient(135deg, #111827, #667085);
}

.popup-main p.icon-ios::before {
    content: "📱";
}

.popup-main p.popup-domain a,
.popup-main p.popup-domain:hover a {
    color: inherit;
}

.popup strong,
.popup-main p a {
    color: var(--guide-blue-strong);
}

.popup-main p:last-child {
    margin-top: 10px;
    padding-top: 16px;
    text-align: center;
}

.popup-main p:last-child::after {
    background: var(--guide-line);
}

.popup-footer {
    padding: 16px 34px 34px;
    text-align: center;
}

.popup-btn {
    width: auto;
    padding: 0;
    border-radius: 8px;
    display: block;
    position: relative;
    overflow: hidden;
    background: linear-gradient(90deg, var(--guide-blue), var(--guide-blue-strong));
    box-shadow: 0 14px 28px rgba(65, 105, 216, 0.24);
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.popup-btn:hover {
    background: linear-gradient(90deg, var(--guide-blue-strong), var(--guide-blue));
    box-shadow: 0 18px 34px rgba(65, 105, 216, 0.3);
    transform: translateY(-1px);
}

.popup-btn::after {
    content: "";
    position: absolute;
    top: -30%;
    left: -36px;
    width: 28px;
    height: 160%;
    background: rgba(255, 255, 255, 0.38);
    transform: rotate(18deg);
    animation: guideButtonShine 4.8s ease-in-out infinite;
    pointer-events: none;
}

.popup-btn button {
    width: 100%;
    min-height: 46px;
    color: #fff;
    font-weight: 850;
}

.loading-container {
    padding: 44px 18px !important;
}

.spinner {
    border-color: rgba(65, 105, 216, 0.14) !important;
    border-top-color: var(--guide-blue) !important;
}

.loading-text {
    color: var(--guide-text) !important;
    font-weight: 750;
}

.error-message {
    color: #d92d20 !important;
}

.status-icon {
    width: 58px;
    height: 58px;
    margin: 0 auto 18px;
    border-radius: 8px;
    display: grid;
    place-items: center;
    color: #fff;
    font-size: 30px;
    font-weight: 900;
    line-height: 1;
    box-shadow: 0 16px 30px rgba(31, 52, 92, 0.16);
}

.status-success {
    background: linear-gradient(135deg, var(--guide-green), var(--guide-cyan));
}

.status-error {
    background: linear-gradient(135deg, #f04438, var(--guide-orange));
}

.retry-btn {
    min-height: 42px;
    padding: 0 22px !important;
    border-radius: 8px !important;
    background: var(--guide-blue) !important;
    box-shadow: 0 12px 24px rgba(65, 105, 216, 0.22);
}

.retry-btn:hover {
    background: var(--guide-blue-strong) !important;
}

@media (max-width: 560px) {
    body.bj {
        padding: 16px;
        align-items: center;
    }

    .guide-shell {
        width: min(100%, calc(100vw - 48px));
        transform: translateY(32px);
    }

    body.bj::before {
        inset: 8px;
    }

    .popup {
        width: 100% !important;
        max-height: none;
    }

    .popup-header {
        padding: 28px 22px 12px;
    }

    .popup-title {
        font-size: 21px;
    }

    .popup-main {
        padding: 0 22px 4px;
    }

    .popup-main p {
        font-size: 14px;
    }

    .popup-main p.popup-domain {
        min-height: 68px;
        padding: 14px 38px 14px 62px;
    }

    .popup-main p.popup-domain::after {
        content: "›";
        right: 12px;
        width: 22px;
        height: 22px;
        font-size: 20px;
        line-height: 1;
    }

    .popup-main p.popup-domain::before {
        left: 14px;
        width: 34px;
        height: 34px;
        font-size: 17px;
    }

    .popup-footer {
        padding: 14px 22px 24px;
    }
}

@keyframes guideBgDrift {
    0% {
        background-position: 0% 50%, 0 0;
    }

    100% {
        background-position: 100% 50%, 0 0;
    }
}

@keyframes guideGridFlow {
    from {
        background-position: 0 0;
    }

    to {
        background-position: 28px 28px;
    }
}

@keyframes guideSweep {
    from {
        transform: translate3d(-8%, -4%, 0);
    }

    to {
        transform: translate3d(8%, 5%, 0);
    }
}

@keyframes guideStripe {
    0%, 100% {
        background-position: 0 0;
    }

    50% {
        background-position: 100% 0;
    }
}

@keyframes guideButtonShine {
    0%, 58% {
        left: -40px;
        opacity: 0;
    }

    72% {
        opacity: 0.72;
    }

    100% {
        left: calc(100% + 38px);
        opacity: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    body,
    body.bj::after,
    .popup::before,
    .popup-btn::after {
        animation: none;
    }
}

@media (min-width: 561px) and (max-width: 760px) {
    .popup-main {
        padding-right: 100px;
    }

    .popup-footer {
        padding-right: 100px;
    }
}
