/* 弹窗遮罩和容器 */
.captcha-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
}

.captcha-modal.show {
    display: flex;
}

.captcha-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.captcha-modal-content {
    position: relative;
    background: white;
    border-radius: 8px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    animation: slideIn 0.3s;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.captcha-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #f0f0f0;
}

.captcha-modal-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 500;
    color: #333;
}

.captcha-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s;
}

.captcha-modal-close:hover {
    color: #333;
}

.captcha-modal-body {
    padding: 24px 20px;
}

/* 验证码图片 */
.captcha-modal-body .captcha-image-wrapper {
    position: relative;
    display: inline-block;
    margin-bottom: 16px;
}

.captcha-modal-body .captcha-image {
    width: 160px;
    height: 50px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    display: block;
    background: #f0f0f0;
}

.captcha-modal-body .captcha-refresh {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 20px;
    height: 20px;
    border: none;
    background: rgba(255, 255, 255, 0.9);
    color: #666;
    font-size: 14px;
    cursor: pointer;
    border-radius: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.captcha-modal-body .captcha-refresh:hover {
    background: rgba(255, 255, 255, 1);
    color: #1890ff;
}

/* 输入组 */
.captcha-modal-body .captcha-input-group {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.captcha-modal-body .captcha-input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    font-size: 14px;
    outline: none;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.captcha-modal-body .captcha-input:focus {
    border-color: #1890ff;
    box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);
}

.captcha-modal-body .captcha-verify-btn {
    padding: 8px 20px;
    background: #1890ff;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
}

.captcha-modal-body .captcha-verify-btn:hover {
    background: #40a9ff;
}

.captcha-modal-body .captcha-verify-btn:active {
    background: #096dd9;
}

/* 消息提示 */
.captcha-modal-body .captcha-message {
    font-size: 12px;
    min-height: 18px;
}

.captcha-modal-body .captcha-message.success {
    color: #52c41a;
}

.captcha-modal-body .captcha-message.error {
    color: #ff4d4f;
}
