/* 登录验证码样式（协议 v2：服务端渲染滑块拼图） */

.jyy-captcha-wrap {
    /* 突破 form 容器宽度（form ~380，挑战图 320 不需要太宽） */
    width: 480px;
    max-width: 92vw;
    margin: 16px auto;
    margin-left: 50%;
    transform: translateX(-50%);
    padding: 14px;
    background: #FAFAFA;
    border: 1px solid #DDD;
    border-radius: 6px;
    text-align: center;
    box-sizing: border-box;
}

.jyy-captcha-tip {
    color: #E65100;
    font-size: 15px;
    margin-bottom: 10px;
    font-weight: 600;
}

/* 挑战图舞台：背景 + 浮动拼图块 */
.jyy-captcha-stage {
    position: relative;
    width: 100%;
    aspect-ratio: 3 / 1;   /* 与挑战图 480×160 一致 */
    margin: 0 auto;
    background: #ddd;
    border: 1px solid #BBB;
    border-radius: 6px;
    overflow: hidden;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
}

.jyy-captcha-bg {
    display: block;
    width: 100%;
    height: 100%;
    image-rendering: crisp-edges;
    pointer-events: none;
}

.jyy-captcha-stickman {
    /* canvas overlay 覆盖背景图，程序绘制火柴人（走/跳/胜利/摔倒动画）
       内部分辨率 480x160 与挑战图一致；CSS 100% 拉伸到 stage 显示尺寸 */
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    image-rendering: crisp-edges;
}

/* 按住助跑按钮（v1 操作手感 + v2 安全协议） */
.jyy-captcha-runbtn {
    margin-top: 12px;
    padding: 14px 36px;
    width: 100%;
    max-width: 280px;
    font-size: 17px;
    font-weight: bold;
    letter-spacing: 1px;
    color: #FFFFFF;
    background: linear-gradient(180deg, #5A8DEE 0%, #3F6FCC 100%);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.25);
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    transition: background 0.15s, transform 0.05s;
}

.jyy-captcha-runbtn:hover {
    background: linear-gradient(180deg, #6FA5FF 0%, #4477DD 100%);
}

.jyy-captcha-runbtn.jyy-pressing {
    background: linear-gradient(180deg, #FFAA00 0%, #E69500 100%);
    transform: translateY(2px);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.jyy-captcha-runbtn.jyy-passed {
    background: linear-gradient(180deg, #56C271 0%, #3CA350 100%);
    cursor: default;
}

.jyy-captcha-runbtn:disabled {
    cursor: not-allowed;
    opacity: 0.7;
}

@media (max-width: 600px) {
    .jyy-captcha-wrap {
        position: relative;
        width: 92vw !important;
        max-width: 92vw !important;
        left: 50%;
        transform: translateX(-50%) !important;
        margin: 16px 0 !important;
        margin-left: auto !important;
    }
}

.jyy-captcha-status {
    margin-top: 10px;
    color: #444;
    font-size: 14px;
    min-height: 18px;
    font-weight: 500;
}

.jyy-captcha-error {
    margin-top: 8px;
    color: #C62828;
    font-size: 14px;
    min-height: 16px;
    font-weight: 500;
}
