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

body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f0f7ff; /* 浅蓝色背景，贴合主色调 */
    padding: 0;
    margin: 0;
}

/* 内容容器 */
.content {
    width: 90%;
    max-width: 600px;
    margin: 50px auto;
    text-align: center;
    padding: 20px;
}

/* 标题样式 - 蓝色主色调 */
.page-title {
    font-size: 28px;
    color: #1677ff; /* 蓝色标题 */
    margin-bottom: 30px;
    font-weight: 600;
}

/* 描述文本 */
.desc-text {
    font-size: 16px;
    color: #444; /* 优化文本对比度 */
    margin: 15px 0;
    line-height: 1.8;
}

/* 按钮样式 - 蓝色主色调 */
.dashang-btn {
    display: none; /* 默认隐藏按钮，关闭二维码后显示 */
    width: 220px;
    height: 60px;
    line-height: 60px;
    background-color: #1677ff; /* 蓝色主按钮 */
    color: #fff;
    text-align: center;
    text-decoration: none;
    border-radius: 30px;
    font-weight: bold;
    font-size: 18px;
    transition: all 0.3s ease;
    margin: 20px auto;
    cursor: pointer;
    border: none;
    box-shadow: 0 4px 12px rgba(22, 119, 255, 0.3); /* 蓝色阴影 */
}

.dashang-btn.show {
    display: inline-block; /* 显示按钮的类 */
}

.dashang-btn:hover {
    opacity: 0.9;
    transform: translateY(-3px);
    background-color: #0e66d9; /* 按钮hover加深蓝色 */
    box-shadow: 0 6px 16px rgba(22, 119, 255, 0.4); /* 增强蓝色阴影 */
}

/* 遮罩层 - 默认显示 */
.hide_box {
    z-index: 999;
    background: rgba(22, 119, 255, 0.05); /* 浅蓝色遮罩，贴合主色调 */
    left: 0;
    top: 0;
    height: 100%;
    width: 100%;
    position: fixed;
    display: block;
}

/* 弹窗容器 - 默认显示二维码 */
.shang_box {
    width: 90%;
    max-width: 500px;
    padding: 25px;
    background-color: #fff;
    border-radius: 15px;
    position: fixed;
    z-index: 1000;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 10px 30px rgba(22, 119, 255, 0.15); /* 蓝色系阴影 */
    display: block; /* 默认显示弹窗（二维码） */
    border: 1px solid #e6f0ff; /* 浅蓝色边框 */
}

/* 自定义关闭按钮（现代风格 - 核心修改） */
.shang_close {
    float: right;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%; /* 圆形背景 */
    background-color: #f5f7fa; /* 浅灰背景 */
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05); /* 轻微阴影增强质感 */
}

/* 绘制精致叉号 - 更细的线条+居中对齐 */
.shang_close::before, .shang_close::after {
    content: '';
    position: absolute;
    width: 14px; /* 缩短叉号长度，更精致 */
    height: 1.5px; /* 变细，更细腻 */
    background-color: #8c8c8c; /* 浅灰色叉号 */
    border-radius: 1px;
}

.shang_close::before {
    transform: rotate(45deg);
}

.shang_close::after {
    transform: rotate(-45deg);
}

/* 关闭按钮 hover 效果 - 交互更细腻 */
.shang_close:hover {
    background-color: #1677ff; /* 蓝色背景 */
    transform: rotate(90deg) scale(1.05); /* 轻微放大+旋转 */
    box-shadow: 0 4px 8px rgba(22, 119, 255, 0.2); /* 蓝色阴影 */
}

.shang_close:hover::before, .shang_close:hover::after {
    background-color: #fff; /* 白色叉号，对比更强烈 */
}

/* 弹窗标题 - 优化配色 */
.shang_tit {
    width: 100%;
    height: 60px;
    text-align: center;
    line-height: 60px;
    color: #1677ff; /* 蓝色标题文字 */
    font-size: 18px;
    background: linear-gradient(120deg, #e6f0ff, #f0f7ff); /* 浅蓝色渐变背景 */
    border-radius: 8px;
    margin: 10px 0 25px;
    border: 1px solid #d9e8ff;
}

/* 二维码容器 - 蓝色边框 */
.shang_payimg {
    width: 220px;
    height: 220px;
    padding: 12px;
    border: 6px solid #1677ff; /* 二维码边框改为蓝色 */
    margin: 0 auto 20px;
    border-radius: 8px;
    background-color: #fff;
    box-shadow: 0 0 10px rgba(22, 119, 255, 0.1);
}

#output {
    text-align: center;
    width: 100%;
    height: 100%;
}

/* 支付说明 - 优化配色 */
.pay_explain {
    text-align: center;
    margin: 15px auto 20px;
    font-size: 16px;
    color: #1677ff; /* 蓝色说明文字 */
    font-weight: 500;
}

/* 信息提示 */
.shang_info {
    clear: both;
    padding-top: 15px;
}

.shang_info p {
    color: #555; /* 优化提示文本对比度 */
    text-align: center;
    font-size: 14px;
    line-height: 2em;
}

/* 统计代码容器 */
.statistics {
    display: none;
}

/* 响应式调整 - 适配移动端关闭图标 */
@media (max-width: 480px) {
    .content {
        margin: 30px auto;
    }
    
    .page-title {
        font-size: 24px;
    }
    
    .shang_tit {
        font-size: 16px;
        height: 50px;
        line-height: 50px;
    }
    
    .shang_payimg {
        width: 180px;
        height: 180px;
        border-width: 4px;
    }

    /* 移动端关闭图标缩小 */
    .shang_close {
        width: 28px;
        height: 28px;
    }
    
    .shang_close::before, .shang_close::after {
        width: 12px;
        height: 1.5px;
    }
}
