/* 基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    min-height: 100%;
    background: #ffffff;
}

body {
    overflow-x: hidden;
}

img {
    display: block;
    width: 100%;
    height: auto;
    border: 0;
    cursor: pointer;
    user-select: none;
    -webkit-user-drag: none;
}

/* 页面容器：最大580px，居中显示 */
#app {
    position: relative;
    width: 100%;
    max-width: 580px;
    min-height: 100vh;
    margin: 0 auto;
    background: #ffffff;
    overflow: hidden;
}

/* 顶部和底部固定图片 */
.fixed-image {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 580px;
    z-index: 9999;
}

.top-image {
    top: 0;
}

.bottom-image {
    bottom: 0;
}

/* 中间图片区域 */
.content {
    width: 100%;
    padding-top: var(--top-image-height, 0px);
    padding-bottom: var(--bottom-image-height, 0px);
}

/* 下载提示 */
#div-loading {
    display: none;
    position: fixed;
    z-index: 10001;
    left: 50%;
    top: 40%;
    transform: translate(-50%, -50%);
    padding: 8px 12px;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 6px;
    font-size: 16px;
    white-space: nowrap;
}

/* PC端二维码外框 */
#pc-qrcode {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: max-content;
    padding: 10px;
    color: #222222;
    background: #f1f1f1;
    border-radius: 10px;
    text-align: center;
    font-size: 14px;
    line-height: 1.4;
    box-shadow: 0 3px 18px rgba(0, 0, 0, 0.2);
}

/* 随xz.js生成的二维码尺寸自动撑开 */
#codeDiv {
    width: max-content;
    height: auto;
    margin: 5px auto 0;
    padding: 0;
    background: #ffffff;
}

#codeDiv canvas,
#codeDiv img {
    display: block;
}

/* PC端保持580px居中显示 */
@media screen and (min-width: 581px) {
    #app,
    .fixed-image {
        width: 580px;
    }
}