/* ==========================================
   WeChat Group Invite Page Style Sheet (Native Style)
   ========================================== */

/* 重置基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: #ffffff; /* 纯白背景，符合微信原生扫码页 */
    font-family: -apple-system-font, BlinkMacSystemFont, "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei UI", "Microsoft YaHei", Arial, sans-serif;
    color: #191919;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    overflow: hidden;
}

/* 主容器 */
.wechat-container {
    width: 100%;
    max-width: 450px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    padding: 30px 24px;
}

/* 微信群头像样式 */
.wechat-group-avatar {
    width: 72px;
    height: 72px;
    border-radius: 12px; /* 原生圆角 */
    margin-top: 55px; /* 与顶部间距 */
    margin-bottom: 18px;
    object-fit: cover;
}

/* 群聊名称 */
.wechat-group-name {
    font-size: 21px;
    font-weight: 600;
    color: #191919;
    margin-bottom: 40px;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
    padding: 0 10px;
}

/* 二维码展示区 */
.wechat-qrcode-container {
    width: 290px;
    height: 290px;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: transparent;
}

.wechat-qrcode {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: opacity 0.3s ease;
}

/* 骨架屏与载入状态 */
.qrcode-skeleton {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: #888888;
    font-size: 13px;
    border: 1px dashed #e0e0e0;
    border-radius: 8px;
    background-color: #fafafa;
}

.spinner {
    width: 28px;
    height: 28px;
    border: 2px solid #e1e1e1;
    border-top: 2px solid #191919; /* 微信深色调 */
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 12px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 二维码底部说明 (原生的灰色文字) */
.wechat-footer-tip {
    font-size: 13.5px;
    color: #a3a3a3; /* 原生浅灰色 */
    font-weight: 400;
    line-height: 1.6;
    margin-top: 48px;
    text-align: center;
    padding: 0 16px;
    letter-spacing: 0.2px;
}

/* 隐藏类 */
.hide {
    display: none !important;
    opacity: 0;
}

/* 小屏幕设备适配微调 */
@media (max-height: 600px) {
    .wechat-group-avatar {
        margin-top: 25px;
    }
    .wechat-group-name {
        margin-bottom: 25px;
    }
    .wechat-qrcode-container {
        width: 220px;
        height: 220px;
    }
    .wechat-footer-tip {
        margin-top: 25px;
    }
}
