* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body,
html {
    width: 100%;
    height: 100%;
    font-family: "Microsoft YaHei", Arial, sans-serif;
    overflow: hidden;
    background-size: 100% 100%;
}

.body {
    position: relative;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    position: relative;
    background-size: 100% 100%;
    background-repeat: no-repeat;
    background-position-y: top;
}

.qiandao {
    padding: 30px;
    width: 80%;
    min-height: 100px;
    position: absolute;
    top: 498px;
    left: 50%;
    transform: translate(-50%, 0%);
    font-size: 48px;
    background-color: rgba(255, 255, 255, 0.5);
    text-align: center;
    box-shadow: 0px 0px 30px 3px rgba(0, 0, 0, 0.5);
    border-radius: 10px;
    animation-name: donghua;
    animation-duration: 2s;
    animation-iteration-count: 1;
    animation-timing-function: ease-in-out;
}

@keyframes donghua {
    0% {
        transform: translate(-50%, 0%) scale(0.5);
        opacity: 0;
    }

    50% {
        transform: translate(-50%, 0%) scale(1);
        opacity: 1;
    }

    60% {
        transform: translate(-50%, 0%) rotateY(10deg);
        opacity: 1;
    }

    70% {
        transform: translate(-50%, 0%) rotateY(-10deg);
        opacity: 1;
    }

    80% {
        transform: translate(-50%, 0%) rotateY(10deg);
        opacity: 1;
    }

    90% {
        transform: translate(-50%, 0%) rotateY(-10deg);
        opacity: 1;
    }

    100% {
        transform: translate(-50%, 0%) rotateY(0deg);
        opacity: 1;
    }
}

.qiandao input {
    width: 100%;
    height: 37px;
    margin: 20px auto;
    display: block;
    font-size: 16px;
    color: #690000;
    padding: 0 10px;
    border: 0px solid #ffffff;
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.9);
}

input::placeholder {
    color: #8d8d8d;
    /* 浅灰色，可自定义为任意颜色值（如 #f00、rgba(0,0,0,0.5) 等） */
    font-size: 14px;
    /* 可选：同时调整字体大小 */
    opacity: 1;
    /* 修复 webkit 内核默认透明度问题 */
}

.qiandao a {
    font-size: 18px;
    background: #009714;
    width: 100%;
    height: 45px;
    display: block;
    color: white;
    line-height: 45px;
    text-decoration: none;
    font-weight: 900;
    border-radius: 5px;
}

.weixin_info {
    width: 100%;
    height: 53px;
    /* display: none; */
}

.info {
    position: absolute;
    left: 50%;
    top: -50px;
    transform: translate(-50%, 0px);
}

.tx img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 4px white solid;
    box-shadow: 0px 0px 16px 0px rgba(0, 0, 0, 0.3);
}

.name {
    font-size: 18px;
    color: #ffffff;
    font-weight: 900;
}

.qiandao_info {
    font-size: 15px;
    line-height: 35px;
    text-align: left;
}

.qiandao_info img {
    width: 150px;
    position: absolute;
    top: 0px;
    left: 50%;
    transform: translate(-50%, -51%);
}

.qiandao_info span {
    margin-top: 3px;
    font-size: 24px;
    display: inherit;
    width: 100%;
    background: #d7d7d8;
    line-height: 26px;
    color: red;
    padding-left: 30px;
    border-radius: 10px;
    padding: 14px 30px;

}



/* 核心：防伪码span样式（平铺背景） */
.qiandao_ {
    position: relative;
    display: inline-block;
    padding: 4px 8px;
    /* 内边距，保证防伪码显示空间 */
    margin: 0 2px;
    border-radius: 2px;
    /* 原有文字层级 */
    position: relative;
    z-index: 1;
    /* 防止防伪码超出span */
    overflow: hidden;
}

/* 伪元素实现平铺防伪码背景 */
.qiandao_::before {
    content: attr(data-name);
    /* 读取data-name的值作为防伪码 */
    position: absolute;
    top: 0;
    left: 0;
    width: 200%;
    /* 超出容器实现水平平铺 */
    height: 200%;
    /* 超出容器实现垂直平铺 */
    font-size: 16px;
    /* 防伪码文字大小 */
    color: rgba(0, 0, 0, 0.1);
    /* 半透明水印效果 */
    transform: rotate(-0deg) scale(1);
    /* 倾斜+轻微缩放，增强防伪 */
    white-space: pre-wrap;
    /* 换行实现垂直平铺 */
    line-height: 27px;
    /* 行高控制垂直间距 */
    letter-spacing: 2px;
    /* 字间距控制水平密度 */
    pointer-events: none;
    /* 不遮挡点击/选择 */
    z-index: 0;
    /* 防伪码在文字下方 */
    /* 轻微模糊，更贴近防伪水印质感 */
    filter: blur(0.3px);
}

/* ------------------裁剪容器样式 --------------------------------*/
.caijian {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    background: aliceblue;
    padding: 10px;
    display: none;
    border-radius: 14px;
    box-shadow: 0px 0px 18px 3px rgba(0, 0, 0, 0.4);
}

.container {
    max-width: 100%;
    margin: 0 auto;
}

/* 新增：头像区域样式（匹配.tx img选择器）
        .tx {
            margin-bottom: 20px;
        }
        .tx img {
            width: 100px;
            height: 100px;
            border-radius: 50%;
            border: 2px dashed #007bff;
            cursor: pointer;
            object-fit: cover;
        } */
#cropBtn {
    padding: 10px 20px;
    background: #28a745;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    margin: 10px 0;
    display: none;
    width: 100%;
}

/* 裁剪容器样式 */
.crop-container {
    width: 100%;
    height: 300px;
    overflow: hidden;
    border: 1px solid #ddd;
    border-radius: 8px;
    display: none;
}

#image {
    max-width: 100%;
}

#result {
    margin-top: 20px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    word-break: break-all;
    font-size: 12px;
    color: #666;
}