/* 验证码保护系统基础样式 */
.captcha-protect-hidden {
    overflow: hidden;
    position: relative;
}

.captcha-protect-fade-mask {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 200px;
    background: linear-gradient(transparent, var(--captcha-bg-color, white));
    pointer-events: none;
}

.captcha-protect-show-all {
    height: auto !important;
}

.captcha-protect-show-all .captcha-protect-fade-mask {
    display: none;
}

#captcha-protect-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000; /* 提高z-index确保在最上层 */
}

#captcha-protect-modal {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #fff;
    padding: 10px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    z-index: 10001; /* 提高z-index确保在最上层 */
    width: 350px;
    text-align: center;
}

.captcha-protect-modal-content h2 {
    margin-top: 0;
    color: #333;
}

.captcha-protect-code-input {
    display: flex;
    justify-content: center;
    margin: 20px 0;
}

.captcha-protect-code-input input {
    width: 150px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    text-align: center;
}

.captcha-protect-code-input button {
    margin-left: 10px;
    padding: 10px 15px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.captcha-protect-code-input button:hover {
    background-color: #45a049;
}

.captcha-protect-qrcode {
    margin: 20px 0;
}

.captcha-protect-qrcode img {
    max-width: 200px;
    height: auto;
}

.captcha-protect-hint {
    color: #666;
    font-size: 14px;
    margin-top: 10px;
}

.captcha-protect-error {
    color: #f44336;
}

#captcha-protect-show-modal-btn {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999; /* 确保按钮在最上层 */
    padding: 10px 20px;
    background-color: #2196F3;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    white-space: nowrap;
}

#captcha-protect-show-modal-btn:hover {
    background-color: #0b7dda;
}

/* 确保遮罩和模态框在最上层 */
#captcha-protect-overlay,
#captcha-protect-modal {
    z-index: 10000;
}