/* 让网页背景变黑，更像一个展厅 */
body {
    margin: 0;
    padding: 0;
    overflow: hidden;
    background-color: #484cb2;
    font-family: sans-serif;
}

/* 加载动画的样式 */
#loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #ffffff;
    font-size: 1.2rem;
    z-index: 100;
}

/* 画布填满屏幕 */
canvas {
    display: block;
    width: 100vw;
    height: 100vh;
    background: transparent;
}

.ui-layer {
    position: fixed;
    top: 24px;
    left: 24px;
    z-index: 120;
    pointer-events: none;
}

.tour-button {
    pointer-events: auto;
    appearance: none;
    border: 0;
    border-radius: 999px;
    padding: 14px 28px;
    background: linear-gradient(135deg, rgba(255, 247, 220, 0.96), rgba(255, 196, 92, 0.96));
    color: #3c2a10;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.08em;
    box-shadow: 0 14px 30px rgba(27, 45, 77, 0.2);
    cursor: pointer;
    transition: transform 0.22s ease, box-shadow 0.22s ease, opacity 0.22s ease;
}

.tour-button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 18px 36px rgba(27, 45, 77, 0.26);
}

.tour-button:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.tour-popup {
    position: fixed;
    left: 0;
    top: 0;
    width: min(600px, calc(100vw - 32px));
    box-sizing: border-box;
    aspect-ratio: 1092 / 545;
    color: #fff7eb;
    z-index: 130;
    opacity: 0;
    transform: translate3d(var(--popup-x, 24px), var(--popup-y, 24px), 0) scale(0.98);
    transform-origin: top left;
    transition: opacity 0.35s ease, transform 0.35s ease;
    pointer-events: none;
}

.tour-popup.is-visible {
    opacity: 1;
    transform: translate3d(var(--popup-x, 24px), var(--popup-y, 24px), 0) scale(1);
}

.tour-popup.is-repositioning {
    transition: none;
}

.tour-popup__bg {
    display: block;
    width: 100%;
    height: auto;
    filter: drop-shadow(0 20px 44px rgba(15, 34, 46, 0.26));
    user-select: none;
    -webkit-user-drag: none;
}

.tour-popup__inner {
    position: absolute;
    inset: 0;
    width: 54%;
    max-width: 290px;
    padding: 14% 0 0 7%;
    text-align: left;
    z-index: 1;
}

.tour-popup__title {
    font-size: clamp(24px, 2.2vw, 32px);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 14px;
    text-align: left;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.28);
}

.tour-popup__text {
    font-size: clamp(15px, 1.28vw, 20px);
    line-height: 1.65;
    text-align: left;
    color: rgba(255, 248, 236, 0.92);
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.24);
}

@media (max-width: 768px) {
    .ui-layer {
        top: 16px;
        left: 16px;
    }

    .tour-button {
        padding: 12px 22px;
        font-size: 15px;
    }

    .tour-popup {
        width: min(92vw, 520px);
    }

    .tour-popup__inner {
        width: 58%;
        max-width: 220px;
        padding-top: 12%;
        padding-left: 6%;
    }

    .tour-popup__title {
        margin-bottom: 10px;
    }

    .tour-popup__text {
        font-size: 14px;
        line-height: 1.55;
    }
}
