.aj-captcha {
    width: 100%;
    max-width: 310px;
    margin: 12px auto 4px;
    user-select: none;
}

.gd-lr-header-login-content > li.aj-captcha-item {
    display: block;
    padding-left: 0;
    line-height: normal;
    border-bottom: 0;
}

.aj-captcha-modal {
    position: fixed;
    z-index: 10000;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(16, 28, 40, 0.48);
}

.aj-captcha-modal.is-open {
    display: flex;
}

.aj-captcha-modal__panel {
    position: relative;
    width: 350px;
    max-width: 100%;
    padding: 22px 20px 20px;
    border-radius: 6px;
    background: #fff;
    box-shadow: 0 8px 28px rgba(16, 35, 55, 0.24);
}

.aj-captcha-modal__title {
    margin: 0;
    color: #24384a;
    font-size: 17px;
    font-weight: 500;
    line-height: 24px;
}

.aj-captcha-modal__close {
    position: absolute;
    top: 12px;
    right: 14px;
    width: 30px;
    height: 30px;
    padding: 0;
    border: 0;
    color: #7b8a98;
    font-size: 24px;
    line-height: 28px;
    cursor: pointer;
    background: transparent;
}

.aj-captcha-modal__close:hover,
.aj-captcha-modal__close:focus {
    color: #107add;
    outline: none;
}

/* AJ-Captcha 官方底图为 310x155，保持 2:1 比例 */
.aj-captcha__image {
    position: relative;
    width: 100%;
    padding-top: 50%;
    overflow: hidden;
    border: 1px solid #d9e2ec;
    border-radius: 4px;
    background: #eef3f7;
}

.aj-captcha__background,
.aj-captcha__block {
    position: absolute;
    display: block;
    pointer-events: none;
}

.aj-captcha__background {
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* 拼图块与底图同高（155px），按比例缩放宽度 */
.aj-captcha__block {
    z-index: 2;
    top: 0;
    left: 0;
    height: 100%;
    width: auto;
    filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.35));
}

.aj-captcha__refresh {
    position: absolute;
    z-index: 3;
    top: 8px;
    right: 8px;
    width: 30px;
    height: 30px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    color: #fff;
    font-size: 20px;
    line-height: 30px;
    text-align: center;
    cursor: pointer;
    background: rgba(20, 35, 50, 0.68);
}

.aj-captcha__refresh:hover,
.aj-captcha__refresh:focus {
    background: rgba(16, 122, 221, 0.92);
    outline: none;
}

.aj-captcha__tips {
    position: absolute;
    z-index: 4;
    top: 50%;
    left: 50%;
    display: none;
    padding: 6px 14px;
    transform: translate(-50%, -50%);
    border-radius: 4px;
    color: #b83737;
    font-size: 13px;
    white-space: nowrap;
    background: rgba(255, 241, 241, 0.94);
}

.aj-captcha__track {
    position: relative;
    width: 100%;
    height: 40px;
    margin-top: 8px;
    overflow: hidden;
    border: 1px solid #d9e2ec;
    border-radius: 4px;
    background: #f4f7fa;
}

.aj-captcha__progress {
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: #dceeff;
}

.aj-captcha__text {
    position: absolute;
    top: 0;
    left: 42px;
    right: 0;
    height: 38px;
    color: #647586;
    font-size: 14px;
    line-height: 38px;
    text-align: center;
    white-space: nowrap;
}

.aj-captcha__handle {
    position: absolute;
    z-index: 2;
    top: -1px;
    left: -1px;
    width: 42px;
    height: 40px;
    padding: 0;
    border: 1px solid #aebdcc;
    border-radius: 4px;
    color: #107add;
    font-size: 22px;
    line-height: 38px;
    cursor: grab;
    background: #fff;
    box-shadow: 0 1px 3px rgba(30, 55, 75, 0.18);
}

.aj-captcha__handle:focus {
    outline: 2px solid #80bfff;
    outline-offset: -2px;
}

.aj-captcha.is-dragging .aj-captcha__handle {
    cursor: grabbing;
}

.aj-captcha.is-loading .aj-captcha__handle,
.aj-captcha.is-verifying .aj-captcha__handle,
.aj-captcha.is-success .aj-captcha__handle {
    cursor: default;
}

.aj-captcha.is-success .aj-captcha__track {
    border-color: #42a66b;
    background: #edf8f1;
}

.aj-captcha.is-success .aj-captcha__progress {
    width: 100% !important;
    background: #d9f2e3;
}

.aj-captcha.is-success .aj-captcha__handle {
    left: calc(100% - 41px) !important;
    border-color: #42a66b;
    color: #278550;
}

.aj-captcha.is-error .aj-captcha__track {
    border-color: #df6868;
    background: #fff1f1;
}

.aj-captcha.is-error .aj-captcha__text {
    color: #b83737;
}

@media (max-width: 480px) {
    .aj-captcha__text {
        font-size: 13px;
    }
}
