/* 1. 基础重置与 iframe 容器适应 */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}
html, body {
    width: 100%;
    height: 100%;
    background: transparent; /* 方便嵌入父页面时融入背景 */
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* 2. 表单与主卡片容器限制 */
.wfform {
    width: 100%;
    max-width: 440px; /* 控制电脑端最大宽度，防止过宽 */
    padding: 10px;
}

.register {
    background: #ffffff;
    padding: 20px 24px;
    width: 100%;
}

/* 3. 列表与表单项紧凑布局 */
.register ul {
    list-style: none;
}

.yzm-box {
    position: relative;
    margin-bottom: 12px; /* 压缩间距，防止页面过长 */
}

.yzm-box p {
    font-size: 13px;
    color: #4a5568;
    margin-bottom: 4px;
    font-weight: 500;
}

/* 输入框通用样式 */
.yzm-box input[type="text"],
.yzm-box input[type="password"] {
    width: 100%;
    height: 40px;
    line-height: 40px;
    padding: 0 12px;
    font-size: 16px;
    color: #333;
    background-color: #f7fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    outline: none;
    transition: all 0.2s ease;
}

.yzm-box input[type="text"]:focus,
.yzm-box input[type="password"]:focus {
    border-color: #3182ce;
    background-color: #fff;
    box-shadow: 0 0 0 2px rgba(49, 130, 206, 0.2);
}

/* 4. 账号自动生成按钮浮动对齐 */
.yzm-box #username {
    padding-right: 110px; /* 给右侧按钮留出空间 */
    background-color: #edf2f7;
}

.yzmm {
    position: absolute;
    right: 4px;
    bottom: 4px;
    height: 32px;
}

.yzmm input[type="button"].shuaxin {
    height: 32px;
    line-height: 32px;
    padding: 0 10px;
    font-size: 12px;
    color: #fff !important;
    background: linear-gradient(135deg, #503f32, #9e7f67);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: opacity 0.2s;
}

.yzmm input[type="button"].shuaxin:hover {
    opacity: 0.9;
}

/* 5. 提交按钮样式 */
.register-btn {
    display: block;
    width: 100%;
    height: 44px;
    line-height: 44px;
    text-align: center;
    background: linear-gradient(135deg, #29c28d, #1e936a);
    color: #ffffff !important;
    font-size: 16px;
    font-weight: bold;
    border-radius: 6px;
    cursor: pointer;
    margin-top: 16px;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(49, 130, 206, 0.3);
    transition: all 0.2s ease;
}

.register-btn:hover {
    background: linear-gradient(135deg, #1d805d, #1e936a);
    box-shadow: 0 6px 15px rgba(49, 130, 206, 0.4);
}

/* 6. 移动端自适应优化 */
@media screen and (max-width: 480px) {
    html, body {
        align-items: flex-start; /* 手机端顶部居中，防止键盘弹起遮挡 */
    }
    
    .wfform {
        padding: 5px;
    }
    
    .register {
        padding: 15px 16px;
        box-shadow: none; /* 移动端可去除外阴影，提升视觉契合度 */
        border-radius: 8px;
    }

    .yzm-box {
        margin-bottom: 10px;
    }

    .yzm-box input[type="text"],
    .yzm-box input[type="password"] {
        height: 38px;
        font-size: 16px;
    }

    .register-btn {
        height: 40px;
        line-height: 40px;
        font-size: 15px;
    }
}